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:

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).


  1. I have added lxde to the image and default it should log into lxde. I have packed it with xz so to untar it with :
    tar -x --xz -f jessie-lxde.tar.xz
    You have to add a kernel.


    1. Forgot to give give download place:

    2. Hi Haakon, any chance for and updated version of your great script mkubuntu.sh for debian jessie ?

  2. Hi. Thanks so much for this. I am using the Cubox-i4 and trying to expand the root partition to use the other 2gb of the 4gb card. i come from raspberry pi where i was able to do it with fdisk like (http://jan.alphadev.net/post/53594241659/growing-the-rpi-root-partition) however i cannot get it to work. fdisk shows me /dev/mmcbkl0p1 starting block 2048 to 4194303. It tells me total sectors on sd are 7744512. However fdisk to create a new extended partition will not give me option to start at block 4194303 (out of range?). Furthermore, it also tells me there is no primary partition on the disk, and when I try to create one (hail mary just to see if works) in the sectors it allows (/dev/mmcblk0p1) it tells me the kernel uses the old boot table and re-reading partition table failed. im a bit stuck. and a new to this. any help would be much appreciated

  3. I believe fdisk is complaining that it does not have a dos partition table.. and fdisk -o would wipe the drive? hmm, stuck. just in case it isn't clear from the above although fdisk -l shows the one entry /dev/mmcblk0p1 when i go to create a partition it tells me that 0 primary 0 extended exists (and 4 free obviously)

  4. This comment has been removed by the author.

  5. duh, was trying fdisk on /dev/mmcblk0p1 rather than /dev/mmcblk0 .. oops

  6. I am slightly confused about why you're using the older kernel. Is it because the 3.10.9 kernel is too unstable and your motivation was to get armhf and newer xorg-version versions? I have a Utilite Pro and I plan to run Gentoo on it (with Wayland if possible?) so your findings interest me.

    1. I chose the older kernel partly to prove the gpu/vpu works and also it because it is relatively stable. The 3.10.9 kernel is unproven and it would be difficult to determine if the problems were with the kernel or the gpu/vpu libraries.

    2. Since posting, I've noticed that there is a 3.10.17 beta release. Sounds a little less rocky than alpha! Having said that, I've fetched the Utilite kernel repository and there are a lot more additional commits from CompuLab than I expected. I know one "initial support" commit has made it into the next mainline kernel but it seems there is still some way to go. Comparing the Utilite repository with the imx repository is also confusing because the two appear to have diverged immediately following the 3.0 release. I thought the former was supposed to be based on the latter. Maybe there's been some rebasing.

    3. I plan to start creating a working 3.10.17 kernel next.

  7. hi,
    what is the login credentials for Debian GNU/Linux jessie/sid ?

    1. As mentioned in the blog 'default user is 'debian' and matching password'

  8. Hi,

    Not sure if it will work with a 3.13 kernel as you need to try and patch all the galcore driver kernel code from the fsl 3.10.9 kernel.

    Segmentation fault can be caused for many reasons and may require a fair amount of debugging to find the cause so there is no easy answer.

  9. I initially asked this under the ubuntu13.04 debugging comment section, which was a mistake. Sorry about that.

    However, to repeat myself, I've got this running on a GK802 and it works just fine. Excellent work. The only thing I miss is the text running up the console when booting. Is there any way of making this happen? I've tried adding the line for serial consoles to /ete/inittab, but this didn't do the trick.

    1. Hi,

      If you want kernel output appearing on the screen while the booting, then would be need to enable console/screen output in uboot (need to compile it) and also set 'console=tty0' as kernel boot arguments.

  10. Hi,

    I've an issue with debian-xfce rootfs (and lxde too). My kernel is 3.10.17-beta from: https://github.com/boundarydevices/linux-imx6/tree/boundary-imx_3.10.17_1.0.0_beta
    Compiled in armhf with : gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux
    This is the link of Xorg.0.log : http://pastebin.com/2xsCk5yQ

    (EE) VIVANTE(0): internal error: GPU Ctx Init Failed
    (EE) VIVANTE(0): internal error: initExaLayer failed in VivScreenInit()
    (EE) AIGLX error: vivante exports no extensions (/usr/lib/arm-linux-gnueabihf/dri/vivante_dri.so: undefined symbol: __driDriverExtensions)

    Any advice and suggestions will be highly appreciated..

    Best regards,

    1. Hi,

      If you are using my rootfs (debian-xfce) then it won't work the 3.10.17_1.0.0_beta kernel because my rootfs is using 3.10.9_1.0.0 BSP. You need to update the rootfs with 3.10.17_1.0.0 BSP libraries. I have a working 3.10.17_1.0.0 rootfs however there's ETA for releasing it because the X11 drivers have some pending issues.

    2. Hi Jasbir,

      thank you for your reply. Sorry to bother you even more, but I need to ask you a newbie question:
      Where can I get the the 3.10.17_1.0.0 BSP libraries ?
      Is there a guide/howto on that topic ?
      Right now I'm using ArchLinux Arm (http://archlinuxarm.org/platforms/armv7/freescale/nitrogen6x) with my custom compiled Uboot and Kernel + device tree support. Xorg with default xf86-video-fbdev (slow). I don't have any experience in BSP libraries so far.
      Thank you again for your time !


    3. Hi,

      BSP 3.10.17 libraries can be obtained from FSL yocto http://git.freescale.com/git/cgit.cgi/imx/meta-fsl-bsp-release.git/log/?h=dora_3.10.17-1.0.0_beta

  11. Hi Jasbir,

    I would like to run your rootfs on a utilite pro, like you did. I downloaded the kernel source from https://github.com/mtx512/linux-imx/tree/imx_3.0.35_4.1.0-cm_utilite.
    Unfortunately, I never have build a kernel before and I'm a stuck at the following point:
    To run the make command, don't I need a .config file, where your settings are stored?
    (With make menuconfig create my own .config - file would be more than I want at this time and make oldconfig seems to search for the default values at a wrong place).
    Do you have a hint for me how to build your kernel, or can you tell me, where to find your .config - file?
    Thanks for your work with the rootfs (I tried and liked it on a hi802 -> where hste did the kernel work for me already) !

    Best regards,

    1. You can create the .config by doing something like this (assuming you are using my kernel):

      make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- utilite_pro_defconfig

    2. Thanks for your quick response! Your hint worked perfectly. I'm looking forward to run your rootfs on the utilite pro. :-)

  12. Why don't you include IPv6 support in your kernel?

  13. Hi Jasbir,
    I am using LXDE (ubuntu 14.04) on armhf(IMX6 Nitrogen6x board). I am trying to run freescale gpu sdk using X11.
    I have followed your steps from


    But,when i try to run the binary,it simply exits without any new window opening and drawings:
    root@nitrogen:/sdk/Samples/GLES1.1/bin/GLES11_x11# ./01_SimpleTriangle
    root@nitrogen:/sdk/Samples/GLES1.1/bin/GLES11_x11# ./11_LightingFog
    root@nitrogen:/sdk/Samples/GLES1.1/bin/GLES11_x11# ./17_Beizer

    Could you help me please.
    Thanks in advance.


    1. First check your samples run against fbdev libraries. If they work then your problem may be related to the xserver version. If the version > 1.14 then its better to try BSP 3.10.53_GA as previous BSP releases don't support past 1.14.

    2. Thanks Jasbir for your reply.
      When i checked for the xserver version it says,

      X.Org X Server 1.14.6
      Release Date: 2014-04-13

      Do you mean version > 1.14 or version >1.14.0 ?


    3. Your xserver version is ok, where did you get the Ubuntu release from?

    4. I got the root file system from Boundary devices (LXDE one).


    5. Update:

      Earlier i was logging in as "root", but when i tried logging in as "ubuntu", i found the samples running but i get a blank screen with a flickering mouse pointer over it and no image drawn on it.

      Could you help me with this?

    6. update:

      I was trying from the serial connection on my pc.It got solved when i tried connecting the device with a keyboard but i do not know why.


  14. This comment has been removed by the author.

  15. This comment has been removed by the author.