Running kmscube with Etnaviv on mx6sabresd board

2 minute read

The Etnaviv developers have made outstanding progress making it possible to run 3D graphics applications on i.MX6 with mainline kernel and standard open source userspace components such as mesa and libdrm.

There is a mailing list to discuss Etnaviv related issues.

How can we easily test the Etnaviv project?

Etnaviv can run on your favorite build system/Linux distro. As I have been using it with Buildroot, this post shows how to build a Buildroot image with Etnaviv support on i.MX6.

In general the Buildroot configs tend to generate a minimal rootfs, but in some cases a more complete defconfig can be accepted. I have added support for the imx6-sabresd_qt5_defconfig target in Buildroot that includes mainline U-Boot, mainline kernel, mesa, libdrm, kmscube, Qt5, glmark2 application.

The imx6-sabresd_qt5_defconfig can be found here

With the imx6-sabresd_qt5_defconfig target we can easily see Etnaviv in action.

A good way to test Etnaviv is by running a popular OpenGLEs application called kmscube. This project is hosted at: (

In order to generate a Buildroot image with Etnaviv support for mx6sabresd:

$ make imx6-sabresd_qt5_defconfig
$ make

This will download and build all the software components from scratch, so it may take a while.

After the build process is finished an sdcard.img file will be available at output/images/sdcard.img.

Just flash it directly to the SD card:

$ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0; sync

Then boot the mx6sabresd board (Since this image uses SPL, it can run on any mx6sabresd board variant: mx6q, mx6dl and mx6qp).

The default password is root.

We are ready now to run the kmscube application by simply doing:

# kmscube

And a nice colored cube will spin on the screen.

The application can be stopped by doing CTRL+C. Re-launch it as

# kmscube &

and the system interrupts can be observed by doing:

# cat /proc/interrupts  | grep gpu
 20:       2436          0          0          0       GPC   9 Level     130000.gpu
 21:          0          0          0          0       GPC  10 Level     134000.gpu
 75:          0          0          0          0       GPC  11 Level     2204000.gpu

Running the cat command several times shows that the hardware GPU interrupt count keep increasing, indicating that the application is being accelerated by the GPU hardware on i.MX6.

kmscube also allows to render video on top of the cube faces. I haven’t tried this yet, but will do it when time permits, as it is a nice example of integrating both the GPU and VPU capabilities of the i.MX6.

Feel free to ping us if you manage to get the kmscube video demo working on i.MX6.