Skip to contentSkip to conversation

Makefile: add endian link flag to u-boot-elf.o

PATCH In review Du Huanpeng 2 participants 2 messages Mar 30, 2022 – Apr 6, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: add endian link flag to u-boot-elf.o

From: Du Huanpeng <[email protected]>

fix compile error when using a little-endian to build with configs:
sfr_nb4-ser_ram_defconfig comtrend_wap5813n_ram_defconfig comtrend_ar5387un_ram_defconfig comtrend_ct5361_ram_defconfig comtrend_vr3032u_ram_defconfig comtrend_ar5315u_ram_defconfig huawei_hg556a_ram_defconfig netgear_dgnd3700v2_ram_defconfig

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 6998388884..5007307f23 100644
@@ -1700,6 +1700,7 @@ u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
 
 quiet_cmd_u-boot-elf ?= LD      $@
 	cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
+	$(if $(CONFIG_SYS_BIG_ENDIAN),-EB,-EL) \
 	-T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
 	-Ttext=$(CONFIG_SYS_TEXT_BASE)
 u-boot.elf: u-boot.bin u-boot-elf.lds
Signature · 1 line
2.32.0
#1 lore raw
Quoted 12 lines · Du Huanpeng

From: Du Huanpeng <[email protected]>

fix compile error when using a little-endian to build with configs:
sfr_nb4-ser_ram_defconfig comtrend_wap5813n_ram_defconfig comtrend_ar5387un_ram_defconfig comtrend_ct5361_ram_defconfig comtrend_vr3032u_ram_defconfig comtrend_ar5315u_ram_defconfig huawei_hg556a_ram_defconfig netgear_dgnd3700v2_ram_defconfig

Quoted 1 line

Applied to u-boot/master, thanks!

Signature · 1 line
Tom