Add support for LZ4 decompression algorithm

This patch adds support for LZ4-compressed FIT image contents. This
algorithm has a slightly worse compression ration than LZO while being
nearly twice as fast to decompress. When loading images from a fast
storage medium this usually results in a boot time win.

Sandbox-tested only since I don't have a U-Boot development system set
up right now. The code was imported unchanged from coreboot where it's
proven to work, though. I'm mostly interested in getting this recognized
by mkImage for use in a downstream project.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Julius Werner
2015-10-06 20:03:53 -07:00
committed by Tom Rini
parent b6b5e394db
commit 027b728d4a
10 changed files with 471 additions and 0 deletions
+18
View File
@@ -100,6 +100,24 @@ config SHA_PROG_HW_ACCEL
is performed in hardware.
endmenu
menu "Compression Support"
config LZ4
bool "Enable LZ4 decompression support"
help
If this option is set, support for LZ4 compressed images
is included. The LZ4 algorithm can run in-place as long as the
compressed image is loaded to the end of the output buffer, and
trades lower compression ratios for much faster decompression.
NOTE: This implements the release version of the LZ4 frame
format as generated by default by the 'lz4' command line tool.
This is not the same as the outdated, less efficient legacy
frame format currently (2015) implemented in the Linux kernel
(generated by 'lz4 -l'). The two formats are incompatible.
endmenu
config ERRNO_STR
bool "Enable function for getting errno-related string message"
help