Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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, not 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.

like image 996
Irr Avatar asked Jun 07 '15 02:06

Irr


People also ask

Where do Bbappend files go?

bbappend file is to reference a modified version of the startup script to be copied in place of the original without changing the base openembedded-core and/or poky environments. The . bbappend file and my version of the script is therefore placed in my project directory with the rest of my own recipes to be built.

What is BitBake command?

The bitbake command builds platform projects, application source, and packages. BitBake is the overall control program, which manages builds of all the packages and of the overall system. It builds platform projects, application source, and packages.

What is .BB file in Linux?

Source file written in Blitz, a game-programming language; compiled using a Blitz compiler included with BlitzMax, Blitz3D, or BlitzPlus development software. Blitz3D is used for creating 3D games. BlitzMax is based on BASIC and can create cross-platform games.

What is .BB file in yocto?

1.3. bb , are the most basic metadata files. These recipe files provide BitBake with the following: Descriptive information about the package. The version of the recipe. Existing Dependencies.


3 Answers

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.

like image 50
challinan Avatar answered Oct 01 '22 22:10

challinan


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.

like image 36
Ryan Avatar answered Oct 01 '22 23:10

Ryan


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.

like image 24
Iceberg Avatar answered Oct 01 '22 22:10

Iceberg