Here is what you need to use the Yocto Project:
Host System: You should have a reasonably current Linux-based host system. You will have the best results with a recent release of Fedora, openSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project and officially supported. For a list of the distributions under validation and their status, see the "Supported Linux Distributions" section in the Yocto Project Reference Manual and the wiki page at Distribution Support.
You should also have about 50 Gbytes of free disk space for building images.
Packages: The OpenEmbedded build system requires that certain packages exist on your development system (e.g. Python 2.6 or 2.7). See "The Packages" section in the Yocto Project Quick Start and the "Required Packages for the Host Development System" section in the Yocto Project Reference Manual for the exact package requirements and the installation commands to install them for the supported distributions.
Yocto Project Release:
You need a release of the Yocto Project locally installed on
your development system.
The documentation refers to this set of locally installed files
as the Source Directory.
You create your Source Directory by using
Git to clone a local copy
of the upstream poky
repository,
or by downloading and unpacking a tarball of an official
Yocto Project release.
The preferred method is to create a clone of the repository.
Working from a copy of the upstream repository allows you to contribute back into the Yocto Project or simply work with the latest software on a development branch. Because Git maintains and creates an upstream repository with a complete history of changes and you are working with a local clone of that repository, you have access to all the Yocto Project development branches and tag names used in the upstream repository.
The following transcript shows how to clone the
poky
Git repository into the current
working directory.
The command creates the local repository in a directory
named poky
.
For information on Git used within the Yocto Project, see
the "Git" section.
$ git clone git://git.yoctoproject.org/poky Cloning into 'poky'... remote: Counting objects: 226790, done. remote: Compressing objects: 100% (57465/57465), done. remote: Total 226790 (delta 165212), reused 225887 (delta 164327) Receiving objects: 100% (226790/226790), 100.98 MiB | 263 KiB/s, done. Resolving deltas: 100% (165212/165212), done.
For another example of how to set up your own local Git
repositories, see this
wiki page, which describes how to create local
Git repositories for both
poky
and meta-intel
.
Yocto Project Kernel: If you are going to be making modifications to a supported Yocto Project kernel, you need to establish local copies of the source. You can find Git repositories of supported Yocto Project kernels organized under "Yocto Linux Kernel" in the Yocto Project Source Repositories at http://git.yoctoproject.org/cgit.cgi.
This setup can involve creating a bare clone of the Yocto Project kernel and then
copying that cloned repository.
You can create the bare clone and the copy of the bare clone anywhere you like.
For simplicity, it is recommended that you create these structures outside of the
Source Directory, which is usually named poky
.
As an example, the following transcript shows how to create the bare clone
of the linux-yocto-3.10
kernel and then create a copy of
that clone.
clone
command.
Doing so can speed up the process.In the following example, the bare clone is named
linux-yocto-3.10.git
, while the
copy is named my-linux-yocto-3.10-work
:
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.10 linux-yocto-3.10.git Cloning into bare repository 'linux-yocto-3.10.git'... remote: Counting objects: 3364487, done. remote: Compressing objects: 100% (507178/507178), done. remote: Total 3364487 (delta 2827715), reused 3364481 (delta 2827709) Receiving objects: 100% (3364487/3364487), 722.95 MiB | 423 KiB/s, done. Resolving deltas: 100% (2827715/2827715), done.
Now create a clone of the bare clone just created:
$ git clone linux-yocto-3.10.git my-linux-yocto-3.10-work Cloning into 'my-linux-yocto-3.10-work'... done.
The meta-yocto-kernel-extras
Git Repository:
The meta-yocto-kernel-extras
Git repository contains Metadata needed
only if you are modifying and building the kernel image.
In particular, it contains the kernel BitBake append (.bbappend
)
files that you
edit to point to your locally modified kernel source files and to build the kernel
image.
Pointing to these local files is much more efficient than requiring a download of the
kernel's source files from upstream each time you make changes to the kernel.
You can find the meta-yocto-kernel-extras
Git Repository in the
"Yocto Metadata Layers" area of the Yocto Project Source Repositories at
http://git.yoctoproject.org/cgit.cgi.
It is good practice to create this Git repository inside the Source Directory.
Following is an example that creates the meta-yocto-kernel-extras
Git
repository inside the Source Directory, which is named poky
in this case:
$ cd ~/poky $ git clone git://git.yoctoproject.org/meta-yocto-kernel-extras meta-yocto-kernel-extras Cloning into 'meta-yocto-kernel-extras'... remote: Counting objects: 727, done. remote: Compressing objects: 100% (452/452), done. remote: Total 727 (delta 260), reused 719 (delta 252) Receiving objects: 100% (727/727), 536.36 KiB | 240 KiB/s, done. Resolving deltas: 100% (260/260), done.
Supported Board Support Packages (BSPs): The Yocto Project supports many BSPs, which are maintained in their own layers or in layers designed to contain several BSPs. To get an idea of machine support through BSP layers, you can look at the index of machines for the release.
The Yocto Project uses the following BSP layer naming scheme:
meta-bsp_name
where bsp_name
is the recognized
BSP name.
Here are some examples:
meta-crownbay meta-emenlow meta-raspberrypi
See the "BSP Layers" section in the Yocto Project Board Support Package (BSP) Developer's Guide for more information on BSP Layers.
A useful Git repository released with the Yocto
Project is meta-intel
, which is a
parent layer that contains many supported
BSP Layers.
You can locate the meta-intel
Git
repository in the "Yocto Metadata Layers" area of the Yocto
Project Source Repositories at
http://git.yoctoproject.org/cgit.cgi.
Using
Git to create a local clone of the
upstream repository can be helpful if you are working with
BSPs.
Typically, you set up the meta-intel
Git repository inside the Source Directory.
For example, the following transcript shows the steps to clone
meta-intel
.
meta-intel
branch that matches your
Source Directory
(i.e. poky
) branch.
For example, if you have checked out the "master" branch
of poky
and you are going to use
meta-intel
, be sure to checkout the
"master" branch of meta-intel
.
$ cd ~/poky $ git clone git://git.yoctoproject.org/meta-intel.git Cloning into 'meta-intel'... remote: Counting objects: 8844, done. remote: Compressing objects: 100% (2864/2864), done. remote: Total 8844 (delta 4931), reused 8780 (delta 4867) Receiving objects: 100% (8844/8844), 2.48 MiB | 264 KiB/s, done. Resolving deltas: 100% (4931/4931), done.
The same
wiki page
referenced earlier covers how to set up the
meta-intel
Git repository.
Eclipse Yocto Plug-in: If you are developing applications using the Eclipse Integrated Development Environment (IDE), you will need this plug-in. See the "Setting up the Eclipse IDE" section for more information.