I.MX8M Mini: Setup Yocto Build Environment

From Estone Technology Wiki
Jump to: navigation, search

Previous Section: i.MX8M-Mini Main Page

Yocto Build Environment Setup

Ubuntu 12.04 or Later

The following steps have been tested on Ubuntu 16.04.6 LTS. An internet connection is required to finish this tutorial

  • Open the linux terminal by pressing on the terminal icon in your host system Linux-terminal-icon.png or press Ctrl+Alt+t to open terminal
  • Check and install updates for package lists packages by inputing the following command to the terminal
$ sudo apt-get update

Setting up the Ubuntu development host

$ 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
$ sudo apt-get install libsdl1.2-dev xterm
$ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
$ sudo apt-get install python-git
$ sudo apt-get install sed cvs subversion coreutils texi2html python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
$ sudo apt-get install uboot-mkimage (Ubuntu 12.04 LTS)
$ sudo apt-get install u-boot-tools

Setting up the repo utility

$ mkdir ~/bin 
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH

Git Project Setup

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

Build Sources

  • The recipes used to build the project come from both the community and i.MX. The Yocto Project layers are downloaded to the sources directory. This sets up the recipes that are used to build the project.
  • The following example shows how to download the i.MX Yocto Project Community BSP recipe layers. For this example, a directory called imx8mm is created for the project. Any name can be used instead of this.
$ mkdir <imx8mm
$ cd <imx8mm>
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.123-2.3.0-8mm_ga.xml
$ repo sync

Next Section: Build & Install SDK