summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-04-13 22:32:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-29 11:17:22 +0100
commit1fb309447fa8e66f88a6dfe4e65807d23dd18342 (patch)
treeb8ebcf810df8cb61dd4f72c073d5cc488d8fa47f /scripts
parentba9e1066b021927c54506c8650f2e9d3f431fffa (diff)
downloadpoky-1fb309447fa8e66f88a6dfe4e65807d23dd18342.tar.gz
runqemu: support virtio drive type
Setting QB_DRIVE_TYPE=/dev/vd selects virtio without triggering any warnings. Previously, that was only possible by setting an unknown value and relying on the fallback to virtio, which caused some warnings to be printed. (From OE-Core rev: 5cbf102662dde6f706a19fa133cfd1e7475eb8c1) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 605bcf25d6..f0ddeea1bf 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -992,12 +992,15 @@ class BaseConfig(object):
992 logger.info('Using ide drive') 992 logger.info('Using ide drive')
993 vm_drive = "%s,format=%s" % (self.rootfs, rootfs_format) 993 vm_drive = "%s,format=%s" % (self.rootfs, rootfs_format)
994 else: 994 else:
995 logger.warn("Unknown QB_DRIVE_TYPE: %s" % drive_type) 995 # virtio might have been selected explicitly (just use it), or
996 996 # is used as fallback (then warn about that).
997 if not vm_drive: 997 if not drive_type.startswith("/dev/vd"):
998 logger.warn("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE") 998 logger.warn("Unknown QB_DRIVE_TYPE: %s" % drive_type)
999 logger.warn('Trying to use virtio block drive') 999 logger.warn("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE")
1000 vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format) 1000 logger.warn('Trying to use virtio block drive')
1001 vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
1002
1003 # All branches above set vm_drive.
1001 self.rootfs_options = '%s -no-reboot' % vm_drive 1004 self.rootfs_options = '%s -no-reboot' % vm_drive
1002 self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT')) 1005 self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT'))
1003 1006