public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: quirin.gylstorff@siemens.com, jan.kiszka@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 8/8] rootfs: stub both dracut and update-initramfs on dracut
Date: Tue, 15 Sep 2026 12:01:25 +0200	[thread overview]
Message-ID: <20260915100125.1991311-9-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260915100125.1991311-1-felix.moessbauer@siemens.com>

The former one can be used as a wrapper even if dracut is used to
actually generate the initrd. If it is used as wrapper and dracut is
stubbed, this might fail as the wrapper expects output from dracut.

As of now, this did not result in any issues, as all dracut-native
targets (where we do explicitly enable dracut in isar) just use the
wrapper instead of calling dracut directly.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/rootfs.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index cea85626..d033bdf0 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -25,7 +25,6 @@ python () {
 
 ROOTFS_PACKAGES ?= ""
 ROOTFS_VARDEPS ?= ""
-ROOTFS_INITRAMFS_GENERATOR_CMD = "${@ d.getVar('ROOTFS_INITRAMFS_GENERATOR_CMDLINE').split()[0]}"
 ROOTFS_INITRAMFS_GENERATOR_CMDLINE = "update-initramfs -u -v -k $kernel_version"
 ROOTFS_BASE_DISTRO ?= "${BASE_DISTRO}"
 
@@ -71,6 +70,8 @@ ROOTFS_PACKAGE_SUFFIX ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
 
 # path to deploy stubbed versions of initrd update scripts during do_rootfs_install
 ROOTFS_STUBS_DIR = "/usr/local/isar-sbin"
+ROOTFS_INITRD_STUBS = "update-initramfs"
+ROOTFS_INITRD_STUBS += "${@ ' dracut' if bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')) else '' }"
 
 # list of <outer>:<inner> or <outer> mount entries
 ROOTFS_MOUNTS ??= "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt ${WORKDIR}:/isar-work"
@@ -321,7 +322,9 @@ rootfs_disable_initrd_generation() {
     set -e
 
     mkdir -p "${ROOTFSDIR}${ROOTFS_STUBS_DIR}"
-    ln -s /usr/bin/true ${ROOTFSDIR}${ROOTFS_STUBS_DIR}/${ROOTFS_INITRAMFS_GENERATOR_CMD}
+    for stub in ${ROOTFS_INITRD_STUBS}; do
+        ln -s /usr/bin/true ${ROOTFSDIR}${ROOTFS_STUBS_DIR}/$stub
+    done
 
     mkdir -p '${ROOTFSDIR}/etc/apt/apt.conf.d'
     echo 'DPkg::Path ${ROOTFS_STUBS_DIR}:/usr/sbin:/usr/bin:/sbin:/bin;' \
-- 
2.55.0

-- 
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 visit https://groups.google.com/d/msgid/isar-users/20260915100125.1991311-9-felix.moessbauer%40siemens.com.

      parent reply	other threads:[~2026-09-15 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 10:01 [PATCH 0/8] Add support to cross-compile a dracut initramfs 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 1/8] rootfs: generalize deployment of rootfs artifact 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 2/8] dracut-module: make module-setup compatible with sysroot 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 3/8] initramfs: move dracut logic to initrd-dracut class 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 4/8] dracut: use fixed log level on generation for progress reporting 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 5/8] dracut: enforce build of reproducible initrd 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 6/8] add host-tooling chroot for generic host tooling 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 7/8] dracut: add support for cross initrd generation 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` 'Felix Moessbauer' via isar-users [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=20260915100125.1991311-9-felix.moessbauer@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=quirin.gylstorff@siemens.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