You can use the BitBake layer management tool 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.
Use the following form when running the layer management tool.
$ bitbake-layerscommand
[arguments
]
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-recipes:
Lists available recipes and the layers that provide them.
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-appends:
Lists .bbappend
files and the
recipe files to which they apply.
show-cross-depends:
Lists dependency relationships between recipes that
cross layer boundaries.
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" ...