Hi Daniel,

On 2026-08-23T19:12:43, Daniel Golle <[email protected]> wrote:
> doc: imagemap: document on-demand loading framework
>
> Describe the imagemap framework architecture: the translation table
> that tracks mapped regions and its phase-determined caching, reading
> from a block-device partition (including MTD via mtdblock and UBI via
> ubiblock), the integration with bootm for on-demand FIT sub-image
> loading, and the SPL build.

The doc doesn't actually describe the SPL build - imagemap is
full-U-Boot only. Please either drop that clause from the commit
message, or add a short paragraph in imagemap.rst noting the SPL
gating (why xpl phases carry no cost).

>
> Signed-off-by: Daniel Golle <[email protected]>
>
> MAINTAINERS              |   1 +
>  doc/develop/imagemap.rst | 100 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  doc/develop/index.rst    |   1 +
>  3 files changed, 102 insertions(+)

> +The ``bootmeth_openwrt`` boot method is the primary consumer of this
> +framework, using it to boot OpenWrt-style FIT firmware images stored
> +directly on raw storage.

bootmeth_openwrt isn't in-tree yet - so better as 'will be the first
in-tree consumer' so the doc doesn't point at a missing symbol.

> diff --git a/doc/develop/index.rst b/doc/develop/index.rst
> @@ -31,6 +31,7 @@ Implementation
>
>     directories
>     bloblist
> +   imagemap
>     bootstd/index
>     ci_testing
>     commands

The surrounding entries are alphabetical (bloblist, bootstd, chid,
ci_testing, commands, ...) so imagemap belongs later - around
global_data/init, not between bloblist and bootstd/index.

> diff --git a/doc/develop/imagemap.rst b/doc/develop/imagemap.rst
> @@ -0,0 +1,100 @@
> +``imagemap_create(dev, name, part)``
> +   Create an imagemap device over a partition of block device *dev*,
> +   selected by *name* or by index *part*.

The real signature also takes a struct udevice **devp out parameter
(see include/imagemap.h). Please add it here so the doc matches the
API.

> diff --git a/doc/develop/imagemap.rst b/doc/develop/imagemap.rst
> @@ -0,0 +1,100 @@
> +Boot Integration
> +----------------
> +
> +The ``imagemap`` framework integrates with the boot pipeline through
> +``bootm_run_states()`` in ``boot/bootm.c``:
> +
> +1. The imagemap device pointer is stored in ``struct bootm_info``
> +   and propagated to the global ``images`` structure.
> +
> +2. ``boot_get_kernel()`` uses ``imagemap_map()`` to read the image
> +   header and FIT metadata without loading the full image into RAM.

boot_get_kernel() is a static helper in boot/bootm.c - a doc reader
won't easily find it. Please either name the entry point a caller
actually reaches (bootm_run_states() / bootm_find_os()) or note that
it's internal. Same for the imagemap_map_to() reference under
fit_image_load(): it would help to say which caller in patch 6 uses
it.

Regards,
Simon

Reply via email to