Aristo Chen f717d798be bootm: improve error message when gzip decompression buffer is too small
Currently, when decompressing a gzip-compressed image during bootm, a
generic error such as "inflate() returned -5" is shown when the buffer is
too small. However, it is not immediately clear that this is caused by
CONFIG_SYS_BOOTM_LEN being too small.

This patch improves error handling by:
- Detecting Z_BUF_ERROR (-5) returned from the inflate() call
- Suggesting the user to increase CONFIG_SYS_BOOTM_LEN when applicable
- Preserving the original return code from zunzip() instead of overwriting
  it with -1

By providing clearer hints when decompression fails due to insufficient
buffer size, this change helps users diagnose and fix boot failures more
easily.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-05-05 14:16:57 -06:00
..
2025-04-03 16:54:49 -06:00
2024-10-23 06:52:38 +02:00
2024-10-18 14:10:22 -06:00
2022-01-19 18:11:34 +01:00
2021-11-11 19:01:56 -05:00
2024-11-14 18:14:06 -06:00
2025-01-22 09:47:49 -06:00