summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2017-11-07 14:22:34 +0100
committerAnton Gerasimov <anton@advancedtelematic.com>2017-11-07 14:31:52 +0100
commit9edb72f79953669259ee386ff6c9c5cfe59f6d9c (patch)
treebad74f3f6e161c62fc0da137a6e416573020e47f /scripts
parent514fbb9fe05e11d8fb8a61d969c6ede76c96538a (diff)
downloadmeta-updater-9edb72f79953669259ee386ff6c9c5cfe59f6d9c.tar.gz
Fix incompatibilities with latest pyro, use wic on RPi
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/otaimage.py32
1 files changed, 10 insertions, 22 deletions
diff --git a/scripts/lib/wic/plugins/source/otaimage.py b/scripts/lib/wic/plugins/source/otaimage.py
index eef0bb4..26cfb10 100644
--- a/scripts/lib/wic/plugins/source/otaimage.py
+++ b/scripts/lib/wic/plugins/source/otaimage.py
@@ -19,10 +19,12 @@ import logging
19import os 19import os
20import sys 20import sys
21 21
22from wic.pluginbase import SourcePlugin 22from wic.plugins.source.rawcopy import RawCopyPlugin
23from wic.utils.misc import get_bitbake_var 23from wic.utils.misc import get_bitbake_var
24 24
25class OTAImagePlugin(SourcePlugin): 25logger = logging.getLogger('wic')
26
27class OTAImagePlugin(RawCopyPlugin):
26 """ 28 """
27 Add an already existing filesystem image to the partition layout. 29 Add an already existing filesystem image to the partition layout.
28 """ 30 """
@@ -30,25 +32,6 @@ class OTAImagePlugin(SourcePlugin):
30 name = 'otaimage' 32 name = 'otaimage'
31 33
32 @classmethod 34 @classmethod
33 def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir,
34 bootimg_dir, kernel_dir, native_sysroot):
35 """
36 Called after all partitions have been prepared and assembled into a
37 disk image. Do nothing.
38 """
39 pass
40
41 @classmethod
42 def do_configure_partition(cls, part, source_params, cr, cr_workdir,
43 oe_builddir, bootimg_dir, kernel_dir,
44 native_sysroot):
45 """
46 Called before do_prepare_partition(). Possibly prepare
47 configuration files of some sort.
48 """
49 pass
50
51 @classmethod
52 def do_prepare_partition(cls, part, source_params, cr, cr_workdir, 35 def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
53 oe_builddir, bootimg_dir, kernel_dir, 36 oe_builddir, bootimg_dir, kernel_dir,
54 rootfs_dir, native_sysroot): 37 rootfs_dir, native_sysroot):
@@ -65,5 +48,10 @@ class OTAImagePlugin(SourcePlugin):
65 src = bootimg_dir + "/" + get_bitbake_var("IMAGE_LINK_NAME") + ".otaimg" 48 src = bootimg_dir + "/" + get_bitbake_var("IMAGE_LINK_NAME") + ".otaimg"
66 49
67 logger.debug('Preparing partition using image %s' % (src)) 50 logger.debug('Preparing partition using image %s' % (src))
68 part.prepare_rootfs_from_fs_image(cr_workdir, src, "") 51 source_params['file'] = src
52
53 super(OTAImagePlugin, cls).do_prepare_partition(part, source_params,
54 cr, cr_workdir, oe_builddir,
55 bootimg_dir, kernel_dir,
56 rootfs_dir, native_sysroot)
69 57