[v2] wic/plugins/bootimg-efi-isar: gate root= with creator.rootdev not None

Message ID 20260408064406.3396423-1-gouravsingh@siemens.com
State Under Review
Headers show
Series [v2] wic/plugins/bootimg-efi-isar: gate root= with creator.rootdev not None | expand

Commit Message

Gourav Singh April 8, 2026, 6:44 a.m. UTC
From: Cedric Hombourger <cedric.hombourger@siemens.com>

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).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Signed-off-by: Gourav Singh <gouravsingh@siemens.com>
---
 meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--
2.39.5

Comments

MOESSBAUER, Felix April 8, 2026, 8:24 a.m. UTC | #1
On Wed, 2026-04-08 at 12:14 +0530, 'Gourav Singh' via isar-users wrote:
> From: Cedric Hombourger <cedric.hombourger@siemens.com>
> 
> 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).

Hi, the change itself is fine, but please also apply the same
modification to bootimg-pcbios-isar.py.

As the isar variants of the plugins are based on upstream OE, please
also consider upstreaming this change (if not already fixed upstream).

Felix

> 
> Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> Signed-off-by: Gourav Singh <gouravsingh@siemens.com>
> ---
>  meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 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..6c6698d6 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
> 
> --
> 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/20260408064406.3396423-1-gouravsingh%40siemens.com.

Patch

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..6c6698d6 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