Hands on Yocto: Initial Yocto Setup
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:
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
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:
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
The asterisk denote the currently active branch. You can checkout another branch (e.g. dizzy, the version before fido) by using
or you can checkout the master branch to have the most up-to-date versions:
Checking out the master branch might be required for supporting cutting edge hardware such as the new Raspberrypi 2.