* [PATCH V4] ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y
@ 2021-03-01 15:41 Marek Vasut
2021-03-03 14:11 ` sbabic at denx.de
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2021-03-01 15:41 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
Cc: uboot-imx <uboot-imx@nxp.com>
---
V2: Swap the u-boot.uim <-> u-boot.img in the conditional so this would
match the patch which Fabio originally tested
V3: - Correct the u-boot.img/u-boot.uim dependency in top-level Makefile
- Drop TB from Fabio, this needs to be retested
V4: Forward the u-boot.uim generation to mach-imx Makefile too
---
Makefile | 5 ++++-
arch/arm/mach-imx/Makefile | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 079881b62ab..cfe28dafbfb 100644
--- a/Makefile
+++ b/Makefile
@@ -1547,7 +1547,10 @@ flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE
endif
endif
-u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE
+u-boot.uim: u-boot.bin FORCE
+ $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+
+u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.img,u-boot.uim) FORCE
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 1aa26a50ad8..e6b4654cd35 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -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.img,u-boot.uim) 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.img,u-boot.uim) FORCE
$(call if_changed,pad_cat)
quiet_cmd_u-boot-nand-spl_imx = GEN $@
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH V4] ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y
2021-03-01 15:41 [PATCH V4] ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y Marek Vasut
@ 2021-03-03 14:11 ` sbabic at denx.de
0 siblings, 0 replies; 2+ messages in thread
From: sbabic at denx.de @ 2021-03-03 14:11 UTC (permalink / raw)
To: u-boot
> 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.
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Christoph Niedermaier <cniedermaier@dh-electronics.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Ye Li <ye.li@nxp.com>
> Cc: uboot-imx <uboot-imx@nxp.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-03 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 15:41 [PATCH V4] ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=y Marek Vasut
2021-03-03 14:11 ` sbabic at denx.de
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.