summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-26 20:20:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-01 08:14:57 +0100
commit3a5336108433ed99e859e812d4bc036a9c5a8223 (patch)
tree59cc24d3948d19e42b3e981a48060569850f55eb /scripts
parenta7f22bd46f169942f5678532556729f98912647c (diff)
downloadpoky-3a5336108433ed99e859e812d4bc036a9c5a8223.tar.gz
wic: remove fsimage plugin
Removed fsimage plugin and prepare_rootfs_from_fs_image API as they duplicate functionality of rawcopy plugin. Fsimage plugin makes wic to remove the image artifact from deployment directory, which can cause problems too. [YOCTO #10618] (From OE-Core rev: 9a470752f5698f791f8f78e28d163a0b9c695186) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/partition.py13
-rw-r--r--scripts/lib/wic/plugins/source/fsimage.py56
2 files changed, 0 insertions, 69 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 8e32afcd89..647a6fb3a7 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -193,19 +193,6 @@ class Partition():
193 "larger (%d kB) than its allowed size %d kB" % 193 "larger (%d kB) than its allowed size %d kB" %
194 (self.mountpoint, self.size, self.fixed_size)) 194 (self.mountpoint, self.size, self.fixed_size))
195 195
196 def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
197 rootfs_dir):
198 """
199 Handle an already-created partition e.g. xxx.ext3
200 """
201 rootfs = oe_builddir
202 du_cmd = "du -Lbks %s" % rootfs
203 out = exec_cmd(du_cmd)
204 rootfs_size = out.split()[0]
205
206 self.size = int(rootfs_size)
207 self.source_file = rootfs
208
209 def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir, 196 def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
210 native_sysroot): 197 native_sysroot):
211 """ 198 """
diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py
deleted file mode 100644
index f7814995e5..0000000000
--- a/scripts/lib/wic/plugins/source/fsimage.py
+++ /dev/null
@@ -1,56 +0,0 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License version 2 as
6# published by the Free Software Foundation.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along
14# with this program; if not, write to the Free Software Foundation, Inc.,
15# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16#
17
18import logging
19import os
20
21from wic import WicError
22from wic.pluginbase import SourcePlugin
23from wic.utils.misc import get_bitbake_var
24
25logger = logging.getLogger('wic')
26
27class FSImagePlugin(SourcePlugin):
28 """
29 Add an already existing filesystem image to the partition layout.
30 """
31
32 name = 'fsimage'
33
34 @classmethod
35 def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
36 oe_builddir, bootimg_dir, kernel_dir,
37 rootfs_dir, native_sysroot):
38 """
39 Called to do the actual content population for a partition i.e. it
40 'prepares' the partition to be incorporated into the image.
41 """
42 if not bootimg_dir:
43 bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
44 if not bootimg_dir:
45 raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
46
47 logger.debug('Bootimg dir: %s', bootimg_dir)
48
49 if 'file' not in source_params:
50 raise WicError("No file specified")
51
52 src = os.path.join(bootimg_dir, source_params['file'])
53
54
55 logger.debug('Preparing partition using image %s', src)
56 part.prepare_rootfs_from_fs_image(cr_workdir, src, "")