@@ -97,7 +97,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
@@ -186,7 +186,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
@@ -231,8 +231,10 @@ 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
+ root_param = f"root={creator.rootdev}" if creator.rootdev else ""
+
+ syslinux_conf += f"APPEND label=boot {root_param} {bootloader.append}\n"
logger.debug("Writing syslinux config %s/syslinux.cfg", hdddir)
cfg = open("%s/hdd/boot/syslinux.cfg" % cr_workdir, "w")