summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-26 18:28:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-27 11:08:34 +0100
commit871363251a2de8fd701e80f711fbd3770dbf992e (patch)
tree659c79ed9fb19a2cf0044a889fdfc37814927fac /scripts
parent6b210e74b7f7d622c95428210fc641788af29266 (diff)
downloadpoky-871363251a2de8fd701e80f711fbd3770dbf992e.tar.gz
wic: fix generation of partition UUID
Partition UUID for msdos partitioning is based on a 4 bytes long system identifier. Wic uses random number to generate system identifier. For the numbers starting with 0 partition uuid is shorter, which makes wic images non-bootable as kernel expects 8 charactest in PARTUUID parameter. Padded system identifier with '0' when generating partition UUID to make it always 8 characters long. This should fix the boot issue. (From OE-Core rev: bdaba95af2b2c9174311374436f184d2a927f6f1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 7d38ab34fb..67fd183670 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -323,7 +323,7 @@ class PartitionedImage():
323 if self.ptable_format == 'gpt': 323 if self.ptable_format == 'gpt':
324 part.uuid = str(uuid.uuid4()) 324 part.uuid = str(uuid.uuid4())
325 else: # msdos partition table 325 else: # msdos partition table
326 part.uuid = '%0x-%02d' % (self.identifier, part.realnum) 326 part.uuid = '%08x-%02d' % (self.identifier, part.realnum)
327 327
328 def prepare(self, imager): 328 def prepare(self, imager):
329 """Prepare an image. Call prepare method of all image partitions.""" 329 """Prepare an image. Call prepare method of all image partitions."""