mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Christian Melki <christian.melki@t2data.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] image-root-cpio: Add compressor options to the env.
Date: Fri, 4 Mar 2022 10:09:44 +0100	[thread overview]
Message-ID: <YiHXWLQNKqy35gIh@pengutronix.de> (raw)
In-Reply-To: <20220303222505.936388-1-christian.melki@t2data.com>

On Thu, Mar 03, 2022 at 11:25:05PM +0100, Christian Melki wrote:
> * xz needs crc32 instead of crc64 for the kernel cpio.

Good point. I didn't know about that.

> * Set zstd compression level to the same as for the kernel (19).

Makes sense.

> * Use multithreading for zstd (deterministic, afaiu).

It is. I looked into this because I was curious. And it makes sense. zstd
was developed at a time when reproducibility was already important.

> Actively decided against -T0 for xz, as compression
> is not deterministic when number of threads varies.

We definitively want to be reproducible here.

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  rules/image-root-cpio.make | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/rules/image-root-cpio.make b/rules/image-root-cpio.make
> index fdb0ccfff..eb09dd53e 100644
> --- a/rules/image-root-cpio.make
> +++ b/rules/image-root-cpio.make
> @@ -26,6 +26,9 @@ IMAGE_ROOT_CPIO_CONFIG	:= cpio.config
>  
>  IMAGE_ROOT_CPIO_ENV := \
>  	FORMAT="newc" \
> +	ZSTD_CLEVEL="19" \
> +	ZSTD_NBTHREADS="0" \
> +	XZ_OPT="--check=crc32" \
>  	COMPRESS=$(call remove_quotes, $(PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_UTIL))

Add the options to the PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_UTIL defaults
and keep the quotes here:

	COMPRESS=$(PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_UTIL)

genimage explicitly does not quote to make to possible to specify the
compressor with options. At least I thinks that should work.

And maybe we could add a IMAGE_ROOT_CPIO_COMPRESSION_MODE_CUSTOM and then
add 'prompt "suffix" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_CUSTOM' to the
suffix and similar for the util.

This way the user could tweak things if absolutely necessary.

What do you think?

Michael

>  
>  ifdef PTXCONF_IMAGE_ROOT_CPIO
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
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 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2022-03-04  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 22:25 Christian Melki
2022-03-04  9:09 ` Michael Olbrich [this message]
2022-03-04  9:21   ` Christian Melki
2022-03-04 10:48     ` Michael Olbrich

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=YiHXWLQNKqy35gIh@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox