From: "peter.czegledy via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Peter Czegledy <peter.czegledy@evosoft.com>
Subject: [PATCH v2] wic: bootimg-efi-isar: fix generating of grub.cfg for custom initrd
Date: Fri, 10 Jan 2025 21:30:41 +0100 [thread overview]
Message-ID: <20250110203041.662979-1-peter.czegledy@evosoft.com> (raw)
In-Reply-To: <f3de208c-dcac-4852-b87a-8046636f1aa2@siemens.com>
From: Peter Czegledy <peter.czegledy@evosoft.com>
Specifying the initrd location via WICs sourceparams initrd argument doesn't generate the initrd location properly in case of grub-efi loader.
This fixes that and unifies the custom initrd handling for grub-efi and systemd-boots.
Signed-off-by: Peter Czegledy <peter.czegledy@evosoft.com>
---
.../lib/wic/plugins/source/bootimg-efi-isar.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 50f4187d..78ae4fb2 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -108,9 +108,12 @@ class BootimgEFIPlugin(SourcePlugin):
if label:
label_conf = "LABEL=%s" % label
- kernel, initrd = isar_get_filenames(
+ kernel, default_initrd = isar_get_filenames(
get_bitbake_var("IMAGE_ROOTFS"), get_bitbake_var("KERNEL_FILE")
)
+ if not initrd:
+ initrd = default_initrd
+
grubefi_conf += "linux /%s %s rootwait %s\n" \
% (kernel, label_conf, bootloader.append)
@@ -187,12 +190,11 @@ class BootimgEFIPlugin(SourcePlugin):
title = source_params.get('title')
- temp_initrd = initrd
- kernel, initrd = isar_get_filenames(
+ kernel, default_initrd = isar_get_filenames(
get_bitbake_var("IMAGE_ROOTFS"), get_bitbake_var("KERNEL_FILE")
)
- if temp_initrd:
- initrd = temp_initrd
+ if not initrd:
+ initrd = default_initrd
boot_conf = ""
boot_conf += "title %s\n" % (title if title else "boot")
--
2.39.5
--
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/20250110203041.662979-1-peter.czegledy%40evosoft.com.
next prev parent reply other threads:[~2025-01-10 20:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 11:50 [PATCH] " peter.czegledy via isar-users
2025-01-10 16:05 ` 'Jan Kiszka' via isar-users
2025-01-10 20:30 ` peter.czegledy via isar-users [this message]
2025-01-21 13:57 ` [PATCH v2] " Uladzimir Bely
2025-01-10 16:42 ` [PATCH] " 'Quirin Gylstorff' via isar-users
2025-01-13 16:16 ` 'Niedermayr, BENEDIKT' via isar-users
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=20250110203041.662979-1-peter.czegledy@evosoft.com \
--to=isar-users@googlegroups.com \
--cc=peter.czegledy@evosoft.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