[oe-commits] [openembedded-core] 10/50: runqemu: support virtio drive type

git at git.openembedded.org git at git.openembedded.org
Fri Apr 28 08:23:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 06f3f987a5ef17c280f19df162387f900b00ac96
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Thu Apr 13 22:32:51 2017 +0200

    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.
    
    Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/runqemu | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 605bcf2..f0ddeea 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -992,12 +992,15 @@ class BaseConfig(object):
                         logger.info('Using ide drive')
                         vm_drive = "%s,format=%s" % (self.rootfs, rootfs_format)
                     else:
-                        logger.warn("Unknown QB_DRIVE_TYPE: %s" % drive_type)
-
-                if not vm_drive:
-                    logger.warn("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE")
-                    logger.warn('Trying to use virtio block drive')
-                    vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
+                        # virtio might have been selected explicitly (just use it), or
+                        # is used as fallback (then warn about that).
+                        if not drive_type.startswith("/dev/vd"):
+                            logger.warn("Unknown QB_DRIVE_TYPE: %s" % drive_type)
+                            logger.warn("Failed to figure out drive type, consider define or fix QB_DRIVE_TYPE")
+                            logger.warn('Trying to use virtio block drive')
+                        vm_drive = '-drive if=virtio,file=%s,format=%s' % (self.rootfs, rootfs_format)
+
+                # All branches above set vm_drive.
                 self.rootfs_options = '%s -no-reboot' % vm_drive
             self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT'))
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list