]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Move virtio RNG to machine configuration
authorNathan Rossi <nathan@nathanrossi.com>
Thu, 22 Sep 2016 13:53:00 +0000 (23:53 +1000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Sep 2016 13:55:44 +0000 (14:55 +0100)
Not all QEMU machines (outside of those available in OE-Core) are
capable of using the virtio-rng-pci device due to various machine models
not having a pci/virtio bus. This makes it such that the use of the
'-device virtio-rng-pci' flag to QEMU is machine specific.

This patch removes the general addition of the flag to all runqemu
targets and adds the flag into the QB_OPT_APPEND for all the qemu*
machines in OE-Core that support its use (which is all of them).

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/conf/machine/include/qemuboot-mips.inc
meta/conf/machine/include/qemuboot-x86.inc
meta/conf/machine/qemuarm.conf
meta/conf/machine/qemuarm64.conf
meta/conf/machine/qemuppc.conf
scripts/runqemu

index 0f04b814432f5ca392faf9de30623bf5e259f845..01f8f8bb3b0ce7a0e1390d3991b9e42d7089f589 100644 (file)
@@ -3,5 +3,5 @@ IMAGE_CLASSES += "qemuboot"
 QB_MEM = "-m 256"
 QB_MACHINE = "-machine malta"
 QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
-QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet"
+QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"
index 221cc95052528539d0064087b12cee53f54ef0c7..20e90716db575c0cd0e31032058cc5050d289939 100644 (file)
@@ -11,4 +11,4 @@ QB_CPU_KVM_x86-64 = "-cpu kvm64"
 QB_AUDIO_DRV = "alsa"
 QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
-QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet"
+QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
index 4c5891ab7cdc343888db787248186ff42401162e..ff1ab7d48f66e65d85da769ee7ac7601560b1811 100644 (file)
@@ -14,6 +14,6 @@ SERIAL_CONSOLES = "115200;ttyAMA0 115200;ttyAMA1"
 QB_SYSTEM_NAME = "qemu-system-arm"
 QB_MACHINE = "-machine versatilepb"
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
-QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet"
+QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 PREFERRED_VERSION_linux-yocto ??= "4.8%"
 QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
index da59c338e432e9c4b35fb86399ba8445f0b04676..a0920fe0e4c3328d871591c730861f067e4a5105 100644 (file)
@@ -15,7 +15,7 @@ QB_MEM = "-m 512"
 QB_MACHINE = "-machine virt"
 QB_CPU = "-cpu cortex-a57"
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
-QB_OPT_APPEND = "-show-cursor"
+QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0,mac=@MAC@"
 QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
 QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
index e54c3dd18ff487e5936d2ac16c32591aea724b81..3ae33088eaf6e408e7fc9ecaa3c40dbb53aa1dae 100644 (file)
@@ -16,5 +16,5 @@ QB_SYSTEM_NAME = "qemu-system-ppc"
 QB_MACHINE = "-machine mac99"
 QB_CPU = "-cpu G4"
 QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
-QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet"
+QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=@MAC@"
index 658f7c8abd8e59a0940b291ca5dfa8c19f23e345..2ed6f9a26e958ebeba06c081393e43579b646dde 100755 (executable)
@@ -900,9 +900,6 @@ class BaseConfig(object):
 
         self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.qemu_opt_script, self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
 
-        # Enable virtio RNG else we can run out of entropy in guests
-        self.qemu_opt += " -device virtio-rng-pci"
-
         if self.snapshot:
             self.qemu_opt += " -snapshot"