summaryrefslogtreecommitdiff
path: root/scripts/Makefile.spl
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2019-01-22 17:09:26 -0500
committerTom Rini <[email protected]>2019-01-26 22:55:53 -0500
commit2f41ade79e5969ebea03a7dcadbeae8e03787d7e (patch)
treeec8f52ec4aa174bcb6de14419568ead76a47aa2f /scripts/Makefile.spl
parentb32ba6f12e4584b85c55c89000b0ef3fd98473f5 (diff)
linker: Modify linker scripts to be more generic
Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE. This lets us re-use the same script for both SPL and TPL. Add logic to scripts/Makefile.spl to pass in the right value when preprocessing the script. Cc: Stefano Babic <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Jagan Teki <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Andreas Bießmann <[email protected]> Cc: Philipp Tomsich <[email protected]> Cc: Michal Simek <[email protected]> Cc: Daniel Schwierzeck <[email protected]> Cc: York Sun <[email protected]> Cc: Bin Meng <[email protected]> Cc: Heiko Schocher <[email protected]> Cc: Adam Ford <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Daniel Schwierzeck <[email protected]> Tested-by: Daniel Schwierzeck <[email protected]> Tested-by: Adam Ford <[email protected]> #da850evm & omap3_logic_somlv Reviewed-by: Simon Goldschmidt <[email protected]>
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 24ee927c72d..9d5921606e1 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 $@