Reference: BitBake
- BitBake is a program written in Python that interprets the metadata
- that makes up Poky. At some point, people wonder what actually happens
- when you type bitbake poky-image-sato. This section
- aims to give an overview of what happens behind the scenes from a
- BitBake perspective.
+ BitBake is a program written in Python that interprets the metadata that makes up Poky.
+ At some point, people wonder what actually happens when you enter:
+
+ $ bitbake poky-image-sato
+
+
+
+
+ This appendix provides an overview of what happens behind the scenes from BitBake's perspective.
-
- It is worth noting that BitBake aims to be a generic "task" executor
- capable of handling complex dependency relationships. As such it has no
- real knowledge of what the tasks it is executing actually do. It just
- considers a list of tasks with dependencies and handles metadata
- consisting of variables in a certain format which get passed to the
- tasks.
-
+
+ BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
+ As such, it has no real knowledge of what the tasks being executed actually do.
+ BitBake just considers a list of tasks with dependencies and handles metadata
+ that consists of variables in a certain format that get passed to the tasks.
+ Parsing
@@ -28,10 +30,10 @@
The first thing BitBake does is work out its configuration by
looking for a file called bitbake.conf.
- BitBake searches through the BBPATH environment
+ BitBake examines the BBPATH environment
variable looking for a conf/
- directory containing a bitbake.conf file and
- adds the first bitbake.conf file found in
+ directory that contains a bitbake.conf file.
+ BitBake adds the first bitbake.conf file found in
BBPATH (similar to the PATH environment variable).
For Poky, bitbake.conf is found in meta/conf/.
@@ -42,32 +44,32 @@
files to include from a conf/
directory below the directories listed in BBPATH.
In general the most important configuration file from a user's perspective
- is local.conf, which contains a users customized
- settings for Poky. Other notable configuration files are the distribution
+ is local.conf, which contains a user's customized
+ settings for Poky.
+ Other notable configuration files are the distribution
configuration file (set by the
DISTRO variable) and the machine configuration file
(set by the MACHINE
- variable). The
- DISTRO and
- MACHINE environment variables are both usually set in
- the local.conf file. Valid distribution
+ variable).
+ The DISTRO and MACHINE environment variables are both usually set in
+ the local.conf file.
+ Valid distribution
configuration files are available in the
meta/conf/distro/ directory and valid machine configuration
files in the meta/conf/machine/
- directory. Within the
- meta/conf/machine/include/ directory are various
- tune-*.inc configuration files which provide common
- "tuning" settings specific to and shared between particular
- architectures and machines.
+ directory.
+ Within the meta/conf/machine/include/
+ directory are various tune-*.inc configuration files that provide common
+ "tuning" settings specific to and shared between particular architectures and machines.
- After the parsing of the configuration files some standard classes
- are included. In particular, base.bbclass is
- always included, as will any other classes
- specified in the configuration using the INHERIT
- variable. Class files are searched for in a classes subdirectory
+ After the parsing of the configuration files some standard classes are included.
+ The base.bbclass file is always included.
+ Other classes that are specified in the configuration using the
+ INHERIT
+ variable are also inculded.
+ Class files are searched for in a classes subdirectory
under the paths in BBPATH in the same way as
configuration files.
@@ -77,21 +79,19 @@
variable BBFILES
is set, usually in
local.conf, and defines the list of places to search for
- .bb files. By
- default this specifies the meta/packages/
+ .bb files.
+ By default this specifies the meta/packages/
directory within Poky, but other directories such as
meta-extras/ can be included
- too. Adding extra content to
- BBFILES is best
- acheived through the use of BitBake
+ too.
+ Adding extra content to BBFILES is best acheived through the use of BitBake
"layers".
- BitBake parses each .bb file in
- BBFILES and
- stores the values of various variables. In summary, for each
- .bb
+ BitBake parses each .bb file in BBFILES and
+ stores the values of various variables.
+ In summary, for each .bb
file the configuration + base class of variables are set, followed
by the data in the .bb file
itself, followed by any inherit commands that