diff --git a/Makefile b/Makefile index 81349a7694..4b347d3603 100644 --- a/Makefile +++ b/Makefile @@ -1708,6 +1708,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