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

classic Classic list List threaded Threaded
91 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

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

Simon Glass-3
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

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 01/27] x86: Change how selection of ROMs works

Simon Glass-3
Most x86 boards build a u-boot.rom which is programmed into SPI flash. But
this is not unique to x86. For example some rockchip boards can also boot
from SPI flash.

Also, at least on x86, binary blobs are sadly quite common. It is not
possible to build a functional image without them, and U-Boot needs to
know this at build time.

Introduce a new CONFIG_HAS_ROM option which selects whether u-boot.rom is
built and a new CONFIG_ROM_NEEDS_BLOBS option to indicate whether binary
blobs are also needed. If they are not needed, it is safe to build the ROM
always. Otherwise we still require the BUILD_ROM environment variable.

For now this affects only x86, but future patches will enable this for
rockchip too.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v2)

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

 Kconfig                    | 18 +++++++++++++++++-
 Makefile                   | 18 +++++++++++++-----
 arch/Kconfig               |  1 +
 arch/x86/Kconfig           |  4 ++++
 arch/x86/cpu/quark/Kconfig |  1 +
 5 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/Kconfig b/Kconfig
index 566ca72c92..b3b8532d2c 100644
--- a/Kconfig
+++ b/Kconfig
@@ -276,9 +276,25 @@ config PHYS_64BIT
   This can be used not only for 64bit SoCs, but also for
   large physical address extension on 32bit SoCs.
 
+config HAS_ROM
+ bool
+ select BINMAN
+ help
+  Enables building of a u-boot.rom target. This collects U-Boot and
+  any necessary binary blobs.
+
+config ROM_NEEDS_BLOBS
+ bool
+ depends on HAS_ROM
+ help
+  Enable this if building the u-boot.rom target needs binary blobs, and
+  so cannot be done normally. In this case, pass BUILD_ROM=1 to make
+  to tell U-Boot to build the ROM.
+
 config BUILD_ROM
  bool "Build U-Boot as BIOS replacement"
- depends on X86
+ depends on HAS_ROM
+ default y if !ROM_NEEDS_BLOBS
  help
   This option allows to build a ROM version of U-Boot.
   The build process generally requires several binary blobs
diff --git a/Makefile b/Makefile
index f55e40c590..df4e3d6c6b 100644
--- a/Makefile
+++ b/Makefile
@@ -921,9 +921,12 @@ ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf
 ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
 ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
 
+ifneq ($(CONFIG_HAS_ROM),)
 ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
-ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
+ALL-y += u-boot.rom
 endif
+endif
+
 ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
 ALL-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
 endif
@@ -1585,7 +1588,7 @@ endif
 # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
 # the middle. This is handled by binman based on an image description in the
 # board's device tree.
-ifneq ($(CONFIG_X86_RESET_VECTOR),)
+ifneq ($(CONFIG_HAS_ROM),)
 rom: u-boot.rom FORCE
 
 refcode.bin: $(srctree)/board/$(BOARDDIR)/refcode.bin FORCE
@@ -1595,11 +1598,12 @@ quiet_cmd_ldr = LD      $@
 cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
        $(filter-out FORCE,$^) -o $@
 
-u-boot.rom: u-boot-x86-start16.bin u-boot-x86-reset16.bin u-boot.bin \
+rom-deps := u-boot.bin
+ifdef CONFIG_X86
+rom-deps += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
  $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
  $(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) \
- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE
- $(call if_changed,binman)
+ $(if $(CONFIG_HAVE_REFCODE),refcode.bin)
 
 OBJCOPYFLAGS_u-boot-x86-start16.bin := -O binary -j .start16
 u-boot-x86-start16.bin: u-boot FORCE
@@ -1610,6 +1614,10 @@ u-boot-x86-reset16.bin: u-boot FORCE
  $(call if_changed,objcopy)
 endif
 
+u-boot.rom: $(rom-deps) FORCE
+ $(call if_changed,binman)
+endif
+
 ifneq ($(CONFIG_ARCH_SUNXI),)
 ifeq ($(CONFIG_ARM64),)
 u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
diff --git a/arch/Kconfig b/arch/Kconfig
index 9be02d1319..7f3cbe2ec8 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -160,6 +160,7 @@ config X86
  select TIMER
  select USE_PRIVATE_LIBGCC
  select X86_TSC_TIMER
+ imply HAS_ROM if X86_RESET_VECTOR
  imply BLK
  imply CMD_DM
  imply CMD_FPGA_LOADMK
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 27295ef384..f51b7c9f41 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -360,6 +360,8 @@ config HAVE_FSP
  bool "Add an Firmware Support Package binary"
  depends on !EFI
  select USE_HOB
+ select HAS_ROM
+ select ROM_NEEDS_BLOBS
  help
   Select this option to add an Firmware Support Package binary to
   the resulting U-Boot image. It is a binary blob which U-Boot uses
@@ -519,6 +521,8 @@ config ENABLE_MRC_CACHE
 
 config HAVE_MRC
  bool "Add a System Agent binary"
+ select HAS_ROM
+ select ROM_NEEDS_BLOBS
  depends on !HAVE_FSP
  help
   Select this option to add a System Agent binary to
diff --git a/arch/x86/cpu/quark/Kconfig b/arch/x86/cpu/quark/Kconfig
index 430cce184d..2fee38aed7 100644
--- a/arch/x86/cpu/quark/Kconfig
+++ b/arch/x86/cpu/quark/Kconfig
@@ -24,6 +24,7 @@ if INTEL_QUARK
 
 config HAVE_RMU
  bool "Add a Remote Management Unit (RMU) binary"
+ select ROM_NEEDS_BLOBS
  help
   Select this option to add a Remote Management Unit (RMU) binary
   to the resulting U-Boot image. It is a data block (up to 64K) of
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 02/27] rockchip: Allow Bob to use SPI boot

Simon Glass-3
In reply to this post by Simon Glass-3
Bob is a Chromebook and can boot from SPI flash. Add it to the condition
check for this.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 arch/arm/mach-rockchip/spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index cddf4fd3d5..f148d48b6a 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -54,7 +54,8 @@ u32 spl_boot_device(void)
 #if defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \
  defined(CONFIG_TARGET_CHROMEBIT_MICKEY) || \
  defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) || \
- defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY)
+ defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY) || \
+ defined(CONFIG_TARGET_CHROMEBOOK_BOB)
  return BOOT_DEVICE_SPI;
 #endif
  if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM))
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 03/27] Makefile: Allow building .rom files for non-x86 boards

Simon Glass-3
In reply to this post by Simon Glass-3
Some non-x86 devices can use SPI flash to boot and need to produce images
of a fixed size to program the flash.

Add a way to handle this for non-x86 boards.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v3)

Changes in v3:
- Add a comment about CONFIG_SPL_FRAMEWORK

 Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Makefile b/Makefile
index df4e3d6c6b..eb2fa50464 100644
--- a/Makefile
+++ b/Makefile
@@ -1612,6 +1612,20 @@ u-boot-x86-start16.bin: u-boot FORCE
 OBJCOPYFLAGS_u-boot-x86-reset16.bin := -O binary -j .resetvec
 u-boot-x86-reset16.bin: u-boot FORCE
  $(call if_changed,objcopy)
+
+else # !CONFIG_X86
+
+ifdef CONFIG_SPL
+rom-deps += spl/u-boot-spl.bin
+
+# We can rely on CONFIG_SPL_FRAMEWORK being set for boards that use binman
+rom-deps += u-boot.img
+endif
+
+ifdef CONFIG_TPL
+rom-deps += tpl/u-boot-tpl.bin
+endif
+
 endif
 
 u-boot.rom: $(rom-deps) FORCE
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 04/27] rockchip: jerry: Add serial support

Simon Glass-3
In reply to this post by Simon Glass-3
This option allows the serial console to work correctly. Add it.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 configs/chromebook_jerry_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index e32de90843..c410b844d5 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -85,6 +85,7 @@ CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
 CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_ROCKCHIP_SERIAL=y
 CONFIG_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_ROCKCHIP=y
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 05/27] rockchip: bob: Support SPI-flash booting

Simon Glass-3
In reply to this post by Simon Glass-3
Update the config for chromebook_bob to support booting from SPI flash.
The existing SPL size is too small since ATF is needed, so double it.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 configs/chromebook_bob_defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configs/chromebook_bob_defconfig b/configs/chromebook_bob_defconfig
index dad96d2ad1..4ffc33398a 100644
--- a/configs/chromebook_bob_defconfig
+++ b/configs/chromebook_bob_defconfig
@@ -3,7 +3,7 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_SYS_TEXT_BASE=0x00200000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_ENV_OFFSET=0x3F8000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
 CONFIG_SPL_TEXT_BASE=0xff8c2000
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_BOOT_MODE_REG=0
@@ -40,6 +40,7 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
@@ -53,6 +54,7 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_SF_DEFAULT_BUS=1
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_DM_ETH=y
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 06/27] rockchip: Enable building a SPI ROM image on jerry

Simon Glass-3
In reply to this post by Simon Glass-3
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
produces a ROM for jerry.

Change the binman image definition to support multiple images, since it
may be used to build both u-boot-rockchip.bin and u-boot.rom

Signed-off-by: Simon Glass <[hidden email]>
---

Changes in v4:
- Add a new CONFIG_ROCKCHIP_SPI_IMAGE to control SPI-image generation

 arch/arm/dts/rk3288-u-boot.dtsi       | 24 ++++++++++++++++++++++++
 arch/arm/dts/rockchip-u-boot.dtsi     |  8 +++++++-
 arch/arm/mach-rockchip/Kconfig        |  9 +++++++++
 arch/arm/mach-rockchip/rk3288/Kconfig |  2 ++
 4 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/rk3288-u-boot.dtsi b/arch/arm/dts/rk3288-u-boot.dtsi
index 51b6e018bd..c87f00141f 100644
--- a/arch/arm/dts/rk3288-u-boot.dtsi
+++ b/arch/arm/dts/rk3288-u-boot.dtsi
@@ -12,6 +12,30 @@
  };
 };
 
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ rom {
+ filename = "u-boot.rom";
+ size = <0x400000>;
+ pad-byte = <0xff>;
+
+ mkimage {
+ args = "-n rk3288 -T rkspi";
+ u-boot-spl {
+ };
+ };
+ u-boot-img {
+ offset = <0x20000>;
+ };
+ u-boot {
+ offset = <0x300000>;
+ };
+ fdtmap {
+ };
+ };
+};
+#endif
+
 &dmc {
  u-boot,dm-pre-reloc;
 };
diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index a2559e2db0..0451db735e 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -6,7 +6,13 @@
 #include <config.h>
 
 / {
- binman {
+ binman: binman {
+ multiple-images;
+ };
+};
+
+&binman {
+ simple-bin {
  filename = "u-boot-rockchip.bin";
  pad-byte = <0xff>;
 
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index e2b6326584..dd1eec9f18 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -366,6 +366,15 @@ config TPL_ROCKCHIP_EARLYRETURN_TO_BROM
 config SPL_MMC_SUPPORT
  default y if !SPL_ROCKCHIP_BACK_TO_BROM
 
+config ROCKCHIP_SPI_IMAGE
+ bool "Build a SPI image for rockchip"
+ depends on HAS_ROM
+ help
+  Some Rockchip SoCs support booting from SPI flash. Enable this
+  option to produce a 4MB SPI-flash image (called u-boot.rom)
+  containing U-Boot. The image is built by binman. U-Boot sits near
+  the start of the image.
+
 source "arch/arm/mach-rockchip/px30/Kconfig"
 source "arch/arm/mach-rockchip/rk3036/Kconfig"
 source "arch/arm/mach-rockchip/rk3128/Kconfig"
diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig
index afb62fca78..bb715e9d0e 100644
--- a/arch/arm/mach-rockchip/rk3288/Kconfig
+++ b/arch/arm/mach-rockchip/rk3288/Kconfig
@@ -5,7 +5,9 @@ choice
 
 config TARGET_CHROMEBOOK_JERRY
  bool "Google/Rockchip Veyron-Jerry Chromebook"
+ select HAS_ROM
  select BOARD_LATE_INIT
+ select ROCKCHIP_SPI_IMAGE
  help
   Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports,
   HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 07/27] rockchip: Enable building a SPI ROM image on bob

Simon Glass-3
In reply to this post by Simon Glass-3
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
produces a ROM for bob.

Signed-off-by: Simon Glass <[hidden email]>
---

Changes in v4:
- Use CONFIG_ROCKCHIP_SPI_IMAGE to select the image

 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/mach-rockchip/rk3399/Kconfig |  2 ++
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
index 7bddc3acdb..390ac2bb5a 100644
--- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
@@ -4,3 +4,7 @@
  */
 
 #include "rk3399-u-boot.dtsi"
+
+&spi_flash {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/rk3399-gru.dtsi b/arch/arm/dts/rk3399-gru.dtsi
index 7ac88392f2..f9c5bb607b 100644
--- a/arch/arm/dts/rk3399-gru.dtsi
+++ b/arch/arm/dts/rk3399-gru.dtsi
@@ -537,7 +537,7 @@ ap_i2c_audio: &i2c8 {
  pinctrl-names = "default", "sleep";
  pinctrl-1 = <&spi1_sleep>;
 
- spiflash@0 {
+ spi_flash: spiflash@0 {
  compatible = "jedec,spi-nor";
  reg = <0>;
 
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index 8237782408..ecd230c720 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -4,11 +4,14 @@
  */
 #define USB_CLASS_HUB 9
 
+#include "rockchip-u-boot.dtsi"
+
 / {
  aliases {
  mmc0 = &sdhci;
  mmc1 = &sdmmc;
  pci0 = &pcie0;
+ spi1 = &spi1;
  };
 
  cic: syscon@ff620000 {
@@ -57,6 +60,30 @@
 
 };
 
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ rom {
+ filename = "u-boot.rom";
+ size = <0x400000>;
+ pad-byte = <0xff>;
+
+ mkimage {
+ args = "-n rk3399 -T rkspi";
+ u-boot-spl {
+ };
+ };
+ u-boot-img {
+ offset = <0x40000>;
+ };
+ u-boot {
+ offset = <0x300000>;
+ };
+ fdtmap {
+ };
+ };
+};
+#endif
+
 &cru {
  u-boot,dm-pre-reloc;
 };
diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig
index 254b9c5b4d..17628f9171 100644
--- a/arch/arm/mach-rockchip/rk3399/Kconfig
+++ b/arch/arm/mach-rockchip/rk3399/Kconfig
@@ -5,6 +5,8 @@ choice
 
 config TARGET_CHROMEBOOK_BOB
  bool "Asus Flip C101PA Chromebook (RK3399)"
+ select HAS_ROM
+ select ROCKCHIP_SPI_IMAGE
  help
   Bob is a small RK3299-based device similar in apperance to Minnie.
   It has two USB 3.0 type-C ports, 4GB of SDRAM, WiFi and a 10.1",
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 08/27] tegra: Drop the unused non-binman code

Simon Glass-3
In reply to this post by Simon Glass-3
This has been in the Makefile long enough to ensure migration is complete.
Drop it.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 Makefile | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index eb2fa50464..5b07bec3be 100644
--- a/Makefile
+++ b/Makefile
@@ -1646,23 +1646,9 @@ u-boot-x86-with-spl.bin: spl/u-boot-spl.bin u-boot.bin FORCE
  $(call if_changed,binman)
 
 ifneq ($(CONFIG_ARCH_TEGRA),)
-ifneq ($(CONFIG_BINMAN),)
 # Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
-%-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: \
- spl/%-spl %.bin FORCE
+%-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: spl/%-spl %.bin FORCE
  $(call if_changed,binman)
-else
-OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
-u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot-nodtb.bin FORCE
- $(call if_changed,pad_cat)
-
-OBJCOPYFLAGS_u-boot-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
-u-boot-tegra.bin: spl/u-boot-spl u-boot.bin FORCE
- $(call if_changed,pad_cat)
-
-u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE
- $(call if_changed,copy)
-endif  # binman
 endif
 
 OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 09/27] tegra: Don't enable binman on ARMv8 SoCs

Simon Glass-3
In reply to this post by Simon Glass-3
At present only the ARMv7 tegra SoCs actually use binman to create an
image. Change the config to reflect this, since otherwise running binman
will produce an error.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 arch/arm/mach-tegra/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 15e7684028..a397748b72 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -41,7 +41,6 @@ config TEGRA_PMC_SECURE
 
 config TEGRA_COMMON
  bool "Tegra common options"
- select BINMAN
  select BOARD_EARLY_INIT_F
  select CLK
  select DM
@@ -69,6 +68,7 @@ config TEGRA_NO_BPMP
 
 config TEGRA_ARMV7_COMMON
  bool "Tegra 32-bit common options"
+ select BINMAN
  select CPU_V7A
  select SPL
  select SPL_BOARD_INIT if SPL
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 10/27] Makefile: Rename ALL-y to INPUTS-y

Simon Glass-3
In reply to this post by Simon Glass-3
When binman is in use, most of the targets built by the Makefile are
inputs to binman. We then need a final rule to run binman to produce the
final outputs.

Rename the variable to indicate this, and add a new 'inputs' target.

Signed-off-by: Simon Glass <[hidden email]>
Reviewed-by: Bin Meng <[hidden email]>
---

Changes in v4:
- Update for changes to arch/arm/mach-k3/config.mk

 Makefile                         | 60 +++++++++++++++++---------------
 arch/arm/config.mk               | 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-stm32mp/config.mk  |  4 +--
 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 +-
 scripts/Makefile.spl             | 24 ++++++-------
 tools/binman/README              |  2 +-
 16 files changed, 85 insertions(+), 81 deletions(-)

diff --git a/Makefile b/Makefile
index 5b07bec3be..0147d9d49b 100644
--- a/Makefile
+++ b/Makefile
@@ -885,80 +885,80 @@ quiet_cmd_static_rela =
 cmd_static_rela =
 endif
 
-# Always append ALL so that arch config.mk's can add custom ones
-ALL-y += u-boot.srec u-boot.bin u-boot.sym System.map binary_size_check
+# Always append INPUTS so that arch config.mk's can add custom ones
+INPUTS-y += u-boot.srec u-boot.bin u-boot.sym System.map binary_size_check
 
-ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
+INPUTS-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
 ifeq ($(CONFIG_SPL_FSL_PBL),y)
-ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin
+INPUTS-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin
 else
 ifneq ($(CONFIG_NXP_ESBC), y)
 # For Secure Boot The Image needs to be signed and Header must also
 # be included. So The image has to be built explicitly
-ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
+INPUTS-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
 endif
 endif
-ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin
+INPUTS-$(CONFIG_SPL) += spl/u-boot-spl.bin
 ifeq ($(CONFIG_MX6)$(CONFIG_IMX_HAB), yy)
-ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img
+INPUTS-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img
 else
 ifeq ($(CONFIG_MX7)$(CONFIG_IMX_HAB), yy)
-ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img
+INPUTS-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img
 else
-ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
+INPUTS-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
 endif
 endif
-ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
-ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb
+INPUTS-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
+INPUTS-$(CONFIG_OF_SEPARATE) += u-boot.dtb
 ifeq ($(CONFIG_SPL_FRAMEWORK),y)
-ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
+INPUTS-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
 endif
-ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
+INPUTS-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
 ifneq ($(CONFIG_SPL_TARGET),)
-ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
+INPUTS-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
 endif
-ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf
-ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
-ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
+INPUTS-$(CONFIG_REMAKE_ELF) += u-boot.elf
+INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi
+INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi
 
 ifneq ($(CONFIG_HAS_ROM),)
 ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
-ALL-y += u-boot.rom
+INPUTS-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
 endif
 endif
 
 ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
-ALL-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
+INPUTS-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
 endif
 
 # Build a combined spl + u-boot image for sunxi
 ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
-ALL-y += u-boot-sunxi-with-spl.bin
+INPUTS-y += u-boot-sunxi-with-spl.bin
 endif
 
 # enable combined SPL/u-boot/dtb rules for tegra
 ifeq ($(CONFIG_ARCH_TEGRA)$(CONFIG_SPL),yy)
-ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
-ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin
+INPUTS-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
+INPUTS-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin
 endif
 
-ALL-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
+INPUTS-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
 
 # Add optional build target if defined in board/cpu/soc headers
 ifneq ($(CONFIG_BUILD_TARGET),)
-ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
+INPUTS-y += $(CONFIG_BUILD_TARGET:"%"=%)
 endif
 
 ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
-ALL-y += init_sp_bss_offset_check
+INPUTS-y += init_sp_bss_offset_check
 endif
 
 ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
-ALL-y += u-boot-with-dtb.bin
+INPUTS-y += u-boot-with-dtb.bin
 endif
 
 ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy)
-ALL-y += u-boot-rockchip.bin
+INPUTS-y += u-boot-rockchip.bin
 endif
 
 LDFLAGS_u-boot += $(LDFLAGS_FINAL)
@@ -1015,7 +1015,11 @@ quiet_cmd_cfgcheck = CFGCHK  $2
 cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
  $(srctree)/scripts/config_whitelist.txt $(srctree)
 
-all: $(ALL-y)
+PHONY += inputs
+inputs: $(INPUTS-y)
+
+all: inputs
+
 ifeq ($(CONFIG_DEPRECATED),y)
  $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
 ifeq ($(CONFIG_SPI),y)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index f25603109e..4153f7e371 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -122,7 +122,7 @@ endif
 
 ifneq ($(CONFIG_SPL_BUILD),y)
 # Check that only R_ARM_RELATIVE relocations are generated.
-ALL-y += checkarmreloc
+INPUTS-y += checkarmreloc
 # The movt / movw can hardcode 16 bit parts of the addresses in the
 # instruction. Relocation is not supported for that case, so disable
 # such usage by requiring word relocations.
@@ -154,17 +154,17 @@ endif
 ifneq ($(CONFIG_IMX_CONFIG),)
 ifdef CONFIG_SPL
 ifndef CONFIG_SPL_BUILD
-ALL-y += SPL
+INPUTS-y += SPL
 endif
 else
 ifeq ($(CONFIG_OF_SEPARATE),y)
-ALL-y += u-boot-dtb.imx
+INPUTS-y += u-boot-dtb.imx
 else
-ALL-y += u-boot.imx
+INPUTS-y += u-boot.imx
 endif
 endif
 ifneq ($(CONFIG_VF610),)
-ALL-y += u-boot.vyb
+INPUTS-y += u-boot.vyb
 endif
 endif
 
diff --git a/arch/arm/mach-at91/config.mk b/arch/arm/mach-at91/config.mk
index 9a023efb19..5426394651 100644
--- a/arch/arm/mach-at91/config.mk
+++ b/arch/arm/mach-at91/config.mk
@@ -4,6 +4,6 @@ endif
 
 ifeq ($(CONFIG_CPU_V7A),y)
 ifndef CONFIG_SPL_BUILD
-ALL-y += u-boot.img
+INPUTS-y += u-boot.img
 endif
 endif
diff --git a/arch/arm/mach-davinci/config.mk b/arch/arm/mach-davinci/config.mk
index 5a33982e2d..4674cae43b 100644
--- a/arch/arm/mach-davinci/config.mk
+++ b/arch/arm/mach-davinci/config.mk
@@ -2,5 +2,5 @@
 #
 # Copyright (C) 2012, Texas Instruments, Incorporated - http://www.ti.com/
 ifndef CONFIG_SPL_BUILD
-ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.ais
+INPUTS-$(CONFIG_SPL_FRAMEWORK) += u-boot.ais
 endif
diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk
index f7afef610c..c9538718e7 100644
--- a/arch/arm/mach-k3/config.mk
+++ b/arch/arm/mach-k3/config.mk
@@ -44,7 +44,7 @@ tiboot3.bin: image_check FORCE
  $(srctree)/tools/k3_gen_x509_cert.sh -c 16 -b $(obj)/u-boot-spl.bin \
  -o $@ -l $(CONFIG_SPL_TEXT_BASE) -k $(KEY)
 
-ALL-y += tiboot3.bin
+INPUTS-y += tiboot3.bin
 endif
 
 ifdef CONFIG_ARM64
@@ -52,10 +52,10 @@ ifdef CONFIG_ARM64
 ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
 SPL_ITS := u-boot-spl-k3_HS.its
 $(SPL_ITS): export IS_HS=1
-ALL-y += tispl.bin_HS
+INPUTS-y += tispl.bin_HS
 else
 SPL_ITS := u-boot-spl-k3.its
-ALL-y += tispl.bin
+INPUTS-y += tispl.bin
 endif
 
 quiet_cmd_k3_mkits = MKITS   $@
@@ -70,9 +70,9 @@ endif
 else
 
 ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ALL-y += u-boot.img_HS
+INPUTS-y += u-boot.img_HS
 else
-ALL-y += u-boot.img
+INPUTS-y += u-boot.img
 endif
 endif
 
diff --git a/arch/arm/mach-keystone/config.mk b/arch/arm/mach-keystone/config.mk
index 5806f8f5d1..5a16891f23 100644
--- a/arch/arm/mach-keystone/config.mk
+++ b/arch/arm/mach-keystone/config.mk
@@ -9,9 +9,9 @@ include  $(srctree)/arch/arm/mach-omap2/config_secure.mk
 
 ifndef CONFIG_SPL_BUILD
 ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ALL-y += u-boot_HS_MLO
+INPUTS-y += u-boot_HS_MLO
 else
-ALL-y += MLO
+INPUTS-y += MLO
 endif
 endif
 
diff --git a/arch/arm/mach-omap2/config.mk b/arch/arm/mach-omap2/config.mk
index af455366ed..4f0d2598fa 100644
--- a/arch/arm/mach-omap2/config.mk
+++ b/arch/arm/mach-omap2/config.mk
@@ -18,9 +18,9 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) # Refer to README.ti-secure for more info
 # For booting spl from QSPI or NOR use
 # u-boot-spl_HS_X-LOADER
 ifeq ($(CONFIG_OMAP54XX),y)
-ALL-y += u-boot-spl_HS_MLO
-ALL-y += u-boot-spl_HS_ULO
-ALL-y += u-boot-spl_HS_X-LOADER
+INPUTS-y += u-boot-spl_HS_MLO
+INPUTS-y += u-boot-spl_HS_ULO
+INPUTS-y += u-boot-spl_HS_X-LOADER
 endif
 # On AM43XX:
 #
@@ -30,8 +30,8 @@ endif
 # For booting spl from all other media use
 # u-boot-spl_HS_ISSW
 ifeq ($(CONFIG_AM43XX),y)
-ALL-y += u-boot-spl_HS_SPI_X-LOADER
-ALL-y += u-boot-spl_HS_ISSW
+INPUTS-y += u-boot-spl_HS_SPI_X-LOADER
+INPUTS-y += u-boot-spl_HS_ISSW
 endif
 # On AM33XX:
 #
@@ -47,21 +47,21 @@ endif
 # For booting spl over UART, USB, or Ethernet use
 # u-boot-spl_HS_2ND
 ifeq ($(CONFIG_AM33XX),y)
-ALL-y += u-boot-spl_HS_SPI_X-LOADER
-ALL-y += u-boot-spl_HS_X-LOADER
-ALL-y += u-boot-spl_HS_MLO
-ALL-y += u-boot-spl_HS_2ND
+INPUTS-y += u-boot-spl_HS_SPI_X-LOADER
+INPUTS-y += u-boot-spl_HS_X-LOADER
+INPUTS-y += u-boot-spl_HS_MLO
+INPUTS-y += u-boot-spl_HS_2ND
 endif
 else
-ALL-y += MLO
+INPUTS-y += MLO
 ifeq ($(CONFIG_AM33XX),y)
-ALL-y += MLO.byteswap
+INPUTS-y += MLO.byteswap
 endif
 endif
 else
 ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ALL-$(CONFIG_QSPI_BOOT) += u-boot_HS_XIP_X-LOADER
-ALL-$(CONFIG_SPL_LOAD_FIT) += u-boot_HS.img
+INPUTS-$(CONFIG_QSPI_BOOT) += u-boot_HS_XIP_X-LOADER
+INPUTS-$(CONFIG_SPL_LOAD_FIT) += u-boot_HS.img
 endif
-ALL-y += u-boot.img
+INPUTS-y += u-boot.img
 endif
diff --git a/arch/arm/mach-rmobile/Makefile b/arch/arm/mach-rmobile/Makefile
index a3fdcc3bc0..3206bce722 100644
--- a/arch/arm/mach-rmobile/Makefile
+++ b/arch/arm/mach-rmobile/Makefile
@@ -84,5 +84,5 @@ spl/u-boot-spl.scif: spl/u-boot-spl.srec spl/u-boot-spl.bin
 
 # if srec_cat is present build u-boot-spl.scif by default
 has_srec_cat = $(call try-run,srec_cat -VERSion,y,n)
-ALL-$(has_srec_cat) += u-boot-spl.scif
+INPUTS-$(has_srec_cat) += u-boot-spl.scif
 CLEAN_FILES += u-boot-spl.scif
diff --git a/arch/arm/mach-stm32mp/config.mk b/arch/arm/mach-stm32mp/config.mk
index 403af2a225..c30bf482f7 100644
--- a/arch/arm/mach-stm32mp/config.mk
+++ b/arch/arm/mach-stm32mp/config.mk
@@ -4,10 +4,10 @@
 #
 
 ifndef CONFIG_SPL
-ALL-y += u-boot.stm32
+INPUTS-y += u-boot.stm32
 else
 ifdef CONFIG_SPL_BUILD
-ALL-y += u-boot-spl.stm32
+INPUTS-y += u-boot-spl.stm32
 endif
 endif
 
diff --git a/board/BuR/brppt1/config.mk b/board/BuR/brppt1/config.mk
index b11b544c37..6853135f83 100644
--- a/board/BuR/brppt1/config.mk
+++ b/board/BuR/brppt1/config.mk
@@ -25,8 +25,8 @@ cmd_prodzip = \
  zip -9 -r $@ misc/* >/dev/null $<
 
 ifeq ($(hw-platform-y),brppt1-spi)
-ALL-y += $(hw-platform-y)_prog.bin
-ALL-y += $(hw-platform-y)_prod.zip
+INPUTS-y += $(hw-platform-y)_prog.bin
+INPUTS-y += $(hw-platform-y)_prod.zip
 endif
 
 $(hw-platform-y)_prog.bin: u-boot-dtb.img spl/u-boot-spl.bin
diff --git a/board/BuR/brppt2/config.mk b/board/BuR/brppt2/config.mk
index fa973db762..0d1638a97a 100644
--- a/board/BuR/brppt2/config.mk
+++ b/board/BuR/brppt2/config.mk
@@ -24,8 +24,8 @@ cmd_prodzip = \
 
 ifeq ($(hw-platform-y),brppt2)
 ifneq ($(CONFIG_SPL_BUILD),y)
-ALL-y += $(hw-platform-y)_prog.bin
-ALL-y += $(hw-platform-y)_prod.zip
+INPUTS-y += $(hw-platform-y)_prog.bin
+INPUTS-y += $(hw-platform-y)_prod.zip
 endif
 endif
 
diff --git a/board/BuR/brsmarc1/config.mk b/board/BuR/brsmarc1/config.mk
index 0692988507..1de971876c 100644
--- a/board/BuR/brsmarc1/config.mk
+++ b/board/BuR/brsmarc1/config.mk
@@ -23,11 +23,11 @@ cmd_prodzip = \
  cp u-boot-dtb.img misc/ && \
  zip -9 -r $@ misc/* >/dev/null $<
 
-ALL-y += $(hw-platform-y)_prog.bin
-ALL-y += $(hw-platform-y)_prod.zip
+INPUTS-y += $(hw-platform-y)_prog.bin
+INPUTS-y += $(hw-platform-y)_prod.zip
 
 $(hw-platform-y)_prog.bin: u-boot-dtb.img spl/u-boot-spl.bin
  $(call if_changed,prodbin)
 
 $(hw-platform-y)_prod.zip: $(hw-platform-y)_prog.bin
- $(call if_changed,prodzip)
\ No newline at end of file
+ $(call if_changed,prodzip)
diff --git a/board/imgtec/boston/config.mk b/board/imgtec/boston/config.mk
index 8cfc9c6894..c1e242f108 100644
--- a/board/imgtec/boston/config.mk
+++ b/board/imgtec/boston/config.mk
@@ -11,5 +11,5 @@ u-boot.mcs: u-boot.bin
 
 # if srec_cat is present build u-boot.mcs by default
 has_srec_cat = $(call try-run,srec_cat -VERSion,y,n)
-ALL-$(has_srec_cat) += u-boot.mcs
+INPUTS-$(has_srec_cat) += u-boot.mcs
 CLEAN_FILES += u-boot.mcs
diff --git a/board/intel/edison/config.mk b/board/intel/edison/config.mk
index fdcbbdf3b1..8c6087e290 100644
--- a/board/intel/edison/config.mk
+++ b/board/intel/edison/config.mk
@@ -10,7 +10,7 @@ cmd_mkalign_eds = \
  dd if=$^ of=$@ bs=4k seek=1 2>/dev/null && \
  mv $@ $^
 
-ALL-y += u-boot-align.bin
+INPUTS-y += u-boot-align.bin
 u-boot-align.bin: u-boot.bin
  $(call if_changed,mkalign_eds)
 
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index e6d56a1286..d528c994ff 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -213,42 +213,42 @@ spl/boot.bin: $(obj)/$(SPL_BIN)-align.bin FORCE
  $(call if_changed,mkimage)
 endif
 
-ALL-y += $(obj)/$(SPL_BIN).bin
+INPUTS-y += $(obj)/$(SPL_BIN).bin
 
 ifdef CONFIG_SAMSUNG
-ALL-y += $(obj)/$(BOARD)-spl.bin
+INPUTS-y += $(obj)/$(BOARD)-spl.bin
 endif
 
 ifneq ($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA10),)
-ALL-y += $(obj)/$(SPL_BIN).sfp
+INPUTS-y += $(obj)/$(SPL_BIN).sfp
 endif
 
 ifdef CONFIG_ARCH_SUNXI
-ALL-y += $(obj)/sunxi-spl.bin
+INPUTS-y += $(obj)/sunxi-spl.bin
 
 ifdef CONFIG_NAND_SUNXI
-ALL-y += $(obj)/sunxi-spl-with-ecc.bin
+INPUTS-y += $(obj)/sunxi-spl-with-ecc.bin
 endif
 endif
 
 ifeq ($(CONFIG_SYS_SOC),"at91")
-ALL-y += $(obj)/boot.bin
+INPUTS-y += $(obj)/boot.bin
 endif
 
 ifdef CONFIG_TPL_BUILD
-ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-tpl.bin \
+INPUTS-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-tpl.bin \
  $(obj)/u-boot-x86-reset16-tpl.bin
 else
-ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-spl.bin \
+INPUTS-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-spl.bin \
  $(obj)/u-boot-x86-reset16-spl.bin
 endif
 
-ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin
-ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin
+INPUTS-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin
+INPUTS-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin
 
-ALL-$(CONFIG_ARCH_MEDIATEK) += $(obj)/u-boot-spl-mtk.bin
+INPUTS-$(CONFIG_ARCH_MEDIATEK) += $(obj)/u-boot-spl-mtk.bin
 
-all: $(ALL-y)
+all: $(INPUTS-y)
 
 quiet_cmd_cat = CAT     $@
 cmd_cat = cat $(filter-out $(PHONY), $^) > $@
diff --git a/tools/binman/README b/tools/binman/README
index a6a3ee48aa..37ee3fc2d3 100644
--- a/tools/binman/README
+++ b/tools/binman/README
@@ -220,7 +220,7 @@ u-boot-<your_suffix>.bin: <input_file_1> <input_file_2> checkbinman FORCE
 endif
 
 This assumes that u-boot-<your_suffix>.bin is a target, and is the final file
-that you need to produce. You can make it a target by adding it to ALL-y
+that you need to produce. You can make it a target by adding it to INPUTS-y
 either in the main Makefile or in a config.mk file in your arch subdirectory.
 
 Once binman is executed it will pick up its instructions from a device-tree
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 11/27] powerpc: mpc85xx: Only enable binman when it is needed

Simon Glass-3
In reply to this post by Simon Glass-3
Quite a few boards using this SoC family don't use binman, yet
CONFIG_BINMAN is enabled for all of them. But the option should only be
enabled if we expect binman to produce an image. Calling binman when the
device tree is missing, etc. will cause failer.

Add a condition so that CONFIG_BINMAN is only enabled as needed.

Signed-off-by: Simon Glass <[hidden email]>
Reviewed-by: Bin Meng <[hidden email]>
---

(no changes since v1)

 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index c2c577f60c..6a2e88fed2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -20,7 +20,7 @@ config MPC85xx
  select CREATE_ARCH_SYMLINK
  select SYS_FSL_DDR
  select SYS_FSL_DDR_BE
- select BINMAN
+ select BINMAN if OF_SEPARATE
  imply CMD_HASH
  imply CMD_IRQ
  imply USB_EHCI_HCD if USB
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman

Simon Glass-3
In reply to this post by Simon Glass-3
On x86 various files that need to be created by binman. It does not make
sense to enumerate these in the Makefile. They are described in the
configuration (devicetree) for each board and we can simply run binman
(always) to generate them.

Update the Makefile to have a separate, final step which runs binman,
once all input dependencies are present.

This avoid sprinkling the Makefile with arch-specific code.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v3)

Changes in v3:
- Drop rockchip changes which should not be in this patch

 Makefile | 63 +++++++++++++-------------------------------------------
 1 file changed, 14 insertions(+), 49 deletions(-)

diff --git a/Makefile b/Makefile
index 0147d9d49b..b4b5b10813 100644
--- a/Makefile
+++ b/Makefile
@@ -921,16 +921,6 @@ INPUTS-$(CONFIG_REMAKE_ELF) += u-boot.elf
 INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi
 INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi
 
-ifneq ($(CONFIG_HAS_ROM),)
-ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
-INPUTS-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
-endif
-endif
-
-ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
-INPUTS-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
-endif
-
 # Build a combined spl + u-boot image for sunxi
 ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
 INPUTS-y += u-boot-sunxi-with-spl.bin
@@ -961,6 +951,10 @@ ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy)
 INPUTS-y += u-boot-rockchip.bin
 endif
 
+INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
+ $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
+ $(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin)
+
 LDFLAGS_u-boot += $(LDFLAGS_FINAL)
 
 # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
@@ -1018,7 +1012,14 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
 PHONY += inputs
 inputs: $(INPUTS-y)
 
-all: inputs
+all: .binman_stamp inputs
+ifeq ($(CONFIG_BINMAN),y)
+ $(call if_changed,binman)
+endif
+
+# Timestamp file to make sure that binman always runs
+.binman_stamp: FORCE
+ @touch $@
 
 ifeq ($(CONFIG_DEPRECATED),y)
  $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
@@ -1311,7 +1312,7 @@ quiet_cmd_binman = BINMAN  $@
 cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                 --toolpath $(objtree)/tools \
  $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
- build -u -d u-boot.dtb -O . -m \
+ build -u -d u-boot.dtb -O . -m --allow-missing \
  -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
  $(BINMAN_$(@F))
 
@@ -1588,27 +1589,11 @@ u-boot-br.bin: u-boot FORCE
 endif
 endif
 
-# x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including
-# reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
-# the middle. This is handled by binman based on an image description in the
-# board's device tree.
-ifneq ($(CONFIG_HAS_ROM),)
-rom: u-boot.rom FORCE
-
-refcode.bin: $(srctree)/board/$(BOARDDIR)/refcode.bin FORCE
- $(call if_changed,copy)
-
 quiet_cmd_ldr = LD      $@
 cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
        $(filter-out FORCE,$^) -o $@
 
-rom-deps := u-boot.bin
 ifdef CONFIG_X86
-rom-deps += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
- $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
- $(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) \
- $(if $(CONFIG_HAVE_REFCODE),refcode.bin)
-
 OBJCOPYFLAGS_u-boot-x86-start16.bin := -O binary -j .start16
 u-boot-x86-start16.bin: u-boot FORCE
  $(call if_changed,objcopy)
@@ -1617,24 +1602,7 @@ OBJCOPYFLAGS_u-boot-x86-reset16.bin := -O binary -j .resetvec
 u-boot-x86-reset16.bin: u-boot FORCE
  $(call if_changed,objcopy)
 
-else # !CONFIG_X86
-
-ifdef CONFIG_SPL
-rom-deps += spl/u-boot-spl.bin
-
-# We can rely on CONFIG_SPL_FRAMEWORK being set for boards that use binman
-rom-deps += u-boot.img
-endif
-
-ifdef CONFIG_TPL
-rom-deps += tpl/u-boot-tpl.bin
-endif
-
-endif
-
-u-boot.rom: $(rom-deps) FORCE
- $(call if_changed,binman)
-endif
+endif # CONFIG_X86
 
 ifneq ($(CONFIG_ARCH_SUNXI),)
 ifeq ($(CONFIG_ARM64),)
@@ -1646,9 +1614,6 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
 endif
 endif
 
-u-boot-x86-with-spl.bin: spl/u-boot-spl.bin u-boot.bin FORCE
- $(call if_changed,binman)
-
 ifneq ($(CONFIG_ARCH_TEGRA),)
 # Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
 %-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: spl/%-spl %.bin FORCE
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 13/27] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM

Simon Glass-3
In reply to this post by Simon Glass-3
This Kconfig is not needed anymore since U-Boot will build the ROM if the
required binary blobs exist.

The BUILD_ROM environment variable used to request that the ROM be built.
Now this always happens if the required binary blobs are available. Update
it to mean that U-Boot should fail if the ROM cannot be built. This
behaviour should be compatible with how it used to work.

Signed-off-by: Simon Glass <[hidden email]>
Reviewed-by: Bin Meng <[hidden email]>
---

(no changes since v1)

 Kconfig                       | 7 +++++--
 Makefile                      | 3 ++-
 configs/qemu-x86_64_defconfig | 1 -
 configs/qemu-x86_defconfig    | 1 -
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Kconfig b/Kconfig
index b3b8532d2c..182f5d6f18 100644
--- a/Kconfig
+++ b/Kconfig
@@ -288,8 +288,11 @@ config ROM_NEEDS_BLOBS
  depends on HAS_ROM
  help
   Enable this if building the u-boot.rom target needs binary blobs, and
-  so cannot be done normally. In this case, pass BUILD_ROM=1 to make
-  to tell U-Boot to build the ROM.
+  so cannot be done normally. In this case, U-Boot will only build the
+  ROM if the required blobs exist. If not, you will see an warning like:
+
+    Image 'main-section' is missing external blobs and is non-functional:
+      intel-descriptor intel-me intel-refcode intel-vga intel-mrc
 
 config BUILD_ROM
  bool "Build U-Boot as BIOS replacement"
diff --git a/Makefile b/Makefile
index b4b5b10813..03590de0ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1312,7 +1312,8 @@ quiet_cmd_binman = BINMAN  $@
 cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                 --toolpath $(objtree)/tools \
  $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
- build -u -d u-boot.dtb -O . -m --allow-missing \
+ build -u -d u-boot.dtb -O . \
+ $(if $(BUILD_ROM),,-m --allow-missing) \
  -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
  $(BINMAN_$(@F))
 
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index dd4ae62a30..4d156bc7fc 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -18,7 +18,6 @@ CONFIG_GENERATE_ACPI_TABLE=y
 CONFIG_X86_OFFSET_U_BOOT=0xfff00000
 CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BUILD_ROM=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_BOOTSTAGE=y
diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index 4309c2352d..f0e8e7d967 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -8,7 +8,6 @@ CONFIG_GENERATE_PIRQ_TABLE=y
 CONFIG_GENERATE_MP_TABLE=y
 CONFIG_GENERATE_ACPI_TABLE=y
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BUILD_ROM=y
 CONFIG_FIT=y
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 14/27] sunxi: Makefile: Drop explicit targets built by binman

Simon Glass-3
In reply to this post by Simon Glass-3
On sunxi various files that need to be created by binman. It does not make
sense to enumerate these in the Makefile. They are described in the
configuration (devicetree) for each board and we can simply run binman
(always) to generate them.

This avoid sprinkling the Makefile with arch-specific code.

Reviewed-by: Bin Meng <[hidden email]>
Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 Makefile | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 03590de0ef..2c1d508a0b 100644
--- a/Makefile
+++ b/Makefile
@@ -922,7 +922,7 @@ INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi
 INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi
 
 # Build a combined spl + u-boot image for sunxi
-ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
+ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64)$(CONFIG_SPL),yyy)
 INPUTS-y += u-boot-sunxi-with-spl.bin
 endif
 
@@ -1606,10 +1606,7 @@ u-boot-x86-reset16.bin: u-boot FORCE
 endif # CONFIG_X86
 
 ifneq ($(CONFIG_ARCH_SUNXI),)
-ifeq ($(CONFIG_ARM64),)
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
- $(call if_changed,binman)
-else
+ifeq ($(CONFIG_ARM64),y)
 u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
  $(call if_changed,cat)
 endif
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 15/27] tegra: Makefile: Drop explicit targets built by binman

Simon Glass-3
In reply to this post by Simon Glass-3
On tegra various files that need to be created by binman. It does not make
sense to enumerate these in the Makefile. They are described in the
configuration (devicetree) for each board and we can simply run binman
(always) to generate them.

This avoid sprinkling the Makefile with arch-specific code.

Reviewed-by: Bin Meng <[hidden email]>
Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 Makefile | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/Makefile b/Makefile
index 2c1d508a0b..f72e627fbe 100644
--- a/Makefile
+++ b/Makefile
@@ -926,12 +926,6 @@ ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64)$(CONFIG_SPL),yyy)
 INPUTS-y += u-boot-sunxi-with-spl.bin
 endif
 
-# enable combined SPL/u-boot/dtb rules for tegra
-ifeq ($(CONFIG_ARCH_TEGRA)$(CONFIG_SPL),yy)
-INPUTS-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
-INPUTS-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin
-endif
-
 INPUTS-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
 
 # Add optional build target if defined in board/cpu/soc headers
@@ -1612,12 +1606,6 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
 endif
 endif
 
-ifneq ($(CONFIG_ARCH_TEGRA),)
-# Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
-%-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: spl/%-spl %.bin FORCE
- $(call if_changed,binman)
-endif
-
 OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
 u-boot-app.efi: u-boot FORCE
  $(call if_changed,zobjcopy)
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 16/27] mediatek: Makefile: Drop explicit targets built by binman

Simon Glass-3
In reply to this post by Simon Glass-3
On mediatek various files that need to be created by binman. It does not
make sense to enumerate these in the Makefile. They are described in the
configuration (devicetree) for each board and we can simply run binman
(always) to generate them.

This avoid sprinkling the Makefile with arch-specific code.

Also update the binman definition so that idbloader.img is only needed
when SPL is actually being used.

Reviewed-by: Bin Meng <[hidden email]>
Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v3)

Changes in v3:
- Move in the rockchip changes mistakenly in the earlier x86 patch

 Makefile                          | 24 ++++++++++++++++--------
 arch/arm/dts/rockchip-u-boot.dtsi |  2 ++
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index f72e627fbe..e4b1c01de1 100644
--- a/Makefile
+++ b/Makefile
@@ -926,7 +926,10 @@ ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64)$(CONFIG_SPL),yyy)
 INPUTS-y += u-boot-sunxi-with-spl.bin
 endif
 
+# Generate this input file for binman
+ifeq ($(CONFIG_SPL),)
 INPUTS-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
+endif
 
 # Add optional build target if defined in board/cpu/soc headers
 ifneq ($(CONFIG_BUILD_TARGET),)
@@ -941,9 +944,20 @@ ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
 INPUTS-y += u-boot-with-dtb.bin
 endif
 
-ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy)
+ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
+# On ARM64 this target is produced by binman so we don't need this dep
+ifeq ($(CONFIG_ARM64),y)
+ifeq ($(CONFIG_SPL),y)
+# TODO: Get binman to generate this too
 INPUTS-y += u-boot-rockchip.bin
 endif
+else
+ifeq ($(CONFIG_SPL),y)
+# Generate these inputs for binman which will create the output files
+INPUTS-y += idbloader.img u-boot.img
+endif
+endif
+endif
 
 INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
  $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
@@ -1459,10 +1473,7 @@ idbloader.img: spl/u-boot-spl.bin FORCE
  $(call if_changed,mkimage)
 endif
 
-ifeq ($(CONFIG_ARM64),)
-u-boot-rockchip.bin: idbloader.img u-boot.img FORCE
- $(call if_changed,binman)
-else
+ifeq ($(CONFIG_ARM64),y)
 OBJCOPYFLAGS_u-boot-rockchip.bin = -I binary -O binary \
  --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
 u-boot-rockchip.bin: idbloader.img u-boot.itb FORCE
@@ -1689,9 +1700,6 @@ u-boot-elf.lds: arch/u-boot-elf.lds prepare FORCE
 
 ifeq ($(CONFIG_SPL),y)
 spl/u-boot-spl-mtk.bin: spl/u-boot-spl
-
-u-boot-mtk.bin: u-boot.dtb u-boot.img spl/u-boot-spl-mtk.bin FORCE
- $(call if_changed,binman)
 else
 MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
  -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index 0451db735e..eae3ee715d 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -11,6 +11,7 @@
  };
 };
 
+#ifdef CONFIG_SPL
 &binman {
  simple-bin {
  filename = "u-boot-rockchip.bin";
@@ -25,3 +26,4 @@
  };
  };
 };
+#endif
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 17/27] Makefile: Move CONFIG_TOOLS_DEBUG check to later

Simon Glass-3
In reply to this post by Simon Glass-3
At present this is checked before the config has been loaded by the
Makefile, so it doesn't work.

Move the check to later.

Signed-off-by: Simon Glass <[hidden email]>
Reviewed-by: Bin Meng <[hidden email]>
---

(no changes since v1)

 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index e4b1c01de1..fced33e777 100644
--- a/Makefile
+++ b/Makefile
@@ -278,7 +278,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
 HOSTCC       = cc
 HOSTCXX      = c++
 KBUILD_HOSTCFLAGS   := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
- $(if $(CONFIG_TOOLS_DEBUG),-g) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
+ $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
 KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
 KBUILD_HOSTLDFLAGS  := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
 KBUILD_HOSTLDLIBS   := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
@@ -735,6 +735,8 @@ KBUILD_CPPFLAGS += $(KCPPFLAGS)
 KBUILD_AFLAGS += $(KAFLAGS)
 KBUILD_CFLAGS += $(KCFLAGS)
 
+KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
+
 # Use UBOOTINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
 UBOOTINCLUDE    := \
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 18/27] Makefile: Fix a long line in cmd_mkfitimage

Simon Glass-3
In reply to this post by Simon Glass-3
Fix this line which is over the limit.

Signed-off-by: Simon Glass <[hidden email]>
Reviewed-by: Bin Meng <[hidden email]>
---

(no changes since v1)

 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fced33e777..163dc0b8b9 100644
--- a/Makefile
+++ b/Makefile
@@ -999,7 +999,8 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
  >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
 
 quiet_cmd_mkfitimage = MKIMAGE $@
-cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@\
+cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) \
+ -f $(U_BOOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@ \
  >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
 
 quiet_cmd_cat = CAT     $@
--
2.28.0.rc0.105.gf9edc3c819-goog

Reply | Threaded
Open this post in threaded view
|

[PATCH v4 19/27] Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty

Simon Glass-3
In reply to this post by Simon Glass-3
At present we use the empty string to indicate that there is no FIT
generator, but this doesn't allow an individual board to undefine it.
Create a separate bool instead.

Update the config of the boards which currently have an empty string.

Signed-off-by: Simon Glass <[hidden email]>
---

(no changes since v1)

 Kconfig                                   | 6 +++++-
 Makefile                                  | 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/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/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             | 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 +
 42 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/Kconfig b/Kconfig
index 182f5d6f18..1dc5273c68 100644
--- a/Kconfig
+++ b/Kconfig
@@ -596,9 +596,13 @@ config SPL_FIT_SOURCE
   U-Boot FIT image. This could specify further image to load and/or
   execute.
 
+config USE_SPL_FIT_GENERATOR
+ bool "Use a script to generate the .its script"
+ default y if SPL_FIT
+
 config SPL_FIT_GENERATOR
  string ".its file generator script for U-Boot FIT image"
- depends on SPL_FIT
+ depends on USE_SPL_FIT_GENERATOR
  default "board/sunxi/mksunxi_fit_atf.sh" if SPL_LOAD_FIT && ARCH_SUNXI
  default "arch/arm/mach-rockchip/make_fit_atf.py" if SPL_LOAD_FIT && ARCH_ROCKCHIP
  default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
diff --git a/Makefile b/Makefile
index 163dc0b8b9..f1b5be1882 100644
--- a/Makefile
+++ b/Makefile
@@ -1350,7 +1350,7 @@ U_BOOT_ITS := u-boot.its
 $(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
  $(call if_changed,copy)
 else
-ifneq ($(CONFIG_SPL_FIT_GENERATOR),"")
+ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
 U_BOOT_ITS := u-boot.its
 ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh")
 U_BOOT_ITS_DEPS += u-boot-nodtb.bin
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index b8333eb4b8..7c34fc5f81 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -6,6 +6,7 @@ CONFIG_AM33XX=y
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
 CONFIG_LOGLEVEL=3
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index 4faab7fa5b..c4ebe54cf4 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
 CONFIG_LOGLEVEL=3
diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig
index fb4e11d1c7..9e8eeefe36 100644
--- a/configs/am335x_hs_evm_uart_defconfig
+++ b/configs/am335x_hs_evm_uart_defconfig
@@ -13,6 +13,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
 CONFIG_LOGLEVEL=3
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index be88f28e9e..e92e9a1825 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -10,6 +10,7 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig
index 8f1e60fd3e..6d32536129 100644
--- a/configs/am43xx_evm_rtconly_defconfig
+++ b/configs/am43xx_evm_rtconly_defconfig
@@ -10,6 +10,7 @@ CONFIG_SPL_RTC_DDR_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 7afd328a49..6a9ec32bc7 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -9,6 +9,7 @@ CONFIG_AM43XX=y
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index fa8d069910..598b14a580 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -18,6 +18,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index dce50dc4be..5afa372e95 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -18,6 +18,7 @@ CONFIG_AHCI=y
 CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board"
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index 081a48f038..f4aaa429ef 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -22,6 +22,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board"
diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig
index 2ecc990683..b71cf14943 100644
--- a/configs/am57xx_hs_evm_usb_defconfig
+++ b/configs/am57xx_hs_evm_usb_defconfig
@@ -24,6 +24,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board"
diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index 918ff4de0c..88f595b397 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -26,6 +26,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-am654-base-board"
 CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern"
 CONFIG_CONSOLE_MUX=y
diff --git a/configs/am65x_evm_r5_defconfig b/configs/am65x_evm_r5_defconfig
index 09c8b74aee..5b756d24e8 100644
--- a/configs/am65x_evm_r5_defconfig
+++ b/configs/am65x_evm_r5_defconfig
@@ -24,6 +24,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-am654-r5-base-board"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig
index bc3da74509..6786e75f3e 100644
--- a/configs/am65x_hs_evm_a53_defconfig
+++ b/configs/am65x_hs_evm_a53_defconfig
@@ -29,6 +29,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_fit_${boot}; run get_overlaystring; run run_fit"
 CONFIG_CONSOLE_MUX=y
diff --git a/configs/am65x_hs_evm_r5_defconfig b/configs/am65x_hs_evm_r5_defconfig
index ead4a59c38..38fd5627fd 100644
--- a/configs/am65x_hs_evm_r5_defconfig
+++ b/configs/am65x_hs_evm_r5_defconfig
@@ -26,6 +26,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-am654-r5-base-board"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index 9b957eff4a..9f860e76c3 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -25,6 +25,7 @@ CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y
 CONFIG_SPL_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index ee5815514b..8577622cbe 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -28,6 +28,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,MX6Q"
 CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index 9cb9612a95..a235170b9b 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -25,6 +25,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,MX6Q"
 CONFIG_BOOTDELAY=3
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 12f08ae6f9..bc142a565d 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -18,6 +18,7 @@ CONFIG_AHCI=y
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard"
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index e15f62eded..52593d9c67 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -22,6 +22,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard"
diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig
index 4178473ddf..c44a3204f2 100644
--- a/configs/dra7xx_hs_evm_usb_defconfig
+++ b/configs/dra7xx_hs_evm_usb_defconfig
@@ -25,6 +25,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard"
diff --git a/configs/imx6qdl_icore_mipi_defconfig b/configs/imx6qdl_icore_mipi_defconfig
index c08a361ee1..6bae7ae331 100644
--- a/configs/imx6qdl_icore_mipi_defconfig
+++ b/configs/imx6qdl_icore_mipi_defconfig
@@ -20,6 +20,7 @@ CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index 66985bde31..5bf3b16721 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -23,6 +23,7 @@ CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
diff --git a/configs/imx6qdl_icore_rqs_defconfig b/configs/imx6qdl_icore_rqs_defconfig
index 6cc50eb264..de455893d4 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -17,6 +17,7 @@ CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 09a73e590d..90e1e43563 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -27,6 +27,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-common-proc-board"
 CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern"
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
diff --git a/configs/j721e_evm_r5_defconfig b/configs/j721e_evm_r5_defconfig
index a06fc7c3d2..6ab6040660 100644
--- a/configs/j721e_evm_r5_defconfig
+++ b/configs/j721e_evm_r5_defconfig
@@ -23,6 +23,7 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-r5-common-proc-board"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/j721e_hs_evm_a72_defconfig b/configs/j721e_hs_evm_a72_defconfig
index 9b5bc6cf54..5b4ada66c4 100644
--- a/configs/j721e_hs_evm_a72_defconfig
+++ b/configs/j721e_hs_evm_a72_defconfig
@@ -28,6 +28,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_IMAGE_POST_PROCESS=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_fit_${boot}; run get_overlaystring; run run_fit"
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
diff --git a/configs/j721e_hs_evm_r5_defconfig b/configs/j721e_hs_evm_r5_defconfig
index 1aa899e63c..9ef2dbcae4 100644
--- a/configs/j721e_hs_evm_r5_defconfig
+++ b/configs/j721e_hs_evm_r5_defconfig
@@ -26,6 +26,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-r5-common-proc-board"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_USE_BOOTCOMMAND=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig
index 3f27ccf7e0..0385bbef9f 100644
--- a/configs/ls1046ardb_qspi_spl_defconfig
+++ b/configs/ls1046ardb_qspi_spl_defconfig
@@ -19,6 +19,7 @@ CONFIG_AHCI=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=10
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 3139567b80..13dc37a2b0 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/liebherr/mccmon6/mon6_imximage_nor.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_BOARD_LATE_INIT=y
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index 24a7dd87a0..b26f847e19 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -17,6 +17,7 @@ CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/liebherr/mccmon6/mon6_imximage_sd.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_BOARD_LATE_INIT=y
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index 5c12754e58..c0358cf430 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -19,6 +19,7 @@ CONFIG_NXP_BOARD_REVISION=y
 CONFIG_FIT=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index c03e0b54f5..330097b21a 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -18,6 +18,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_FIT=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
diff --git a/configs/pico-imx6_defconfig b/configs/pico-imx6_defconfig
index 04c132b474..2f6b4ce099 100644
--- a/configs/pico-imx6_defconfig
+++ b/configs/pico-imx6_defconfig
@@ -18,6 +18,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTCOMMAND="run default_boot"
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index 4d156bc7fc..c7a7abcbb5 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -20,6 +20,7 @@ CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_SHOW_BOOT_PROGRESS=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index b3274a93b4..cd115bf6b2 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -13,6 +13,7 @@ CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_BOOTSTAGE_FDT=y
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index 625b597bbd..8fdd21c0d3 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200"
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index cd9ba108b3..dc85625a8b 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -16,6 +16,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its"
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index 94361f3b10..1e1aa86426 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -16,6 +16,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its"
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 8dfd218426..3209aad65e 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -23,6 +23,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 # CONFIG_CONSOLE_MUX is not set
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 76cc94ef23..5b08503395 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -15,6 +15,7 @@ CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_USE_PREBOOT=y
 CONFIG_SPL_STACK_R=y
--
2.28.0.rc0.105.gf9edc3c819-goog

12345