public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Gourav Singh' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, Gourav Singh <gouravsingh@siemens.com>
Subject: [PATCH v4] wic/plugins: gate root= with creator.rootdev for efi-isar and pcbios-isar
Date: Fri, 10 Apr 2026 14:38:13 +0530	[thread overview]
Message-ID: <20260410090813.3501355-1-gouravsingh@siemens.com> (raw)

Checks for creator.rootdev not being None were missing and would cause
the kernel command line to read "root=None". When using the Discoverable
Partitions Specification, we really want no root= parameter on the
kernel command line (and root=None is anyhow not a valid option).

A patch has been sent to upstream OE wic plugins to apply these changes:
https://lists.yoctoproject.org/g/yocto-patches/topic/wic_patch_wic_plugins/118740415

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Signed-off-by: Gourav Singh <gouravsingh@siemens.com>
---
 .../lib/wic/plugins/source/bootimg-efi-isar.py  |  7 ++++---
 .../wic/plugins/source/bootimg-pcbios-isar.py   | 17 ++++++++++++-----
 2 files changed, 16 insertions(+), 8 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 6bc78d42..d68a8ff3 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -104,7 +104,7 @@ class BootimgEFIPlugin(SourcePlugin):
                         (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))

             label = source_params.get('label')
-            label_conf = "root=%s" % creator.rootdev
+            label_conf = f"root={creator.rootdev}" if creator.rootdev else ""
             if label:
                 label_conf = "LABEL=%s" % label

@@ -201,7 +201,8 @@ class BootimgEFIPlugin(SourcePlugin):
             boot_conf += "linux /%s\n" % kernel

             label = source_params.get('label')
-            label_conf = "LABEL=Boot root=%s" % creator.rootdev
+            label_conf = "LABEL=Boot"
+            label_conf += f" root={creator.rootdev}" if creator.rootdev else ""
             if label:
                 label_conf = "LABEL=%s" % label

@@ -366,7 +367,7 @@ class BootimgEFIPlugin(SourcePlugin):

             with tempfile.TemporaryDirectory() as tmp_dir:
                 label = source_params.get('label')
-                label_conf = "root=%s" % creator.rootdev
+                label_conf = f"root={creator.rootdev}" if creator.rootdev else ""
                 if label:
                     label_conf = "LABEL=%s" % label

diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
index d5040b72..e12cba83 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
@@ -140,14 +140,21 @@ class BootimgPcbiosIsarPlugin(SourcePlugin):

             syslinux_conf += "KERNEL " + kernel + "\n"

-            syslinux_conf += "APPEND label=boot root=%s %s\n" % \
-                             (creator.rootdev, bootloader.append)
+            # Check if rootdev exists
+            root_param = f"root={creator.rootdev}" if creator.rootdev else ""
+
+            syslinux_conf += f"APPEND label=boot {root_param} {bootloader.append}\n"

             # if we are using an initrd, smuggle it in
             if initrd:
-                syslinux_conf = syslinux_conf.replace(
-                    " root=%s " % (creator.rootdev),
-                    " root=%s initrd=%s " % (creator.rootdev, initrd))
+                if root_param:
+                    syslinux_conf = syslinux_conf.replace(
+                        root_param,
+                        f"{root_param} initrd={initrd} ")
+                else:
+                    syslinux_conf = syslinux_conf.replace(
+                        " label=boot ",
+                        f" label=boot initrd={initrd} ")

         logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg",
                      cr_workdir)
--
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/20260410090813.3501355-1-gouravsingh%40siemens.com.

             reply	other threads:[~2026-04-10  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10  9:08 'Gourav Singh' via isar-users [this message]
2026-04-10 10:32 ` 'Jan Kiszka' 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=20260410090813.3501355-1-gouravsingh@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=gouravsingh@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