diff options
| author | Alexey Charkov <alchark@flipper.net> | 2026-07-30 13:31:47 +0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-08-13 15:00:55 -0600 |
| commit | 824317a8bc5689d93016e4c2211d194f98d9da33 (patch) | |
| tree | 58b5db7b3fb4c8ab1f44002acacae042264ae158 | |
| parent | e50f87c650f87866ab8ca19d0695236a5936d648 (diff) | |
| download | u-boot-824317a8bc5689d93016e4c2211d194f98d9da33.tar.gz u-boot-824317a8bc5689d93016e4c2211d194f98d9da33.zip | |
spl: Fix link when LZMA is enabled without legacy image format support
spl_load_legacy_lzma() lives in common/spl/spl_legacy.c, which is only
built when CONFIG_$(PHASE_)LEGACY_IMAGE_FORMAT is set, but the call site
in _spl_load() is guarded by CONFIG_SPL_LZMA alone. Enabling LZMA
decompression without the legacy image format therefore fails to link:
ld: common/spl/spl.o: in function `_spl_load':
include/spl_load.h:73: undefined reference to `spl_load_legacy_lzma'
CONFIG_SPL_LZMA is also needed to support LZMA-compressed payloads with a
FIT-only SPL, so add the missing condition to avoid including the legacy
image related function call when legacy image support is not built.
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
| -rw-r--r-- | include/spl_load.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/spl_load.h b/include/spl_load.h index 525e0c9e86c..31ed5651f7b 100644 --- a/include/spl_load.h +++ b/include/spl_load.h @@ -63,6 +63,7 @@ static inline int _spl_load(struct spl_image_info *spl_image, return spl_load_imx_container(spl_image, info, offset); if (IS_ENABLED(CONFIG_SPL_LZMA) && + CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) && image_get_magic(header) == IH_MAGIC && image_get_comp(header) == IH_COMP_LZMA) { spl_image->flags |= SPL_COPY_PAYLOAD_ONLY; |
