public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Srinuvasan Arjunan <srinuvasanasv@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH V3] recipes-initramfs/compress-initrd: add recipe to compress initrd with xz
Date: Thu, 18 Jul 2024 04:36:28 -0700 (PDT)	[thread overview]
Message-ID: <957f7a7d-5baf-4eed-97e3-e902935ba35an@googlegroups.com> (raw)
In-Reply-To: <2ef644ca-b0fa-4583-8ac0-7635e9a4b05cn@googlegroups.com>


[-- Attachment #1.1: Type: text/plain, Size: 3870 bytes --]



On Monday, July 8, 2024 at 3:14:54 PM UTC+5:30 Srinuvasan Arjunan wrote:

On Tuesday, July 2, 2024 at 7:11:00 PM UTC+5:30 srinuv...@siemens.com wrote:

From: srinuvasan <srinuv...@siemens.com> 

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. 

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/
compress-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 

+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 

config KAS_IMAGE_PREINSTALL 
diff --git a/kas/package/pkg_compress_initrd.yaml 
b/kas/package/pkg_compress_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 = " compress-initrd" 
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 = "Compress the initrd with configured compression tool" 
+MAINTAINER = "Your name here <y...@domain.com>" 
+ 
+inherit dpkg-raw 
+ 
+COMPRESS_TOOL ?= "xz" 
+ 
+DEBIAN_DEPENDS = "linux-image-${KERNEL_NAME}, xz-utils, initramfs-tools" 
+ 
+SRC_URI = " \ 
+ file://postinst \ 
+" 
+do_install() { 
+ install -v -d "${D}/etc/initramfs-tools/conf.d/" 
+ echo "COMPRESS=${COMPRESS_TOOL}" > 
"${D}/etc/initramfs-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 
-- 
2.34.1



   Hi All,

             Any update on this patch?

Many thanks,
Srinu 



   Hi All,

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

Thanks,
Srinu

-- 
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 email 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.

[-- Attachment #1.2: Type: text/html, Size: 5712 bytes --]

      reply	other threads:[~2024-07-18 11:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  5:26 [PATCH] " srinuvasan.a
2024-05-13  5:27 ` Jan Kiszka
2024-05-13  5:47   ` Srinuvasan Arjunan
2024-05-13  6:29     ` Jan Kiszka
2024-05-13  6:47 ` MOESSBAUER, Felix
2024-05-13  9:41   ` [PATCH v1] " srinuvasan.a
2024-05-30  5:49     ` Uladzimir Bely
2024-05-30  5:52       ` Srinuvasan Arjunan
2024-05-31  7:35     ` Jan Kiszka
2024-04-17 13:43       ` [PATCH V3] " srinuvasan.a
2024-07-08  9:44         ` Srinuvasan Arjunan
2024-07-18 11:36           ` Srinuvasan Arjunan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=957f7a7d-5baf-4eed-97e3-e902935ba35an@googlegroups.com \
    --to=srinuvasanasv@gmail.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox