public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Quirin Gylstorff' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Subject: Re: [PATCH] rootfs: run kernel-install after update-initramfs
Date: Fri, 17 Apr 2026 09:35:48 +0200	[thread overview]
Message-ID: <568ae2cf-a3a0-4e9e-b876-9fb437c873f3@siemens.com> (raw)
In-Reply-To: <20260415125522.458497-1-srinuvasan.a@siemens.com>



On 4/15/26 2:55 PM, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
> 
> When efibootguard is used as the primary bootloader and
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux
> to contain a unified kernel image for first boot.
> 
> Run kernel-install after update-initramfs to ensure the unified
> kernel image is generated and placed correctly.
> 
> Invoke kernel-install for UKI generation only when:
> - ukify binary is available
> - /usr/lib/kernel/install.conf exists
> 
> Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>   meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
>   1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
> index a9233111..9024f006 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}"
>   ROOTFS_USE_DRACUT ??= ""
>   
>   def initramfs_generator_cmdline(d):
> -    rootfs_packages =  d.getVar('ROOTFS_PACKAGES') or ''
> +    rootfs_packages = d.getVar('ROOTFS_PACKAGES') or ''
> +
>       if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):
> -        return "dracut --force --kver \"$kernel_version\""
> -    return "update-initramfs -u -v -k \"$kernel_version\""
> +        return 'dracut --force --kver "$kernel_version"'
> +
> +    cmdline = 'update-initramfs -u -v -k "$kernel_version"'
> +
> +    cmdline += (
> +        '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] && '
> +        'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '
> +        '"/boot/initrd.img-$kernel_version" || :'
Why are you not using the uki build of dracut?

Quirin
> +    )
> +
> +    return cmdline
>   
>   ROOTFS_PACKAGES ?= ""
>   ROOTFS_VARDEPS ?= ""
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {
>   }
>   
>   rootfs_generate_initramfs[progress] = "custom:rootfs_progress.InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> +    export kernel
> +}
> +
>   rootfs_generate_initramfs() {
>       if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; then
>           for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do

-- 
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/568ae2cf-a3a0-4e9e-b876-9fb437c873f3%40siemens.com.

      parent reply	other threads:[~2026-04-17  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 12:55 srinuvasan.a via isar-users
2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
2026-04-16 12:16   ` Srinuvasan Arjunan
2026-04-20  9:33     ` Srinuvasan Arjunan
2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
2026-04-17  7:27     ` 'Jan Kiszka' via isar-users
2026-04-17  7:35 ` 'Quirin Gylstorff' 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=568ae2cf-a3a0-4e9e-b876-9fb437c873f3@siemens.com \
    --to=isar-users@googlegroups.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