Ubuntu Bionic 18.04.3 LTS for i.MX6 boards with etnaviv GPU acceleration – January 2020 (mainline kernel 5.4.6)

Published on January 6, 2020

Ubuntu Bionic 18.04.3 LTS - XFCE4 desktop We are glad to offer our new special images of Ubuntu Bionic for i.MX6 Nitrogen boards with the most recent mainline 5.4.6  kernel and without NXP/IMX BSP. The mainline kernel supports the GPU acceleration with the etnaviv driver, and supports the C&M VPU also with its CODA-960 driver. You will need to register on our web-site and log in before you can accept the license agreement and download the images from here:

Important ! Before installing this image please check your U-Boot version. The above images require U-Boot version 2018.07  to be used. Make sure to visit our wiki if you need to upgrade: https://boundarydevices.com/wiki/u-boot/ .You can find the bootscript in the /boot subdirectory now, its named boot.scr . The partition labels are set if you use dd or ddrescue to create the disk. If you use your own method please check the boot partition labels, because the fstab boots by label (LABEL=sys-0Dh for example) now. You can use ext2label to modify partition label. One more important rule: you must disable all unused video devices in U-Boot environment. For example in case of HDMI diplay (only): => setenv fb_lcd off => setenv fb_lvds off => setenv fb_lvds2 off => setenv fb_mipi off => setenv fb_hdmi 1280x720M@60 => setenv fb_hdmi_set 1280x720-32@60 => saveenv => reset The number 32 after the resolution is the bpp.

Programming the image

The image is a slightly-less-than-8GiB image file containing the partition table.  Inspired by ubuntu-mate.org, I changed over from dd to another disk copy program called ddrescue. It is a much more talkative program, although dd does do it's job honestly. I don't like mute programs, you never know whats happening in a given moment. For example, if you want to create an SD card for a console image, you need to do the following : $ sudo apt-get install gddrescue xz-utils util-linux $ gunzip 20200105-nitrogen6x-5.4.6-ml-bionic-en_US-console_armhf.img.gz $ sudo ddrescue -D --force 20200105-nitrogen6x-5.4.6-ml-bionic-en_US-console_armhf.img /dev/sdX You have to replace sdX with your actual SDHC reader/writer device. Use the lsblk command to check it. Type lsblk with unplugged SDHC reader, then insert the device, and type lsblk again. A new node will be added , that is your SDHC reader/writer device.

Usernames and passwords

Two users are defined for use on the system: ubuntu and root. The password for each is Boundary (capital B). The user ubuntu has administrator rights, but doesn't need to enter password at sudo command. We wanted to make life easier at the cost of some security. If you want to change this please type: ubuntu@bionic-mlb:~$ sudo visudo , and comment out or delete the last line with "ubuntu" and "NOPASSWD:" An ssh server is configured on the system, though it does not allow password-based authentication for user root. User ubuntu has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so : ubuntu@bionic-mlb:~$ sudo mkdir /root/.ssh ubuntu@bionic-mlb:~$ sudo nano /root/.ssh/authorized_keys ... paste content of $HOME/.ssh/id_rsa.pub here ubuntu@bionic-mlb:~$ sudo chmod 600 /root/.ssh/auth* ubuntu@bionic-mlb:~$ sudo chmod 600 /root/.ssh/

What's supported

Since the images above include the mainline stable 5.4.6 kernel, essentially almost everything is supported including :
  • Vivante GPU accelerations (etnaviv)
  • C&M VPU accelerations (coda-960)
  • All kind of storage devices , SDHC card, eMMC, SATA hdd, USB pen sticks, cell modems
  • It supports i.MX6Q/DL/SX board's
The packaging (inluding kernel) is done in the normal debian way, so apt-get update/dist-upgrade will keep your image up and running the latest as patches come out.

What's new in this release

  • The Linux kernel has been changet to 5.4.6 mainline kernel ( meta-package name: linux-boundary-mlb )
  • GPU driver was changed to etnaviv kernel driver,  libdrm-etnaviv1, libdrm-armada2 DRM userspace drivers, mesa EGL and OpenGL ES2 libraries,  etnaviv_dri.so DRI driver (comes with mesa package), xf86-video-armada xorg video driver for DRM KMS etnaviv driver.
  • The NXP BSP packages have been removed, there are no gstreamer-imx and imx-gpu-viv and imx-galcore, imx-lib, imx-vpu packages anymore.
  • The distribution was upgraded to Bionic 18.04.3 LTS . Here are some main component versions :
    • Xorg server 1.19.6
    • mesa 19.0.8-0ubuntu0~18.04.3
    • gstreamer1.0 1.14.5
    • bluez 5.48-1ubuntu3
    • Qt5 5.9.5
    • apt 1.6.12
    • chromium-browser 79.0.3945.79-0ubuntu0.18.04.1
    • dpkg
    • gcc/g++ 7.4.0
    • firefox 71.0+build5-0ubuntu0.18.04.1
    • libwayland 1.16.0
    • weston 3.0.0-1
    • XFCE Desktop Environment 4.12.4

First let's see the console mode. You can test the GPU acceleration with the following command: ubuntu@bionic-mlb:$ kmscube -D /dev/dri/card1 Using display 0x19bb030 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" client extensions: ...... =================================== OpenGL ES 2.x information: version: "OpenGL ES 2.0 Mesa 19.0.8" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "etnaviv" renderer: "Vivante GC2000 rev 5108" extensions: ..... =================================== As you can see the installed mesa package from the Ubuntu repository supports the etnaviv DRM driver, it provides OpenGL ES2 acceleration You'll see a spinning color cube on the screen. The mainline kernel supports the imx6q VPU by the coda-960 driver. It creates v4l2 gstreamer codec and scaler elements, you can check it in the following way: ubuntu@bionic-mlb:/$ gst-inspect-1.0 | grep V4L2 video4linux2: v4l2video10convert: V4L2 Video Converter video4linux2: v4l2h264enc: V4L2 H.264 Encoder video4linux2: v4l2mpeg4enc: V4L2 MPEG4 Encoder video4linux2: v4l2mpeg4dec: V4L2 MPEG4 Decoder video4linux2: v4l2mpeg2dec: V4L2 MPEG2 Decoder video4linux2: v4l2h264dec: V4L2 H264 Decoder The videosink can only be the kmssink. That sink is unable to scale/resize the video canvas, you can do that only with the v4l2video10convert (the number in the name could be different) . That converter/scaler gstreamer element is able to convert RAW videostream's colorspace and/or size. It uses the i.MX6Q IPU, so its HW accelerated converter. You can play a video in the following way: $ gst-launch-1.0 playbin uri=${URI} video-sink="kmssink connector-id=${conn_id} name=imx-drm can-scale=false sync=true" You can check the connector ID in the following way (in case of HDMI display): $ modetest -M imx-drm -c | grep HDMI-A-1 The connector ID will be the first number in the line, usually 56 Let's see Chromium Browser status: The Chromium Browser is GPU accelerated Its driven by etnaviv + Mesa GL HTML5 score is acceptable WebGL runs, although its very slow Playing movie trailer via gstreamer xvimagesink Running glmark2 on etnaviv glxgears 3D mesa test In the /root folder you can find 2 xorg server configurations. Both work, but in a different way. The xorg configuration is a symbolic link to one of these files, in the folder /usr/share/X11/xorg.conf.d/75-device.conf One uses Armada graphics driver for xorg via etnadrm: https://git.arm.linux.org.uk/cgit/xf86-video-armada.git/tree/README?h=unstable-devel ,the other xorg configuration uses etnaviv DRM/KMS driver with modesetting.
As always, please give us some feedback and let us know how things work for you.