[PATCH v4 00/27] rockchip: x86: Support building ROM files automatically with binman

Simon Glass sjg at chromium.org
Sun Jul 19 21:55:51 CEST 2020


Rockchip-based Chromebooks support booting from SPI flash. It is annoying
to have to manually build the SPI image when the SD image is built
automatically.

This feature is already available for x86 devices, so the existing
mechanism is reused. Briefly, this allows a BUILD_ROM environment variable
to be provided to indicate that any required binary blobs are present and
it is safe to build the ROM.

A new 'mkimage' type is added to binman to support building binaries
containing mkimagem using a binman definition to configure it. This avoids
Makefile/shell/Python code to do the same thing.

This series also migrates some rockchip boards to use binman to produce
their FIT as well, resulting in removing the fit_spl_optee.sh script.

Other archs and the rest of rockchip could be migrated too.

This series uses binman to produce a ROM image on two selected
Chromebooks, Bob (RK3399) and Jerry (RK3388).

Changes in v4:
- Add a new CONFIG_ROCKCHIP_SPI_IMAGE to control SPI-image generation
- Use CONFIG_ROCKCHIP_SPI_IMAGE to select the image
- Update for changes to arch/arm/mach-k3/config.mk
- Move the .itb output to a separate rockchip-optee.dtsi file
- Add a check for CONFIG_FIT before building the .its

Changes in v3:
- Add a comment about CONFIG_SPL_FRAMEWORK
- Drop rockchip changes which should not be in this patch
- Move in the rockchip changes mistakenly in the earlier x86 patch
- Drop use of rk322x.dtsi
- Add changes to rk3288-u-boot.dtsi instead
- Drop leftover debugging

Changes in v2:
- Drop 'rockchip' tag since this commit no-longer affects rockchip yet
- Drop ROM_NEEDS_BLOBS for baytrail since HAVE_FSP already selects it
- Add patches to partially migrate rockchip to use binman

Simon Glass (27):
  x86: Change how selection of ROMs works
  rockchip: Allow Bob to use SPI boot
  Makefile: Allow building .rom files for non-x86 boards
  rockchip: jerry: Add serial support
  rockchip: bob: Support SPI-flash booting
  rockchip: Enable building a SPI ROM image on jerry
  rockchip: Enable building a SPI ROM image on bob
  tegra: Drop the unused non-binman code
  tegra: Don't enable binman on ARMv8 SoCs
  Makefile: Rename ALL-y to INPUTS-y
  powerpc: mpc85xx: Only enable binman when it is needed
  x86: Makefile: Drop explicit targets built by binman
  x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM
  sunxi: Makefile: Drop explicit targets built by binman
  tegra: Makefile: Drop explicit targets built by binman
  mediatek: Makefile: Drop explicit targets built by binman
  Makefile: Move CONFIG_TOOLS_DEBUG check to later
  Makefile: Fix a long line in cmd_mkfitimage
  Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty
  Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR
  rockchip: Convert evb-rk3288 over to use binman
  rockchip: Convert evb-rk3229 over to use binman
  rockchip: Drop the fit_spl_optee.sh script
  x86: Move the fdtmap away from the binary blobs
  x86: chromebook_link64: Correct the image layout
  x86: chromebook_panther: Correct the image layout
  x86: chromebook_samus_tpl: Correct the image layout

 Kconfig                                   |  29 +++-
 Makefile                                  | 169 ++++++++++------------
 arch/Kconfig                              |   1 +
 arch/arm/config.mk                        |  10 +-
 arch/arm/dts/rk3288-u-boot.dtsi           |  25 ++++
 arch/arm/dts/rk3399-gru-u-boot.dtsi       |   4 +
 arch/arm/dts/rk3399-gru.dtsi              |   2 +-
 arch/arm/dts/rk3399-u-boot.dtsi           |  27 ++++
 arch/arm/dts/rockchip-optee.dtsi          |  64 ++++++++
 arch/arm/dts/rockchip-u-boot.dtsi         |  10 +-
 arch/arm/mach-at91/config.mk              |   2 +-
 arch/arm/mach-davinci/config.mk           |   2 +-
 arch/arm/mach-k3/config.mk                |  10 +-
 arch/arm/mach-keystone/config.mk          |   4 +-
 arch/arm/mach-omap2/config.mk             |  28 ++--
 arch/arm/mach-rmobile/Makefile            |   2 +-
 arch/arm/mach-rockchip/Kconfig            |   9 ++
 arch/arm/mach-rockchip/fit_spl_optee.sh   |  84 -----------
 arch/arm/mach-rockchip/rk3288/Kconfig     |   3 +
 arch/arm/mach-rockchip/rk3399/Kconfig     |   2 +
 arch/arm/mach-rockchip/spl.c              |   3 +-
 arch/arm/mach-stm32mp/config.mk           |   4 +-
 arch/arm/mach-tegra/Kconfig               |   2 +-
 arch/powerpc/Kconfig                      |   2 +-
 arch/x86/Kconfig                          |  11 +-
 arch/x86/cpu/quark/Kconfig                |   1 +
 arch/x86/dts/u-boot.dtsi                  |  10 +-
 board/BuR/brppt1/config.mk                |   4 +-
 board/BuR/brppt2/config.mk                |   4 +-
 board/BuR/brsmarc1/config.mk              |   6 +-
 board/imgtec/boston/config.mk             |   2 +-
 board/intel/edison/config.mk              |   2 +-
 configs/am335x_evm_defconfig              |   1 +
 configs/am335x_hs_evm_defconfig           |   1 +
 configs/am335x_hs_evm_uart_defconfig      |   1 +
 configs/am43xx_evm_defconfig              |   1 +
 configs/am43xx_evm_rtconly_defconfig      |   1 +
 configs/am43xx_evm_usbhost_boot_defconfig |   1 +
 configs/am43xx_hs_evm_defconfig           |   1 +
 configs/am57xx_evm_defconfig              |   1 +
 configs/am57xx_hs_evm_defconfig           |   1 +
 configs/am57xx_hs_evm_usb_defconfig       |   1 +
 configs/am65x_evm_a53_defconfig           |   1 +
 configs/am65x_evm_r5_defconfig            |   1 +
 configs/am65x_hs_evm_a53_defconfig        |   1 +
 configs/am65x_hs_evm_r5_defconfig         |   1 +
 configs/chromebook_bob_defconfig          |   4 +-
 configs/chromebook_jerry_defconfig        |   1 +
 configs/chromebook_link64_defconfig       |   2 +
 configs/chromebook_samus_tpl_defconfig    |   2 +-
 configs/chromebox_panther_defconfig       |   2 +
 configs/dh_imx6_defconfig                 |   1 +
 configs/display5_defconfig                |   1 +
 configs/display5_factory_defconfig        |   1 +
 configs/dra7xx_evm_defconfig              |   1 +
 configs/dra7xx_hs_evm_defconfig           |   1 +
 configs/dra7xx_hs_evm_usb_defconfig       |   1 +
 configs/evb-rk3229_defconfig              |   2 +-
 configs/evb-rk3288_defconfig              |   2 +-
 configs/imx6qdl_icore_mipi_defconfig      |   1 +
 configs/imx6qdl_icore_mmc_defconfig       |   1 +
 configs/imx6qdl_icore_rqs_defconfig       |   1 +
 configs/j721e_evm_a72_defconfig           |   1 +
 configs/j721e_evm_r5_defconfig            |   1 +
 configs/j721e_hs_evm_a72_defconfig        |   1 +
 configs/j721e_hs_evm_r5_defconfig         |   1 +
 configs/ls1046ardb_qspi_spl_defconfig     |   1 +
 configs/mccmon6_nor_defconfig             |   1 +
 configs/mccmon6_sd_defconfig              |   1 +
 configs/mx6sabreauto_defconfig            |   1 +
 configs/mx6sabresd_defconfig              |   1 +
 configs/pico-imx6_defconfig               |   1 +
 configs/qemu-x86_64_defconfig             |   2 +-
 configs/qemu-x86_defconfig                |   1 -
 configs/sandbox_spl_defconfig             |   1 +
 configs/socfpga_arria10_defconfig         |   1 +
 configs/stm32mp15_dhcom_basic_defconfig   |   1 +
 configs/stm32mp15_dhcor_basic_defconfig   |   1 +
 configs/wandboard_defconfig               |   1 +
 configs/xilinx_zynq_virt_defconfig        |   1 +
 scripts/Makefile.spl                      |  24 +--
 tools/binman/README                       |   2 +-
 82 files changed, 373 insertions(+), 248 deletions(-)
 create mode 100644 arch/arm/dts/rockchip-optee.dtsi
 delete mode 100755 arch/arm/mach-rockchip/fit_spl_optee.sh

-- 
2.28.0.rc0.105.gf9edc3c819-goog



More information about the U-Boot mailing list