Setup Build Environment (Linux)

To build images of IoT Yocto you need:

  • Ubuntu 22.04 (LTS)

  • At least 400 GiB of free disk space

  • At least 64 GiB of system memory for a 16-core system

  • Internet connection

Note

MediaTek has verified and recommends building IoT Yocto on a native Ubuntu 22.04 machine. Other distributions listed in the Yocto Reference Manual may also be used, though compatibility is not guaranteed by MediaTek.

While building on a container or virtual machine is technically feasible, MediaTek does not guarantee compatibility, as issues may arise from interactions between the container/virtual machine environment and the host system.

On Ubuntu, use the following command to install the required packages:

sudo apt-get install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libelf-dev libsdl1.2-dev lz4 pylint xterm python3-subunit mesa-common-dev libstdc++-12-dev libssl-dev

And install the latest repo tool:

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

We recommend checking these package versions:

  • git --version 1.8.3.1 or greater

  • tar --version 1.27.1 or greater

  • python3 --version 3.6.0 or greater

  • gcc --version 5.0 or greater

  • repo --version 2.16.6 or greater

Note

The repo tool bundled in Ubuntu is usually outdated. It’s recommended to install the latest version.