Setup 4.14.98 Yocto Build Environment

From Estone Technology Wiki
Revision as of 21:06, 7 July 2020 by Charles (Talk | contribs) (Setup Ubuntu Development Host)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Yocto Build Environment Setup

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

  • Update host system packages

$ sudo apt-get update

Setup Ubuntu Development Host

  • Yocto project build requires some dependency packages be installed on your host system for image completion. Without these packages the build will fail.

Yocto Project Download Packages

$ sudo apt-get install build-essential gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat

$ sudo apt-get install 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++

$ sudo apt-get install 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

Setup repo utility

1. Create <bin> folder in your home directory

(Skip this step if the directory <~/bin> already exists in the host filesystem)

$ mkdir ~/bin

$ curl > ~/bin/repo

$ chmod a+x ~/bin/repo

$ nano ~/.bashrc

2. Add the following line: PATH=~/bin:$PATH to the </.bashrc> configuration file to ensure that <~/bin> folder is in your PATH variable.


Linux Terminal:

$ export PATH=~/bin:$PATH

Git Setup

  • Get Git properly setup, follow the commands below.

$ git config --global "Your Name"

$ git config --global "Your Email"

$ git config --list

Sync Build Source Code

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 imx-yocto-bsp will be created for the project. Any name can be used instead of this.

PPC-4310 Sources

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
$ repo sync

PPC-4310 Alexa-AVS Sources

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
$ repo sync
$ git clone -b master
$ cd sources/
$ git clone -b master
$ cd ..