From 7b99bc04acd6a2e3805dd592daff18fb0ecba164 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 18 Jan 2014 14:32:51 +0000 Subject: bitbake: user-manual-metadata: Expand parsing process docuemtnation (Bitbake rev: 2596dd2b42c06ef258032356294cc345a6e25fed) Signed-off-by: Richard Purdie --- bitbake/doc/user-manual/user-manual-metadata.xml | 88 +++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) (limited to 'bitbake/doc/user-manual/user-manual-metadata.xml') diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml index 73238fd9e5..239390ac8d 100644 --- a/bitbake/doc/user-manual/user-manual-metadata.xml +++ b/bitbake/doc/user-manual/user-manual-metadata.xml @@ -579,10 +579,96 @@ For the 'deptask', 'rdeptask', 'depends', 'rdepends' and 'recrdeptask' flags please see the dependencies section. + +
+ Parsing and Execution +
- Parsing + Parsing Overview + + + BitBake parses configuration files, classes, and + .bb files. + + + + The first thing BitBake does is look for the + bitbake.conf file. + This file resides in the within the conf/ + directory. + BitBake finds it by examining its BBPATH + environment variable and looking for the + conf/ directory. + + + + The bitbake.conf file lists other configuration + 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 user's + customized settings for the build environment. + 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 BitBake + environment variables are both usually set in the + local.conf file. + Valid distribution configuration files are available + in the conf/distro/ directory and valid machine + configuration files in the meta/conf/machine/ + directory. + Within the 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 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 included. + Class files are searched for in a classes subdirectory under + the paths in BBPATH in the same way as + configuration files. + + + + After classes are included, the variable + BBFILES is set, usually in + local.conf, and defines the list of + places to search for .bb files. + Adding extra content to BBFILES is best + achieved through the use of BitBake layers as described in the + Layers section below. + + + + BitBake parses each .bb file in + BBFILES and stores the values of various + variables. + In summary, for each .bb file the configuration + plus the base class of variables are set, followed by the data in the + .bb file itself, followed by any inherit commands + that .bb file might contain. + + + + Because parsing .bb files is a time consuming + process, a cache is kept to speed up subsequent parsing. + This cache is invalid if the timestamp of the + .bb file itself changes, or if the timestamps of + any of the include, configuration files or class files on which + the .bb file depends change. + +
+
Configuration files + The first kind of metadata in BitBake is configuration metadata. This metadata is global, and therefore affects all packages and -- cgit v1.2.3-54-g00ecf