summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig14
-rw-r--r--Makefile2
-rw-r--r--scripts/Makefile.spl5
3 files changed, 20 insertions, 1 deletions
diff --git a/Kconfig b/Kconfig
index 75f9563ce6c..82df59f176e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -715,6 +715,20 @@ config SYS_CLK_FREQ
A static value for the CPU frequency. Note that if not required
for a given SoC, this can be left at 0.
+config HAS_LDR
+ bool
+ help
+ Enables building .ldr targets for U-Boot and SPL. This does not
+ automatically build any additional targets with make or buildman.
+
+config LDR_CPU
+ string "CPU name to be passed to LDR utility."
+ depends on HAS_LDR
+ help
+ Set the CPU name for the -T parameter in the LDR utility. This is
+ generally used on processors from Analog Devices, but may be also
+ be useful for other vendors.
+
source "api/Kconfig"
endmenu # General setup
diff --git a/Makefile b/Makefile
index 1069adca91e..7321fe1499e 100644
--- a/Makefile
+++ b/Makefile
@@ -1360,7 +1360,7 @@ u-boot-nodtb.bin: u-boot FORCE
u-boot.ldr: u-boot
$(CREATE_LDR_ENV)
- $(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS)
+ $(LDR) -T $(CONFIG_LDR_CPU) -c $@ $< $(LDR_FLAGS)
$(BOARD_SIZE_CHECK)
# binman
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 60db38d5bdd..1868f1beef6 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -381,6 +381,11 @@ $(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin
$(objtree)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@
endif
+$(obj)/u-boot-spl.ldr: $(obj)/u-boot-spl
+ $(CREATE_LDR_ENV)
+ $(LDR) -T $(CONFIG_LDR_CPU) -c $@ $< $(LDR_FLAGS)
+ $(BOARD_SIZE_CHECK)
+
quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@