On Thu, 29 Jan 2026 at 16:55, Marek Vasut
<[email protected]> wrote:
>
> Unless specified otherwise using the mkimage -B n option, align
> DTs in fitImage external data to 8 Bytes, and retain alignment
> of everything else to 4 Bytes. This should fulfill the DTspec
> requirement, that DTs must be placed at 8 Byte aligned addresses,
> even for DTs that are part of fitImage with external data. For
> fitImage with embedded data, there is nothing we can do, as the
> embedded data are aligned to 4 Bytes, just like any other DT
> property.
>
> Replace fdtdec_get_child_count() counting of images with counting
> of padding using fdt_for_each_subnode(). This is much more useful,
> as the added up padding can be passed directly to calloc() when
> allocating the buffer which holds the external data. The image
> count is no longer needed.
>
> Adjust the image layouting such, that buf_ptr is incremented to
> place the next image at align_size aligned offset. This is done
> at the beginning of the loop, once the align_size for current
> image can be determined from the current image type.
>
> Update binman test to validate the new 8 Byte alignment.
>
> Signed-off-by: Marek Vasut <[email protected]>
> ---
> Cc: Alper Nebi Yasak <[email protected]>
> Cc: Anshul Dalal <[email protected]>
> Cc: Aristo Chen <[email protected]>
> Cc: Beleswar Padhi <[email protected]>
> Cc: Bryan Brattlof <[email protected]>
> Cc: Paul HENRYS <[email protected]>
> Cc: Quentin Schulz <[email protected]>
> Cc: Rasmus Villemoes <[email protected]>
> Cc: Simon Glass <[email protected]>
> Cc: Tom Rini <[email protected]>
> Cc: Wolfgang Wallner <[email protected]>
> Cc: Yannic Moog <[email protected]>
> ---
>  tools/binman/ftest.py | 20 +++++++--------
>  tools/fit_image.c     | 58 ++++++++++++++++++++++++++++++++++---------
>  2 files changed, 56 insertions(+), 22 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

This aligns binman with the new mkimage but I think that is OK.

Regards,
Simon

Reply via email to