Yocto is a industry grade tool for building customized linux distributions. Unfortunateley it does come with an industry grade learning curve, too. This part of our multi-part yocto tutorial covers yocto system install.

We will assume some basic Linux user and software development skills, but no expert skills in either Linux, build systems, configuration management or software development. If your Linux commandline skills are not up to scratch, you might peruse some beginners tutorial such as http://www.ee.surrey.ac.uk/Teaching/Unix/.

Choosing your build System

Yocto can only be built on a Linux system. If you are on another operating system you can obtain the build appliance, a virtual machine containing linux and the yocto build system. As a general rule, all major distributions (Ubuntu, Debian, Fedora, CentOS, open SUSE) in their current realeses are supported. Use of an unsupported distro ist generally possible, but might require some tweaking and will result in a warning at build time. Use of an either too old or too new supported distro will also result in a warning, but will usually succeed without further tweaking. A full list of supported distros and detailled instructions for installing all required dependencies can be found in the yocto reference manual. Where required, we will show commands for the Ubuntu distro.

Installing required software

Yocto requires various components which a re not typically included in standard distros. For Ubuntu you’ll need to add:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
  build-essential chrpath socat libsdl1.2-dev xterm make xsltproc \
  docbook-utils fop dblatex xmlto autoconf automake libtool libglib2.0-dev

For other distros, please check the yocto reference manual.

Installing yocto

We start by creating a directory in our home directory to contain all our yocto related stuff and changing into the newly created directory

$ cd ~ && mkdir yocto && cd yocto

There are various methods to obtain yocto, such as a ready made build appliance or a tar ball.

The preferred method is cloning the git repository:

$ git clone -b fido git://git.yoctoproject.org/poky.git  && cd poky

This will retrieve the entire yocto system and the included poky distro skeleton and change into the resulting poky directory on completion. As of the time of writing, the most current yocto distro is fido (yocto version 1.8). Cloning the git repository in the above mentioned way, will result in checking out the fido branch. Use following command to obtain a list of available branches

$ git branch -a
* fido
  remotes/origin/1.1_M1
  remotes/origin/1.1_M2
  remotes/origin/1.1_M3
...
  remotes/origin/denzil
  remotes/origin/dizzy
  remotes/origin/dora
  remotes/origin/dora-toaster
  remotes/origin/dylan
  remotes/origin/edison
  remotes/origin/elroy
  remotes/origin/fido

The asterisk denote the currently active branch. You can checkout another branch (e.g. dizzy, the version before fido) by using

$ git checkout dizzy

or you can checkout the master branch to have the most up-to-date versions:

$ git checkout master

Checking out the master branch might be required for supporting cutting edge hardware such as the new Raspberrypi 2.