Sometimes it can be hard to see why BitBake wants to build other recipes before the one you have specified. Dependency information can help you understand why a recipe is built.
To generate dependency information for a recipe, run the following command:
$ bitbake -g recipename
This command writes the following files in the current directory:
pn-buildlist
: A list of
recipes/targets involved in building
recipename
.
"Involved" here means that at least one task from the
recipe needs to run when building
recipename
from scratch.
Targets that are in
ASSUME_PROVIDED
are not listed.
pn-depends.dot
: A graph showing
dependencies between build-time targets (recipes).
package-depends.dot
: A graph showing
known dependencies between runtime targets.
task-depends.dot
: A graph showing
dependencies between tasks.
The graphs are in
DOT
format and can be converted to images (e.g. using the
dot
tool from
Graphviz).
DOT files use a plain text format.
The graphs generated using the
bitbake -g
command are often so
large as to be difficult to read without special
pruning (e.g. with Bitbake's
-I
option) and processing.
Despite the form and size of the graphs, the
corresponding .dot
files can still
be possible to read and provide useful information.
As an example, the
task-depends.dot
file contains
lines such as the following:
"libxslt.do_configure" -> "libxml2.do_populate_sysroot"
The above example line reveals that the
do_configure
task in libxslt
depends on the
do_populate_sysroot
task in libxml2
, which is a normal
DEPENDS
dependency between the two recipes.
For an example of how .dot
files
can be processed, see the
scripts/contrib/graph-tool
Python
script, which finds and displays paths between graph
nodes.
You can use a different method to view dependency information by using the following command:
$ bitbake -g -u depexp recipename
This command displays a GUI window from which you can view
build-time and runtime dependencies for the recipes involved in
building recipename
.