[PATCH v2 10/11] boot: build the imagemap pointers only when enabled
Simon Glass
sjg at chromium.org
Fri Oct 23 04:37:35 PDT 2026
On 2026-10-21T14:08:59, Daniel Golle <daniel at makrotopia.org> wrote:
> boot: build the imagemap pointers only when enabled
>
> struct bootm_headers and struct bootm_info carry an imagemap pointer
> whatever the configuration, so every board pays for it with the feature
> off, and each use site has to spell out an IS_ENABLED() test beside the
> NULL check.
>
> Compile the two fields under CONFIG_IMAGEMAP and reach them through
> bootm_imagemap(), bootm_set_imagemap(), bootm_info_imagemap() and
> bootm_info_set_imagemap(), which fold to NULL and to nothing when it
> is off.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>
> boot/bootm.c | 44 ++++++++++++++++++++++++++++----------------
> boot/image-fit.c | 13 +++++++------
> include/bootm.h | 31 +++++++++++++++++++++++++++++++
> include/image.h | 31 +++++++++++++++++++++++++++++++
> 4 files changed, 97 insertions(+), 22 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the openwrt-devel
mailing list