[RFC v2 1/2] libfdt: add fdt_alignprop
Simon Glass
sjg at chromium.org
Tue Nov 8 00:35:48 CET 2022
Hi Bjørn,
On Sun, 6 Nov 2022 at 11:20, Bjørn Mork <bjorn at mork.no> wrote:
>
> Properties are sometimes used to store data with stricter alignment
> requirements than the 4-byte fdt tag alignment. Aligning the offset
> of the property data will alloe a client to directly address it,
> without reloaction, provided the fdt is loaded on a similarily
> aligned boundary.
>
> One known use-case for this is the U-Boot FIT images, which may
> embed nested fdt blobs inside properties of the outer FIT fdt.
> Although strongly discouraged, U-Boot can be configured to use these
> embedded blobs "in place". This is discouraged because if only will
> work if the offset of the property value, i.e. the embedded fdt,
> happens to match the 8-byte boundary required by the devicetree
> spec.
>
> Adding the ability to align property data allows U-Boot tools to
> reliably create FIT images for such use.
>
> Other use cases are currently not known, but anticipated.
>
> Signed-off-by: Bjørn Mork <bjorn at mork.no>
> ---
> scripts/dtc/libfdt/fdt_rw.c | 26 ++++++++++++++++++++++++
> scripts/dtc/libfdt/fdt_wip.c | 2 +-
> scripts/dtc/libfdt/libfdt.h | 30 ++++++++++++++++++++++++++++
> scripts/dtc/libfdt/libfdt_internal.h | 1 +
> 4 files changed, 58 insertions(+), 1 deletion(-)
Can you use an external FIT?
Regards,
Simon
More information about the U-Boot
mailing list