public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update
@ 2026-01-12 10:11 Beleswar Padhi
  2026-01-12 10:11 ` [PATCH v2 1/2] scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fit Beleswar Padhi
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Beleswar Padhi @ 2026-01-12 10:11 UTC (permalink / raw)
  To: trini
  Cc: ilias.apalodimas, malysagreg, sughosh.ganu, philip.molloy,
	marek.vasut+renesas, james.hilliard1, anshuld, afd, nm, vigneshr,
	n-francis, u-kumar1, b-padhi, u-boot

Recent libfdt updates (commit 0535e46d55d7 "scripts/dtc: Update to
upstream version v1.7.2-35-g52f07dcca47c") enforce strict 8-byte
alignment for device tree blobs, as required by the device tree
specification. This causes failures on platforms using
CONFIG_SPL_MULTI_DTB_FIT, where DTBs were not properly aligned.

The alignment issue occurs at two levels:

1. DTBs embedded within the multidtb.fit FIT image may not be 8-byte
   aligned, even though the FIT image itself starts at an aligned
   address. This causes -FDT_ERR_ALIGNMENT failures when
   setup_multi_dtb_fit() tries to locate and use these DTBs.

2. The FIT image is concatenated to u-boot-spl-nodtb.bin at a boundary
   determined by the OMAP2 linker script. Currently, the linker only
   advances the location counter for alignment without padding the
   binary, causing the FIT image to be appended an unaligned offset.

This series addresses both issues:

Patch 1 adds the -B 0x8 flag to mkimage, ensuring all DTB entries
within the FIT image are 8-byte aligned.

Patch 2 fixes the linker script to include padding in the binary
by placing an alignment directive inside the __u_boot_list section,
ensuring the FIT image is appended at an 8-byte aligned boundary.

v2: Changelog:
1. Remove extra ALIGN() directive, add a comment instead.
2. Add R/B, Reported-by and Fixes: tags.

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

Testing done:
1. Boot tested on all TI K3 platforms.

Beleswar Padhi (2):
  scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fit
  ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTB

 arch/arm/mach-omap2/u-boot-spl.lds | 6 +++++-
 scripts/Makefile.xpl               | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-01-20 18:08 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 10:11 [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update Beleswar Padhi
2026-01-12 10:11 ` [PATCH v2 1/2] scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fit Beleswar Padhi
2026-01-12 14:39   ` Marek Vasut
2026-01-12 17:25     ` Padhi, Beleswar
2026-01-12 21:57       ` Marek Vasut
2026-01-12 22:03         ` Tom Rini
2026-01-12 23:53           ` Marek Vasut
2026-01-13 10:25             ` Beleswar Prasad Padhi
2026-01-13 13:27               ` Marek Vasut
2026-01-13 15:00             ` Tom Rini
2026-01-13 16:38               ` Marek Vasut
2026-01-12 10:11 ` [PATCH v2 2/2] ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTB Beleswar Padhi
2026-01-12 13:08   ` Anshul Dalal
2026-01-12 16:48     ` Tom Rini
2026-01-12 21:56       ` Marek Vasut
2026-01-12 22:05         ` Tom Rini
2026-01-12 23:56           ` Marek Vasut
2026-01-13 15:00             ` Tom Rini
2026-01-13 16:34               ` Marek Vasut
2026-01-14 14:17                 ` Tom Rini
2026-01-15  0:02                   ` Marek Vasut
2026-01-15  8:00                     ` Ilias Apalodimas
2026-01-16  4:52                       ` Anshul Dalal
2026-01-13 19:45               ` Tom Rini
2026-01-12 14:40   ` Marek Vasut
2026-01-12 16:45     ` Tom Rini
2026-01-20 18:08 ` (subset) [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox