diff options
| author | Michal Simek <[email protected]> | 2026-02-26 10:27:16 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-13 13:21:52 -0600 |
| commit | 60ef345b1a10ec859f29ebc706724f907e8771cb (patch) | |
| tree | ab2a01e64dabaab4787ef231d6e1fefb8a97410f /Makefile | |
| parent | 7f35a4251dae2b1c94c959ac15cf4d0814485a88 (diff) | |
spl: Remake SPL elf from bin
On Xilinx MB-V there is a need to use ELF file for SPL which is placed
in BRAM (Block RAM) because tools for placing code to bitstream requires to
use ELF. That's why introduce SPL_REMAKE_ELF similar to REMAKE_ELF option
as was originally done by commit f4dc714aaa2d ("arm64: Turn u-boot.bin back
into an ELF file after relocate-rela").
There is already generic and simple linker script (arch/u-boot-elf.lds)
which can be also used without any modification.
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1231,6 +1231,7 @@ ifneq ($(CONFIG_SPL_TARGET),) INPUTS-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) endif INPUTS-$(CONFIG_REMAKE_ELF) += u-boot.elf +INPUTS-$(CONFIG_SPL_REMAKE_ELF) += spl/u-boot-spl.elf INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi @@ -2000,6 +2001,15 @@ u-boot.elf: u-boot.bin u-boot-elf.lds FORCE $(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o $(call if_changed,u-boot-elf) +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) \ + -Ttext=$(CONFIG_SPL_TEXT_BASE) +spl/u-boot-spl.elf: spl/u-boot-spl.bin u-boot-elf.lds + $(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< spl/u-boot-spl-elf.o + $(call if_changed,u-boot-spl-elf) + u-boot-elf.lds: arch/u-boot-elf.lds prepare FORCE $(call if_changed_dep,cpp_lds) |
