Linux Host Setup
Introduction
The Yocto build system requires a Linux host machine. You can either run this host as a standalone / native computer or as a virtual machine on, for example, a Microsoft Windows PC. The minimum available hard disk space is 50 GB, but it is recommended that the host machine has at least 120 GB to be able to build the largest image / distribution.
Several Linux distributions are supported by the Yocto project. Please refer to the Supported Linux Distributions section in the Yocto reference manual for a complete list.
The instructions in this document have been tested on an Ubuntu 14.04, 16.04, 18.04 and 20.04. If you want to run on a virtual machine please refer to the
Required Packages
The Yocto Project requires several packages to be installed on the host machine. If you are using a Ubuntu based distribution follow the instructions below. If you, however, are using another distribution refer to the Required Packages for the Build Host section in the Yocto reference manual.
sudo apt-get update
sudo apt-get install gawk wget git-core diffstat unzip texinfo \
gcc-multilib build-essential chrpath socat \
libsdl1.2-dev xterm sed cvs subversion \
coreutils texi2html docbook-utils python-pysqlite2 help2man make \
gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev \
mercurial autoconf automake groff curl lzop asciidoc u-boot-tools
Install the repo tool
The repo
tool has been developed to make it easier to manage multiple Git repositories. Instead of
downloading each repository separately the repo tool can download all with one instruction. Download and install the tool by following the instructions below.
- Create a directory for the tool. The example below creates a directory named bin in your home folder.
mkdir ~/bin
- Download the tool
curl http://commondatastorage.googleapis.com/git-repodownloads/repo > ~/bin/repo
- Make the tool executable
chmod a+x ~/bin/repo
- Add the directory to the PATH variable. The line below could be added to your .bashrc file so the path is available in each started shell/terminal
export PATH=~/bin:$PATH
Download Yocto recipes
The Yocto project consists of many recipes used when building an image. These recipes come from
several repositories and the repo
tool is used to download these repositories.
In step 3 below a branch must be selected of the ea-yocto-base
repository. This table lists the
available branches.
Branch name | Description |
---|---|
ea-6.6.23 | U-Boot: 2024.04. Linux: 6.6.23 |
ea-6.1.36 | U-Boot: 2023.04. Linux: 6.1.36 |
ea-6.1.1 | U-Boot: 2022.04. Linux: 6.1.1 |
ea-5.15.32 | U-Boot: 2022.04. Linux: 5.15.32 |
ea-5.10.72 | U-Boot: 2021.04. Linux: 5.10.72 |
ea-5.10.35 | U-Boot: 2021.04. Linux: 5.10.35 (Last distribution with iMX7ULP support) |
ea-5.4.47 | U-Boot: 2020.04. Linux: 5.4.47 |
ea-5.4.24 | U-Boot: 2020.04. Linux: 5.4.24 |
ea-4.14.98 | U-Boot: 2018.03. Linux: 4.14.98 |
ea-4.14.78 | U-Boot: 2018.03. Linux: 4.14.78 |
ea-4.9.123 | U-Boot: 2017.03. Linux: 4.9.123 |
ea-4.9.11_1.0.0 | U-Boot: 2016.03. Linux: 4.9.11 |
ea-4.1.15_2.0.0 | U-Boot: 2016.03. Linux: 4.1.15 |
- Create a directory for the downloaded files (
ea-bsp
in the example below)
mkdir ea-bsp
cd ea-bsp
- Configure Git if you haven’t already done so. Change "Your name" to your actual name and "Your e-mail" to your e-mail address.
git config --global user.name "Your name"
git config --global user.email "Your e-mail"
- Initialize repo. The file containing all needed repositories is downloaded in this step. Change
<selected branch>
to a branch name according to the table above.
repo init -u https://github.com/embeddedartists/ea-yocto-base -b <selected branch>
- Start to download files
repo sync
All files have now been downloaded into the ea-bsp
directory. Most of the files will actually be available in the sub-directory called sources
.