summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-04-22 12:32:03 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-29 07:58:44 +0100
commit5bc1e42b03cc99d9e6a710d56153667d04a195d1 (patch)
tree5a53f9b5e68ea5b0f657830e81265f64ee6d63cf /scripts/lib
parent514a87877e61d63626c21a61a1824c131031489d (diff)
downloadpoky-5bc1e42b03cc99d9e6a710d56153667d04a195d1.tar.gz
wic: set partition system id
Used sfdisk to set partition system id if --system-id parameter is used for a partition in wks file. [YOCTO #9096] (From OE-Core rev: a1f7f7e61fd20fb6319825648930f7b6aa0e0cee) 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')
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 9da4a7f2b4..4170ec1918 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -110,7 +110,8 @@ class Image(object):
110 'align': align, # Partition alignment 110 'align': align, # Partition alignment
111 'no_table' : no_table, # Partition does not appear in partition table 111 'no_table' : no_table, # Partition does not appear in partition table
112 'part_type' : part_type, # Partition type 112 'part_type' : part_type, # Partition type
113 'uuid': uuid} # Partition UUID 113 'uuid': uuid, # Partition UUID
114 'system_id': system_id} # Partition system id
114 115
115 self.__add_partition(part) 116 self.__add_partition(part)
116 117
@@ -310,6 +311,10 @@ class Image(object):
310 exec_native_cmd("parted -s %s set %d %s on" % \ 311 exec_native_cmd("parted -s %s set %d %s on" % \
311 (disk['disk'].device, part['num'], flag_name), 312 (disk['disk'].device, part['num'], flag_name),
312 self.native_sysroot) 313 self.native_sysroot)
314 if part['system_id']:
315 exec_native_cmd("sfdisk --part-type %s %s %s" % \
316 (disk['disk'].device, part['num'], part['system_id']),
317 self.native_sysroot)
313 318
314 # Parted defaults to enabling the lba flag for fat16 partitions, 319 # Parted defaults to enabling the lba flag for fat16 partitions,
315 # which causes compatibility issues with some firmware (and really 320 # which causes compatibility issues with some firmware (and really