Hi Aristo,
On 2026-09-22T12:36:21, Aristo Chen <[email protected]> wrote:
> doc: fit: document shared image data through the image-data property
>
> Someone trying to shrink a multi-board FIT has no way to discover the
> image-data property from the U-Boot documentation, since the format
> reference lives in the external specification. Add a worked example in
> the style of the other FIT example pages: a kernel offered at two load
> addresses by two configurations while the payload is stored once,
> together with the rules the producer enforces, the resolved form,
> the interaction with hashing, signing and encryption, and a pointer to
> the specification.
>
> Suggested-by: Simon Glass <[email protected]>
> Signed-off-by: Aristo Chen <[email protected]>
>
> doc/usage/fit/index.rst | 1 +
> doc/usage/fit/multi-with-shared-data.rst | 114
> +++++++++++++++++++++++++++++++
> 2 files changed, 115 insertions(+)
> + kernel-1 {
> + description = "Linux kernel";
> + data = /incbin/("./Image");
...
> + kernel-board-b {
> + description = "Linux kernel at the board B address";
> + image-data = "kernel-1";
Naming is asymmetric: the target is kernel-1 but the sharer is
kernel-board-b. Renaming the target to kernel-board-a would make the
pairing with conf-board-a / conf-board-b obvious, and match the
fdt-board-a / fdt-board-b naming just below. Minor, feel free to
ignore.
> +mkimage resolves the reference while building the FIT. With embedded
> +data the payload is copied into both nodes, so sharing pays off
> +together with external data (-E or -p), where both nodes point at a
> +single copy of the payload through identical data-offset or
> +data-position and data-size values. The 'image-data' property is
> +retained in the resolved FIT as a record of the relationship, and
> +re-processing such a FIT with 'mkimage -F' keeps it intact. Each node
The 'pays off together with external data' phrasing is hard to parse.
Perhaps: "With embedded data the payload is copied into both nodes in
the resolved FIT, so the size saving only appears with external data
(-E or -p), where both nodes point at a single copy through identical
data-offset (or data-position) and data-size values." What do you
think?
Reviewed-by: Simon Glass <[email protected]>
Regards,
Simon