summaryrefslogtreecommitdiff
path: root/scripts/lib/wic/plugins
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-05 12:54:08 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-11 23:55:40 +0100
commitb812d0f40423bc56394cc8b6fc92eb1f477dba1b (patch)
tree09b0c8c596829f712cddbca8486ab1bfa6d2ab02 /scripts/lib/wic/plugins
parente21e31b48b20bf2f8a7733c52b436a65c27de8aa (diff)
downloadopenembedded-core-b812d0f40423bc56394cc8b6fc92eb1f477dba1b.tar.gz
openembedded-core-b812d0f40423bc56394cc8b6fc92eb1f477dba1b.tar.bz2
openembedded-core-b812d0f40423bc56394cc8b6fc92eb1f477dba1b.zip
wic: Move validation of --ptable option to wks parser
bootloader --ptable option has two valid choices: gpt and msdos Moved this check to wks parser by changing option type to 'choice'. Removed similar checks from 5 other places. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py15
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py8
-rw-r--r--scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py8
3 files changed, 6 insertions, 25 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 39ce9f375e..d3b8468c7b 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -60,13 +60,8 @@ class BootimgEFIPlugin(SourcePlugin):
kernel = "/bzImage"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
grubefi_conf += "linux %s root=%s rootwait %s\n" \
- % (kernel, rootstr, options)
+ % (kernel, cr.rootdev, options)
grubefi_conf += "}\n"
msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
@@ -104,16 +99,10 @@ class BootimgEFIPlugin(SourcePlugin):
kernel = "/bzImage"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
boot_conf = ""
boot_conf += "title boot\n"
boot_conf += "linux %s\n" % kernel
- boot_conf += "options LABEL=Boot root=%s %s\n" \
- % (rootstr, options)
+ boot_conf += "options LABEL=Boot root=%s %s\n" % (cr.rootdev, options)
msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
% cr_workdir)
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index dd49480141..5caffbc8e2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -103,12 +103,8 @@ class BootimgPcbiosPlugin(SourcePlugin):
kernel = "/vmlinuz"
syslinux_conf += "KERNEL " + kernel + "\n"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
- syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
+ syslinux_conf += "APPEND label=boot root=%s %s\n" % \
+ (cr.rootdev, options)
msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \
% cr_workdir)
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index 90dac05dca..533eaa7bd1 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -100,12 +100,8 @@ class RootfsPlugin(SourcePlugin):
syslinux_conf += "LABEL linux\n"
syslinux_conf += " KERNEL /boot/bzImage\n"
- if image_creator.ptable_format in ('msdos', 'gpt'):
- rootstr = image_creator.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
- syslinux_conf += " APPEND label=boot root=%s %s\n" % (rootstr, options)
+ syslinux_conf += " APPEND label=boot root=%s %s\n" % \
+ (image_creator.rootdev, options)
syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg")
msger.debug("Writing syslinux config %s" % syslinux_cfg)