[U-Boot] [RFC PATCH 4/7] Hook spl directory into main Makefile

Aneesh V aneesh at ti.com
Wed Jun 29 15:09:24 CEST 2011


From: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
---
 Makefile |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 813b03b..ea35b17 100644
--- a/Makefile
+++ b/Makefile
@@ -317,6 +317,7 @@ ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin
 ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin
 ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
 ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin
+ALL-$(CONFIG_UBOOT_SPL) += spl
 
 all:		$(ALL-y)
 
@@ -414,6 +415,12 @@ mmc_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
 
 $(obj)mmc_spl/u-boot-mmc-spl.bin:	mmc_spl
 
+spl:		depend
+		$(MAKE) -C spl all
+
+$(obj)u-boot.spl.bin:		spl $(obj)u-boot.img
+		cat $(obj)spl/u-boot-spl.bin $(obj)u-boot.img > $@
+
 $(VERSION_FILE):
 		@( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \
 		   printf '#define PLAIN_VERSION "%s%s"\n' \
@@ -1127,6 +1134,7 @@ clean:
 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
 	@rm -f $(ONENAND_BIN)
 	@rm -f $(obj)onenand_ipl/u-boot.lds
+	@$(MAKE) -C spl clean
 	@rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
 	@find $(OBJTREE) -type f \
 		\( -name 'core' -o -name '*.bak' -o -name '*~' \
-- 
1.7.0.4



More information about the U-Boot mailing list