diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-02 17:02:02 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-11 23:59:10 +0100 |
commit | 179fb20603b31708226649c860d60dc6fa427b11 (patch) | |
tree | 840d4432e33b988fd44b208e5c5d8b9f863cfdf6 /scripts/lib/wic | |
parent | 76f503535f52ef535f312ce4accb076b2b2091a4 (diff) | |
download | poky-179fb20603b31708226649c860d60dc6fa427b11.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.
(From OE-Core rev: 6174983e20bd24422e5cee57e78dce9c92cb3c15)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index c28b9af036..ab62b7a9e9 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -46,6 +46,10 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
46 | mbrfile = "%s/syslinux/" % bootimg_dir | 46 | mbrfile = "%s/syslinux/" % bootimg_dir |
47 | if cr._ptable_format == 'msdos': | 47 | if cr._ptable_format == 'msdos': |
48 | mbrfile += "mbr.bin" | 48 | mbrfile += "mbr.bin" |
49 | elif cr._ptable_format == 'gpt': | ||
50 | mbrfile += "gptmbr.bin" | ||
51 | else: | ||
52 | msger.error("Unsupported partition table: %s" % cr._ptable_format) | ||
49 | 53 | ||
50 | if not os.path.exists(mbrfile): | 54 | if not os.path.exists(mbrfile): |
51 | msger.error("Couldn't find %s. If using the -e option, do you have the right MACHINE set in local.conf? If not, is the bootimg_dir path correct?" % mbrfile) | 55 | msger.error("Couldn't find %s. If using the -e option, do you have the right MACHINE set in local.conf? If not, is the bootimg_dir path correct?" % mbrfile) |
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): | |||
169 | Called after all partitions have been prepared and assembled into a | 169 | Called after all partitions have been prepared and assembled into a |
170 | disk image. In this case, we install the MBR. | 170 | disk image. In this case, we install the MBR. |
171 | """ | 171 | """ |
172 | mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/mbr.bin") | 172 | mbrfile = os.path.join(native_sysroot, "usr/share/syslinux/") |
173 | if image_creator._ptable_format == 'msdos': | ||
174 | mbrfile += "mbr.bin" | ||
175 | elif image_creator._ptable_format == 'gpt': | ||
176 | mbrfile += "gptmbr.bin" | ||
177 | else: | ||
178 | msger.error("Unsupported partition table: %s" % \ | ||
179 | image_creator._ptable_format) | ||
180 | |||
173 | if not os.path.exists(mbrfile): | 181 | if not os.path.exists(mbrfile): |
174 | msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile) | 182 | msger.error("Couldn't find %s. Has syslinux-native been baked?" % mbrfile) |
175 | 183 | ||