diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-10-06 13:33:36 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-07 16:43:58 +0100 |
commit | 5763d8f9cddc593cbcfba78a06071cfd01b3b244 (patch) | |
tree | 1f3ca5651b4ed26f7c7e48cf730aa88db699455d /scripts/lib/wic/partition.py | |
parent | e8ce5083c54e3cece55702c4433601bdcbf9ccc3 (diff) | |
download | poky-5763d8f9cddc593cbcfba78a06071cfd01b3b244.tar.gz |
wic: generate PARTUUID for MDOS partitions
Added generation of partition UUIDs for MSDOS partitions.
UUID for MSDOS partitions is <disk identifier>-<partition number>,
where disk identifier is a random 4 bytes long number. It's usually
generated when MBR/partition table is initialized.
As UUID is used to point to the root partition in bootloader config
we need to generate it before the MBR is initialized.
After MBR is created we need to rewrite system identifier to match
it with what is used in bootloader config. This will be implemented
in the next commit.
(From OE-Core rev: 6ecc6addf4080eda75a15af077816c81c6bf70a5)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r-- | scripts/lib/wic/partition.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 30cd320a30..90f65a1e39 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | import os | 27 | import os |
28 | import tempfile | 28 | import tempfile |
29 | import uuid | ||
30 | 29 | ||
31 | from wic.utils.oe.misc import msger, parse_sourceparams | 30 | from wic.utils.oe.misc import msger, parse_sourceparams |
32 | from wic.utils.oe.misc import exec_cmd, exec_native_cmd | 31 | from wic.utils.oe.misc import exec_cmd, exec_native_cmd |
@@ -60,8 +59,6 @@ class Partition(): | |||
60 | self.system_id = args.system_id | 59 | self.system_id = args.system_id |
61 | self.use_uuid = args.use_uuid | 60 | self.use_uuid = args.use_uuid |
62 | self.uuid = args.uuid | 61 | self.uuid = args.uuid |
63 | if args.use_uuid and not self.uuid: | ||
64 | self.uuid = str(uuid.uuid4()) | ||
65 | 62 | ||
66 | self.lineno = lineno | 63 | self.lineno = lineno |
67 | self.source_file = "" | 64 | self.source_file = "" |