Skip to contentSkip to conversation

ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y

PATCH Superseded Marek Vasut 1 participant 1 message Feb 1, 2021

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y

The u-boot-with-spl.imx is a concatenation of SPL and u-boot.uim. The u-boot.uim is u-boot.bin wrapped in uImage. In case OF_SEPARATE is enabled, the u-boot.bin does not contain control DT for U-Boot, and so u-boot.uim does not contain the DT, and so u-boot-with-spl.imx does not contain the DT, and a system where u-boot-with-spl.imx is written to offset 1024B to the start of storage no longer boots, as it is missing DT.

In case OF_SEPARATE is enabled, u-boot.img contains both u-boot.bin and the necessary DTs. Therefore, use u-boot.img instead of u-boot.uim to generate u-boot-with-spl.imx when OF_SEPARATE is enabled.

Cc Christoph Niedermaier <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Simon Glass <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
---
 arch/arm/mach-imx/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-imx/Makefile +2 -2
index 1aa26a50ad8..81159eabd24 100644
@@ -202,10 +202,10 @@ append = cat $(filter-out $< $(PHONY), $^) >> $@
 quiet_cmd_pad_cat = CAT     $@
 cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@
 
-u-boot-with-spl.imx: SPL u-boot.uim FORCE
+u-boot-with-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.uim,u-boot.img) FORCE
 	$(call if_changed,pad_cat)
 
-u-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx u-boot.uim FORCE
+u-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx $(if $(CONFIG_OF_SEPARATE),u-boot.uim,u-boot.img) FORCE
 	$(call if_changed,pad_cat)
 
 quiet_cmd_u-boot-nand-spl_imx = GEN     $@
Signature · 1 line
2.29.2