Re: [PATCH] spl: Fix link when LZMA is enabled without legacy image format support

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszThhWiB_Bqex6eB6vWOU5UsAbqQMzL+Zos=+LSKb9pdDJA@mail.gmail.com>
On 2026-07-30T09:31:47, Alexey Charkov <[email protected]> wrote:
> 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 <[email protected]>
>
> include/spl_load.h | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.