From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH v2 15/20] wic: Add --uuid partition option
Date: Tue, 30 Jun 2015 11:51:47 +0300 [thread overview]
Message-ID: <1435654312-18177-16-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1435654312-18177-1-git-send-email-ed.bartosh@linux.intel.com>
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@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
next prev parent reply other threads:[~2015-06-30 8:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 8:51 [wic][PATCH v2 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 01/20] wic: Fix misleading message Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 02/20] wic: Test rootfs plugin using image recipes Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 03/20] wic: Test rootfs plugin using rootfs paths Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 04/20] wic: Refactor getting bitbake variables Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 05/20] wic: Include mount point into image report Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 06/20] wic: Remove annoing debug message Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 07/20] wic: Turn off debug output for 'bitbake -e' Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 08/20] wic: Refactor prepare_rootfs API Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 09/20] wic: Rename partition images Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 10/20] wic: Get rid of useless variable 'image_rootfs' Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 11/20] wic: Call methods better way Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 12/20] wic: Refactor prepare_empty_partition API Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 13/20] wic: Remove duplicated code Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 14/20] wic: Fix naming conflict Ed Bartosh
2015-06-30 8:51 ` Ed Bartosh [this message]
2015-06-30 8:51 ` [wic][PATCH v2 16/20] wic: Refactor fstab update code Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 17/20] wic: Remove __write_partition method Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 18/20] wic: Fix confusing error message Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 19/20] wic: Code cleanup: long lines, identation and whitespaces Ed Bartosh
2015-06-30 8:51 ` [wic][PATCH v2 20/20] wic: Code cleanup: unused imports Ed Bartosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435654312-18177-16-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox