From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7368350909424730112 X-Forwarded-Encrypted: i=2; AJvYcCWt31wCaVnSso1Ecx3b83zNbAlVaGIjwgWrx4b6T+5AgCT8fdvTtj+YlL5tHTev5xnOOX4QtbXm3tbqUZH3QTR6OA1MyVwxQHqji9k= X-Received: by 2002:a50:99d9:0:b0:56c:5990:813e with SMTP id 4fb4d7f45d1cf-57a17810a3fmr702217a12.13.1717048172762; Wed, 29 May 2024 22:49:32 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:28c7:b0:572:6ddc:bb0f with SMTP id 4fb4d7f45d1cf-57a17387f57ls151312a12.1.-pod-prod-03-eu; Wed, 29 May 2024 22:49:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWGaYv5VFW5+h7tSyp3kHDuhKo9F7/Jh6Xh2OI+T4o+Iyro/aBX3TOLQSVgMCKDawiwla9+UFX1k2sGhrUNZPa8zhRBADpBdw/rFJU= X-Google-Smtp-Source: AGHT+IHX9XlmSH2/tt6wpS5X+0d55k3XTQLxzhMzE12OobbE7r/uaGsINARO4+lVTaZYsgq72qAH X-Received: by 2002:a50:d7d3:0:b0:57a:2525:f1ee with SMTP id 4fb4d7f45d1cf-57a2525f38dmr49886a12.4.1717048170682; Wed, 29 May 2024 22:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717048170; cv=none; d=google.com; s=arc-20160816; b=tXicIbKN4qZQoVaC1NAI2CNBBnlX724pQUzb7YVgzuPlQcyVkNBW9Q4zfMq7XWd6oV KLG+4wXtgevwQvSKJt6gxT8nPzLzGTGWt0hgKDSO0xOXbBjcab7wkDc6u80FKtTraKEX 03yMBbFicLi1M1TftAuBXcRnLEz8AUbGWxAUzx90qNYj7dREEbxK77HOmb2QpzJ/jBg6 D1MruTILB722S+FNf+XDFS2tLK3BEqljbQPjeNNjX57siiAh3n5h9y6wfvRWEAMPml3a V91XvzvooAg9cn1/nxq4OUuM1hpICYhlMlSV7nQP9W5gMHvexK9WmCJqQxMt9h+5tfSj kvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id; bh=uyxRtBEG5bSnZrW7/yJYzHM8OQHkUUR7qEs7UkDoaFo=; fh=O8qOVoyC4kVwjYhl6ndzNlnWHnJpUJcq4mpswxQLIKQ=; b=hIAz2rKmaC4+IdExykNMBxx6vFEnfME+vF2uTYXjHu/T0dg84ZFKhCBLe4Dn7dJmJ6 cHqJd3v+Myh4M99RlOHNkavQ1ARH8DcqC9uVZ9+Nq8rbMlMJfenRhTL47g9zACcxNa5X u9kYHJFKPV592I8SfWI70XzsLM+EfMY/dgSvsTHaf1eGb4g2mkmj90AVPl6A2EIW9rha yULh6AW03QkYZQI5R/QtXNpxaYpCt1jkCgt40bjbQvnmFABgndqVDtKSoA4jLqiL2lF9 r089J52gxGDx2njrSMg6HoZCQGh3TS+UXxNxBLh22gHK3ltWuwcEPMB6kEdGDV1vKk6A myoQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a22c3f777si2123a12.0.2024.05.29.22.49.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2024 22:49:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 44U5nS84014201 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 May 2024 07:49:29 +0200 Message-ID: <1f98ad04a922a3deab3bdf28936cb05c586f28a0.camel@ilbers.de> Subject: Re: [PATCH v1] recipes-initramfs/compress-initrd: add recipe to compress initrd with xz From: Uladzimir Bely To: srinuvasan.a@siemens.com, isar-users@googlegroups.com Date: Thu, 30 May 2024 08:49:27 +0300 In-Reply-To: <20240513094143.365942-1-srinuvasan.a@siemens.com> References: <0372409e74c5d0aab55e61d8c2f9f2e988b0297d.camel@siemens.com> <20240513094143.365942-1-srinuvasan.a@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 1Df2kphb+zOc On Mon, 2024-05-13 at 15:11 +0530, srinuvasan.a via isar-users wrote: > From: srinuvasan >=20 > By default initrd compressed with gzip tool, with the present > bullseye base image > of amd64 the initrd size is almost 27MB, this can be reduced with the > help of xz tool, > using this one the generated initrd size is almost 18MB, we saved > almost 9MB. >=20 > Signed-off-by: srinuvasan > --- > =C2=A0meta-isar/conf/local.conf.sample=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 +- > =C2=A0.../compress-initrd/compress-initrd.bb=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 | 21 > +++++++++++++++++++ > =C2=A0.../compress-initrd/files/postinst=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 5 +++++ > =C2=A03 files changed, 27 insertions(+), 1 deletion(-) > =C2=A0create mode 100644 meta-isar/recipes-initramfs/compress- > initrd/compress-initrd.bb > =C2=A0create mode 100644 meta-isar/recipes-initramfs/compress- > initrd/files/postinst >=20 > diff --git a/meta-isar/conf/local.conf.sample b/meta- > isar/conf/local.conf.sample > index 17455015..ac8b749e 100644 > --- a/meta-isar/conf/local.conf.sample > +++ b/meta-isar/conf/local.conf.sample > @@ -149,7 +149,7 @@ CONF_VERSION =3D "1" > =C2=A0 > =C2=A0# > =C2=A0# The default list of extra packages to be installed. > -IMAGE_INSTALL =3D "hello-isar example-raw example-module- > ${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar- > disable-apt-cache cowsay example-prebuilt" > +IMAGE_INSTALL =3D "hello-isar example-raw example-module- > ${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar- > disable-apt-cache cowsay example-prebuilt compress-initrd" > =C2=A0 > =C2=A0# > =C2=A0# Machines with secure boot should use signed modules. > diff --git a/meta-isar/recipes-initramfs/compress-initrd/compress- > initrd.bb b/meta-isar/recipes-initramfs/compress-initrd/compress- > initrd.bb > new file mode 100644 > index 00000000..b1a5909b > --- /dev/null > +++ b/meta-isar/recipes-initramfs/compress-initrd/compress-initrd.bb > @@ -0,0 +1,21 @@ > +# Sample recipe to configure the desired compression tool > +# during initramfs generation > +# > +# This software is a part of ISAR. > + > +DESCRIPTION =3D "Compress the initrd with configured compression tool" > +MAINTAINER =3D "Your name here " This line is still not fixed/removed. > + > +inherit dpkg-raw > + > +COMPRESS_TOOL ?=3D "xz" > + > +DEBIAN_DEPENDS =3D "linux-image-${KERNEL_NAME}, xz-utils, initramfs- > tools" > + > +SRC_URI =3D " \ > +=C2=A0=C2=A0=C2=A0 file://postinst=C2=A0\ > +" > +do_install() { > +=C2=A0=C2=A0=C2=A0 install -v -d "${D}/etc/initramfs-tools/conf.d/" > +=C2=A0=C2=A0=C2=A0 echo "COMPRESS=3D${COMPRESS_TOOL}" > "${D}/etc/initra= mfs- > tools/conf.d/${PN}.conf" > +} > diff --git a/meta-isar/recipes-initramfs/compress- > initrd/files/postinst b/meta-isar/recipes-initramfs/compress- > initrd/files/postinst > new file mode 100644 > index 00000000..0db52142 > --- /dev/null > +++ b/meta-isar/recipes-initramfs/compress-initrd/files/postinst > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +set -e > + > +update-initramfs -c -k all > --=20 > 2.34.1 >=20 Since this is a new Isar package, an appropriate Kconfig/yaml item is worth adding into kas/package. --=20 Best regards, Uladzimir.