All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] runqemu: Change to use -device virtio-gpu-pci instead of -vga virtio
@ 2019-08-28  5:45 shohei.maruyama
  2019-08-28  5:45 ` [PATCH v2 2/2] runqemu: Fix guest has not initialized error shohei.maruyama
  0 siblings, 1 reply; 4+ messages in thread
From: shohei.maruyama @ 2019-08-28  5:45 UTC (permalink / raw)
  To: openembedded-core

If using qemu-system-aarch64 or qemu-system-arm with the options, an error
occured as follows:

  qemu-system-aarch64: Virtio VGA not available

this commit fixes the error by using -device virtio-gpu-pci instead of
-vga virtio.

Signed-off-by: Shohei Maruyama <shohei.maruyama@cybertrust.co.jp>
---
 scripts/runqemu | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 19fd521cd9..28ecee97a7 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -398,11 +398,11 @@ class BaseConfig(object):
             elif arg == 'sdl':
                 self.qemu_opt_script += ' -display sdl'
             elif arg == 'gtk-gl':
-                self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
+                self.qemu_opt_script += ' -device virtio-gpu-pci,virgl=on -display gtk,gl=on'
             elif arg == 'gtk-gl-es':
-                self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+                self.qemu_opt_script += ' -device virtio-gpu-pci,virgl=on -display gtk,gl=es'
             elif arg == 'egl-headless':
-                self.qemu_opt_script += ' -vga virtio -display egl-headless'
+                self.qemu_opt_script += ' -device virtio-gpu-pci,virgl=on -display egl-headless'
                 # As runqemu can be run within bitbake (when using testimage, for example),
                 # we need to ensure that we run host pkg-config, and that it does not
                 # get mis-directed to native build paths set by bitbake.
-- 
2.23.0



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

* [PATCH v2 2/2] runqemu: Fix guest has not initialized error
  2019-08-28  5:45 [PATCH v2 1/2] runqemu: Change to use -device virtio-gpu-pci instead of -vga virtio shohei.maruyama
@ 2019-08-28  5:45 ` shohei.maruyama
  2019-08-28  6:59   ` Alexander Kanavin
  2019-08-28  7:55   ` Alexander Kanavin
  0 siblings, 2 replies; 4+ messages in thread
From: shohei.maruyama @ 2019-08-28  5:45 UTC (permalink / raw)
  To: openembedded-core

By default qemu use -device VGA,edid=on but in some case cannot use
display because of it.

Signed-off-by: Shohei Maruyama <shohei.maruyama@cybertrust.co.jp>
---
 meta/conf/machine/qemuarm64.conf | 2 +-
 scripts/runqemu                  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index 5c8aac1511..2c6d4dfc98 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -17,7 +17,7 @@ QB_CPU = "-cpu cortex-a57"
 # Standard Serial console
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0"
 # For graphics to work we need to define the VGA device as well as the necessary USB devices
-QB_OPT_APPEND = "-show-cursor -device VGA,edid=on"
+QB_OPT_APPEND = "-show-cursor"
 QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0"
diff --git a/scripts/runqemu b/scripts/runqemu
index 28ecee97a7..d4ff5b9eb9 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -397,6 +397,8 @@ class BaseConfig(object):
                 self.kernel_cmdline_script += ' console=ttyS0'
             elif arg == 'sdl':
                 self.qemu_opt_script += ' -display sdl'
+            elif arg == 'gtk':
+                self.qemu_opt_script += ' -device virtio-gpu-pci'
             elif arg == 'gtk-gl':
                 self.qemu_opt_script += ' -device virtio-gpu-pci,virgl=on -display gtk,gl=on'
             elif arg == 'gtk-gl-es':
-- 
2.23.0



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

* Re: [PATCH v2 2/2] runqemu: Fix guest has not initialized error
  2019-08-28  5:45 ` [PATCH v2 2/2] runqemu: Fix guest has not initialized error shohei.maruyama
@ 2019-08-28  6:59   ` Alexander Kanavin
  2019-08-28  7:55   ` Alexander Kanavin
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2019-08-28  6:59 UTC (permalink / raw)
  To: shohei.maruyama; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

On Wed, 28 Aug 2019 at 07:46, <shohei.maruyama@cybertrust.co.jp> wrote:

> By default qemu use -device VGA,edid=on but in some case cannot use
> display because of it.
> +            elif arg == 'gtk':
> +                self.qemu_opt_script += ' -device virtio-gpu-pci'
>

We would prefer to use standard vga, and enable virtio only for virgl
usage. Can you please look into what the issue is here?

Alex

[-- Attachment #2: Type: text/html, Size: 767 bytes --]

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

* Re: [PATCH v2 2/2] runqemu: Fix guest has not initialized error
  2019-08-28  5:45 ` [PATCH v2 2/2] runqemu: Fix guest has not initialized error shohei.maruyama
  2019-08-28  6:59   ` Alexander Kanavin
@ 2019-08-28  7:55   ` Alexander Kanavin
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2019-08-28  7:55 UTC (permalink / raw)
  To: shohei.maruyama; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Wed, 28 Aug 2019 at 07:46, <shohei.maruyama@cybertrust.co.jp> wrote:

> By default qemu use -device VGA,edid=on but in some case cannot use
> display because of it.
> +            elif arg == 'gtk':
> +                self.qemu_opt_script += ' -device virtio-gpu-pci'
>

This also needs:
a)  '-display gtk, gl=off' should be added explicitly - it is the default
now, but may not be in future qemu versions;
b) the option should be named 'gtk-virtio', as it is important which
emulated video card it is using;
c) the option should be documented at the beginning of runqemu script;
d) like in the previous patch, please first look into why '-vga virtio'
does not work for you;
e) also, if you can, please get to the reason why standard vga does not
work either. It should be working on all qemu variants.

Thanks,
Alex

[-- Attachment #2: Type: text/html, Size: 1423 bytes --]

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

end of thread, other threads:[~2019-08-28  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  5:45 [PATCH v2 1/2] runqemu: Change to use -device virtio-gpu-pci instead of -vga virtio shohei.maruyama
2019-08-28  5:45 ` [PATCH v2 2/2] runqemu: Fix guest has not initialized error shohei.maruyama
2019-08-28  6:59   ` Alexander Kanavin
2019-08-28  7:55   ` Alexander Kanavin

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.