aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-02 17:02:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-11 23:55:37 +0100
commit6174983e20bd24422e5cee57e78dce9c92cb3c15 (patch)
tree83c336866fef006b2ec44147d1bf63392518a47f /scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
parent0e119d469796a19fbeae61a7162fd70660c936a5 (diff)
downloadopenembedded-core-contrib-6174983e20bd24422e5cee57e78dce9c92cb3c15.tar.gz
wic: Use gptmbr.bin MBR for gpt partitions
Used proper syslinux MBR gptmbr.bin for GPT partitons. Added check for unsupported partition formats. 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/source/rootfs_pcbios_ext.py')
-rw-r--r--scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index 29c873dc7b..cdd7c84c12 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -169,7 +169,15 @@ class RootfsPlugin(SourcePlugin):
Called after all partitions have been prepared and assembled into a
disk image. In this case, we install the MBR.
"""
- mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/mbr.bin")
+ mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/")
+ if image_creator._ptable_format == 'msdos':
+ mbrfile += "mbr.bin"
+ elif image_creator._ptable_format == 'gpt':
+ mbrfile += "gptmbr.bin"
+ else:
+ msger.error("Unsupported partition table: %s" % \
+ image_creator._ptable_format)
+
if not os.path.exists(mbrfile):
msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile)