[U-Boot] [RFC PATCH 14/17] spl: introduce CONFIG_SPL_TARGET

Scott Wood scottwood at freescale.com
Sat Sep 22 02:01:24 CEST 2012


Currently it seems that SPLs rely on the user to specify the final target
on the make command line.  This is a departure from traditional U-Boot practice
and results in a lack of build coverage in MAKEALL.

Now boards can specify CONFIG_SPL_TARGET to determine what gets built by default.
Eventually all SPL boards should specify CONFIG_SPL_TARGET, but for now default
to at least building the SPL code.

Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 Makefile |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index dd879a5..8feb6e1 100644
--- a/Makefile
+++ b/Makefile
@@ -371,10 +371,21 @@ endif
 # Always append ALL so that arch config.mk's can add custom ones
 ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
 
+# This default can be removed when all SPLs define CONFIG_SPL_TARGET.
+# Until then this ensures that at least the SPL gets built by MAKEALL.
+ifdef CONFIG_SPL
+	ifdef CONFIG_SPL_TARGET
+		# need to strip off double quotes
+		SPL_TARGET := $(subst ",,$(CONFIG_SPL_TARGET))
+	else
+		SPL_TARGET ?= spl/u-boot-spl.bin
+	endif
+endif
+
 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_SPL) += $(obj)spl/u-boot-spl.bin
+ALL-$(CONFIG_SPL) += $(obj)$(SPL_TARGET)
 ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin
 
 all:		$(ALL-y) $(SUBDIR_EXAMPLES)
-- 
1.7.9.5




More information about the U-Boot mailing list