From: Zhihang Wei <wzh@ilbers.de>
To: isar-users@googlegroups.com, quirin.gylstorff@siemens.com,
jan.kiszka@siemens.com, cedric.hombourger@siemens.com,
christoph.steiger@siemens.com
Subject: Re: [PATCH] initramfs: Restore default "generate-initrd" logic in initramfs.bbclass
Date: Thu, 11 Dec 2025 11:02:32 +0100 [thread overview]
Message-ID: <bef8a9db-a8ed-4f6b-9ed1-9a1c9441592d@ilbers.de> (raw)
In-Reply-To: <20251209115009.1932908-1-wzh@ilbers.de>
Applied to next.
Zhihang
On 12/9/25 12:50, Zhihang Wei wrote:
> After 78d42de "rootfs: rework no-generate-initrd rootfs feature", the logic
> for adding "generate-initrd" feature was moved from image.bbclass to
> rootfs.bbclass. This feature controls whether the initrd(initramfs) is
> generated and deployed under build/tmp/deploy/images/. By default, this
> feature is not added.
>
> However, initramfs.bbclass also inherits rootfs.bbclass. As a result, builds
> of initramfs recipes, such as isar-initramfs.bb, no longer generate or deploy
> an initrd image. The test case test_var_image_initrd has failed.
>
> This patch adds "generate-initrd" feature back to initramfs.bbclass, and
> cleans up incorrect conflict resolving in c3c4e72.
>
> Signed-off-by: Zhihang Wei <wzh@ilbers.de>
> ---
> meta/classes-recipe/image.bbclass | 3 +++
> meta/classes-recipe/initramfs.bbclass | 1 +
> meta/classes-recipe/rootfs.bbclass | 4 ----
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
> index 24a23808..2c8beefa 100644
> --- a/meta/classes-recipe/image.bbclass
> +++ b/meta/classes-recipe/image.bbclass
> @@ -48,6 +48,9 @@ python() {
> d.setVar('INITRD_DEPLOY_FILE', initrd_image)
> }
>
> +# Generate and deploy debian default initrd if no custom initrd needs to be built
> +ROOTFS_FEATURES += "${@ 'generate-initrd' if (d.getVar('INITRD_IMAGE') == '' and d.getVar('IMAGE_INITRD') == '') else ''}"
> +
> # This variable is used by wic and start_vm
> KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}"
>
> diff --git a/meta/classes-recipe/initramfs.bbclass b/meta/classes-recipe/initramfs.bbclass
> index 85b07f28..7d4ae523 100644
> --- a/meta/classes-recipe/initramfs.bbclass
> +++ b/meta/classes-recipe/initramfs.bbclass
> @@ -27,6 +27,7 @@ DEPENDS += "${INITRAMFS_INSTALL}"
>
> ROOTFSDIR = "${INITRAMFS_ROOTFS}"
> ROOTFS_FEATURES = "generate-manifest"
> +ROOTFS_FEATURES += "generate-initrd"
> ROOTFS_PACKAGES = "${INITRAMFS_GENERATOR_PKG} ${INITRAMFS_PREINSTALL} ${INITRAMFS_INSTALL}"
>
> # validate whether there are incompatible packages in the installation list
> diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
> index eb5645af..cbb658dd 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -23,8 +23,6 @@ ROOTFS_INITRAMFS_GENERATOR_CMD = "${@ d.getVar('ROOTFS_INITRAMFS_GENERATOR_CMDLI
> ROOTFS_INITRAMFS_GENERATOR_CMDLINE = "${@ initramfs_generator_cmdline(d)}"
> ROOTFS_BASE_DISTRO ?= "${BASE_DISTRO}"
>
> -IMAGE_INITRD ?= ""
> -
> # Features of the rootfs creation:
> # available features are:
> # 'clean-package-cache' - delete package cache from rootfs
> @@ -32,8 +30,6 @@ IMAGE_INITRD ?= ""
> # 'export-dpkg-status' - exports /var/lib/dpkg/status file to ${ROOTFS_DPKGSTATUS_DEPLOY_DIR}
> # 'clean-log-files' - delete log files that are not owned by packages
> # 'populate-systemd-preset' - enable systemd units according to systemd presets
> -# 'generate-initrd' - generate debian default initrd
> -ROOTFS_FEATURES += "${@ 'generate-initrd' if d.getVar('IMAGE_INITRD') == '' else ''}"
>
> ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes"
>
--
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/bef8a9db-a8ed-4f6b-9ed1-9a1c9441592d%40ilbers.de.
prev parent reply other threads:[~2025-12-11 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 11:50 Zhihang Wei
2025-12-11 10:02 ` Zhihang Wei [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=bef8a9db-a8ed-4f6b-9ed1-9a1c9441592d@ilbers.de \
--to=wzh@ilbers.de \
--cc=cedric.hombourger@siemens.com \
--cc=christoph.steiger@siemens.com \
--cc=isar-users@googlegroups.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