Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can someone point me toward a bitbake or openembedded tutorial?

I've been working with the Angstrom Linux distribution for the BeagleBoard. Can anyone point me to a tutorial or reference for how bitbake and OpenEmbedded actually work? For example, when I invoke bitbake like this:

bitbake virtual/kernel

what's actually happening? I've grep'ed the Angstrom recipes and searched the Angstrom filesystem, but I don't seem to be able to find references to either virtual or kernel. I feel a bit flummoxed working with this toolchain and making kernel patches without really understanding how bitbake works.

like image 452
Ted Middleton Avatar asked Oct 24 '11 00:10

Ted Middleton


1 Answers

BitBake is a complex piece of software that unfortunately doesn't have the best user documentation. I believe that it's (loosely) based on the portage system in Gentoo, so some familiarity with that system might be a help.

The best way that I've found to figure out what is happening when you try to build something is to pass the -g option to bitbake, which will generate two files, depends.dot and task-depends.dot. The former is a graph of the dependencies of that package, showing what other packages get pulled in when you run a specific task. The latter shows more detail, showing tasks instead of packages. These tasks are a bit lower-level than the packages themselves; building a package might cause the system to fetch the sources, patch the sources, run a configure script, perform the compilation, install the binaries, and split the resulting files into subpackages.

These files can show why you're pulling in a piece of software you don't want, so that you can edit the offending package to remove its dependency. The graphs generated here can be visualized with the graphviz package, but if you run the -g option for a large task, such as an image task, the generated graph would be too large to visualize. It can still be useful to grep through the .dot files.

like image 158
David Brigada Avatar answered Sep 30 '22 02:09

David Brigada