Yocto release for i.MX8M NANO

Published on February 8, 2020

We are pleased to announce a Yocto release for our Nitrogen8M Nano SBC based on the i.MX8M NANO processor. Below you will find the download link for the image as well as detailed instructions for the build including a features set.

For the Impatient

You can download the Yocto image from here:

As usual, you'll need to register on our site and agree to the EULA because it contains NXP content. The image is a SD card image that can be restored using zcat and dd under Linux.

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M
In addition, you can use the etcher utility to flash the SD Card or USB stick via Windows or Linux: balena-etcher

Build procedure

This image uses the zeus branch of our boundary-bsp-platform repository. To build the image, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo
Then create your build directory and initialize everything.
~$ mkdir ~/yocto-imx8m-nano && cd yocto-imx8m-nano
~/yocto-imx8m-nano$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b zeus
~/yocto-imx8m-nano$ repo sync
Setup the environment for building, in this example we will be building our boundary-wayland distro for Nitrogen8m Nano
~/yocto-imx8m-nano$ MACHINE=nitrogen8_2eth DISTRO=boundary-wayland . setup-environment build
Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages such as BD-SDMAC support
~/yocto-imx8m-nano/build$ bitbake boundary-image-multimedia-full
After some time this should build the same image as above. The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • GPU Vivante libraries 6.2.4p4.0
  • GStreamer1.0 1.14.0 for i.MX
  • Weston 5.0.0 for i.MX
  • qcacld-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.50 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

Display support

Please make sure your platform includes the latest U-Boot for i.MX8M MINI:

This version of U-Boot supports the display configuration, allowing to use any of the following displays:

GPU acceleration

In order to test the GPU, you can either use the standard Weston EGL programs or the ones provided by Vivante. Here are a few examples:

root@nitrogen8mm:~# weston-simple-egl &
root@nitrogen8mm:~# cd /opt/viv_samples/vdk/
root@nitrogen8mm:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPU

Camera input

Camera MIPI-CSI input can be checked using our OV5640 MIPI with GStreamer:

root@nitrogen8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! \
    video/x-raw,width=1280,height=720 ! glimagesink

nitrogen8m-camera

Ethernet

Once the eth0 interface is up, you can use ping to check internet connectivity:

root@nitrogen82eth:~# ping google.com -I eth0
PING google.com (172.217.14.78): 56 data bytes
64 bytes from 172.217.14.78: seq=0 ttl=56 time=12.117 ms
64 bytes from 172.217.14.78: seq=1 ttl=56 time=16.837 ms
64 bytes from 172.217.14.78: seq=2 ttl=56 time=21.280 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 12.117/16.744/21.280 ms
Once the eth1 interface is up, you can use ping to check internet connectivity:
root@nitrogen82eth:~# ping google.com -I eth1
PING google.com (172.217.14.78): 56 data bytes
64 bytes from 172.217.14.78: seq=0 ttl=56 time=14.271 ms
64 bytes from 172.217.14.78: seq=1 ttl=56 time=12.400 ms
64 bytes from 172.217.14.78: seq=2 ttl=56 time=18.015 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 12.400/14.895/18.015 ms
root@nitrogen82eth:~#

Wi-Fi

Same goes for the Wi-Fi that can be tested just as easily:

root@nitrogen8mm:~# nmcli d wifi connect <network_name> password <password>
root@nitrogen8mm:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@nitrogen8mm:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

You'll be able to connect using these commands:

root@localhost:~# echo 0 > /sys/class/rfkill/rfkill0/state 
root@localhost:~# echo 1 > /sys/class/rfkill/rfkill0/state 
root@localhost:~# hciattach /dev/ttymxc0 qca 3000000 -t30 flow
Current Product ID              : 0x00000008
Current Patch Version           : 0x0111
Current ROM Build Version       : 0x0302
Current SOC Version             : 0x00000023
qca_soc_init: Rome Version (0x03020023)
====================================================
TLV Type               : 0x1
Length                 : 33060 bytes
Total Length           : 32804 bytes
Patch Data Length      : 32780 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x0114
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
root@localhost:~# echo 1 > /sys/class/rfkill/rfkill2/state
root@localhost:~# hciconfig hci0 up
root@localhost:~# hcitool scan
Scanning ...

CAN

You'll be able to bring up the interface using these commands:
root@nitrogen8mm:~# ip link set can0 up type can bitrate 500000
root@nitrogen8mm:~# ifconfig can0 up

From this point, you can use commands such as candsend and candump to send or display messages on the bus.   As usual, feel free to leave a comment below to share your experience.