Skip to content

Build Yocto for I‐Pi SMARC IMX8MP

Kothandaraman Kannadansan edited this page Dec 22, 2023 · 9 revisions

1. Set up a build host environment:

1.1 Recommended Hardware for the host

  • Intel Core-i7 Processor (>= 4 cores)
  • at least 8GB of Memory
  • at least 500GB Disk sapce
  • Ubuntu 20.04 LTS 64bit or later version for Yocto Project Build
  • High-speed network connectivity

 1.2 Essential host Packages are required to be installed on your host :

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm zstd liblz4-tool curl git python-is-python3

Note:

Please Don't use the root account to build Yocto. it might cause unpredictable errors.


  1.3 "Google repo" packages is required to be installed on your host :

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=${PATH}:~/bin

1.4 Before star to build the source, please make sure that git is set up properly with the commands below:

$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list

2. Fetch the source from the git location as below:

2.1 please create the working directory. we're creating "imx8mp-yocto-bsp" .

$ mkdir imx8mp-yocto-bsp 
$ cd imx8mp-yocto-bsp

2.2 Start to download the source and build with the command below.

For zeus

$ repo init -u https://github.com/ADLINK/adlink-manifest -b lec-imx-yocto-zeus -m adlink-lec-imx8mp-yocto-zeus_1v6.xml
$ repo sync
$ MACHINE=lec-imx8mp DISTRO=fsl-imx-wayland source adlink-imx-setup-release.sh -b <build_dir>

For hardknott

$ repo init -u https://github.com/ADLINK/adlink-manifest -b lec-imx-yocto-hardknott -m adlink-lec-imx8mp-yocto-hardknott_1v5.xml
$ repo sync
$ MACHINE=lec-imx8mp DISTRO=fsl-imx-wayland source adlink-imx-setup-release.sh -b <build_dir>

For kirkstone

$ repo init -u https://github.com/ADLINK/adlink-manifest -b lec-imx-yocto-kirkstone -m adlink-lec-imx8mp-yocto-kirkstone_1v0.xml
$ repo sync
$ MACHINE=lec-imx8mp DISTRO=fsl-imx-xwayland source adlink-imx-setup-release.sh -b <build_dir>

2.3 Required Setting in conf/local.conf

$ vi <build_dir>/conf/local.conf

# sets the LPDDR4 DRAM size, available options are: LPDDR4_2GB, LPDDR4_2GK, LPDDR4_4GB, LPDDR4_8GB
UBOOT_EXTRA_CONFIGS = "LPDDR4_2GB"

2.4 Build the image

$ bitbake imx-image-multimedia

2.5 Image is generated as imx-image-multimedia-xxx.wic.bz2 in <build_dir>/tmp/deploy/image/lec-imx8mp/, use below command to unzip

$ bunzip2 -dk -f imx-image-multimedia-xxx.wic.bz2

Kirkstone Image
$ zstd -dk imx-image-multimedia-xxx.wic.zst

3. Next action is flashing the image

Please refer to here