[PATCH 1/2] boot: android: Always use 8-byte aligned DT with libfdt
Marek Vasut
marek.vasut at mailbox.org
Sat Nov 15 18:11:20 CET 2025
On 11/14/25 1:45 PM, Simon Glass wrote:
Hello Simon,
>>>>> 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?
It seems the 'abootomg' command is extracting DTB from a container where
the DTB can be at 4-byte aligned address. Thus far, the command
internally used that possibly 4-byte aligned address, which is wrong. It
also returned that address which was used by further U-Boot commands
as-is, which is also wrong.
This DTB usage here has nothing to do with any boot flow, this is
incorrect DTB alignment during manipulation, which is not part of boot.
What exactly do you propose should be changed with this patch ?
More information about the U-Boot
mailing list