* [PATCH] arm: imx: add u-boot-nand.imx to boot from NAND without SPL
@ 2023-03-10 10:07 Luca Ceresoli
2023-04-04 10:19 ` sbabic
0 siblings, 1 reply; 2+ messages in thread
From: Luca Ceresoli @ 2023-03-10 10:07 UTC (permalink / raw)
To: Stefano Babic, Fabio Estevam, NXP i.MX U-Boot Team, Simon Glass,
Pali Rohár, Heinrich Schuchardt, Marek Behún,
Quentin Schulz
Cc: Luca Ceresoli, u-boot, Thomas Petazzoni
U-Boot can be booted from NAND without SPL by prepending the DCD header to
the actual U-Boot binary. However this requires prepending 1024 bytes to
u-boot.imx (DCD + u-boot.bin).
There is already a similar target to build spl/u-boot-nand-spl.imx, add the
same option for no-SPL boot.
Tested on i.MX6ULL.
The resulting layout of u-boot-nand.imx is:
- Offset 0x0000 (0 KiB): padding
- Offset 0x0400 (1 KiB): DCD header
- Offset 0x1000 (4 KiB): u-boot.bin
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Makefile | 3 +++
arch/arm/mach-imx/Makefile | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index e760bacf9451..db124476d6e6 100644
--- a/Makefile
+++ b/Makefile
@@ -1522,6 +1522,9 @@ endif
u-boot.uim: u-boot.bin FORCE
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+u-boot-nand.imx: u-boot.imx 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 $@
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 4dfc60eedc43..c386132dacd1 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -132,6 +132,12 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
$(call if_changed,mkimage)
+quiet_cmd_u-boot-nand_imx = GEN $@
+cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@
+
+u-boot-nand.imx: u-boot.imx FORCE
+ $(call if_changed,u-boot-nand_imx)
+
ifeq ($(CONFIG_MULTI_DTB_FIT),y)
MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \
-T $(IMAGE_TYPE) -e $(CONFIG_TEXT_BASE)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] arm: imx: add u-boot-nand.imx to boot from NAND without SPL
2023-03-10 10:07 [PATCH] arm: imx: add u-boot-nand.imx to boot from NAND without SPL Luca Ceresoli
@ 2023-04-04 10:19 ` sbabic
0 siblings, 0 replies; 2+ messages in thread
From: sbabic @ 2023-04-04 10:19 UTC (permalink / raw)
To: Luca Ceresoli, u-boot
> U-Boot can be booted from NAND without SPL by prepending the DCD header to
> the actual U-Boot binary. However this requires prepending 1024 bytes to
> u-boot.imx (DCD + u-boot.bin).
> There is already a similar target to build spl/u-boot-nand-spl.imx, add the
> same option for no-SPL boot.
> Tested on i.MX6ULL.
> The resulting layout of u-boot-nand.imx is:
> - Offset 0x0000 (0 KiB): padding
> - Offset 0x0400 (1 KiB): DCD header
> - Offset 0x1000 (4 KiB): u-boot.bin
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Applied to u-boot-imx, next, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-04 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 10:07 [PATCH] arm: imx: add u-boot-nand.imx to boot from NAND without SPL Luca Ceresoli
2023-04-04 10:19 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox