From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 9 Jan 2020 12:45:00 -0500 Subject: [PATCH 11/16] lib: enable lzma decompression support for SPL build In-Reply-To: <1578557412.5535.7.camel@mcddlt001> References: <1578452513-7045-1-git-send-email-weijie.gao@mediatek.com> <22c3ad4c-aa4c-9a26-b552-e3e711856ea2@gmx.de> <1578557412.5535.7.camel@mcddlt001> Message-ID: <20200109174500.GF31026@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jan 09, 2020 at 04:10:12PM +0800, Weijie Gao wrote: > On Wed, 2020-01-08 at 08:22 +0100, Heinrich Schuchardt wrote: > > > > On 1/8/20 4:01 AM, Weijie Gao wrote: > > > This patch enables LZMA decompression support for SPL build > > > > > > Signed-off-by: Weijie Gao > > > --- > > > lib/Kconfig | 5 +++++ > > > lib/Makefile | 1 + > > > 2 files changed, 6 insertions(+) > > > > > > diff --git a/lib/Kconfig b/lib/Kconfig > > > index 965cf7bc03..2f38e37802 100644 > > > --- a/lib/Kconfig > > > +++ b/lib/Kconfig > > > @@ -418,6 +418,11 @@ config SPL_LZ4 > > > fast compression and decompression speed. It belongs to the LZ77 > > > family of byte-oriented compression schemes. > > > > > > +config SPL_LZMA > > > + bool "Enable LZMA decompression support for SPL build" > > > + help > > > + This enables support for LZMA compression altorithm for SPL boot. > > > > %s/altorithm/algorithm/g > > > > Why do we need yet another algorithm for compression? > > > > Doesn't Zstandard provide a much faster decompression? > > Cf. https://sites.google.com/site/powturbo/home/web-compression > > > > Best regards > > > > Heinrich > > > > > + > > > config SPL_LZO > > > bool "Enable LZO decompression support in SPL" > > > help > > > diff --git a/lib/Makefile b/lib/Makefile > > > index 1fb650cd90..8e51eec01c 100644 > > > --- a/lib/Makefile > > > +++ b/lib/Makefile > > > @@ -64,6 +64,7 @@ obj-$(CONFIG_$(SPL_)ZLIB) += zlib/ > > > obj-$(CONFIG_$(SPL_)ZSTD) += zstd/ > > > obj-$(CONFIG_$(SPL_)GZIP) += gunzip.o > > > obj-$(CONFIG_$(SPL_)LZO) += lzo/ > > > +obj-$(CONFIG_$(SPL_)LZMA) += lzma/ > > > obj-$(CONFIG_$(SPL_)LZ4) += lz4_wrapper.o > > > > > > obj-$(CONFIG_LIBAVB) += libavb/ > > > > > Hi Heinrich, > > I need an algorithm with the maximum compression ratio to reduce the > size of the u-boot payload as much as possible. > > I believe currently lzma and xz are the best choices. > Refer to: > https://catchchallenger.first-world.info/wiki/Quick_Benchmark:_Gzip_vs_Bzip2_vs_LZMA_vs_XZ_vs_LZ4_vs_LZO > > Although they will take longer time for compression and decompression, > considering that the u-boot payload is usually small (<= 1MiB), there > will not be significant effect on decompression time. Where does zstd fall in the list however? Can you please try that and report back? Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: