[U-Boot] [PATCH v7 19/19] imx: Add u-boot-with-nand-spl.imx make target

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Fri Feb 15 21:54:25 CET 2013


This image adds a dummy 1024-byte header to u-boot-with-spl.imx in order to get
an image that can be programmed on a NAND Flash page boundary.

This supports only i.MX25/35/51 so far, not i.MX53/6. For the latter, the dummy
header will have to be replaced with a generated FCB header depending at least
on the NAND Flash page size.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
---
Changes in v7:
 - New patch.

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 Makefile                     |    5 +++++
 arch/arm/imx-common/Makefile |    3 +++
 2 files changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index 896266f..8bda59d 100644
--- a/Makefile
+++ b/Makefile
@@ -495,6 +495,10 @@ $(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 		$(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
 			$(OBJTREE)/u-boot-with-spl.imx
 
+$(obj)u-boot-with-nand-spl.imx: $(obj)u-boot-with-spl.imx
+		$(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
+			$(OBJTREE)/u-boot-with-nand-spl.imx
+
 $(obj)u-boot.ubl:       $(obj)u-boot-with-spl.bin
 		$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
 		-e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl
@@ -867,6 +871,7 @@ clobber:	tidy
 	@rm -f $(obj)u-boot.pbl
 	@rm -f $(obj)u-boot.imx
 	@rm -f $(obj)u-boot-with-spl.imx
+	@rm -f $(obj)u-boot-with-nand-spl.imx
 	@rm -f $(obj)u-boot.ubl
 	@rm -f $(obj)u-boot.ais
 	@rm -f $(obj)u-boot.dtb
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index 24bf822..835040f 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -65,6 +65,9 @@ $(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.
 	cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.bin > $@
 	rm $(OBJTREE)/spl/u-boot-spl-pad.imx
 
+$(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/u-boot-with-spl.imx
+	dd bs=1024 count=1 if=/dev/zero 2>/dev/null | cat - $< > $@
+
 
 #########################################################################
 
-- 
1.7.10.4



More information about the U-Boot mailing list