summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2020-01-04 23:08:57 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-06 23:54:39 +0000
commit9ac151b744d9305f777430f08e871ea6cba75efc (patch)
tree6c31c9d4b907fb4750a43bf9ec71a34c12a14745 /scripts
parent0560b812c90376b5ce85d6772020379034fdd83f (diff)
downloadpoky-9ac151b744d9305f777430f08e871ea6cba75efc.tar.gz
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 <maxim.uvarov@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu3
1 files changed, 3 insertions, 0 deletions
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):
1196 elif drive_type.startswith("/dev/hd"): 1196 elif drive_type.startswith("/dev/hd"):
1197 logger.info('Using ide drive') 1197 logger.info('Using ide drive')
1198 vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) 1198 vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format)
1199 elif drive_type.startswith("/dev/vdb"):
1200 logger.info('Using block virtio drive');
1201 vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0' % (self.rootfs, rootfs_format)
1199 else: 1202 else:
1200 # virtio might have been selected explicitly (just use it), or 1203 # virtio might have been selected explicitly (just use it), or
1201 # is used as fallback (then warn about that). 1204 # is used as fallback (then warn about that).