summaryrefslogtreecommitdiff
path: root/scripts/Makefile.spl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.spl')
-rw-r--r--scripts/Makefile.spl9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 24ee927c72..9d5921606e 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -147,6 +147,15 @@ LDPPFLAGS += \
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
+# Turn various CONFIG symbols into IMAGE symbols for easy reuse of
+# the scripts between SPL and TPL.
+ifneq ($(CONFIG_$(SPL_TPL_)MAX_SIZE),)
+LDPPFLAGS += -DIMAGE_MAX_SIZE=$(CONFIG_$(SPL_TPL_)MAX_SIZE)
+endif
+ifneq ($(CONFIG_$(SPL_TPL_)TEXT_BASE),)
+LDPPFLAGS += -DIMAGE_TEXT_BASE=$(CONFIG_$(SPL_TPL_)TEXT_BASE)
+endif
+
MKIMAGEOUTPUT ?= /dev/null
quiet_cmd_mkimage = MKIMAGE $@