All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] runqemu: Move virtio RNG to machine configuration
@ 2016-09-22 13:53 Nathan Rossi
  2016-09-22 13:53 ` [PATCH 2/2] scripts/runqemu: Using a cpio* rootfs has no special network Nathan Rossi
  2016-09-23  1:33 ` [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Khem Raj
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Rossi @ 2016-09-22 13:53 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/conf/machine/include/qemuboot-mips.inc | 2 +-
 meta/conf/machine/include/qemuboot-x86.inc  | 2 +-
 meta/conf/machine/qemuarm.conf              | 2 +-
 meta/conf/machine/qemuarm64.conf            | 2 +-
 meta/conf/machine/qemuppc.conf              | 2 +-
 scripts/runqemu                             | 3 ---
 6 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/meta/conf/machine/include/qemuboot-mips.inc b/meta/conf/machine/include/qemuboot-mips.inc
index 0f04b81443..01f8f8bb3b 100644
--- a/meta/conf/machine/include/qemuboot-mips.inc
+++ b/meta/conf/machine/include/qemuboot-mips.inc
@@ -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}"
diff --git a/meta/conf/machine/include/qemuboot-x86.inc b/meta/conf/machine/include/qemuboot-x86.inc
index 221cc95052..20e90716db 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -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"
diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index 4c5891ab7c..ff1ab7d48f 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -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)}"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index da59c338e4..a0920fe0e4 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -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"
diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
index e54c3dd18f..3ae33088ea 100644
--- a/meta/conf/machine/qemuppc.conf
+++ b/meta/conf/machine/qemuppc.conf
@@ -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@"
diff --git a/scripts/runqemu b/scripts/runqemu
index 658f7c8abd..2ed6f9a26e 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -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"
 
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] scripts/runqemu: Using a cpio* rootfs has no special network
  2016-09-22 13:53 [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Nathan Rossi
@ 2016-09-22 13:53 ` Nathan Rossi
  2016-09-23  1:33 ` [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Rossi @ 2016-09-22 13:53 UTC (permalink / raw)
  To: openembedded-core

When booting a system with the rootfs being of cpio* type the networking
setup should still work the same as for all other root filesystem types.
This change removes the clearing of the NETWORK_CMD variable allowing
for the slirp/tap setup to be provided to QEMU.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 scripts/runqemu | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 2ed6f9a26e..5095e67817 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -821,7 +821,6 @@ class BaseConfig(object):
             self.rootfs_options = '-drive file=%s,if=virtio,format=raw' % self.rootfs
 
         if self.fstype in ('cpio.gz', 'cpio'):
-            self.set('NETWORK_CMD', '')
             self.kernel_cmdline = 'root=/dev/ram0 rw debugshell'
             self.rootfs_options = '-initrd %s' % self.rootfs
         else:
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] runqemu: Move virtio RNG to machine configuration
  2016-09-22 13:53 [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Nathan Rossi
  2016-09-22 13:53 ` [PATCH 2/2] scripts/runqemu: Using a cpio* rootfs has no special network Nathan Rossi
@ 2016-09-23  1:33 ` Khem Raj
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-09-23  1:33 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: Patches and discussions about the oe-core layer

On Thu, Sep 22, 2016 at 6:53 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
> 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>
> ---
>  meta/conf/machine/include/qemuboot-mips.inc | 2 +-
>  meta/conf/machine/include/qemuboot-x86.inc  | 2 +-
>  meta/conf/machine/qemuarm.conf              | 2 +-
>  meta/conf/machine/qemuarm64.conf            | 2 +-
>  meta/conf/machine/qemuppc.conf              | 2 +-
>  scripts/runqemu                             | 3 ---
>  6 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/meta/conf/machine/include/qemuboot-mips.inc b/meta/conf/machine/include/qemuboot-mips.inc
> index 0f04b81443..01f8f8bb3b 100644
> --- a/meta/conf/machine/include/qemuboot-mips.inc
> +++ b/meta/conf/machine/include/qemuboot-mips.inc
> @@ -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}"
> diff --git a/meta/conf/machine/include/qemuboot-x86.inc b/meta/conf/machine/include/qemuboot-x86.inc
> index 221cc95052..20e90716db 100644
> --- a/meta/conf/machine/include/qemuboot-x86.inc
> +++ b/meta/conf/machine/include/qemuboot-x86.inc
> @@ -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"
> diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
> index 4c5891ab7c..ff1ab7d48f 100644
> --- a/meta/conf/machine/qemuarm.conf
> +++ b/meta/conf/machine/qemuarm.conf
> @@ -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)}"
> diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
> index da59c338e4..a0920fe0e4 100644
> --- a/meta/conf/machine/qemuarm64.conf
> +++ b/meta/conf/machine/qemuarm64.conf
> @@ -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"
> diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
> index e54c3dd18f..3ae33088ea 100644
> --- a/meta/conf/machine/qemuppc.conf
> +++ b/meta/conf/machine/qemuppc.conf
> @@ -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@"
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 658f7c8abd..2ed6f9a26e 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -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"
> -

I think this comment should be carried along too.

>          if self.snapshot:
>              self.qemu_opt += " -snapshot"
>
> --
> 2.9.3
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-23  1:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 13:53 [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Nathan Rossi
2016-09-22 13:53 ` [PATCH 2/2] scripts/runqemu: Using a cpio* rootfs has no special network Nathan Rossi
2016-09-23  1:33 ` [PATCH 1/2] runqemu: Move virtio RNG to machine configuration Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.