public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Singh, Gourav' via isar-users" <isar-users@googlegroups.com>
To: "Kiszka, Jan" <jan.kiszka@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Hombourger, Cedric" <cedric.hombourger@siemens.com>,
	"MOESSBAUER, Felix" <felix.moessbauer@siemens.com>,
	"Koturappa, Hemanth" <hemanth.koturappa@siemens.com>
Subject: RE: [PATCH v4] wic/plugins: gate root= with rootdev check for efi, pcbios and partition
Date: Wed, 24 Jun 2026 13:21:37 +0000	[thread overview]
Message-ID: <KL1PR0601MB4697BCE53123E8FBA0B3C619BCED2@KL1PR0601MB4697.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <826ed2ff-7824-4bfa-9436-47505fa870f8@siemens.com>

Hi Jan,

Sorry for the late reply.

While working on the WIC plugins update, I noticed that because WIC has moved to the standalone project, updating to newer upstream content introduces path/layout changes in addition to normal file updates. 
In Isar, this shows up as old paths under `scripts/lib/wic` / `meta*/scripts/lib/wic` versus newer upstream-style locations (`src/wic`, `example-wks`, etc.). Also, the WIC entrypoint is now `cli.py` instead 
of the old `scripts/wic` style entrypoint, so Isar invocation paths are impacted too.

Could you please suggest which direction you would prefer:
- keep Isar's current path layout as much as possible, or
- migrate to the newer upstream path/entrypoint layout during the bump?

Reference: standalone WIC repository: https://git.yoctoproject.org/wic/

Thanks,
Gourav

-----Original Message-----
From: Kiszka, Jan (FT RPD CED) <jan.kiszka@siemens.com> 
Sent: 28 May 2026 12:29
To: Singh, Gourav (FT FDS CES LX PBU 2) <gouravsingh@siemens.com>; isar-users@googlegroups.com
Cc: Hombourger, Cedric (FT FDS CES LX) <cedric.hombourger@siemens.com>; Moessbauer, Felix (FT RPD CED OES-DE) <felix.moessbauer@siemens.com>
Subject: Re: [PATCH v4] wic/plugins: gate root= with rootdev check for efi, pcbios and partition

On 28.05.26 08:38, Gourav Singh wrote:
> Checks for creator.rootdev (or cr.rootdev) being None were missing and 
> would cause the kernel command line to contain "root=None". When using 
> the Discoverable Partitions Specification, no root= parameter should 
> appear on the kernel command line, as root=None is not valid.
> 
> This fix mirrors the same change applied to the upstream wic plugins:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.yoctoproject.org%2Fg%2Fyocto-patches%2Ftopic%2Fwic_patch_v2_wic_plug
> ins%2F119493445&data=05%7C02%7Cgouravsingh%40siemens.com%7C51d7b4dcce2
> 64dab437c08debc869951%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C639
> 155483489937296%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%
> 7C%7C&sdata=mDDkNdufN2mWSSvVxGqO%2Ba2agMVACXqgU0EBnQX5GaM%3D&reserved=
> 0

I would recommend to split the upstream changes from the isar-only bits, first bumping our imported wic bits to a well-definied upstream revision, then adding what is needed to our forks.

Jan

> 
> Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> Signed-off-by: Gourav Singh <gouravsingh@siemens.com>
> ---
>  .../wic/plugins/source/bootimg-efi-isar.py    |  7 ++++---
>  .../wic/plugins/source/bootimg-pcbios-isar.py | 20 
> ++++++++++++++-----  scripts/lib/wic/plugins/source/bootimg-efi.py |  7 ++++---
>  .../wic/plugins/source/bootimg-partition.py   | 11 ++++++++--
>  .../lib/wic/plugins/source/bootimg-pcbios.py  | 10 ++++++++--
>  5 files changed, 40 insertions(+), 15 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..28b6af63 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 = "root=%s" % 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 += (" root=%s" % 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 = "root=%s" % 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..bb126df8 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,24 @@ class BootimgPcbiosIsarPlugin(SourcePlugin):
> 
>              syslinux_conf += "KERNEL " + kernel + "\n"
> 
> -            syslinux_conf += "APPEND label=boot root=%s %s\n" % \
> -                             (creator.rootdev, bootloader.append)
> +            parts = ["label=boot"]
> +            if creator.rootdev:
> +                parts.append("root=%s" % creator.rootdev)
> +            if bootloader.append:
> +                parts.append(bootloader.append)
> +
> +            syslinux_conf += "APPEND %s\n" % " ".join(parts)
> 
>              # 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 creator.rootdev:
> +                    syslinux_conf = syslinux_conf.replace(
> +                            "root=%s" % creator.rootdev,
> +                            "root=%s initrd=%s" % (creator.rootdev, initrd))
> +                else:
> +                    syslinux_conf = syslinux_conf.replace(
> +                            " label=boot ",
> +                            " label=boot initrd=%s " % initrd)
> 
>          logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg",
>                       cr_workdir)
> diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
> b/scripts/lib/wic/plugins/source/bootimg-efi.py
> index 13a9cddf..c18a1e71 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-efi.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
> @@ -95,7 +95,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 = "root=%s" % creator.rootdev if creator.rootdev else ""
>              if label:
>                  label_conf = "LABEL=%s" % label
> 
> @@ -180,7 +180,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 += (" root=%s" % creator.rootdev) if creator.rootdev else ""
>              if label:
>                  label_conf = "LABEL=%s" % label
> 
> @@ -316,7 +317,7 @@ class BootimgEFIPlugin(SourcePlugin):
> 
>              with tempfile.TemporaryDirectory() as tmp_dir:
>                  label = source_params.get('label')
> -                label_conf = "root=%s" % creator.rootdev
> +                label_conf = "root=%s" % creator.rootdev if creator.rootdev else ""
>                  if label:
>                      label_conf = "LABEL=%s" % label
> 
> diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py 
> b/scripts/lib/wic/plugins/source/bootimg-partition.py
> index 94183174..ebddcb90 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-partition.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
> @@ -153,8 +153,15 @@ class BootimgPartitionPlugin(SourcePlugin):
>              if has_dtb:
>                  extlinux_conf += "   fdtdir %s\n" % fdt_dir
>              bootloader = cr.ks.bootloader
> -            extlinux_conf += "append root=%s rootwait %s\n" \
> -                             % (cr.rootdev, bootloader.append if bootloader.append else '')
> +
> +            # Check if rootdev exists
> +            parts = ["rootwait"]
> +            if cr.rootdev:
> +                parts.insert(0, "root=%s" % cr.rootdev)
> +            if bootloader.append:
> +                parts.append(bootloader.append)
> +
> +            extlinux_conf += "append %s\n" % " ".join(parts)
> 
>          install_cmd = "install -d %s/extlinux/" % hdddir
>          exec_cmd(install_cmd)
> diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py 
> b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
> index a207a835..5d5d5c23 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
> @@ -125,8 +125,14 @@ class BootimgPcbiosPlugin(SourcePlugin):
>              kernel = "/" + get_bitbake_var("KERNEL_IMAGETYPE")
>              syslinux_conf += "KERNEL " + kernel + "\n"
> 
> -            syslinux_conf += "APPEND label=boot root=%s %s\n" % \
> -                             (creator.rootdev, bootloader.append)
> +            # Check if rootdev exists
> +            parts = ["label=boot"]
> +            if creator.rootdev:
> +                parts.append("root=%s" % creator.rootdev)
> +            if bootloader.append:
> +                parts.append(bootloader.append)
> +
> +            syslinux_conf += "APPEND %s\n" % " ".join(parts)
> 
>          logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg",
>                       cr_workdir)
> --
> 2.39.5
> 

--
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
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/KL1PR0601MB4697BCE53123E8FBA0B3C619BCED2%40KL1PR0601MB4697.apcprd06.prod.outlook.com.

  reply	other threads:[~2026-06-24 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  6:38 'Gourav Singh' via isar-users
2026-05-28  6:59 ` 'Jan Kiszka' via isar-users
2026-06-24 13:21   ` 'Singh, Gourav' via isar-users [this message]
2026-06-24 13:50     ` 'MOESSBAUER, Felix' 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=KL1PR0601MB4697BCE53123E8FBA0B3C619BCED2@KL1PR0601MB4697.apcprd06.prod.outlook.com \
    --to=isar-users@googlegroups.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=gouravsingh@siemens.com \
    --cc=hemanth.koturappa@siemens.com \
    --cc=jan.kiszka@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