summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-27 17:18:10 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:08:38 +0100
commita49a42270046edd460f9619368a6fbeae4d3f58d (patch)
tree010dd1169161c7015dd84d800970b17bb3eec9e5 /scripts/lib
parent594dc7213f69eb06c94444ab4d5ef45e465b710a (diff)
downloadpoky-a49a42270046edd460f9619368a6fbeae4d3f58d.tar.gz
wic: Add --uuid partition option
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. (From OE-Core rev: c7ffe3785e61f3c57aeeebc34ec573685f0ea6a8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/image/help.py5
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py5
2 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index c8b2fab6d8..0666d80f45 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -787,6 +787,11 @@ DESCRIPTION
787 random globally unique identifier (GUID) for the partition 787 random globally unique identifier (GUID) for the partition
788 and use it in bootloader configuration to specify root partition. 788 and use it in bootloader configuration to specify root partition.
789 789
790 --uuid: This option is specific to wic. It specifies partition UUID.
791 It's useful if preconfigured partition UUID is added to kernel command line
792 in bootloader configuration before running wic. In this case .wks file can
793 be generated or modified to set preconfigured parition UUID using this option.
794
790 * bootloader 795 * bootloader
791 796
792 This command allows the user to specify various bootloader 797 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 874b20766d..fea4d6deb4 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):
53 self.extra_space = kwargs.get("extra-space", "10M") 53 self.extra_space = kwargs.get("extra-space", "10M")
54 self.overhead_factor = kwargs.get("overhead-factor", 1.3) 54 self.overhead_factor = kwargs.get("overhead-factor", 1.3)
55 self._use_uuid = False 55 self._use_uuid = False
56 self.uuid = None 56 self.uuid = kwargs.get("uuid", None)
57 self.use_uuid = kwargs.get("use-uuid", False) 57 self.use_uuid = kwargs.get("use-uuid", False)
58 self.source_file = "" 58 self.source_file = ""
59 self.size = 0 59 self.size = 0
@@ -71,6 +71,8 @@ class Wic_PartData(Mic_PartData):
71 retval += " --no-table" 71 retval += " --no-table"
72 if self.use_uuid: 72 if self.use_uuid:
73 retval += " --use-uuid" 73 retval += " --use-uuid"
74 if self.uuid:
75 retval += " --uuid=%s" % self.uuid
74 retval += " --extra-space=%s" % self.extra_space 76 retval += " --extra-space=%s" % self.extra_space
75 retval += " --overhead-factor=%f" % self.overhead_factor 77 retval += " --overhead-factor=%f" % self.overhead_factor
76 78
@@ -491,5 +493,6 @@ class Wic_Partition(Mic_Partition):
491 nargs=1, default=1.3) 493 nargs=1, default=1.3)
492 op.add_option("--use-uuid", dest="use_uuid", action="store_true", 494 op.add_option("--use-uuid", dest="use_uuid", action="store_true",
493 default=False) 495 default=False)
496 op.add_option("--uuid")
494 497
495 return op 498 return op