summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-06 14:42:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-09 12:06:54 +0100
commit8fec4a5a004f0e99734f8c0820c66522d08f213e (patch)
tree740ecfb24205451026432b4c1cd3250c2c3d149d /scripts
parent51b001909f1856c45cf87091d6e4446c266d5786 (diff)
downloadopenembedded-core-8fec4a5a004f0e99734f8c0820c66522d08f213e.tar.gz
openembedded-core-8fec4a5a004f0e99734f8c0820c66522d08f213e.tar.bz2
openembedded-core-8fec4a5a004f0e99734f8c0820c66522d08f213e.zip
scripts/runqemu: Add snapshot support
Allow access to the snapshot option of qemu to simplify some of our runtime testing to avoid copying images. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index fca8d1d29d..9af13f3360 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -162,6 +162,7 @@ class BaseConfig(object):
self.lock = ''
self.lock_descriptor = ''
self.bitbake_e = ''
+ self.snapshot = False
self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs')
self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso')
@@ -328,6 +329,8 @@ class BaseConfig(object):
self.vhost_enabled = True
elif arg == 'slirp':
self.slirp_enabled = True
+ elif arg == 'snapshot':
+ self.snapshot = True
elif arg == 'publicvnc':
self.qemu_opt_script += ' -vnc :0'
elif arg.startswith('tcpserial='):
@@ -809,6 +812,9 @@ class BaseConfig(object):
# Enable virtio RNG else we can run out of entropy in guests
self.qemu_opt += " -device virtio-rng-pci"
+ if self.snapshot:
+ self.qemu_opt += " -snapshot"
+
if self.serialstdio:
logger.info("Interrupt character is '^]'")
cmd = "stty intr ^]"