summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-03-29 00:12:06 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-30 10:01:58 +0100
commitd486db593e6643bd10b8fe90257d547a9f341043 (patch)
tree4eb2757ad60d046095f1b01c25e5226d1085d717 /scripts/lib
parentc7efb3a21618ce3069811042279a0d898237ac0f (diff)
downloadopenembedded-core-d486db593e6643bd10b8fe90257d547a9f341043.tar.gz
openembedded-core-d486db593e6643bd10b8fe90257d547a9f341043.tar.bz2
openembedded-core-d486db593e6643bd10b8fe90257d547a9f341043.zip
wic: Add option --rootfs-dir to --source
The '--rootfs-dir' option is optional and only takes efect is a partition is set up like this: part /standby --source rootfs --rootfs-dir=<special rootfs> ... So '--rootfs-dir' is used instead of bitbake ROOTFS_DIR variable or '-r' param. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/partition.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 8973edc110..887195fa60 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -45,6 +45,7 @@ class Wic_PartData(Mic_PartData):
Mic_PartData.__init__(self, *args, **kwargs)
self.deleteRemovedAttrs()
self.source = kwargs.get("source", None)
+ self.rootfs = kwargs.get("rootfs-dir", None)
self.source_file = ""
self.size = 0
@@ -53,6 +54,8 @@ class Wic_PartData(Mic_PartData):
if self.source:
retval += " --source=%s" % self.source
+ if self.rootfs:
+ retval += " --rootfs-dir=%s" % self.rootfs
return retval
@@ -332,4 +335,7 @@ class Wic_Partition(Mic_Partition):
# and calculate partition size
op.add_option("--source", type="string", action="store",
dest="source", default=None)
+ # use specified rootfs path to fill the partition
+ op.add_option("--rootfs-dir", type="string", action="store",
+ dest="rootfs", default=None)
return op