diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/lib/wic/plugins/source/otaimage.py | 32 | ||||
| -rwxr-xr-x | scripts/run-qemu-ota | 2 |
2 files changed, 11 insertions, 23 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 | |||
| 19 | import os | 19 | import os |
| 20 | import sys | 20 | import sys |
| 21 | 21 | ||
| 22 | from wic.pluginbase import SourcePlugin | 22 | from wic.plugins.source.rawcopy import RawCopyPlugin |
| 23 | from wic.utils.misc import get_bitbake_var | 23 | from wic.utils.misc import get_bitbake_var |
| 24 | 24 | ||
| 25 | class OTAImagePlugin(SourcePlugin): | 25 | logger = logging.getLogger('wic') |
| 26 | |||
| 27 | class 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 | ||
diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index 5334814..641296c 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota | |||
| @@ -161,7 +161,7 @@ def main(): | |||
| 161 | if args.dry_run: | 161 | if args.dry_run: |
| 162 | print(" ".join(img_cmdline)) | 162 | print(" ".join(img_cmdline)) |
| 163 | else: | 163 | else: |
| 164 | Popen(img_cmdline) | 164 | Popen(img_cmdline).wait() |
| 165 | 165 | ||
| 166 | if args.dry_run: | 166 | if args.dry_run: |
| 167 | print(" ".join(cmdline)) | 167 | print(" ".join(cmdline)) |
