We’ve received many requests for Yocto support on our Nitrogen8M Mini SBC based on the i.MX8M MINI 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:
Build procedure
This image uses the warrior branch of our boundary-bsp-platform repository.
This is mostly a clone of fsl-community-bsp-platform with meta-boundary added in.
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 && cd yocto-imx8mm ~/yocto-imx8mm$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b warrior ~/yocto-imx8mm$ repo sync
Setup the environment for building, in this example we will be building our boundary-wayland distro for nitrogen8mm
~/yocto-imx8mm$ MACHINE=nitrogen8mm 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-imx8mm/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.4p1.8
- VPU Hantro libraries v1.8.0
- GStreamer1.0 1.14.0 for i.MX
- Weston 4.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:
- HDMI display (1080p)
- 7″ 1280×800 MIPI BD070LIC2_8M
- 8″ 1920×1200 MIPI BD080MCC1
- 10″ 1280×800 MIPI BD101LCC2_8M
Note that we’ve noticed that the NXP HDMI driver is picky when it comes to custom display timings (sometimes refuses to set the clock).
So if you are experiencing any issue with HDMI, please try entering the following commands in U-Boot in order to force the use of standard timings:
=> setenv cmd_custom 'setenv bootargs $bootargs drm_kms_helper.edid_firmware=HDMI-A-1:edid/1280x720.bin' => saveenv
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
VPU decoding
The i.MX8MM processor can decode videos with a resolution up to 1080p so here is an example using GPlay tool:
root@nitrogen8mm:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov root@nitrogen8mm:~# gplay-1.0 --video-sink=glimagesink Hobbit-1080p.mov
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
Ethernet
Once the eth0
interface is up, you can use iperf3
to check Ethernet performances:
root@nitrogen8mm:~# iperf3 -c 192.168.1.60 Connecting to host 192.168.1.60, port 5201 [ 5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201 [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.09 GBytes 938 Mbits/sec 0 sender [ 5] 0.00-10.04 sec 1.09 GBytes 932 Mbits/sec receiver
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
For products with Bluetooth, you’ll be able to connect using these commands:
root@nitrogen8mm:~# hciconfig hci0 up root@nitrogen8mm:~# hcitool scan Scanning ... 11:22:DE:AD:BE:EF Some Device
As usual, feel free to leave a comment below to share your experience.
Hi,
New to BD devices. How do I get started adding features not already included? I need to add Yocto USB support such that the 8M Mini SOM acts as a USB device.
Thanks!
Steve
Hi Steve,
You can build yourself by following the steps under “Build procedure”. From there you can modify/tailor the image how you want. If you need additional support please send your support questions to support@boundarydevices.com.
Thanks,
Chris Dimich
Hi Chris,
I am getting the following error:
ERROR: u-boot-boundary-v2018.07+gitAUTOINC+2e8d95b7d4-r0 do_patch: Command Error: ‘quilt –quiltrc /home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/build/tmp/work/nitrogen8m-fslc-linux/u-boot-boundary/v2018.07+gitAUTOINC+2e8d95b7d4-r0/recipe-sysroot-native/etc/quiltrc push’ exited with 0 Output:
Applying patch 0001-Add-support-for-KOE-tx31d200vm0baa-display.patch
patching file arch/arm/include/asm/mach-imx/fbpanel.h
Hunk #1 succeeded at 189 (offset 15 lines).
patching file board/boundary/nitrogen6_max/nitrogen6_max.c
Hunk #1 succeeded at 503 (offset 4 lines).
patching file board/boundary/nitrogen6sx/nitrogen6sx.c
patching file board/boundary/nitrogen6x/nitrogen6x.c
Hunk #1 FAILED at 362.
1 out of 1 hunk FAILED — rejects in file board/boundary/nitrogen6x/nitrogen6x.c
Patch 0001-Add-support-for-KOE-tx31d200vm0baa-display.patch does not apply (enforce with -f)
ERROR: u-boot-boundary-v2018.07+gitAUTOINC+2e8d95b7d4-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/build/tmp/work/nitrogen8m-fslc-linux/u-boot-boundary/v2018.07+gitAUTOINC+2e8d95b7d4-r0/temp/log.do_patch.112575
ERROR: Task (/home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/sources/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb:do_patch) failed with exit code ‘1’
Please help resolve this.
Thanks,
Rajiv Verma
Hi Rajiv,
Yes thanks for this. We are aware, as we recently pointed our uboot recipes on our master branch of meta-boundary to pull from the head. This caused a patch inside meta-boot2qt to no longer apply. Until we resolve this with Qt, you can safely just remove the recipe (that applies patch) or force the yocto build to ignore it by adding it to BBMASK parameter in local.conf
BBMASK += “meta-boot2qt/meta-fsl-extras/recipes-bsp/u-boot/u-boot-boundary”
Thanks,
Chris Dimich
Hi Chris,
Thanks for the quick turn-around on this. Yes, the recipe masking worked.
-Rajiv
More errors when I continued the build with ‘-k’ option. Summary as follows:
Summary: 3 tasks failed:
/home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/sources/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb:do_patch
/home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/sources/poky/meta/recipes-core/glibc/glibc-locale_2.28.bb:do_package_write_rpm
/home/rv/_10X/Yocto/Boundary-Nitrogen8M-Mini/sources/poky/meta/recipes-support/db/db_5.3.28.bb:do_package_write_rpm
Summary: There were 2 WARNING messages shown.
Summary: There were 9 ERROR messages shown, returning a non-zero exit code.
I am using Ubuntu 16.04 LTS host.
Was able to resolve these errors (it was my VM running out of memory) but the U-Boot patch failure remains to be resolved.
U-Boot failure also resolved as noted above in the previous comment
Hi Rajiv,
We have put in a patch to ignore the recipe for now. Please repo sync and try to rebuild.
Thanks,
Chris Dimich
Boot from SDCARD on Nitogen8M_Mini not working
I prepared an SDCARD from the Yocto image generated (boundary-image-multimedia-full-nitrogen8m.wic.gz) using the steps given above on this page (zcat … | dd of=…) but the UBoot does not boot from SDCARD even when I tried to manually boot from UBoot command line (run bootcmd_mmc1). I have tried both 16GB SDCARD and 8GB SDCARD. When I insert the SDCARD on my Ubuntu host both the root and boot partitions show up in the explorer windows on Ubuntu.
Note that I even tried with the stock image from Boundary provided at the top of this page but that too didn’t seem to boot on NItrogen8M board.
What am I missing here?
Rajiv
Hi Rajiv,
We are seeing an issue with UHS sd cards booting on the Nitrogen8M Mini. We are currently working to resolve this issue, but in the meantime can you use a lower speed SD Card if you have it? We are sorry for the inconvenience.
Thanks,
Chris Dimich
Hi Chris,
OK – the UHS issue you mentioned seems to only help with the stock image (provided above) and it worked on a SanDisk 8GB Class-2 MicroSD card. However, the same card failed to boot the Yocto generated image (boundary-image-multimedia-full) which was built using the steps on this page. My build image is called ‘boundary-image-multimedia-full-nitrogen8m-20191024211854.rootfs.wic.gz’ (171425951 bytes in size) and it gives me the following error in U-Boot:
“`
mmc1 is current device
Scanning mmc 1:1…
Found U-Boot script /boot.scr
4484 bytes read in 10 ms (437.5 KiB/s)
## Executing script at 40480000
** Unable to read file uEnv.txt **
** Unable to read file /imx8mm-nitrogen8mm.dtb **
!!!! Error loading /imx8mm-nitrogen8mm.dtb
SCRIPT FAILED: continuing…
“`
I do not see the file ‘imx8mm-nitrogen8mm.dtb’ in the boot partition of the SD card. Instead there are the following files in there:
“`
boot.scr
Image
imx8mq-nitrogen8m.dtb
imx8mq-nitrogen8m-m4.dtb
“`
This is definitely different from what’s in the stock image’s boot partition which is as follows:
“`
boot.scr
Image
imx8mm-nitrogen8mm.dtb
imx8mm-nitrogen8mm_som.dtb
imx8mq-nitrogen8m.dtb
imx8mq-nitrogen8m-m4.dtb
“`
Has the latest Yocto image been validated at your end. It seems there’s some disconnect in the way the boot partition contents and/or the boot.scr are configured.
-Rajiv
Hi Rajiv,
Looks like you built for the nitrogen8m. Please set your MACHINE=nitrogen8mm in local.conf. You will see above when setting up environment you have to execute the following:
MACHINE=nitrogen8mm DISTRO=boundary-wayland . setup-environment build
Thanks,
Chris Dimich
Thanks Chris. Indeed I wasn’t aware there were two MACHINE variants (‘nitrogen8m’ and ‘nitrogen8mm’) and my simple mistake of missing out one extra ‘m’ at the end seemed to have been the issue here (in addition to the UHS SDCard issue that you pointed out).
I have been able to boot from SDCard after doing a rebuild for the correct MACHINE.
I will try to flash the same image to eMMC using the Wiki instructions (Fastboot mode). Meanwhile if you can provide further guidance on the following:
1. Where does the U-Boot & SBL live currently (I don’t see it on the SDCard image unless its part of the 4MB raw partition that I see in GParted)?
2. We want to create multiple partitions on the eMMC to allow swapping of RootFS after a field update. How can I partition eMMC?
3. Is there another ‘image’ target defined that only has minimal display support (or even no display support) and can result in a smaller RootFS footprint?
Thanks for your support.
Rajiv
Hi Rajiv,
To answer your questions:
1. Where does the U-Boot & SBL live currently (I don’t see it on the SDCard image unless its part of the 4MB raw partition that I see in GParted)?
U-boot exists in SPI NOR and not on the SD Card.
2. We want to create multiple partitions on the eMMC to allow swapping of RootFS after a field update. How can I partition eMMC?
You can refer here for partitioning the generated wic image:
https://www.yoctoproject.org/docs/2.4.2/dev-manual/dev-manual.html#creating-partitioned-images-using-wic
Then you can flash this wic image to eMMC.
3. Is there another ‘image’ target defined that only has minimal display support (or even no display support) and can result in a smaller RootFS footprint?
You can examine all available images to build inside each layers “images” folder. Just search for all images folders inside the sources directory. For example in the poky directory there is an image called “core-image-minimal” which does just enough to allow the device to boot and have a basic rootfs with no display support.
Thanks,
Chris Dimich
Hi Chris,
Couple of followup on this (after I tried few things):
1. I tried to build “core-image-sato” as a starting point for creating a basic GUI enabled image but got the following error on Yocto (using MACHINE=nitrogen8mm; DISTRO=boundary-wayland):
“ERROR: Nothing RPROVIDES ‘packagegroup-core-x11-base’ (but /home/rv/_10X/BoundaryDevices/Yocto/iMX8m_mini/sources/poky/meta/recipes-sato/images/core-image-sato.bb RDEPENDS on or otherwise requires it)
packagegroup-core-x11-base was skipped: missing required distro feature ‘x11’ (not in DISTRO_FEATURES)”
a) Not sure what combinations of DISTRO & IMAGE options are supported on this board. Is there a list that I can refer to OR a way to query in Yocto?
b) Our requirements are essentially a simple GUI – no 3D graphics or streaming contents or browser. Can you suggest a DISTRO + IMAGE combo that would work for us and that is supported by your BSP? I don’t mind tweaking it later to add/remove some wanted/unwanted packages but the idea is to start with “minimum” instead of “full-blown”
2. For flashing the eMMC with the Yocto generated image I had to use the “Solution #2” (UBoot’s Mass Storage Gadget support). Is it also possible to flash the Yocto generated image using “fastboot” – if so what are the steps for doing that?
Thanks,
Rajiv
Hi Rajiv,
This image is essentially a good starting point GUI. The boundary-image-multimedia-full is based on an fsl basic Wayland terminal image with some added packages. X11 is basically no longer supported on imx8, so you can try to play around with XWayland, but we do not support this. To answer your question about fastboot, you can try to follow this link if you want: https://boundarydevices.com/android-pie-9-0-0-release-for-i-mx-8mm/ but there is no need, Android requires fastboot whereas Yocto does not. You can normally flash an SD card or eMMC with the instructions provided in this post.
Thanks,
Chris Dimich