From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 04 Mar 2022 10:10:24 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nQ3xA-00HObN-N0 for lore@lore.pengutronix.de; Fri, 04 Mar 2022 10:10:24 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nQ3x9-0000wT-SV; Fri, 04 Mar 2022 10:10:23 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ3wX-0000wJ-Q8; Fri, 04 Mar 2022 10:09:45 +0100 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nQ3wX-002ZsC-Lb; Fri, 04 Mar 2022 10:09:44 +0100 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nQ3wW-00FmLK-5C; Fri, 04 Mar 2022 10:09:44 +0100 Date: Fri, 4 Mar 2022 10:09:44 +0100 From: Michael Olbrich To: Christian Melki Message-ID: Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20220303222505.936388-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220303222505.936388-1-christian.melki@t2data.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] image-root-cpio: Add compressor options to the env. X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 > --- > 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