From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 18 Jul 2024 13:36:37 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-yw1-f189.google.com (mail-yw1-f189.google.com [209.85.128.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 46IBaasa026212 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Jul 2024 13:36:36 +0200 Received: by mail-yw1-f189.google.com with SMTP id 00721157ae682-650b621f4cdsf17922717b3.1 for ; Thu, 18 Jul 2024 04:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1721302590; x=1721907390; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=hX4mmewM6VCTMbXOlnOMhyoDNiMA3sVJrLCv10EgnQY=; b=f9PNnYYAraJe3agBU1IOw2Y/11W0WByjNzfql+zPrNB9GgPcMEBM9y+ECCUhNhbga3 pYR+oiCM0YfJ5pM+9n42m6YMJ2pCCYwUbB1f6xa27rgfphfthNun0dxNq0gwndfQGp6M vJmXLiX+dKwYLQaeBEmtX/0Clr2HJr05H1ii/xUWaIqZTHvAj1sz2Di2PiT57OutrAx+ dr1yWVGV67cHzKVlbfUTl+0Fxrvw69AWhLlq36L2ynqgG20k48MCta3pZw5sD/04mo6f DwrQAyRrxJKIvieM9PDMKp6fwlq3+EkGVDLmVAl2ZRRXMz+BlUdFduNM2L+UDNkgELPx tTHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721302590; x=1721907390; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=hX4mmewM6VCTMbXOlnOMhyoDNiMA3sVJrLCv10EgnQY=; b=hKYTAKGKJsKClEbFnNqjvWle0dh4amHslLL+n895VZLCBsCqd4Tgmcqcivw1H2jGq4 1nUrk32FTCvbebmVoWQRvRnAW32nTVICsa2y+RJTIc2CXi5OYoIggss92SBLYiUgyOr6 TYgYCHJKqWTxY49MAH8WHHVjkbDGqyG+75jmgrtf+OM6CrWL17/vZbnxxZaQm7/8HrOx KsW/Pwn+ozYq10EI/tPLlUj7Pux7wuajz+yWaR6s6benykoDNDu3bngg9HCqM5PVNTnv h2V1EsN5m3WHhZDjRLr/I931s+m06bHed3fCrOLbb/c6jgLbBcdvSDnhavd5HsKArYdw ZJhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721302590; x=1721907390; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=hX4mmewM6VCTMbXOlnOMhyoDNiMA3sVJrLCv10EgnQY=; b=TaxClzZE1sUqHoQKxkj2O0fgHPsOZMGx4zl/d6djcPN8Z4FKl2iZKafcTQuKnTeHUy kXxH5hmbmcUOX1jkfnayQ01x86ppD0/aCcYoJ7BoorOVURtRIpN/v24Df8XZf3V60rmV FRfFivkPzEoBcTsMIZFnFfn8iXQ6ZU0x2U32RVS7i3gYJOlNelaqmraVN58KvNbI98jK dU3NgrgdPjzO+s3qT/73WeTt+6VyP4QU35HwwyFv7xiLTFS9v0uk9uomQM9NgyOT/arJ uyBgG2uC5v67YO0aYBVNo1tHVfSJS6hhp3H0zfa9NSUA6xERhbEMZXQ/WTHf43k08DaU w8zg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=1; AJvYcCVUoYI5u2vtNyYSrgTk6QmiqShJVuegftSy5Qx5wX3C46bB/hu4TXSVsUa7YO7yFODXitXaWuSjktEuq2bwuzq3ibs= X-Gm-Message-State: AOJu0YzYsGjTfkb9lKKTq4AqOYfGgjVT+HI/x3REv+P4ENyH5UCO19ow QKyNgXhKDxlREJAaPLav5lQuMnBBFZpe0ZVWUWRcZLlIKrUi+kPy X-Google-Smtp-Source: AGHT+IFSwkfrN9Aa7qQWeYu/G0rgmaxCeyh4n+H5PmxXT1XH4mpvqmhrWBf2tUqRA37s1xntad5TuQ== X-Received: by 2002:a0d:e384:0:b0:64b:bad:2108 with SMTP id 00721157ae682-664ffdb9129mr52926007b3.39.1721302590397; Thu, 18 Jul 2024 04:36:30 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ad4:4150:0:b0:6b5:da50:ac19 with SMTP id 6a1803df08f44-6b79b7ae4abls11937006d6.2.-pod-prod-07-us; Thu, 18 Jul 2024 04:36:29 -0700 (PDT) X-Received: by 2002:a05:6214:21c2:b0:6b5:e898:16c8 with SMTP id 6a1803df08f44-6b79c554f52mr3712096d6.4.1721302589366; Thu, 18 Jul 2024 04:36:29 -0700 (PDT) Date: Thu, 18 Jul 2024 04:36:28 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <957f7a7d-5baf-4eed-97e3-e902935ba35an@googlegroups.com> In-Reply-To: <2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn@googlegroups.com> References: <20240417134347.86724-1-srinuvasan.a@siemens.com> <2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn@googlegroups.com> Subject: Re: [PATCH V3] recipes-initramfs/compress-initrd: add recipe to compress initrd with xz MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_396124_1735289964.1721302588410" X-Original-Sender: srinuvasanasv@gmail.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS 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: +Rc+J678cHzj ------=_Part_396124_1735289964.1721302588410 Content-Type: multipart/alternative; boundary="----=_Part_396125_878095814.1721302588410" ------=_Part_396125_878095814.1721302588410 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, July 8, 2024 at 3:14:54=E2=80=AFPM UTC+5:30 Srinuvasan Arjunan w= rote: On Tuesday, July 2, 2024 at 7:11:00=E2=80=AFPM UTC+5:30 srinuv...@siemens.c= om wrote: From: srinuvasan =20 By default initrd compressed with gzip tool, with the present bullseye base= =20 image=20 of amd64 the initrd size is almost 27MB, this can be reduced with the help= =20 of xz tool,=20 using this one the generated initrd size is almost 18MB, we saved almost=20 9MB.=20 Signed-off-by: srinuvasan =20 ---=20 kas/package/Kconfig | 9 ++++++++=20 kas/package/pkg_compress_initrd.yaml | 9 ++++++++=20 .../compress-initrd/compress-initrd.bb | 21 +++++++++++++++++++=20 .../compress-initrd/files/postinst | 5 +++++=20 4 files changed, 44 insertions(+)=20 create mode 100644 kas/package/pkg_compress_initrd.yaml=20 create mode 100644 meta-isar/recipes-initramfs/compress-initrd/ compress-initrd.bb=20 create mode 100644=20 meta-isar/recipes-initramfs/compress-initrd/files/postinst=20 diff --git a/kas/package/Kconfig b/kas/package/Kconfig=20 index 35ba7cf1..9c24a680 100644=20 --- a/kas/package/Kconfig=20 +++ b/kas/package/Kconfig=20 @@ -146,6 +146,15 @@ config KAS_INCLUDE_PACKAGE_ISAR_CI_SSH_SETUP=20 default "kas/package/pkg_sshd-regen-keys.yaml"=20 depends on PACKAGE_ISAR_CI_SSH_SETUP=20 +config PACKAGE_COMPRESS_INITRD=20 + bool "compress initrd"=20 + default y=20 +=20 +config KAS_INCLUDE_PACKAGE_COMPRESS_INITRD=20 + string=20 + default "kas/package/pkg_compress_initrd.yaml"=20 + depends on PACKAGE_COMPRESS_INITRD=20 +=20 endmenu=20 config KAS_IMAGE_PREINSTALL=20 diff --git a/kas/package/pkg_compress_initrd.yaml=20 b/kas/package/pkg_compress_initrd.yaml=20 new file mode 100644=20 index 00000000..376a280c=20 --- /dev/null=20 +++ b/kas/package/pkg_compress_initrd.yaml=20 @@ -0,0 +1,9 @@=20 +# This software is a part of ISAR.=20 +# Copyright (C) 2024 ilbers GmbH=20 +=20 +header:=20 + version: 14=20 +=20 +local_conf_header:=20 + package-compress-initrd: |=20 + IMAGE_INSTALL:append =3D " compress-initrd"=20 diff --git a/meta-isar/recipes-initramfs/compress-initrd/compress-initrd.bb= =20 b/meta-isar/recipes-initramfs/compress-initrd/compress-initrd.bb=20 new file mode 100644=20 index 00000000..b1a5909b=20 --- /dev/null=20 +++ b/meta-isar/recipes-initramfs/compress-initrd/compress-initrd.bb=20 @@ -0,0 +1,21 @@=20 +# Sample recipe to configure the desired compression tool=20 +# during initramfs generation=20 +#=20 +# This software is a part of ISAR.=20 +=20 +DESCRIPTION =3D "Compress the initrd with configured compression tool"=20 +MAINTAINER =3D "Your name here "=20 +=20 +inherit dpkg-raw=20 +=20 +COMPRESS_TOOL ?=3D "xz"=20 +=20 +DEBIAN_DEPENDS =3D "linux-image-${KERNEL_NAME}, xz-utils, initramfs-tools"= =20 +=20 +SRC_URI =3D " \=20 + file://postinst \=20 +"=20 +do_install() {=20 + install -v -d "${D}/etc/initramfs-tools/conf.d/"=20 + echo "COMPRESS=3D${COMPRESS_TOOL}" >=20 "${D}/etc/initramfs-tools/conf.d/${PN}.conf"=20 +}=20 diff --git a/meta-isar/recipes-initramfs/compress-initrd/files/postinst=20 b/meta-isar/recipes-initramfs/compress-initrd/files/postinst=20 new file mode 100644=20 index 00000000..0db52142=20 --- /dev/null=20 +++ b/meta-isar/recipes-initramfs/compress-initrd/files/postinst=20 @@ -0,0 +1,5 @@=20 +#!/bin/sh=20 +=20 +set -e=20 +=20 +update-initramfs -c -k all=20 --=20 2.34.1 Hi All, Any update on this patch? Many thanks, Srinu=20 Hi All, Still do you feel any fixes/improvement needed for this patch, if= =20 not kindly merge this change. Thanks, Srinu --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= isar-users/957f7a7d-5baf-4eed-97e3-e902935ba35an%40googlegroups.com. ------=_Part_396125_878095814.1721302588410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Monday, July 8, 2024 at 3:14:54=E2=80= =AFPM UTC+5:30 Srinuvasan Arjunan wrote:
On Tuesday, July 2, 2024 at 7:11:00=E2= =80=AFPM UTC+5:30 srinuv...@siemens.com w= rote:
From: srinuvasan <<= a rel=3D"nofollow">srinuv...@siemens.com>

By default initrd compressed with gzip tool, with the present bullsey= e 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 alm= ost 9MB.

Signed-off-by: srinuvasan <srinuv...@siemens.c= om>
---
kas/package/Kconfig | 9 ++++++++
kas/package/pkg_compress_initrd.yaml | 9 ++++++++
.../compress-initrd/compress-initrd.bb | 21 +++++++++++++++= ++++
.../compress-initrd/files/postinst | 5 +++++
4 files changed, 44 insertions(+)
create mode 100644 kas/package/pkg_compress_initrd.yaml
create mode 100644 meta-isar/recipes-initramfs/compress-initrd/compres= s-initrd.bb
create mode 100644 meta-isar/recipes-initramfs/compress-initrd/files= /postinst

diff --git a/kas/package/Kconfig b/kas/package/Kconfig
index 35ba7cf1..9c24a680 100644
--- a/kas/package/Kconfig
+++ b/kas/package/Kconfig
@@ -146,6 +146,15 @@ config KAS_INCLUDE_PACKAGE_ISAR_CI_SSH_SETUP
default "kas/package/pkg_sshd-regen-keys.yaml"
depends on PACKAGE_ISAR_CI_SSH_SETUP
=20
+config PACKAGE_COMPRESS_INITRD
+ bool "compress initrd"
+ default y
+
+config KAS_INCLUDE_PACKAGE_COMPRESS_INITRD
+ string
+ default "kas/package/pkg_compress_initrd.yaml"
+ depends on PACKAGE_COMPRESS_INITRD
+
endmenu
=20
config KAS_IMAGE_PREINSTALL
diff --git a/kas/package/pkg_compress_initrd.yaml b/kas/package/pkg_c= ompress_initrd.yaml
new file mode 100644
index 00000000..376a280c
--- /dev/null
+++ b/kas/package/pkg_compress_initrd.yaml
@@ -0,0 +1,9 @@
+# This software is a part of ISAR.
+# Copyright (C) 2024 ilbers GmbH
+
+header:
+ version: 14
+
+local_conf_header:
+ package-compress-initrd: |
+ IMAGE_INSTALL:append =3D " compress-initrd"
diff --git a/meta-isar/recipes-initramfs/compress-initrd/compress-initr= d.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 too= l"
+MAINTAINER =3D "Your name here <
y...@domain.c= om>"
+
+inherit dpkg-raw
+
+COMPRESS_TOOL ?=3D "xz"
+
+DEBIAN_DEPENDS =3D "linux-image-${KERNEL_NAME}, xz-utils, initramfs-= tools"
+
+SRC_URI =3D " \
+ file://postinst \
+"
+do_install() {
+ install -v -d "${D}/etc/initramfs-tools/conf.d/"
+ echo "COMPRESS=3D${COMPRESS_TOOL}" > "${D}/etc/initramfs-tool= s/conf.d/${PN}.conf"
+}
diff --git a/meta-isar/recipes-initramfs/compress-initrd/files/postin= st 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


= =C2=A0 =C2=A0Hi All,

=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0Any update on this patch?

M= any thanks,
Srinu=C2=A0

=

=C2=A0 =C2=A0Hi All,

=C2= =A0 =C2=A0 =C2=A0 =C2=A0 Still do you feel any fixes/improvement needed for= this patch, if not kindly merge this change.

Th= anks,
Srinu

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg= id/isar-users/957f7a7d-5baf-4eed-97e3-e902935ba35an%40googlegroups.com.=
------=_Part_396125_878095814.1721302588410-- ------=_Part_396124_1735289964.1721302588410--