meta-webosose
meta-webosose copied to clipboard
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
- First Issue
Error Message: qemu does not support opengl
Solution: qemu should be compiled with "--enable-opengl" (oe-core/meta/recipes-devtools/qemu/qemu.inc)
PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
- Second Issue
Segment Fault when running qemu on the host pc
( meta-webosose/meta-webos-backports/meta-webos-backports-2.4/recipes-graphics/libepoxy/libepoxy_1.4.3.bb ) Solution: libepoxy should be compiled with "--enable-x11" as well as "--enable-egl" (These options are not mutual exclusive.)
- Required Jobs (enabling virgl hw acceleration) : QB_OPT_APPEND should have the following options ( oe-core/meta/conf/machine/include/qemuboot-x86.inc )
-vga virtio -display sdl,gl=on
- Required Jobs (/dev/kvm permission) https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu
sudo groupadd --system kvm
sudo gpasswd -a $USER kvm
sudo chown root:kvm /dev/kvm
sudo chmod 0660 /dev/kvm
- Required Jobs (To use runqemu params)
- slirp - enable user networking
- kvm - enable KVM when running x86/x86_64
runqemu qemux86 kvm slirp
In my 16.04 Ubuntu, build fails with followings, mesa-native_17.1.7
../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_misc.o): In function llvm::RTDyldMemoryManager::getSymbolAddress(std::string const&)': | lp_bld_misc.cpp:(.text._ZN4llvm19RTDyldMemoryManager16getSymbolAddressERKSs[_ZN4llvm19RTDyldMemoryManager16getSymbolAddressERKSs]+0x4): undefined reference to
llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::string const&)'
| ../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_misc.o): In function llvm::RTDyldMemoryManager::findSymbol(std::string const&)': | lp_bld_misc.cpp:(.text._ZN4llvm19RTDyldMemoryManager10findSymbolERKSs[_ZN4llvm19RTDyldMemoryManager10findSymbolERKSs]+0x1b): undefined reference to
llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::string const&)'
| collect2: error: ld returned 1 exit status
I checked the above with original meta-webosose and then same error occurs.
@heegoo-han Thanks for notifying this. I found a similar issue for this. (https://lists.freedesktop.org/archives/mesa-dev/2015-April/082023.html)
I resolved the mesa-native build error in both meta-webosose master branch and this @sparkleholic 's pull requested changes like below:
- take aside /usr/bin/llvm-* to a temporary directory . It means remove host pc side llvm tools.
- make cleanall-mesa-native
- bitbake mesa-native
@heegoo-han In conclusion, under certain circumstances a build error occurred regardless of this code patch. Depending on the llvm installed on the host pc, there seems to be an error occuring. This part will be communicated to the SCM separately from the PR.
- @chbae
@sparkleholic , Thanks for your efforts.
Thanks. we will review it soon and release it.
@sparkleholic Is this commit tested in the latest build? If it is tested in latest build, we will review and be decided to release. Sorry for late reply.