You can use the BitBake layer management tool
bitbake-layers
to provide a view
into the structure of recipes across a multi-layer project.
Being able to generate output that reports on configured layers
with their paths and priorities and on
.bbappend
files and their applicable
recipes can help to reveal potential problems.
For help on the BitBake layer management tool, use the following command:
$ bitbake-layers --help NOTE: Starting bitbake server... usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] <subcommand> ... BitBake layers utility optional arguments: -d, --debug Enable debug output -q, --quiet Print only errors -F, --force Force add without recipe parse verification --color COLOR Colorize output (where COLOR is auto, always, never) -h, --help show this help message and exit subcommands: <subcommand> show-layers show current configured layers. show-overlayed list overlayed recipes (where the same recipe exists in another layer) show-recipes list available recipes, showing the layer they are provided by show-appends list bbappend files and recipe files they apply to show-cross-depends Show dependencies between recipes that cross layer boundaries. add-layer Add one or more layers to bblayers.conf. remove-layer Remove one or more layers from bblayers.conf. flatten flatten layer configuration into a separate output directory. layerindex-fetch Fetches a layer from a layer index along with its dependent layers, and adds them to conf/bblayers.conf. layerindex-show-depends Find layer dependencies from layer index. create-layer Create a basic layer Use bitbake-layers <subcommand> --help to get help on a specific command
The following list describes the available commands:
help:
Displays general help or help on a specified command.
show-layers:
Shows the current configured layers.
show-overlayed:
Lists overlayed recipes.
A recipe is overlayed when a recipe with the same name
exists in another layer that has a higher layer
priority.
show-recipes:
Lists available recipes and the layers that provide them.
show-appends:
Lists .bbappend
files and the
recipe files to which they apply.
show-cross-depends:
Lists dependency relationships between recipes that
cross layer boundaries.
add-layer:
Adds a layer to bblayers.conf
.
remove-layer:
Removes a layer from bblayers.conf
flatten:
Flattens the layer configuration into a separate output
directory.
Flattening your layer configuration builds a "flattened"
directory that contains the contents of all layers,
with any overlayed recipes removed and any
.bbappend
files appended to the
corresponding recipes.
You might have to perform some manual cleanup of the
flattened layer as follows:
Non-recipe files (such as patches) are overwritten. The flatten command shows a warning for these files.
Anything beyond the normal layer
setup has been added to the
layer.conf
file.
Only the lowest priority layer's
layer.conf
is used.
Overridden and appended items from
.bbappend
files need to be
cleaned up.
The contents of each
.bbappend
end up in the
flattened recipe.
However, if there are appended or changed
variable values, you need to tidy these up
yourself.
Consider the following example.
Here, the bitbake-layers
command adds the line
#### bbappended ...
so that
you know where the following lines originate:
... DESCRIPTION = "A useful utility" ... EXTRA_OECONF = "--enable-something" ... #### bbappended from meta-anotherlayer #### DESCRIPTION = "Customized utility" EXTRA_OECONF += "--enable-somethingelse"
Ideally, you would tidy up these utilities as follows:
... DESCRIPTION = "Customized utility" ... EXTRA_OECONF = "--enable-something --enable-somethingelse" ...
layerindex-fetch
:
Fetches a layer from a layer index, along with its
dependent layers, and adds the layers to the
conf/bblayers.conf
file.
layerindex-show-depends
:
Finds layer dependencies from the layer index.
create-layer
:
Creates a basic layer.