- Embedded Linux Development Using Yocto Project Cookbook(Second Edition)
- Alex González
- 252字
- 2021-06-30 19:21:27
Looking at dependencies
You can ask BitBake to print the current and provided versions of packages with the following command:
$ bitbake --show-versions
Another common debugging task is the removal of unwanted dependencies.
To see an overview of pulled-in dependencies, you can use BitBake's verbose output by running this:
$ bitbake -v <target>
To analyze what dependencies are pulled in by a package, we can ask BitBake to create DOT files that describe these dependencies by running the following command:
$ bitbake -g <target>
The DOT format is a text description language for graphics that is understood by the GraphViz open source package and all the utilities that use it. DOT files can be visualized or further processed.
You can omit dependencies from the graph to produce more readable output. For example, to omit dependencies from glibc, you would run the following command:
$ bitbake -g <target> -I glibc
Once the preceding commands have been run, we get the following files in the current directory:
- pn-buildlist: This file shows the list of packages that would be built by the given target
- recipes-depends.dot: This file shows the dependencies between recipes
- task-depends.dot: This file shows the dependencies between tasks
To convert the .dot files to postscript files (.ps), you may execute:
$ dot -Tps filename.dot -o outfile.ps
However, the most useful way to display dependency data is to ask BitBake to display it graphically with the dependency explorer, as follows:
$ bitbake -g -u taskexp <target>
The result may be seen in the following screenshot:
