]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
spl: Kconfig: migrate $(SPL_TPL_)LDSCRIPT to Kconfig
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 28 Jul 2017 17:20:49 +0000 (19:20 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:34 +0000 (17:12 +0200)
Now that we have split up SPL_LDSCRIPT into a SPL and TPL variant and
have started to use the TPL-variant for the RK3368, it's time to clean
up behind ourselves: move both variants into Kconfig and remove them
from the whitelist.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/Kconfig
scripts/Makefile.spl
scripts/config_whitelist.txt

index 64f9e1fd4e06908fdec21a5b45f02a351a14f710..3342c04aa53c486dc17d5f1fa4a26d6c098d8286 100644 (file)
@@ -18,6 +18,16 @@ config SPL
 
 if SPL
 
+config SPL_LDSCRIPT
+       string "Linker script for the SPL stage"
+       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
+       depends on SPL
+       help
+         The SPL stage will usually require a different linker-script
+         (as it runs from a different memory region) than the regular
+         U-Boot stage.  Set this to the path of the linker-script to
+         be used for SPL.
+
 config SPL_BOARD_INIT
        bool "Call board-specific initialization in SPL"
        help
@@ -707,6 +717,15 @@ config TPL
 
 if TPL
 
+config TPL_LDSCRIPT
+        string "Linker script for the TPL stage"
+       depends on TPL
+       help
+         The TPL stage will usually require a different linker-script
+         (as it runs from a different memory region) than the regular
+         U-Boot stage.  Set this to the path of the linker-script to
+         be used for TPL.
+
 config TPL_BOOTROM_SUPPORT
         bool "Support returning to the BOOTROM (from TPL)"
        help
index 4a9a58f1ea4919f548965efd04c8a76afc722881..167b2d9d2977c0259f4b11671343167a713352e6 100644 (file)
@@ -103,9 +103,16 @@ u-boot-spl-platdata := $(obj)/dts/dt-platdata.o
 endif
 
 # Linker Script
-ifdef CONFIG_$(SPL_TPL_)LDSCRIPT
+# First test whether there's a linker-script for the specific stage defined...
+ifneq ($(CONFIG_$(SPL_TPL_)LDSCRIPT),)
 # need to strip off double quotes
 LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_$(SPL_TPL_)LDSCRIPT:"%"=%))
+else
+# ...then fall back to the generic SPL linker-script
+ifneq ($(CONFIG_SPL_LDSCRIPT),)
+# need to strip off double quotes
+LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_SPL_LDSCRIPT:"%"=%))
+endif
 endif
 
 ifeq ($(wildcard $(LDSCRIPT)),)
index 488ca922aa2775597c3f882f95060d15946e6a37..95ae3bfa4193ca854c12d3187929f54149edf95f 100644 (file)
@@ -2207,7 +2207,6 @@ CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
 CONFIG_SPL_INIT_MINIMAL
 CONFIG_SPL_JR0_LIODN_NS
 CONFIG_SPL_JR0_LIODN_S
-CONFIG_SPL_LDSCRIPT
 CONFIG_SPL_LOAD_FIT_ADDRESS
 CONFIG_SPL_MAX_FOOTPRINT
 CONFIG_SPL_MAX_PEB_SIZE
@@ -4909,7 +4908,6 @@ CONFIG_TI_KEYSTONE_SERDES
 CONFIG_TI_KSNAV
 CONFIG_TI_SPI_MMAP
 CONFIG_TMU_TIMER
-CONFIG_TPL_LDSCRIPT
 CONFIG_TPL_MAX_SIZE
 CONFIG_TPL_PAD_TO
 CONFIG_TPL_STACK