[PATCH 07/10] Makefile: Align fit-dtb.blob and u-boot.itb by 64bits for 64bit systems

Michal Simek michal.simek at xilinx.com
Thu Aug 19 13:19:46 CEST 2021


Enabling MULTI_DTB_FIT and DTB_RESELECT can end up with multi DTBs in FIT
image placed and aligned only by 32bits (4bytes). For 64bit systems there
is 64bit (8bytes) alignment required. That's why make sure that
fit-dtb.blob and u-boot.itb as our primary target images for Xilinx ZynqMP
are all 64bit aligned. The patch is using CONFIG_PHYS_64BIT macro to
identify 64bit systems (including 32bit systems with PAE).

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index 269e353a28ad..1bbe95595efe 100644
--- a/Makefile
+++ b/Makefile
@@ -1169,6 +1169,10 @@ MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
 	-a 0 -e 0 -E \
 	$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null
 
+ifeq ($(CONFIG_PHYS_64BIT),y)
+MKIMAGEFLAGS_fit-dtb.blob += -B 0x8
+endif
+
 ifneq ($(EXT_DTB),)
 u-boot-fit-dtb.bin: u-boot-nodtb.bin $(EXT_DTB)
 		$(call if_changed,cat)
@@ -1431,6 +1435,9 @@ MKIMAGEFLAGS_u-boot.itb =
 else
 MKIMAGEFLAGS_u-boot.itb = -E
 endif
+ifeq ($(CONFIG_PHYS_64BIT),y)
+MKIMAGEFLAGS_u-boot.itb += -B 0x8
+endif
 
 ifdef U_BOOT_ITS
 u-boot.itb: u-boot-nodtb.bin \
-- 
2.32.0



More information about the U-Boot mailing list