From bcdd02328e65130915965fdc378c89bb8e2c08bc Mon Sep 17 00:00:00 2001 From: Greg Malysa Date: Tue, 19 Mar 2024 22:16:07 -0400 Subject: build: Revive and update LDR format support LDR format files are used primarily by Analog Devices processors but may be of interest to other vendors. Previously support existed for this format as part of the U-Boot build, but it has been unmaintained and unused for a long time. In preparation for adding support for modern ADI processors that use LDR, modernize the LDR support: - Introduce CONFIG_LDR_CPU as the CPU string recognized by the LDR tool may not be the same as CONFIG_CPU - Add an SPL target that repackages u-boot-spl inside an LDR file An almost identical target for packaging u-boot into an LDR file already exists and did not need to be created. Co-developed-by: Nathan Barrett-Morrison Signed-off-by: Nathan Barrett-Morrison Signed-off-by: Ian Roberts Signed-off-by: Greg Malysa --- scripts/Makefile.spl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') 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)) $< $@ -- cgit v1.2.3