From 9ac151b744d9305f777430f08e871ea6cba75efc Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Sat, 4 Jan 2020 23:08:57 +0300 Subject: runqemu: add virtio block device Implement new QB_DRIVE_TYPE="/dev/vdb" which falls back to virtio block device emulated by qemu. That is needed to support following qemu command line: -drive id=disk0,file=%s,if=none,format=%s \ -device virtio-blk-device,drive=disk0' Real use case is arm64 emulation with qemu with atf+optee+uboot, so that uboot driver sees this disk and able to load from it. (From OE-Core rev: 4d72cd395b2dd40dde1f3809e3ab255938e6a7a1) Signed-off-by: Maxim Uvarov Signed-off-by: Richard Purdie --- scripts/runqemu | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/runqemu b/scripts/runqemu index b6fca041ae..c324982e8a 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1196,6 +1196,9 @@ class BaseConfig(object): elif drive_type.startswith("/dev/hd"): logger.info('Using ide drive') vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) + elif drive_type.startswith("/dev/vdb"): + logger.info('Using block virtio drive'); + vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0' % (self.rootfs, rootfs_format) else: # virtio might have been selected explicitly (just use it), or # is used as fallback (then warn about that). -- cgit v1.2.3-54-g00ecf