Tuesday, 31 December 2013

I.MX6 Debian Jessie (GPU/VPU) 3.10.9-1.0.0

Following on from the Xubuntu 13.04 rootfs which previewed GPU acceleration beyond Xorg 11, here is a Debian Jessie/Sid rootfs which has support for both GPU and VPU acceleration using the alpha 3.10.9-1.0.0 FSL (freescale) libraries. This armhf rootfs fires up a xfce desktop and has been validated against a 3.0.35-4.1.0 kernel.



Given the fact the 3.10.9-1.0.0 libraries are in an alpha this rootfs should also be treated as alpha quality i.e not everything you expect to work does! Another important point to mention is gstreamer support,  the existing VPU libraries make use of plugins for gstreamer 0.10 while Jessie has moved onto gstreamer 1.0 and currently it is not clear how/if Freescale will address this.  There is a 1.0 plugin that Carlos has bravely been working towards which I have included in the build again treat this as alpha quality. Give the state of the gstreamer plugins I haven't found an easily way to add support for totem or parole.

As per my previous releases this rootfs should run on most imx6d/q devices given a valid uboot and kernel (at least 4.1.0) , see my previous blog for the vivante patch. In order to reduce the image size, this is a minimal rootfs with just a few basic xfce/lxde applications installed (no browser). You can revert to a console boot if xfce/lxde is not required, see later part of the instructions below.

I have tested this rootfs on a Utilite Pro using this kernel and on a UDOO using this kernel. Many thanks to hste (aka Haakon Stende) for sanity testing on his GK802 and hosting my files. Courtesy of hste you also have the option of a lxde rootfs.

  • Additional instructions for UDOO can be found here along a SD card image. Furthermore I have verified that is possible to run the UDOO Arduino IDE on this rootfs. Albeit it requires a few changes to be make the IDE launch and compile, instructions are provided in the link.
  • For cubox-i Rabeeh has created a SD card image see here.
  • For all other devices use the instructions below:

1. Download the rootfs xfce or lxde and extract onto your media (for lxde see comments for tar command).

2. If you require serial console output then edit /etc/inittab and include an additional line at the end of the file for tty output as below, replacing <ttymxc> with  the correct serial port for your device. For example for UDOO it is ttymxc1 and for Utilite it is ttymxc3

    T0:23:respawn:/sbin/getty -L <ttymxc> 115200

3. By default no networking is configured, you will need to setup networking access as per your requirements. If you have ethernet then you can run  'dhclient eth0'.

4. On a successful boot you should be presented with the lightdm greeter logon screen. The default user is 'debian' and matching password.

5.  To test GPU acceleration open a terminal and run glxgear, es2gear, glmark2 and glmarks2-es2. Given the limited Open GL support provided by the Vivante libraries don't expect all applications to use GPU acceleration.

6. To test VPU support using the gstreamer0.10 plugins you can either:

  • Run gplay with a media file. The main drawback is there is no playback controls to pause/stop/forward/rewind video.
  • Thanks to the ingenuity of htse, I have included the video player from a yocto build which provides file selection and playback controls. To launch:
            video-player.sh

Note: video-player.sh doesn't repaint the on-screen controls, therefore it  requires the mouse to be moved over the controls for repainting to occur.

7. To test VPU using the gstreamer1.0 plugin, I have included a script thats launches playbin:

    gst-1.0-playbin.sh <media file>

Note: if you attempt to close the window early, playbin continues to runs and only the display output is halted. To correctly close early kill the playbin process.

8. I encountered problems with xfce-mixer not correctly detecting multiple sound cards (eg on the Utilte Pro). To test sound is correctly configured I have included a sample wav (paino2.wav) file. To test sound output run:

   aplay paino2.wav

If you don't hear sound, run 'aplay -l' to list the sound devices detected by alsa. To run aplay against the correct device you can pass the sound card and device number listed by 'aplay -l' to the aplay command, example below (2 is card and 0 is the device):

   aplay hw:2,0 piano2.wav

To set the default sound device you can create the following entries in/etc/asound.conf. Replacing 'card' and 'device' with the correct values.

  defaults.Master.card 2
  defaults.Master.device 0
  defaults.pcm.card 2
  defaults.pcm.device 0
  defaults.ctl.card 2
  defaults.ctl.device 0


9. As per my last blog because we are replacing the mesa libraries with Vivante equivalents, any package updates for the mesa libraries will break GPU acceleration. If you plan to compile natively, this potentially may result in compilation breakages which rely on the mesa headers. As a work around you  could reinstall the mesa packages to obtain the correct headers, compile and then move the mesa shared libraries out the way again.

10. For root access password is same as user.

11. To revert to a console boot, you can disable lightdm from auto starting by:

   update-rc.d lightdm disable


If you require more help try the irc channel imx6-dev (was know as imx6-dongle).