[PATCH 1/2] boot: android: Always use 8-byte aligned DT with libfdt
Tom Rini
trini at konsulko.com
Fri Nov 14 15:23:59 CET 2025
On Fri, Nov 14, 2025 at 05:45:32AM -0700, Simon Glass wrote:
> Hi Marek,
>
> On Thu, 13 Nov 2025 at 14:57, Marek Vasut <marek.vasut at mailbox.org> wrote:
> >
> > On 11/13/25 9:36 PM, Tom Rini wrote:
> >
> > Hello everyone,
> >
> > >>> Which is different from disagreeing with your specific feedback about
> > >>> how we get there, to be clear.
> > >
> > > And again, since your feedback to this patch was "Don't?", I'm saying we
> > > need to. But the rest of your feedback was structural on moving towards
> > > resolving it and so I assume Marek will respond.
> >
> > The "blast radius" are these patches, that's all that tripped the tests:
> >
> > - boot: android: Always use 8-byte aligned DT with libfdt
> > - test/py: android: Point fdt command to aligned addresses
> > - test/py: Use aligned address for overlays in 'extension' test
> > - sandbox: Fix DT compiler address warnings in sandbox DTs
> > - sandbox: Fix DT compiler pin warnings in sandbox DTs
> > - boot: Assure FDT is always at 8-byte aligned address
> > - arm: qemu: Eliminate fdt_high and initrd_high misuse
> > - efi_loader: Assure fitImage from capsule is used from 8-byte aligned
> > address
> > - MIPS: Assure end of U-Boot is at 8-byte aligned offset
> >
> > Regarding last minute alignment, the problem with this android image
> > seems to be in the android image itself, which packs in badly aligned
> > FDT. We therefore have to copy it out and realign.
>
> My request is to implement these checks as part of the boot flow
> (bootm, etc.) rather than adding memory allocations in leaf function.
> We already support copying the FDT to a different address so we can
> expand it and add things. Can we make use of that code?
There are likely some cases where we should do the check-and-move
elsewhere, but others such as MIPS where we shouldn't get it wrong to
start with. I believe we've had a few other patches that also fix the
other cases where we don't ensure correct alignment to start with, and
really must.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251114/6fa5679b/attachment.sig>
More information about the U-Boot
mailing list