diff mbox series

[U-Boot,2/9] Makefile: use "arm64" architecture for U-Boot image files

Message ID 20190221013034.9099-3-andre.przywara@arm.com
State Deferred
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series sunxi: Allow FEL capable SPLs with 32bit builds | expand

Commit Message

Andre Przywara Feb. 21, 2019, 1:30 a.m. UTC
At the moment we use the arch/arm directory for arm64 boards as well,
so the Makefile will pick up the "arm" name for the architecture to use
for tagging binaries in U-Boot image files.
Differentiate between the two by looking at the CPU variable being defined
to "armv8", and use the arm64 architecture name on creating the image
file if that matches.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Alexander Graf Feb. 21, 2019, 11:26 a.m. UTC | #1
On 02/21/2019 02:30 AM, Andre Przywara wrote:
> At the moment we use the arch/arm directory for arm64 boards as well,
> so the Makefile will pick up the "arm" name for the architecture to use
> for tagging binaries in U-Boot image files.
> Differentiate between the two by looking at the CPU variable being defined
> to "armv8", and use the arm64 architecture name on creating the image
> file if that matches.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex
Philipp Tomsich Feb. 21, 2019, 11:37 a.m. UTC | #2
> On 21.02.2019, at 02:30, Andre Przywara <andre.przywara@arm.com> wrote:
> 
> At the moment we use the arch/arm directory for arm64 boards as well,
> so the Makefile will pick up the "arm" name for the architecture to use
> for tagging binaries in U-Boot image files.
> Differentiate between the two by looking at the CPU variable being defined
> to "armv8", and use the arm64 architecture name on creating the image
> file if that matches.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 75a5c7d171..d6e7c69f40 100644
--- a/Makefile
+++ b/Makefile
@@ -1167,13 +1167,19 @@  $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
 endif
 endif
 
+ifeq ($(CPU),armv8)
+IH_ARCH := arm64
+else
+IH_ARCH := $(ARCH)
+endif
+
 ifdef CONFIG_SPL_LOAD_FIT
-MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
+MKIMAGEFLAGS_u-boot.img = -f auto -A $(IH_ARCH) -T firmware -C none -O u-boot \
 	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
 	-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
 	$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST)))
 else
-MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
+MKIMAGEFLAGS_u-boot.img = -A $(IH_ARCH) -T firmware -C none -O u-boot \
 	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
 	-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
 MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \