conga-SMX8 Yocto 2.5
A x86 based Linux system with installed cross compile toolchain is required to develop Yocto based software for i.MX 8-based designs. It is possible to use a virtual machine that runs Linux but a dedicated system with Ubuntu is preferrable. Furthermore, the host should have a serial port to access the debug console and an SD card reader.
This guide shows the procedure for Yocto Project 2.5 (Sumo) as an example. Use the latest Yocto release whenever possible.
Setting up and building Yocto
1. Installation in Ubuntu 16.04 64 bit (Clean install)
Setup a clean Ubuntu 16.04 64bit system installation on your preferred devlopment workstation.
2. additional packages
Install some additional packages that are required for building Yocto successfully:
$ sudo apt-get update
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc repo python3-pip
2.1 Repo
A previous version of repo tool is required to work in combination with the Ubuntu 16.04
$ curl <https://storage.googleapis.com/git-repo-downloads/repo-1> > repo
$ chmod a+rx repo
$ sudo cp repo /usr/bin
3. Configure the local git
$ git config --global user.email "youremail"
$ git config --global user.name "Your name"
4. Fetch the yocto recipes
4.1 Solve git-lfs error
The following modification should be applied into the sourcers/poky/meta/conf/bitbake.conf file, to avoid a fatal error while bitbaking. Adding the following lines into the mentioned file, will solve the error.
5. Configure the build environment for the target module
5.1 Memory selection
The Yocto variable MEMORY_PRESENT is included to select the different memory configurations for the different variants
Possible values of MEMORY_PRESENT are:
"2GB"
"4GB"
By default is set to 4GB. If the 2GB memory variant is the target, please add the following line into your conf/local.conf file with the correspoding memory size:
The variable is used in u-boot and imx-sc-firmware to select consistenly the memory present on the target hardware.
5.2 H&D Wireless SPB228
this section applies to the conga-SMX8 variants with onboard Wifi option only
In order to support the HD-Wireless SBP228 module that is assembled on the conga-SMX8 Wifi variants, the Yocto-BSP incorporates the layer meta-spb228-pcie-usb
in its sources directory. The layer ensures that all required kernel components are added to the image during the build process.
By default, the WLAN regulatory domain is set to US. In order to change the default country, modify the file sources/meta-spb228-pcie-usb/recipes-kernel/spb228-pci-usb/linux-pcie-usb-driver-228.bb and set the country code according to the ISO 3166-1 alpha-2, modifying the "US" to the alpha-2 code of the desired country, in the following line:
e.g. in order to set Germany (DE) as default country:
Attention: The onboard Wifi module is connected via the 2nd PCIe interface (pcieb) of the i.MX 8 SOC. This interface is disabled by default and has to be activated by
the corresponding DTB file during kernel boot. To do this, either imx8qm-cgtsmx8-pcieb.dtb or imx8qm-cgtsmx8-hdmi-pcieb.dtb have to be specified for the
bootloader environment variable "fdt_file".
See also: i.MX 8QM HD Wireless SPB228 Wifi Module
6. Build the image, e.g. fsl-image-qt5
Depending on the performance of the development system, this process might take hours.
When it finishes the image will be located under the build folder: tmp/deploy/images/imx8qm-cgtsmx8
Transfering the root filesystem to uSD card
In order to transfer the image to a uSD card, follow the next steps changing sdX for your detected device:
Device tree blob (*.dtb)
The default devicetree blob configured in the bootloader is "imx8qm-cgtsmx8.dtb" (defined in the environment variable "fdt_file" of the bootloader).
There are additional devicetree blobs provided for special use cases:
imx8qm-cgtsmx8.dtb: LVDS graphical output (default)
imx8qm-cgtsmx8-hdmi.dtb: HDMI graphical output
imx8qm-cgtsmx8-dsi.dtb: DSI ADV7533 suppport
imx8qm-cgtsmx8-mipi-ov5640.dtb: OV5640 camera support
imx8qm-cgtsmx8-pcieb.dtb: Enable 2nd PCIe interface (pcieb)
imx8qm-cgtsmx8-hdmi-pcieb.dtb: HDMI graphical output and 2nd PCIe interface enabled (pcieb)
imx8qm-cgtsmx8-lpuart2.dtb: LPuart2 enabled, disables GPIO5 and GPIO10
imx8qm-cgtsmx8-edp.dtb: eDP graphical output
imx8qm-cgtsmx8-hdmi-edp: eDP and HDMI graphical output
imx8qm-cgtsmx8-hdmi-lvds.dtb: HDMI and LVDS graphical output
imx8qm-cgtsmx8-hdmi-lvds-edp.dtb: HDMI, LVDS and eDP graphical output
Changing the device tree blob
In order to change the device tree configuration, power-on the board and stop the boot process on bootloader level.
Specify the desired .dtb file in the variable fdt_file, e.g.:
Provided Boot Container
The boot container (that incorporates the bootloader) in this BSP release is prepared for programming on the SPI.
This is achieved by using the "cgtsmx8_fspi_defconfig" during the bootloader configuration process.