mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 5/5] lib: uncompress: add general zstd support
Date: Thu, 14 Jul 2022 11:20:42 +0200	[thread overview]
Message-ID: <20220714092042.GL23482@pengutronix.de> (raw)
In-Reply-To: <c2815e3a-dfd4-3398-0da0-cc494df3513e@pengutronix.de>

On Thu, Jul 14, 2022 at 10:54:47AM +0200, Ahmad Fatoum wrote:
> On 14.07.22 10:45, Sascha Hauer wrote:
> > On Wed, Jul 13, 2022 at 12:09:22PM +0200, Ahmad Fatoum wrote:
> >> So far, we only supported zstd in squashfs and ubifs. Add support
> >> everywhere else: In PBL for decompressing barebox proper, in uncompress
> >> for compression arbitrary files and for bootm to decompress zstd
> >> kernel images.
> > 
> > Have you tested this with the uncompress command?
> > 
> > a zstd compressed barebox works here, but using uncompress
> > on a zstd compressed file results in:
> > 
> > ZSTD-compressed data is corrupt
> > 
> > or sometimes:
> > 
> > Out of memory while allocating ZSTD_DStream
> 
> I didn't test the uncompress command, no. How did you create
> the zstd file?

just a plain 'zstd foo' without any options.

> The Linux zstd decompression expects the size
> to be trailing the decompressed data and doesn't parse the
> zstd header. See the comment in scripts/Makefile.lib for details.

When it's expected that we can't use the uncompress command on zstd
files then we shouldn't support it.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2022-07-14  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 10:09 [PATCH 0/5] lib: zstd: allow use in PBL and shell Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 1/5] lib: zstd: adopt Linux directory structure Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 2/5] lib: zstd: sync with Linux Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 3/5] decompressor: define macros for non-PBL case as well Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 4/5] ARM: cpu: uncompress: increase early malloc pool to 256K Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 5/5] lib: uncompress: add general zstd support Ahmad Fatoum
2022-07-14  8:45   ` Sascha Hauer
2022-07-14  8:54     ` Ahmad Fatoum
2022-07-14  9:20       ` Sascha Hauer [this message]

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=20220714092042.GL23482@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox