How to list all of the .bb and .bbappend files used to build a specific package with bitbake?
Asked Answered
D

3

9

Let's consider the package "virtual/kernel". I would like to know which .bb and .bbappend files are involved in building this package.

I know that I can get the package name through:

bitbake -e virtual/kernel | grep ^BP=

This command gives me the name of the package used to build virtual/kernel that in my case is linux-fslc-4.0+gitAUTOINC+19ebefd40a. However, I do not know how to get the list of .bb and .bbappend files (with their location included) used to build the linux-fslc-4.0+gitAUTOINC+19ebefd40a package.

Dicrotic answered 7/6, 2015 at 2:20 Comment(0)
S
10

You can use

bitbake-layers show-appends

To list all of the recipes that are extended with .bbappend files. It will indicate the priority and location of all such files.

Spoof answered 8/10, 2015 at 13:15 Comment(0)
A
7

First of all, you should be aware that there are potentially many dozens of files involved in building a single package, and that is especially true for building a complex package such as the Linux kernel.

You can get much more information if you pipe the output of 'bitbake -e foo' to a file and then analyze its contents. Something like

$ bitbake -e virtual/kernel >kernel.env

For example, early in the output, you can find the list of includes as bitbake scans and reads the chain of class files. Also very useful, though not directly related to the question is that you can see the cumulative changes made to variables as these include files are read in and parsed.

If you isolate those lines that set variables, you can effectively build a list of files involved in the building of the package. Something like this:

$ cat kernel.env | egrep '^#[ ]*append|^#[ ]*set' | cut -d ':' -f 1 | awk '{print $3}' | sort | uniq

...should produce a list of bitbake files (*.conf, *.bb, *.bbclass, etc) that are involoved in building the package. Ugly, but it works ;)

You might also consider joining #oe and #yocto on freenode IRC where lots of really smart people hang out that know much more about this stuff than I do! Good luck.

Anosmia answered 8/6, 2015 at 13:9 Comment(0)
A
4

Try the following:

Show .bb file of a recipe

RECIPE_NAME="linux-yocto"
bitbake -e  $RECIPE_NAME | grep ^FILE=

Show .bbappend files of a recipe

RECIPE_NAME="linux-yocto"
bitbake-layers show-appends linux-yocto

Querying specific recipe with bitbake-layers show-appends linux-yocto might not be supported by old version of bitbake. Use bitbake-layers show-appends instead.

Alcorn answered 24/4, 2021 at 8:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.