diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-05 10:17:13 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-11 23:55:40 +0100 |
commit | c3cb9eb31570b2a92c8081a6b3716cb7443b1506 (patch) | |
tree | 938f57eaa671c8387e2d7044aeb776f90763b9f1 /scripts/lib/wic | |
parent | e4bc71fa78b0d7a60aa85b8eb09a053545b61b84 (diff) | |
download | openembedded-core-c3cb9eb31570b2a92c8081a6b3716cb7443b1506.tar.gz openembedded-core-c3cb9eb31570b2a92c8081a6b3716cb7443b1506.tar.bz2 openembedded-core-c3cb9eb31570b2a92c8081a6b3716cb7443b1506.zip |
wic: Set type GUID and UUID for partition
Set type GUID and UUID for partition using sgdisk utility.
Type GUID can be specified for partition in .wks with
--part-type option.
UUID is generated when --use-uuid option is specified for
partition.
[YOCTO #7716]
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')
-rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index a6e2e4f233..1eb1f015d6 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -294,6 +294,21 @@ class Image(object): self.__create_partition(d['disk'].device, p['type'], parted_fs_type, p['start'], p['size']) + if p['part_type']: + msger.debug("partition %d: set type UID to %s" % \ + (p['num'], p['part_type'])) + exec_native_cmd("sgdisk --typecode=%d:%s %s" % \ + (p['num'], p['part_type'], + d['disk'].device), self.native_sysroot) + + if p['uuid']: + msger.debug("partition %d: set UUID to %s" % \ + (p['num'], p['uuid'])) + exec_native_cmd("sgdisk --partition-guid=%d:%s %s" % \ + (p['num'], p['uuid'], + d['disk'].device), + self.native_sysroot) + if p['boot']: flag_name = "legacy_boot" if d['ptable_format'] == 'gpt' else "boot" msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \ |