[OE-core] [wic][PATCH 15/20] wic: Add --uuid partition option
Ed Bartosh
ed.bartosh at linux.intel.com
Mon Jun 29 19:10:28 UTC 2015
Added --uuid option to the configuration of wks parser.
This option specifies partition UUID. The code to process
it is already in place. It was implemented for --use-uuid
option.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index c8b2fab..0666d80 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -787,6 +787,11 @@ DESCRIPTION
random globally unique identifier (GUID) for the partition
and use it in bootloader configuration to specify root partition.
+ --uuid: This option is specific to wic. It specifies partition UUID.
+ It's useful if preconfigured partition UUID is added to kernel command line
+ in bootloader configuration before running wic. In this case .wks file can
+ be generated or modified to set preconfigured parition UUID using this option.
+
* bootloader
This command allows the user to specify various bootloader
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 874b207..fea4d6d 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -53,7 +53,7 @@ class Wic_PartData(Mic_PartData):
self.extra_space = kwargs.get("extra-space", "10M")
self.overhead_factor = kwargs.get("overhead-factor", 1.3)
self._use_uuid = False
- self.uuid = None
+ self.uuid = kwargs.get("uuid", None)
self.use_uuid = kwargs.get("use-uuid", False)
self.source_file = ""
self.size = 0
@@ -71,6 +71,8 @@ class Wic_PartData(Mic_PartData):
retval += " --no-table"
if self.use_uuid:
retval += " --use-uuid"
+ if self.uuid:
+ retval += " --uuid=%s" % self.uuid
retval += " --extra-space=%s" % self.extra_space
retval += " --overhead-factor=%f" % self.overhead_factor
@@ -491,5 +493,6 @@ class Wic_Partition(Mic_Partition):
nargs=1, default=1.3)
op.add_option("--use-uuid", dest="use_uuid", action="store_true",
default=False)
+ op.add_option("--uuid")
return op
--
2.1.4
More information about the Openembedded-core
mailing list