Hi Alexey,
On 9/18/26 12:52 PM, Alexey Charkov wrote:
SPL knows about multiple compression algorithms, but only two are
hand-rolled into the simple FIT loading code, in spite of a nice ready
made helper already being available right there.
Generalize the compressed FIT handling code to accept any compression
algorithm compiled into the SPL, and fix up the SPL_ZSTD linkage which
requires xxhash in the SPL but which was absent to date.
While here, also extend binman to support passing a compression level via
its image templates, which helps squeeze additional ~15% size savings in
my testing with Zstd level 19 without impacting decompression speed.
This is done with Rockchip RK3576 in mind, so a small Rockchip image
template refactor is included.
CI passes all green:
https://git.u-boot-project.org/u-boot/contributors/alchark/u-boot/-/pipelines/1319
Doesn't work on my PX30 Ringneck for any of the supported compression
algorithms (didn't check lzma as I'm daily driving Fedora and it doesn't
have lzma_alone binary).
Doesn't work on my RK3399 Puma as well (couldn't check zstd, SPL was too
big and overlapped with U-Boot FIT, note that Puma is special in that it
only allows (256-32)KiB for SPL, due to backward compatibility with
older versions of U-Boot that had U-Boot FIT located at offset 256KiB).
On RK3588 Jaguar, all worked (still didn't check lzma due to reasons
listed above).
Cheers,
Quentin