From patchwork Thu May 28 06:38:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gourav Singh X-Patchwork-Id: 5088 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 28 May 2026 08:38:48 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f62.google.com (mail-lf1-f62.google.com [209.85.167.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 64S6clmA002125 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 28 May 2026 08:38:47 +0200 Received: by mail-lf1-f62.google.com with SMTP id 2adb3069b0e04-5a86f4deccdsf9735102e87.2 for ; Wed, 27 May 2026 23:38:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1779950322; cv=pass; d=google.com; s=arc-20240605; b=QODrfX/RFNba/yQxQHPETEaEa8FSEq/HxBFhftmr0WewtEM6sW8JuRugi9ekrB/gvu JhdGZgqEhvQQhwKEJB6n8FQTU9641knG5gz7aHHA3byjFB850wMAYNuH+wPMslOcuCgy 2el8Zd8BbGHR4r5uD1nahz6FZnNjystD5aPhTRxJmAehRp4Q+8ZMrONmh8e89cvv47aj dHk7iQGRVTCnwS15Vgwh/BctGnX6ugo5PIPg2MvucovYwefN3xCnFEDErQ76h6zZCPuK XnG72rp0FmSP/twLW0OUf8ex6HP21sKkJfrf+ywh1hKHhwVBgeA9TPFz4yMnbEeu8gxT sX5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Xb4CKdu2GdMP8UZRL0o+SNEEcH7NR3avh3Dl73v2/Ik=; fh=tS1EkFFk5zhxYB+fF1nvruiA9H9OHdFuqOY/+bJfxX8=; b=LLbEj8M8sG/HU3xErVc5Zkkr5zk+uYCd9WbvaspQQFHolU1u/B8IbNxIB/dHfmPosU wF8qCVe6h4D6hBabBhGLN7Be0qhGAClDoH11MKSQEw9ROfqw52k7KMHUwWg0UYJBMUS9 /f/daNj6doMpUjs3r0sTgTGbgn9P96FK1uiDy/Ex7OUwWeJHRawZfvbAPrRFz2qyk3MS OvCIciQQxNz3ipbXupNAGQY7GVsocQ7dQTWJ4DKCf/OwZBo+3QFhIF+Xw70FBU2KiIIg AkmqMQaP/Mpb8LGybKdauG5Kl+CDLSS4hzhpmnfuSIHTtvu3hTVCMKNM0qskQSIFBmKR 8KjA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hmGQQIdi; spf=pass (google.com: domain of fm-1333022-202605280638382ceff201ea00020709-ssxd9y@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1333022-202605280638382ceff201ea00020709-ssXD9y@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1779950322; x=1780555122; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Xb4CKdu2GdMP8UZRL0o+SNEEcH7NR3avh3Dl73v2/Ik=; b=DmuJ/nR3tvDHisGBUj9kJdkMb+AaNX3IKnyrtPs72f2bKlSrxHvaPDRyVwQmB56EHM CmKMI7HbOzVCi3mp2ee1QueL/7wywhfJBCj5SA2yNmOBoglYcRYucvmM3WMin6eWFmWv pSl9iPmZayv7jkb8Sp6x/HlVMOqXUsTq9lBQXfyN9Z0d3Sbg/m25iVsmeuUJDBgSunFU 6EaOUrI/Slk4fU6c2Erb0TgySBuYncEfc6rLy0dJLyOxsb2SQrsGCghe8m/ZNlt+2/t4 LFEjhUmjgK1FngZF+wSdxiqNFcBb1FweeUkSqnCcLXpa8b0WejFgWt4VPJugP1MfYyNQ uwBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779950322; x=1780555122; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xb4CKdu2GdMP8UZRL0o+SNEEcH7NR3avh3Dl73v2/Ik=; b=PonqjLckeAzm2wxkkG8durHiKt6DPR0vfN7oeYZldu+fT2b+C+c3aVL8fwo5js7oO6 C0QdW5ns0VSH80t+gWnY/ylCDmCuDv/hyEI/ed8yL1CdDyGu4AOHUYlTf5Q2BQNdhLp0 zSZHLEMuRO3VtrSO5JYRE4mN3Hz+2HEbeIe1LOCidH+C3egOt8acA7Kchw/tdgU90Wy5 hvseZXypY+JJ/cqoN9Pb1aH5kPk4NCgUnccOR0MfH5Om87zHOVE5n86k2v8ecYuqcgfF 4tFVjQOguawMNI7qTh6+OapUC34LV1YVLqCtMgz47DPb/75AM89TO1Nudn5OnWckYbBm ZEfw== X-Forwarded-Encrypted: i=2; AFNElJ9cRRk6EWKoMIjRgZY6JNKO1/oYXDYplW4Sz6Nqu/o3ClyXWuUmGGN14PX6vxHvZcezR1gDX3U=@isar-build.org X-Gm-Message-State: AOJu0YyLTcHxuE0EEx3gTiK9aDLk3aU85MrGTO03I+4rL6mJfpmI6373 DtxhwddvZHEQfJy0VbGxHsZCeFUcZPHYkrgCPV1riOA8GJUNsRkaoWQ1 X-Received: by 2002:a05:6512:1452:10b0:5aa:105e:b95e with SMTP id 2adb3069b0e04-5aa32379d7bmr5401452e87.16.1779950321639; Wed, 27 May 2026 23:38:41 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AUV6zMN3RrS1ONihCyrJ9nycnjVjuMmwI9V8qW0hBi+WOWLLZA==" Received: by 2002:a05:6512:1306:b0:5a8:8e51:e485 with SMTP id 2adb3069b0e04-5aa4efdf006ls214914e87.0.-pod-prod-03-eu; Wed, 27 May 2026 23:38:39 -0700 (PDT) X-Received: by 2002:a05:6512:22d9:b0:5a8:757b:80ee with SMTP id 2adb3069b0e04-5aa32379f4emr6749482e87.17.1779950319197; Wed, 27 May 2026 23:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779950319; cv=none; d=google.com; s=arc-20240605; b=NP2nWhAuucpA5GUQBLGoTQr9wjrKUtnL8jiMYQogbq6ZalJYX+m9QwseVxfjLrFwiH p7TpkiwlAWw6tmtg7VXRUhUiabRkzZQ1fjwuQrzBYGbgW1ziXYNvIavsV70j7aQgLfuZ uo86++bdAlOZF0XzF8Z9HTqvmxK88GJLB5bHf/FRGS1WyrjuWVIIsQXmhGs3xh4yVXxv 6sNRiLQ1sZJ3E3V36vCMKXkLp8ThlRKs/LNedeQNnsR3TTR9NqSGZakBnUYqW9pP3T2G KJi9YueLZVE7h+5QeehB2qzeQXHqx/oraQAxGO3D+1osdTUs4N258fgD27U7wTdUMASF reoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=ggFhT31zGxz/Q4hNK1d3KbCbCup/NEnFRlHAbTF7AMs=; fh=LcheGS+ctQFkS2CXSKOhus0j2Ed8EhxJ5jJyIWkAxI4=; b=DFCu4Xmj+q/kP+8V1VOQeX+2bimP1A6hbwC7zRcqeO3YkS2+qfOdUtwgxPk9L5JTz3 yEcdiebd41H/4ON+JdS4hKz+MkPJDGgohcT23YlhA8xI9Z2ur6BWA2r/BtEhxH2MQ6xy /NpFcDjtRUoIOWsBX/osanGci3S7Yog491BfbdpS4ihU/T64DibrGfnZxrYygr6R9ae6 KjVaPGZEZwvNyUFCyCbLjtyDSGK7BHfyPn4ip3UFYgdpx1p+btldkPvAtpLOQ91nMtR8 U/jTHPnTmnPRlnL4dglGyc/WT7i8dkIhnXYvtcA4aO8GyZh/HENol0bUMrjUuTDVbX09 tXTg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hmGQQIdi; spf=pass (google.com: domain of fm-1333022-202605280638382ceff201ea00020709-ssxd9y@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1333022-202605280638382ceff201ea00020709-ssXD9y@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-5aa4637c5d0si158606e87.8.2026.05.27.23.38.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 May 2026 23:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1333022-202605280638382ceff201ea00020709-ssxd9y@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 202605280638382ceff201ea00020709 for ; Thu, 28 May 2026 08:38:38 +0200 X-Patchwork-Original-From: "'Gourav Singh' via isar-users" From: Gourav Singh To: isar-users@googlegroups.com Cc: cedric.hombourger@siemens.com, jan.kiszka@siemens.com, felix.moessbauer@siemens.com, Gourav Singh Subject: [PATCH v4] wic/plugins: gate root= with rootdev check for efi, pcbios and partition Date: Thu, 28 May 2026 12:08:12 +0530 Message-Id: <20260528063812.2024923-1-gouravsingh@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1333022:519-21489:flowmailer X-Original-Sender: gouravsingh@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hmGQQIdi; spf=pass (google.com: domain of fm-1333022-202605280638382ceff201ea00020709-ssxd9y@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1333022-202605280638382ceff201ea00020709-ssXD9y@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Gourav Singh Reply-To: Gourav Singh Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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://lists.yoctoproject.org/g/yocto-patches/topic/wic_patch_v2_wic_plugins/119493445 Signed-off-by: Cedric Hombourger Signed-off-by: Gourav Singh --- .../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(-) -- 2.39.5 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)