If you plan on customizing a recipe for a particular BSP, you need to do the following:
Create a *.bbappend
file for
the modified recipe.
For information on using append files, see the
"Using .bbappend Files in Your Layer"
section in the Yocto Project Development Tasks
Manual.
Ensure your directory structure in the BSP layer that supports your machine is such that the OpenEmbedded build system can find it. See the example later in this section for more information.
Put the append file in a directory whose name matches
the machine's name and is located in an appropriate
sub-directory inside the BSP layer (i.e.
recipes-bsp
,
recipes-graphics
,
recipes-core
, and so forth).
Place the BSP-specific files in the proper directory inside the BSP layer. How expansive the layer is affects where you must place these files. For example, if your layer supports several different machine types, you need to be sure your layer's directory structure includes hierarchy that separates the files according to machine. If your layer does not support multiple machines, the layer would not have that additional hierarchy and the files would obviously not be able to reside in a machine-specific directory.
Following is a specific example to help you better understand
the process.
This example customizes customizes a recipe by adding a
BSP-specific configuration file named
interfaces
to the
init-ifupdown_1.0.bb
recipe for machine
"xyz" where the BSP layer also supports several other
machines:
Edit the
init-ifupdown_1.0.bbappend
file
so that it contains the following:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
The append file needs to be in the
meta-xyz/recipes-core/init-ifupdown
directory.
Create and place the new
interfaces
configuration file in
the BSP's layer here:
meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces
meta-xyz
layer did
not support multiple machines, you would place
the interfaces
configuration
file in the layer here:
meta-xyz/recipes-core/init-ifupdown/files/interfaces
The
FILESEXTRAPATHS
variable in the append files extends the search path
the build system uses to find files during the build.
Consequently, for this example you need to have the
files
directory in the same
location as your append file.