[PATCH v2 1/2] scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fit

Beleswar Padhi b-padhi at ti.com
Mon Jan 12 11:11:01 CET 2026


When CONFIG_SPL_MULTI_DTB_FIT is enabled, multiple device trees are
packed inside the multidtb.fit FIT image. While the individual DTBs
and the FIT image start address are 8-byte aligned, the DTBs embedded
within the FIT image are not guaranteed to maintain 8-byte alignment.

This misalignment causes -FDT_ERR_ALIGNMENT failure in
setup_multi_dtb_fit() when locating the next available DTB within the
FIT blob and setting gd->fdt_blob, because of the recent libfdt
hardening since commit 0535e46d55d7 ("scripts/dtc: Update to upstream
version v1.7.2-35-g52f07dcca47c")

Add the -B 0x8 flag to mkimage to enforce 8-byte alignment for all DTB
entries within the multidtb FIT image.

Reported-by: Anshul Dalal <anshuld at ti.com>
Closes: https://lore.kernel.org/u-boot/DFJ950O0QM0D.380U0N16ZO19E@ti.com
Fixes: 0535e46d55d7 ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c")
Signed-off-by: Beleswar Padhi <b-padhi at ti.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Reviewed-by: Anshul Dalal <anshuld at ti.com>
---
v2: Changelog:
1. Carry R/B, Reported-by, Closes and Fixes tag.

Link to v1:
https://lore.kernel.org/all/20260109190026.58464-2-b-padhi@ti.com/

 scripts/Makefile.xpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl
index 5e65d7b2498..1183f5180ba 100644
--- a/scripts/Makefile.xpl
+++ b/scripts/Makefile.xpl
@@ -602,7 +602,7 @@ $(SHRUNK_ARCH_DTB): $$(patsubst $(obj)/dts/%, $(dt_dir)/%, $$@) $(dir $(SHRUNK_A
 targets += $(SPL_OF_LIST_TARGETS)
 
 MKIMAGEFLAGS_$(SPL_BIN).multidtb.fit = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
-	-n "Multi DTB fit image for $(SPL_BIN)" -E \
+	-n "Multi DTB fit image for $(SPL_BIN)" -B 0x8 -E \
 	$(patsubst %,-b %,$(SHRUNK_ARCH_DTB))
 
 $(obj)/$(SPL_BIN).multidtb.fit: /dev/null $(SHRUNK_ARCH_DTB) FORCE
-- 
2.34.1



More information about the U-Boot mailing list