summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-08-11 20:35:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-15 18:21:52 +0100
commite00e902fc7f91be415682e084c839bce7bb64d3f (patch)
tree46f06f6eabf3d373a7218c5c1ddfcd7b2e839ada /scripts
parentef700ea11f51f239a886831ad26ff0d64b57c73d (diff)
downloadpoky-e00e902fc7f91be415682e084c839bce7bb64d3f.tar.gz
wic: Add sourceparam param to partition plugin methods
The sourceparam param allows source plugins to be parameterized generically (via --sourceparams="key=val[,key=val], implemented previously). (From OE-Core rev: 2abbcc843ba888782f6d68748d930c81e6ae7040) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py6
-rw-r--r--scripts/lib/wic/pluginbase.py15
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py10
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py10
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py5
5 files changed, 27 insertions, 19 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 3920adbd53..76cf7a994c 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -143,16 +143,16 @@ class Wic_PartData(Mic_PartData):
143 msger.error("The '%s' --source specified for %s doesn't exist.\n\tSee 'wic list source-plugins' for a list of available --sources.\n\tSee 'wic help source-plugins' for details on adding a new source plugin." % (self.source, self.mountpoint)) 143 msger.error("The '%s' --source specified for %s doesn't exist.\n\tSee 'wic list source-plugins' for a list of available --sources.\n\tSee 'wic help source-plugins' for details on adding a new source plugin." % (self.source, self.mountpoint))
144 144
145 self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) 145 self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods)
146 self._source_methods["do_configure_partition"](self, cr, cr_workdir, 146 self._source_methods["do_configure_partition"](self, None, cr, cr_workdir,
147 oe_builddir, 147 oe_builddir,
148 bootimg_dir, 148 bootimg_dir,
149 kernel_dir, 149 kernel_dir,
150 native_sysroot) 150 native_sysroot)
151 self._source_methods["do_stage_partition"](self, cr, cr_workdir, 151 self._source_methods["do_stage_partition"](self, None, cr, cr_workdir,
152 oe_builddir, 152 oe_builddir,
153 bootimg_dir, kernel_dir, 153 bootimg_dir, kernel_dir,
154 native_sysroot) 154 native_sysroot)
155 self._source_methods["do_prepare_partition"](self, cr, cr_workdir, 155 self._source_methods["do_prepare_partition"](self, None, cr, cr_workdir,
156 oe_builddir, 156 oe_builddir,
157 bootimg_dir, kernel_dir, rootfs_dir, 157 bootimg_dir, kernel_dir, rootfs_dir,
158 native_sysroot) 158 native_sysroot)
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 06f318f624..b8b3a46354 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -64,8 +64,9 @@ class SourcePlugin(_Plugin):
64 msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name) 64 msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name)
65 65
66 @classmethod 66 @classmethod
67 def do_stage_partition(self, part, cr, workdir, oe_builddir, bootimg_dir, 67 def do_stage_partition(self, part, source_params, cr, cr_workdir,
68 kernel_dir, native_sysroot): 68 oe_builddir, bootimg_dir, kernel_dir,
69 native_sysroot):
69 """ 70 """
70 Special content staging hook called before do_prepare_partition(), 71 Special content staging hook called before do_prepare_partition(),
71 normally empty. 72 normally empty.
@@ -80,8 +81,9 @@ class SourcePlugin(_Plugin):
80 msger.debug("SourcePlugin: do_stage_partition: part: %s" % part) 81 msger.debug("SourcePlugin: do_stage_partition: part: %s" % part)
81 82
82 @classmethod 83 @classmethod
83 def do_configure_partition(self, part, cr, cr_workdir, oe_builddir, 84 def do_configure_partition(self, part, source_params, cr, cr_workdir,
84 bootimg_dir, kernel_dir, native_sysroot): 85 oe_builddir, bootimg_dir, kernel_dir,
86 native_sysroot):
85 """ 87 """
86 Called before do_prepare_partition(), typically used to create 88 Called before do_prepare_partition(), typically used to create
87 custom configuration files for a partition, for example 89 custom configuration files for a partition, for example
@@ -90,8 +92,9 @@ class SourcePlugin(_Plugin):
90 msger.debug("SourcePlugin: do_configure_partition: part: %s" % part) 92 msger.debug("SourcePlugin: do_configure_partition: part: %s" % part)
91 93
92 @classmethod 94 @classmethod
93 def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, 95 def do_prepare_partition(self, part, source_params, cr, cr_workdir,
94 kernel_dir, rootfs_dir, native_sysroot): 96 oe_builddir, bootimg_dir, kernel_dir, rootfs_dir,
97 native_sysroot):
95 """ 98 """
96 Called to do the actual content population for a partition i.e. it 99 Called to do the actual content population for a partition i.e. it
97 'prepares' the partition to be incorporated into the image. 100 'prepares' the partition to be incorporated into the image.
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 53f1782381..ea94fd2424 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -42,8 +42,9 @@ class BootimgEFIPlugin(SourcePlugin):
42 name = 'bootimg-efi' 42 name = 'bootimg-efi'
43 43
44 @classmethod 44 @classmethod
45 def do_configure_partition(self, part, cr, cr_workdir, oe_builddir, 45 def do_configure_partition(self, source_params, part, cr, cr_workdir,
46 bootimg_dir, kernel_dir, native_sysroot): 46 oe_builddir, bootimg_dir, kernel_dir,
47 native_sysroot):
47 """ 48 """
48 Called before do_prepare_partition(), creates grubefi config 49 Called before do_prepare_partition(), creates grubefi config
49 """ 50 """
@@ -92,8 +93,9 @@ class BootimgEFIPlugin(SourcePlugin):
92 cfg.close() 93 cfg.close()
93 94
94 @classmethod 95 @classmethod
95 def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, 96 def do_prepare_partition(self, part, source_params, cr, cr_workdir,
96 kernel_dir, rootfs_dir, native_sysroot): 97 oe_builddir, bootimg_dir, kernel_dir,
98 rootfs_dir, native_sysroot):
97 """ 99 """
98 Called to do the actual content population for a partition i.e. it 100 Called to do the actual content population for a partition i.e. it
99 'prepares' the partition to be incorporated into the image. 101 'prepares' the partition to be incorporated into the image.
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index bd2225eeaf..aceed20428 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -65,8 +65,9 @@ class BootimgPcbiosPlugin(SourcePlugin):
65 raise ImageError("Unable to set MBR to %s" % full_path) 65 raise ImageError("Unable to set MBR to %s" % full_path)
66 66
67 @classmethod 67 @classmethod
68 def do_configure_partition(self, part, cr, cr_workdir, oe_builddir, 68 def do_configure_partition(self, part, source_params, cr, cr_workdir,
69 bootimg_dir, kernel_dir, native_sysroot): 69 oe_builddir, bootimg_dir, kernel_dir,
70 native_sysroot):
70 """ 71 """
71 Called before do_prepare_partition(), creates syslinux config 72 Called before do_prepare_partition(), creates syslinux config
72 """ 73 """
@@ -118,8 +119,9 @@ class BootimgPcbiosPlugin(SourcePlugin):
118 cfg.close() 119 cfg.close()
119 120
120 @classmethod 121 @classmethod
121 def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, 122 def do_prepare_partition(self, part, source_params, cr, cr_workdir,
122 kernel_dir, rootfs_dir, native_sysroot): 123 oe_builddir, bootimg_dir, kernel_dir,
124 rootfs_dir, native_sysroot):
123 """ 125 """
124 Called to do the actual content population for a partition i.e. it 126 Called to do the actual content population for a partition i.e. it
125 'prepares' the partition to be incorporated into the image. 127 'prepares' the partition to be incorporated into the image.
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 919e97e6b6..a432a18705 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -62,8 +62,9 @@ class RootfsPlugin(SourcePlugin):
62 return image_rootfs_dir 62 return image_rootfs_dir
63 63
64 @classmethod 64 @classmethod
65 def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, 65 def do_prepare_partition(self, part, source_params, cr, cr_workdir,
66 kernel_dir, krootfs_dir, native_sysroot): 66 oe_builddir, bootimg_dir, kernel_dir,
67 krootfs_dir, native_sysroot):
67 """ 68 """
68 Called to do the actual content population for a partition i.e. it 69 Called to do the actual content population for a partition i.e. it
69 'prepares' the partition to be incorporated into the image. 70 'prepares' the partition to be incorporated into the image.