Here is what you need to get set up 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 100 gigabytes of free disk space for building images.
Packages: The OpenEmbedded build system requires 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. You set that up with a local Source Directory one of two ways depending on whether you are going to contribute back into the Yocto Project or not.
Tarball Extraction: If you are not going to contribute back into the Yocto Project, you can simply go to the Yocto Project Website, select the "Downloads" tab, and choose what you want. Once you have the tarball, just extract it into a directory of your choice.
For example, the following command extracts the
Yocto Project 1.5 release tarball
into the current working directory and sets up the local Source Directory
with a top-level folder named poky-dora-10.0.0
:
$ tar xfj poky-dora-10.0.0.tar.bz2
This method does not produce a local Git repository. Instead, you simply end up with a snapshot of the release.
Git Repository Method: If you are going to be contributing
back into the Yocto Project or you simply want to keep up
with the latest developments, you should use Git commands to set up a local
Git repository of the upstream poky
source repository.
Doing so creates a repository with a complete history of changes and allows
you to easily submit your changes upstream to the project.
Because you clone the 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: 203728, done. remote: Compressing objects: 100% (52371/52371), done. remote: Total 203728 (delta 147444), reused 202891 (delta 146614) Receiving objects: 100% (203728/203728), 95.54 MiB | 308 KiB/s, done. Resolving deltas: 100% (147444/147444), done.
For another example of how to set up your own local Git repositories, see this
wiki page, which describes how to create both poky
and meta-intel
Git repositories.
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 (usually 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 | 102 KiB/s, done. Resolving deltas: 100% (260/260), done.
Supported Board
Support Packages (BSPs):
The Yocto Project provides a layer called meta-intel
and
it is maintained in its own separate Git repository.
The meta-intel
layer contains many supported
BSP Layers.
Similar considerations exist for setting up the meta-intel
layer.
You can get set up for BSP development one of two ways: tarball extraction or
with a local Git repository.
It is a good idea to use the same method that you used to set up the Source Directory.
Regardless of the method you use, 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-n450
See the "BSP Layers" section in the Yocto Project Board Support Package (BSP) Developer's Guide for more information on BSP Layers.
Tarball Extraction: You can download any released BSP tarball from the same "Downloads" page of the Yocto Project Website to get the Yocto Project release. Once on the "Download" page, look to the right of the page and scroll down to find the BSP tarballs.
Once you have the tarball, just extract it into a directory of your choice. Again, this method just produces a snapshot of the BSP layer in the form of a hierarchical directory structure.
Git Repository Method: If you are working
with a local Git repository for your Source Directory, you should also use this method
to set up the meta-intel
Git repository.
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.
Typically, you set up the meta-intel
Git repository inside
the Source Directory.
For example, the following transcript shows the steps to clone the
meta-intel
Git repository inside the local poky
Git repository.
$ cd ~/poky $ git clone git://git.yoctoproject.org/meta-intel.git Cloning into 'meta-intel'... remote: Counting objects: 7366, done. remote: Compressing objects: 100% (2491/2491), done. remote: Total 7366 (delta 3997), reused 7299 (delta 3930) Receiving objects: 100% (7366/7366), 2.31 MiB | 95 KiB/s, done. Resolving deltas: 100% (3997/3997), 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.