summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2017-04-20 20:36:25 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2017-05-10 16:16:09 +0200
commitd57259b95078accec01e58a63f783010b782ece4 (patch)
treefbf6272ac885b6343a04320787e5ff52b5e50274 /Makefile
parentdd9999d5f4d3a0354c959fa3bccc0957a1164bf5 (diff)
downloadu-boot-d57259b95078accec01e58a63f783010b782ece4.tar.gz
u-boot-d57259b95078accec01e58a63f783010b782ece4.tar.xz
u-boot-d57259b95078accec01e58a63f783010b782ece4.zip
u-boot.elf: remove hard-coded arm64 flags
This is needed in order to allow building it for other archs. Move relocation comment to a better place. Remove no longer needed dts FIXME. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 5 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 600a4d623a..d129e16164 100644
--- a/Makefile
+++ b/Makefile
@@ -747,6 +747,9 @@ BOARD_SIZE_CHECK =
endif
# Statically apply RELA-style relocations (currently arm64 only)
+# This is useful for arm64 where static relocation needs to be performed on
+# the raw binary, but certain simulators only accept an ELF file (but don't
+# do the relocation).
ifneq ($(CONFIG_STATIC_RELA),)
# $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base
DO_STATIC_RELA = \
@@ -1180,14 +1183,9 @@ OBJCOPYFLAGS_u-boot-img-spl-at-end.bin := -I binary -O binary \
u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
$(call if_changed,pad_cat)
-# Create a new ELF from a raw binary file. This is useful for arm64
-# where static relocation needs to be performed on the raw binary,
-# but certain simulators only accept an ELF file (but don't do the
-# relocation).
-# FIXME refactor dts/Makefile to share target/arch detection
+# Create a new ELF from a raw binary file.
u-boot.elf: u-boot.bin
- @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \
- $< u-boot-elf.o
+ @$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
@$(LD) u-boot-elf.o -o $@ \
--defsym=_start=$(CONFIG_SYS_TEXT_BASE) \
-Ttext=$(CONFIG_SYS_TEXT_BASE)