Building Linux Images for the i.MX 8M Plus SOM Starter Kit

This application note explains how to build the Linux BSP from the git repositories.

Linux Host Requirements

Linux host requirements are as follows: Ubuntu 20.04 with the recommended amount of free space of at least 250 GB.

Setting Up Linux Host

  1. Prepare the Linux host for the build:

    $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ xz-utils debianutils iputils-ping libbz2-dev libz-dev python2.7 dfu-util libusb-1.0.0-dev $ sudo dpkg-reconfigure dash # Say "No" to not use "dash" as the default system shell. $ wget $ chmod 755 repo $ sudo cp repo /usr/local/bin/
  2. Clone the build script:

    $ git clone -b imx-5.15-32-vb
  3. Checkout an appropriate release tag (e.g. 1.0.5-213):

    $ cd meta-vb-imx8mp $ git checkout 1.0.5-213
  4. Create directories for the Yocto cache and downloads:

    $ sudo mkdir -p /home/cache/CACHE/5.15.32/sstate-cache $ sudo mkdir -p /home/cache/CACHE/5.15.32/downloads $ sudo chmod 777 /home/cache/CACHE/5.15.32/sstate-cache /home/cache/CACHE/5.15.32/downloads

Building Images

Run the build script to build the release images:

$ sh meta-vb-imx8mp/scripts/ -t 1.0.5-213 ...

Building a Specific Release

In the above example, the script will build from the 1.0.5-213 release tag in the source repositories , ,

If you would like to build from the top-of-the trunk of the imx-5.15.32-vb development branches, run the script as below:

$ cd meta-vb-imx-8mp $ git checkout imx-5.15.32-vb $ cd .. $ sh meta-vb-imx8mp/scripts/ -b imx-5.15.32-vb ...

Understanding Build Artefacts

After the build, the resultant build artefacts will be located in the build-desktop/ directory:

$ ls -l build-desktop/builddir/tmp/deploy/images/imx8mpnavq/ ... -rwxr-xr-x 1 build build 7054552 Sep 25 10:49 uuu -rw-r--r-- 1 build build 1508656 Sep 25 10:49 imx-boot-imx8mpnavq-sd.bin-flash_evk lrwxrwxrwx 1 build build 62 Sep 25 20:11 imx-image-desktop-ros-imx8mpnavq.wic.bz2 -> imx-image-desktop-ros-imx8mpnavq-20230109184422.rootfs.wic.bz2 ...