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; Mon, 08 Jul 2024 11:45:03 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f191.google.com (mail-qt1-f191.google.com [209.85.160.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4689j16O031998 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 8 Jul 2024 11:45:02 +0200 Received: by mail-qt1-f191.google.com with SMTP id d75a77b69052e-4459b1ce272sf58077731cf.1 for ; Mon, 08 Jul 2024 02:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720431896; x=1721036696; 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=iWmATLCXbxaTKFgHywlUTElHNnNTayOyxZwBgdbvCW0=; b=gxKJaaGtv1PrNCyOaUOQYwY6UkN3Lyn5+ClTzBtfu4Ueoar6T0LhtR4jBdksnvSp/M h2HWc24jvx5K60vI5m8bmWAdmuD/Ma9rXd5VtIiGuhzYkA8vhQxReBM4aSOj7LtFd8Mc AaMM5ETWasLzHY9Yua0DBR5oPBXiZZSFqebWMhwhwy4OvjS0gY8v/NAQdr+cIFggs0WH q0gie3gIwZKrWAwYJtN9RO3RHDA+uTNG5uAK+TXs24d/QGXH2Owfsh5mPdC+yH1u9WdV Mup2X9Ro/PNSU3FhOtURTQq39DQRQcDaWwOSiJxnzFE8WNlEemiSqBfQ8FRx7bckrild oGxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720431896; x=1721036696; 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=iWmATLCXbxaTKFgHywlUTElHNnNTayOyxZwBgdbvCW0=; b=PkRi55QCnte6q22nz2dVHbK9taxPGSTqwKQQYWQHFpm0UsFEbeflT+V1tYC7C+jkNd ylpKneop3s2Db24VYPVs0QejoiIDbbfIYnJczgN7tZYfDpMN30HNFhke08TGfwVp6IcP viEwzP3Jjl1o0C9+F2OPJmgnxgAjB+wNEvq8Vi3LlUfbGa0eIuVmDRbVq2jYqBUBW5DX J7BFy92+4851mMjZ+nL2Wra0+cHKM6E1VmegS6Bt+/rBRWdJvGyzbpO/ytbOQaaEXIFK 74tBaf6sjDdoAin2ecTfGjmSkR6+q/e2GMljS7NUe0+/ZlmkPveq5xkzHg19J1WnoaQ1 cJgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720431896; x=1721036696; 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=iWmATLCXbxaTKFgHywlUTElHNnNTayOyxZwBgdbvCW0=; b=QCbzMkH4MDgh6HiO5FZE9/FMXzQghA2mqj38tKn0BylKNX/llYum0P8d0B9osmIL1o gujJ+nnEgkwQNzcyAWfYyeRctbHSksrbqSWCSmpwtBpn4Xn9QpdenNWxnai/1NtG4uy2 udFe31dDjBxL95PdbDlaWGHA74sJr4CapQyx3dZsZGvynjCz5NHwYoR2ZbkKKKys4n5V oxnbDLlXSLmh2i4mcK2tAoT4LYG6RLR0/xcC/pkwO66OPDda2MZ/oWe8pDQ3MuXgZgCP Ilx/JE1/IsC1nQ0bw0u6MED/2uNKLsWFS3Ut6CNWRmr1uANIn9JznP3gqj+4zWjcWmrg 7PwQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=1; AJvYcCXmZu8ItQqMnxUJUgnxfbfAsU8qel8G9Xq7E3n1xqK0k8YKs1eZhbiin2z5nrruY+zTwhF30EdfJ4OiFLjB8hjXROk= X-Gm-Message-State: AOJu0YxcMcDNcemMQI8GRky++gDfJLnguB8SgUqczULjcPvcufSjftI1 kObF+qDvsub7UIRIjU3OFFqFGYdB04ZOjzOp9eu6XH0Oz9yoMxwI X-Google-Smtp-Source: AGHT+IG3zkknnaSv1j1jbwJzI7tEFa79R9PRQfJzP3wGUp6uLPkdiMmXhubS2kAnQbApVzyQhHqKgA== X-Received: by 2002:a05:622a:1a27:b0:447:e0a0:9e75 with SMTP id d75a77b69052e-447e0a0a06cmr87010051cf.63.1720431896000; Mon, 08 Jul 2024 02:44:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:5f0c:0:b0:447:dec7:dfe2 with SMTP id d75a77b69052e-447dec7ecf5ls30102751cf.0.-pod-prod-05-us; Mon, 08 Jul 2024 02:44:55 -0700 (PDT) X-Received: by 2002:a05:622a:64a:b0:447:f1c8:e62c with SMTP id d75a77b69052e-447f1c8eb28mr415631cf.1.1720431894918; Mon, 08 Jul 2024 02:44:54 -0700 (PDT) Date: Mon, 8 Jul 2024 02:44:53 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn@googlegroups.com> In-Reply-To: <20240417134347.86724-1-srinuvasan.a@siemens.com> References: <20240417134347.86724-1-srinuvasan.a@siemens.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_71344_1029393623.1720431893992" 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: NjLTGOaOsiK4 ------=_Part_71344_1029393623.1720431893992 Content-Type: multipart/alternative; boundary="----=_Part_71345_1333640514.1720431893992" ------=_Part_71345_1333640514.1720431893992 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 --=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/2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn%40googlegroups.com. ------=_Part_71345_1333640514.1720431893992 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tuesday, July 2, 2024 at 7:11:00=E2= =80=AFPM UTC+5:30 srinuv...@siemens.com wrote:
From: srinuvasan <srinu= v...@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.com>
---
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.com>"
+
+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?

Many than= ks,
Srinu=C2=A0

--
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/2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn%40googlegroups.com.=
------=_Part_71345_1333640514.1720431893992-- ------=_Part_71344_1029393623.1720431893992--