[PATCH v8 01/12] Makefile: add SPL_REMAKE_ELF_LDSCRIPT feature
Michal Simek
michal.simek at amd.com
Mon May 18 10:46:33 CEST 2026
On 5/16/26 20:19, michael.srba at seznam.cz wrote:
> From: Michael Srba <Michael.Srba at seznam.cz>
>
> Some platforms (e.g. at least Qualcomm) use the ELF format in creative
> ways, including in the bootrom. Make SPL_REMAKE_ELF use a linker script
> specified in SPL_REMAKE_ELF_LDSCRIPT (with the previously hardcoded path
> as the default).
>
> Signed-off-by: Michael Srba <Michael.Srba at seznam.cz>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> Makefile | 9 +++++++--
> common/spl/Kconfig | 12 ++++++++++++
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 552328f9f2c..b8a3fe0bf81 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2008,12 +2008,17 @@ u-boot.elf: u-boot.bin u-boot-elf.lds FORCE
> quiet_cmd_u-boot-spl-elf ?= LD $@
> cmd_u-boot-spl-elf ?= $(LD) spl/u-boot-spl-elf.o -o $@ \
> $(if $(CONFIG_SYS_BIG_ENDIAN),-EB,-EL) \
> - -T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_SPL_TEXT_BASE) \
> + -T spl/u-boot-spl-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_SPL_TEXT_BASE) \
> -Ttext=$(CONFIG_SPL_TEXT_BASE)
> -spl/u-boot-spl.elf: spl/u-boot-spl.bin u-boot-elf.lds
> +spl/u-boot-spl.elf: spl/u-boot-spl.bin spl/u-boot-spl-elf.lds
Still missing FORCE here.
If you don't do it on risc-v you will see
COPY spl/u-boot-spl.bin
Makefile:2015: FORCE prerequisite is missing
LD spl/u-boot-spl.elf
Thanks,
Michal
More information about the U-Boot
mailing list