From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 28 Feb 2022 13:10:14 +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 1nOeqz-00DDIc-Uw for lore@lore.pengutronix.de; Mon, 28 Feb 2022 13:10:14 +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 1nOeqy-0002YN-Gl; Mon, 28 Feb 2022 13:10:12 +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 1nOeq3-0001rJ-00; Mon, 28 Feb 2022 13:09:15 +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 1nOeq2-001oQm-VG; Mon, 28 Feb 2022 13:09:14 +0100 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nOeq1-00AyS2-CO; Mon, 28 Feb 2022 13:09:13 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Mon, 28 Feb 2022 13:09:13 +0100 Message-Id: <20220228120913.2614769-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220222092436.3860271-1-christian.melki@t2data.com> References: <20220222092436.3860271-1-christian.melki@t2data.com> MIME-Version: 1.0 Subject: Re: [ptxdist] [APPLIED] image-root-cpio: Move compression options into one menu. 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: Christian Melki 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 Thanks, applied as 2b511c4bc2cb9d0b265c7aab770d2abfe34e07db. Michael [sent from post-receive hook] On Mon, 28 Feb 2022 13:09:12 +0100, Christian Melki wrote: > * Clean cpio generation, drop separate in and make for gz. > * Extend image-root-cpio.in with compression methods > (raw, gz, zstd, xz, lzop). > * Compression mode selects compression utility. > * Filename suffix depends on compression mode. > * Platform migration from PTXCONF_IMAGE_ROOT_CPIO_GZ to > PTXCONF_IMAGE_ROOT_CPIO and PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > * Extend help. Explain that compression for integrated cpios > in kernel blob are compressed by the kernel build system. > > Signed-off-by: Christian Melki > Message-Id: <20220222092436.3860271-1-christian.melki@t2data.com> > Signed-off-by: Michael Olbrich > > diff --git a/platforms/image-root-cpio-gz.in b/platforms/image-root-cpio-gz.in > deleted file mode 100644 > index e1feb5f9b9c4..000000000000 > --- a/platforms/image-root-cpio-gz.in > +++ /dev/null > @@ -1,10 +0,0 @@ > -## SECTION=image > - > -config IMAGE_ROOT_CPIO_GZ > - tristate > - select HOST_GENIMAGE > - select IMAGE_ROOT_TGZ > - prompt "Generate images/root.cpio.gz" > - help > - Build the traditionally initrd RAM disk to be used > - as initramfs by the kernel. > diff --git a/platforms/image-root-cpio.in b/platforms/image-root-cpio.in > index f5ee4c1d8d4c..d3090dc298e9 100644 > --- a/platforms/image-root-cpio.in > +++ b/platforms/image-root-cpio.in > @@ -1,10 +1,73 @@ > ## SECTION=image > > -config IMAGE_ROOT_CPIO > +menuconfig IMAGE_ROOT_CPIO > tristate > select HOST_GENIMAGE > select IMAGE_ROOT_TGZ > - prompt "Generate images/root.cpio" > + select HOST_ZSTD if IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD > + select HOST_XZ if IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > + select HOST_LZOP if IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP > + prompt "Generate images/root.cpio " > help > - Build the traditionally initrd RAM disk to be used > - as initramfs by the kernel. > + Build the traditional rootfs to be used as initramfs > + by the kernel. > + The compression choices are for external initramfs use. > + When including a cpio archive inside the kernel blob, > + the kernel build system can manage compressing the cpio > + archive itself. > + > +if IMAGE_ROOT_CPIO > + > +choice > + prompt "CPIO compression mode" > + default IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE > + > +config IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE > + bool > + prompt "no compression" > + help > + No compression. > + > +config IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > + bool > + prompt "gz" > + help > + Compress root.cpio with gz > + > +config IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD > + bool > + prompt "zstd" > + help > + Compress root.cpio with zstd > + > +config IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > + bool > + prompt "xz" > + help > + Compress root.cpio with xz > + > +config IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP > + bool > + prompt "lzop" > + help > + Compress root.cpio with lzop > + > +endchoice > + > +config IMAGE_ROOT_CPIO_COMPRESSION_SUFFIX > + string > + default "" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE > + default ".gz" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > + default ".zst" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD > + default ".xz" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > + default ".lzo" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP > + > +config IMAGE_ROOT_CPIO_COMPRESSION_UTIL > + string > + default "" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE > + default "gzip" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > + default "zstd" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD > + default "xz" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > + default "lzop" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP > + > +endif > diff --git a/rules/image-root-cpio-gz.make b/rules/image-root-cpio-gz.make > deleted file mode 100644 > index 52a6a4bd9e93..000000000000 > --- a/rules/image-root-cpio-gz.make > +++ /dev/null > @@ -1,38 +0,0 @@ > -# -*-makefile-*- > -# > -# Copyright (C) 2012 by Michael Olbrich > -# > -# For further information about the PTXdist project and license conditions > -# see the README file. > -# > - > -# > -# We provide this package > -# > -IMAGE_PACKAGES-$(PTXCONF_IMAGE_ROOT_CPIO_GZ) += image-root-cpio-gz > - > -# > -# Paths and names > -# > -IMAGE_ROOT_CPIO_GZ := image-root-cpio-gz > -IMAGE_ROOT_CPIO_GZ_DIR := $(BUILDDIR)/$(IMAGE_ROOT_CPIO_GZ) > -IMAGE_ROOT_CPIO_GZ_IMAGE := $(IMAGEDIR)/root.cpio.gz > -IMAGE_ROOT_CPIO_GZ_FILES := $(IMAGEDIR)/root.tgz > -IMAGE_ROOT_CPIO_GZ_CONFIG := cpio.config > - > -# ---------------------------------------------------------------------------- > -# Image > -# ---------------------------------------------------------------------------- > - > -IMAGE_ROOT_CPIO_GZ_ENV := \ > - FORMAT="newc" \ > - COMPRESS=gzip > - > -ifdef PTXCONF_IMAGE_ROOT_CPIO_GZ > -$(IMAGE_ROOT_CPIO_GZ_IMAGE): > - @$(call targetinfo) > - @$(call image/genimage, IMAGE_ROOT_CPIO_GZ) > - @$(call finish) > -endif > - > -# vim: syntax=make > diff --git a/rules/image-root-cpio.make b/rules/image-root-cpio.make > index ab6afdd42c09..fdb0ccfff1cd 100644 > --- a/rules/image-root-cpio.make > +++ b/rules/image-root-cpio.make > @@ -16,7 +16,7 @@ IMAGE_PACKAGES-$(PTXCONF_IMAGE_ROOT_CPIO) += image-root-cpio > # > IMAGE_ROOT_CPIO := image-root-cpio > IMAGE_ROOT_CPIO_DIR := $(BUILDDIR)/$(IMAGE_ROOT_CPIO) > -IMAGE_ROOT_CPIO_IMAGE := $(IMAGEDIR)/root.cpio > +IMAGE_ROOT_CPIO_IMAGE := $(IMAGEDIR)/root.cpio$(call remove_quotes, $(PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_SUFFIX)) > IMAGE_ROOT_CPIO_FILES := $(IMAGEDIR)/root.tgz > IMAGE_ROOT_CPIO_CONFIG := cpio.config > > @@ -26,7 +26,7 @@ IMAGE_ROOT_CPIO_CONFIG := cpio.config > > IMAGE_ROOT_CPIO_ENV := \ > FORMAT="newc" \ > - COMPRESS= > + COMPRESS=$(call remove_quotes, $(PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_UTIL)) > > ifdef PTXCONF_IMAGE_ROOT_CPIO > $(IMAGE_ROOT_CPIO_IMAGE): > diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform > index e9b4854d50b1..c75705f3a1cb 100755 > --- a/scripts/migrate/migrate_platform > +++ b/scripts/migrate/migrate_platform > @@ -51,3 +51,11 @@ s/^\(\(# \)\?PTXCONF_TF_A_PLATFORM\>\)\(.*$\)/\1S\3/ > # > s/^\(\(# \)\?PTXCONF\)_DTC\>\(.*$\)/\1_KERNEL_DTB\3/ > s/^\(\(# \)\?PTXCONF\)_DTC_OFTREE\(_DTS\(\|_PATH\)\)\(.*$\)/\1_KERNEL\3\5/ > + > +# > +# from : ptxdist-2022.02.0 > +# to : ptxdist-2022.03.0 > +# symbol : PTXCONF_IMAGE_ROOT_CPIO_GZ -> PTXCONF_IMAGE_ROOT_CPIO, PTXCONF_IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > +# reason : root.cpio generation consolidated. gz generation now dependent on regular cpio generation. > +# > +s/^\(\(# \)\?PTXCONF_\)IMAGE_ROOT_CPIO_GZ\>\(.*\)$/\1IMAGE_ROOT_CPIO\3\n\1IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ\3/ _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de