Qemu OpenGL ES acceleration

Testing Qemu OpenGL ES acceleration.

Installing qemu

Add the repository:

sudo add-apt-repository ppa:linaro-foundations/qemu-opengl-es

Install qemu-system

sudo apt-get install qemu-system mesa-utils-extra

This will remove any existing install of qemu-system and any OpenGL ES library installed on your machine.

Running Qemu with Acceleration

First, test that the OpenGL ES to OpenGL translation library works.


Graph of rotating gears should appear. Download the qemu demo image:


Launch Qemu. We add some helpful options, such as tcp redirect to get in with ssh.

DGLES2_BACKEND=glx qemu-system-arm -M beaglexm -sd beagle_sd.img -serial stdio -device usb-kbd -device usb-mouse -redir tcp:5555::22

Log in to the serial console (or ssh -p 5555 root@localhost, password "ubuntu"). Start X and load the kernel acceleration module:

Xorg &
insmod kfgles2.ko kfgles2_abi=1
export DISPLAY=:0

Qemu is now ready for testing opengl es applications. See the directories opengles1 / opengles2 under root. Some test results:

  • es2gears, es1gears
    • runs but graphics broken
  • es2tri
    • aborts (lack of window manager?)
  • torus_x11
    • works
  • glmark2-es2
    • Opens a window with a visual that does not satisfy requirements of dgles2 library.
    • Other applications tend request egl configuration first, and then create a matching x11 window...

Known issues

  • Frequent crashes at least on nvidia driver
    • before starting opengl applications, attach gdb with gdp -p `pidof qemu-system-arm`

  • Terminating OpenGL ES applications with ctrl-c might deadlock QEMU
    • end application with ctrl-z and then kill
  • Lack of EGL_KHR_image extensions makes it not possible to run unity desktop compositor.


dgles, fgles and kfgles live in:

* http://git.linaro.org/gitweb?p=people/rikuvoipio/gles-libs.git;a=shortlog;h=refs/heads/linaro

Only modifications done on packaging. On X86/amd64 dgles library is built, and on fgles on armel/armhf.

Qemu OpenGL patches live in:

* http://git.linaro.org/gitweb?p=people/rikuvoipio/qemu.git;a=shortlog;h=refs/heads/gles

Compiling kfgles2 module for linaro kernels

Go to the gles-libs/kfgles directory, and point to the kernel build you have used, and execute:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KERNELDIR=~/linux-linaro-2.6.38/debian/build/build-linaro-omap/

Kernel patch for networking with Qemu/Beagle

The included qemu image has network support for qemu. If you make your own kernel, and you still want to network with qemu, pick the patch below and make sure you have SMC91X enabled in kernel or as in module (it will be if you use omap2plus debfconfig, which you should be using anyway!).

* http://people.linaro.org/~rikuvoipio/beagle-kernel-network.patch

Platform/DevPlatform/QemuOpenGLES (last modified 2011-07-07 10:21:38)