All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weijie Gao <weijie.gao@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH 11/16] lib: enable lzma decompression support for SPL build
Date: Thu, 9 Jan 2020 16:10:12 +0800	[thread overview]
Message-ID: <1578557412.5535.7.camel@mcddlt001> (raw)
In-Reply-To: <22c3ad4c-aa4c-9a26-b552-e3e711856ea2@gmx.de>

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 <weijie.gao@mediatek.com>
> > ---
> >   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.

Best Regards,

Weijie

  reply	other threads:[~2020-01-09  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  3:01 [PATCH 11/16] lib: enable lzma decompression support for SPL build Weijie Gao
2020-01-08  7:22 ` Heinrich Schuchardt
2020-01-09  8:10   ` Weijie Gao [this message]
2020-01-09 17:45     ` Tom Rini
2020-01-10  8:21       ` Weijie Gao
2020-01-10 14:17         ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1578557412.5535.7.camel@mcddlt001 \
    --to=weijie.gao@mediatek.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.