The bitbake-layers create-layer
script
automates creating a BSP layer.
What makes a layer a "BSP layer", is the presence of a machine
configuration file.
Additionally, a BSP layer usually has a kernel recipe
or an append file that leverages off an existing kernel recipe.
The primary requirement, however, is the machine configuration.
Use these steps to create a BSP layer:
Create a General Layer:
Use the bitbake-layers
script with the
create-layer
subcommand to create a
new general layer.
For instructions on how to create a general layer using the
bitbake-layers
script, see the
"Creating a General Layer Using the bitbake-layers
Script"
section in the Yocto Project Development Tasks Manual.
Create a Layer Configuration File:
Every layer needs a layer configuration file.
This configuration file establishes locations for the
layer's recipes, priorities for the layer, and so forth.
You can find examples of layer.conf
files in the Yocto Project
Source Repositories.
To get examples of what you need in your configuration
file, locate a layer (e.g. "meta-ti") and examine the
http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/conf/layer.conf
file.
Create a Machine Configuration File:
Create a conf/machine/
bsp_root_name
.conf
file.
See
meta-yocto-bsp/conf/machine
for sample
bsp_root_name
.conf
files.
Other samples such as
meta-ti
and
meta-freescale
exist from other vendors that have more specific machine
and tuning examples.
Create a Kernel Recipe:
Create a kernel recipe in recipes-kernel/linux
by either using a kernel append file or a new custom kernel
recipe file (e.g. yocto-linux_4.12.bb
).
The BSP layers mentioned in the previous step also contain different
kernel examples.
See the
"Modifying an Existing Recipe"
section in the Yocto Project Linux Kernel Development Manual
for information on how to create a custom kernel.
The remainder of this section provides a description of
the Yocto Project reference BSP for Beaglebone, which
resides in the
Container Layer
(i.e.
meta-yocto-bsp
).