This is a work in progress
Main information for building qemu can be found in https://wiki.qemu.org/Hosts/Linux. This documentation add some more details on how I tried to build qemu with OpenGL support on Ubuntu 18.04 Server in December 2019.
- Git
- Make
- bison
- flex
sudo apt install build-essential
sudo apt install libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev
sudo apt install libepoxy-dev libgbm-dev
sudo apt install libsdl2-dev
sudo apt install libvirglrenderer-dev
To clone particular version only -- on order to speed up downloads:
git clone --branch v4.2.0 --depth 1 git://git.qemu-project.org/qemu.git
-
--target-list=x86_64-softmmu
Limit build to x86-64 architecture to speed up build.
-
--enable-kvm
-
--enable-opengl
-
--enable-sdl
-
--enable-virglrenderer
-
-j4
Number of concurrent build workers. Adjust to match the number of your logical processors.
After;
make install
Tell apparmor to allow libvirtd
run the custom build qemu and its tools in /usr/local/bin
by adding the directory into /etc/apparmor.d/usr.sbin.libvirtd
. (This assumes libvirt-daemon-system
is already installed.)
/usr/local/bin/* PUx,
Then run:
sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.libvirtd
To apply the changes immediately.