[U-Boot] [PATCH v4 4/4] Update u-boot-nand.bin to be used with spl

Philippe Reynes tremyfr at yahoo.fr
Sun Jul 28 22:16:56 CEST 2013


Signed-off-by: Philippe Reynes <tremyfr at yahoo.fr>
Signed-off-by: Eric Jarrige <eric.jarrige at armadeus.org>
---
 Makefile |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 4218226..b971f30 100644
--- a/Makefile
+++ b/Makefile
@@ -617,8 +617,14 @@ $(obj)u-boot.lds: $(LDSCRIPT)
 nand_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
+ifeq ($(CONFIG_SPL),y)
+$(obj)u-boot-nand.bin:    $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
+		$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin && \
+		cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
+else
 $(obj)u-boot-nand.bin:	nand_spl $(obj)u-boot.bin
 		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
+endif
 
 $(obj)spl/u-boot-spl.bin:	$(SUBDIR_TOOLS) depend
 		$(MAKE) -C spl all
-- 
1.7.4.4



More information about the U-Boot mailing list