[PATCH v1] bootm: teach handle_decomp_error() about the noload decompression buffer
Tom Rini
trini at konsulko.com
Wed Jul 8 20:07:06 CEST 2026
On Sun, Jul 05, 2026 at 02:51:22PM +0000, Aristo Chen wrote:
> For a compressed kernel_noload image, bootm_load_os() allocates a
> per-image decompression buffer of ALIGN(image_len * 8, SZ_1M) rather
> than the global CONFIG_SYS_BOOTM_LEN. When decompression fails on that
> path, handle_decomp_error() still prints
>
> Image too large: increase CONFIG_SYS_BOOTM_LEN
>
> which is misleading: increasing CONFIG_SYS_BOOTM_LEN does not help
> because the smaller per-image buffer is the actual bound. Commit
> 2ff26c1e378d ("bootm: fix overflow of the noload kernel decompression
> buffer") worked around this by printing a follow-up note right after
> handle_decomp_error() returned, but the boot log then reads as two
> contradictory sentences.
>
> Introduce enum bootm_decomp_limit and pass it into
> handle_decomp_error() so the helper picks the right message in one
> place. For the noload path it now prints
>
> Image too large for the kernel_noload buffer (0x100000 bytes)
>
> quoting the actual buffer size; the global path is unchanged. Drop the
> trailing note in bootm_load_os() so only one line is printed.
>
> Suggested-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Aristo Chen <aristo.chen at canonical.com>
Thanks for doing this. It's clearer for the user and after checking a
handful of platforms, we only grow by 8 bytes, so, that's well worth it.
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260708/7be52ebb/attachment.sig>
More information about the U-Boot
mailing list