]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - scripts/Makefile.spl
spl: Kconfig: migrate $(SPL_TPL_)LDSCRIPT to Kconfig
[people/ms/u-boot.git] / scripts / Makefile.spl
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)),)