From ed1ba58cfebe0eebdc3192614cec35dd288afdc3 Mon Sep 17 00:00:00 2001 From: Junil Kim Date: Tue, 4 Sep 2018 14:02:29 +0900 Subject: [PATCH] qemu: support graphic hw acceleration :Release Notes: support "runqemu qemux86" to use hw acceleration options :Detailed Notes: Currently qemux86 generated from oe build fails launching with hw acceleration options (e.g. -vga virtio -display sdl,gl=on) on X11 WM linux host. - To support acceleration options, the following should be required. qemu should be compiled with "--enable-opengl". - libepoxy should be compiled with "-enable-x11" as well as "-enable-egl" (These options are not mutual exclusive.). :Testing Performed: Tested locally on Ubuntu 18.04. $ runqemu qemux86 kvm slirp :QA Notes: None :Issues Addressed: None Signed-off-by: Junil Kim --- meta-webos/conf/machine/include/qemuboot-x86.inc | 16 ++++++++++++++++ meta-webos/recipes-devtools/qemu/qemu_%.bbappend | 2 +- .../libepoxy/libepoxy_%.bbappend | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 meta-webos/conf/machine/include/qemuboot-x86.inc diff --git a/meta-webos/conf/machine/include/qemuboot-x86.inc b/meta-webos/conf/machine/include/qemuboot-x86.inc new file mode 100644 index 000000000..e7982af1f --- /dev/null +++ b/meta-webos/conf/machine/include/qemuboot-x86.inc @@ -0,0 +1,16 @@ +# For runqemu +IMAGE_CLASSES += "qemuboot" +QB_SYSTEM_NAME_x86 = "qemu-system-i386" +QB_CPU_x86 = "-cpu qemu32" +QB_CPU_KVM_x86 = "-cpu kvm32" + +QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64" +QB_CPU_x86-64 = "-cpu core2duo" +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=1280x720-32 oprofile.timer=1 uvesafb.task_timeout=-1" +# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy +QB_OPT_APPEND = "-vga virtio -display sdl,gl=on -show-cursor -usb -usbdevice tablet -device virtio-rng-pci" +QB_MEM = "-m 1024" diff --git a/meta-webos/recipes-devtools/qemu/qemu_%.bbappend b/meta-webos/recipes-devtools/qemu/qemu_%.bbappend index 2e687585d..1206d0d8b 100644 --- a/meta-webos/recipes-devtools/qemu/qemu_%.bbappend +++ b/meta-webos/recipes-devtools/qemu/qemu_%.bbappend @@ -5,7 +5,7 @@ EXTENDPRAUTO_append = "webos2" PACKAGECONFIG[sdl2] = "--with-sdlabi=2.0,--with-sdlabi=1.2,libsdl2" PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer" -PACKAGECONFIG_class-native = "fdt alsa sdl sdl2 virglrenderer" +PACKAGECONFIG_class-native = "fdt alsa sdl sdl2 virglrenderer glx" PACKAGECONFIG_class-nativesdk = "fdt sdl sdl sdl2 virglrenderer" FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" diff --git a/meta-webos/recipes-graphics/libepoxy/libepoxy_%.bbappend b/meta-webos/recipes-graphics/libepoxy/libepoxy_%.bbappend index 4c43f136f..15e741ecd 100644 --- a/meta-webos/recipes-graphics/libepoxy/libepoxy_%.bbappend +++ b/meta-webos/recipes-graphics/libepoxy/libepoxy_%.bbappend @@ -5,7 +5,7 @@ EXTENDPRAUTO_append = "webos1" REQUIRED_DISTRO_FEATURES_class-native = "" REQUIRED_DISTRO_FEATURES_class-nativesdk = "" -PACKAGECONFIG_class-native = "egl" +PACKAGECONFIG_class-native = "x11 egl" PACKAGECONFIG_class-nativesdk = "egl" BBCLASSEXTEND = "native nativesdk"