[oe-commits] [openembedded-core] 14/14: runqemu: add virtio block device
git at git.openembedded.org
git at git.openembedded.org
Mon Jan 6 00:25:05 UTC 2020
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 a89a8a7638c6d510eec3c9732bddd50adca00ac9
Author: Maxim Uvarov <maxim.uvarov at linaro.org>
AuthorDate: Sat Jan 4 23:08:57 2020 +0300
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.
Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/runqemu | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/runqemu b/scripts/runqemu
index b6fca04..c324982 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).
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list