This section describes how to get your build host ready to work with BSP layers. Once you have the host set up, you can create the layer as described in the "Creating a new BSP Layer Using the yocto-bsp Script" section.
Set Up the Build Environment: Be sure you are set up to use BitBake in a shell. See the "Setting Up the Development Host to Use the Yocto Project" section in the Yocto Project Development Tasks Manual for information on how to get a build host ready that is either a native Linux machine or a machine that uses CROPS.
Clone the poky
Repository:
You need to have a local copy of the Yocto Project
Source Directory
(i.e. a local poky
repository).
See the
"Cloning the poky
Repository"
and possibly the
"Checking Out by Branch in Poky"
and
"Checking Out by Tag in Poky"
sections all in the Yocto Project Development Tasks Manual for
information on how to clone the poky
repository and check out the appropriate branch for your work.
Determine the BSP Layer You Want: 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.
Optionally Clone the
meta-intel
BSP Layer:
If your hardware is based on current Intel CPUs and devices,
you can leverage this BSP layer.
For details on the meta-intel
BSP layer,
see the layer's
README
file.
Navigate to Your Source Directory:
Typically, you set up the
meta-intel
Git repository
inside the
Source Directory
(e.g. poky
).
Clone the Layer:
$ git clone git://git.yoctoproject.org/meta-intel.git Cloning into 'meta-intel'... remote: Counting objects: 14224, done. remote: Compressing objects: 100% (4591/4591), done. remote: Total 14224 (delta 8245), reused 13985 (delta 8006) Receiving objects: 100% (14224/14224), 4.29 MiB | 2.90 MiB/s, done. Resolving deltas: 100% (8245/8245), done. Checking connectivity... done.
Check Out the Proper Branch:
The branch you check out for
meta-intel
must match the same
branch you are using for the Yocto Project release
(e.g. sumo):
$ git checkout branch_name
For an example on how to discover branch names and checkout on a branch, see the "Checking Out By Branch in Poky" section in the Yocto Project Development Tasks Manual.
Optionally Set Up an Alternative BSP Layer:
If your hardware can be more closely leveraged to an
existing BSP not within the meta-intel
BSP layer, you can clone that BSP layer.
The process is identical to the process used for the
meta-intel
layer except for the layer's
name.
For example, if you determine that your hardware most
closely matches the meta-minnow
,
clone that layer:
$ git clone git://git.yoctoproject.org/meta-minnow Cloning into 'meta-minnow'... remote: Counting objects: 456, done. remote: Compressing objects: 100% (283/283), done. remote: Total 456 (delta 163), reused 384 (delta 91) Receiving objects: 100% (456/456), 96.74 KiB | 0 bytes/s, done. Resolving deltas: 100% (163/163), done. Checking connectivity... done.
Initialize the Build Environment:
While in the root directory of the Source Directory (i.e.
poky
), run the
oe-init-build-env
environment setup script to define the OpenEmbedded
build environment on your build host.
$ source oe-init-build-env
Among other things, the script creates the
Build Directory,
which is build
in this case
and is located in the
Source Directory.
After the script runs, your current working directory
is set to the build
directory.