How to Build Yocto

The Yocto Project provides open-source tools for developers to customize Linux-based systems regardless of the architecture. With this procedure, you will be able to build a Yocto image for I-Pi SMARC 1200.

1. Set up a build host environment

1.1 Recommended Hardware for the host

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

1.2 Essential host Packages required to be installed in your host

sudo apt update && sudo apt upgrade
sudo apt install gawk wget git-core diffstat unzip gcc-multilib build-essential chrpath socat cpio python3-pip xz-utils debianutils iputils-ping python3-jinja2 libsdl1.2-dev xterm zstd liblz4-tool curl git

Note:

Please Don’t use the root account to build Yocto. It might cause unpredictable errors.

1.3 Setup the GitHub account in the Host

Before starting to build the source, 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

1.4 “Google repo” packages required to be installed in your host

mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH="~/bin:$PATH"

2. Fetch the source from the git location as below

2.1 Create the working directory

Note: If you’re using external drive to build the image it must be Ext4 format. FAT and eXFAT formats are not supported.

mkdir mtk_bsp
cd mtk_bsp

2.2 Start to download the sources

  • Attention: current default branch for build image is “kirkstone”. For other branches build, please refer to our ADLINK GitHub repository for paired manifest  .xml accordingly!
repo init -u https://github.com/ADLINK/adlink-manifest.git -b rity-kirkstone-v23.2 -m 4.0.xml --no-repo-verify
repo sync

Setup the build machine

source setup_adlink_env.sh -b build

Run the following command on your host system to provoke the yocto image building process.

bitbake rity-demo-image

After the build is complete, disk images will be located at work-dir/build-dir/tmp/deploy/images/lec-mtk-i1200-ufs/

3. Flashing the build

Go to the image build directory. Replace with your directory path [work-dir/build-dir].

cd work-dir/build-dir/tmp/deploy/images/lec-mtk-i1200-ufs/

Flashing the image on UFS click here.