Fix TI DTB alignment issues with recent libfdt update
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 24 repliesIn review
- v12 patches 9 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fitscripts/ | +1 | 9 replies | |
| 2/2 | ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTBarch/ | +5 | 14 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Tom Rini | Marek Vasut | Anshul Dalal |
|---|---|---|---|
| 1/2 | R-b | R-b | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update
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/[email protected]/
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(-)
Signature · 1 line
2.34.1