summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst54
1 files changed, 27 insertions, 27 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
index 84d65fa9c3..a6ef90db12 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
@@ -40,7 +40,7 @@ the BitBake command and its options, see ":ref:`The BitBake Command
40 the number of processors, which takes into account hyper-threading. 40 the number of processors, which takes into account hyper-threading.
41 Thus, a quad-core build host with hyper-threading most likely shows 41 Thus, a quad-core build host with hyper-threading most likely shows
42 eight processors, which is the value you would then assign to 42 eight processors, which is the value you would then assign to
43 ``BB_NUMBER_THREADS``. 43 :term:`BB_NUMBER_THREADS`.
44 44
45 A possibly simpler solution is that some Linux distributions (e.g. 45 A possibly simpler solution is that some Linux distributions (e.g.
46 Debian and Ubuntu) provide the ``ncpus`` command. 46 Debian and Ubuntu) provide the ``ncpus`` command.
@@ -65,13 +65,13 @@ data itself is of various types:
65 65
66The ``layer.conf`` files are used to construct key variables such as 66The ``layer.conf`` files are used to construct key variables such as
67:term:`BBPATH` and :term:`BBFILES`. 67:term:`BBPATH` and :term:`BBFILES`.
68``BBPATH`` is used to search for configuration and class files under the 68:term:`BBPATH` is used to search for configuration and class files under the
69``conf`` and ``classes`` directories, respectively. ``BBFILES`` is used 69``conf`` and ``classes`` directories, respectively. :term:`BBFILES` is used
70to locate both recipe and recipe append files (``.bb`` and 70to locate both recipe and recipe append files (``.bb`` and
71``.bbappend``). If there is no ``bblayers.conf`` file, it is assumed the 71``.bbappend``). If there is no ``bblayers.conf`` file, it is assumed the
72user has set the ``BBPATH`` and ``BBFILES`` directly in the environment. 72user has set the :term:`BBPATH` and :term:`BBFILES` directly in the environment.
73 73
74Next, the ``bitbake.conf`` file is located using the ``BBPATH`` variable 74Next, the ``bitbake.conf`` file is located using the :term:`BBPATH` variable
75that was just constructed. The ``bitbake.conf`` file may also include 75that was just constructed. The ``bitbake.conf`` file may also include
76other configuration files using the ``include`` or ``require`` 76other configuration files using the ``include`` or ``require``
77directives. 77directives.
@@ -104,7 +104,7 @@ BitBake first searches the current working directory for an optional
104contain a :term:`BBLAYERS` variable that is a 104contain a :term:`BBLAYERS` variable that is a
105space-delimited list of 'layer' directories. Recall that if BitBake 105space-delimited list of 'layer' directories. Recall that if BitBake
106cannot find a ``bblayers.conf`` file, then it is assumed the user has 106cannot find a ``bblayers.conf`` file, then it is assumed the user has
107set the ``BBPATH`` and ``BBFILES`` variables directly in the 107set the :term:`BBPATH` and :term:`BBFILES` variables directly in the
108environment. 108environment.
109 109
110For each directory (layer) in this list, a ``conf/layer.conf`` file is 110For each directory (layer) in this list, a ``conf/layer.conf`` file is
@@ -114,7 +114,7 @@ files automatically set up :term:`BBPATH` and other
114variables correctly for a given build directory. 114variables correctly for a given build directory.
115 115
116BitBake then expects to find the ``conf/bitbake.conf`` file somewhere in 116BitBake then expects to find the ``conf/bitbake.conf`` file somewhere in
117the user-specified ``BBPATH``. That configuration file generally has 117the user-specified :term:`BBPATH`. That configuration file generally has
118include directives to pull in any other metadata such as files specific 118include directives to pull in any other metadata such as files specific
119to the architecture, the machine, the local environment, and so forth. 119to the architecture, the machine, the local environment, and so forth.
120 120
@@ -135,7 +135,7 @@ The ``base.bbclass`` file is always included. Other classes that are
135specified in the configuration using the 135specified in the configuration using the
136:term:`INHERIT` variable are also included. BitBake 136:term:`INHERIT` variable are also included. BitBake
137searches for class files in a ``classes`` subdirectory under the paths 137searches for class files in a ``classes`` subdirectory under the paths
138in ``BBPATH`` in the same way as configuration files. 138in :term:`BBPATH` in the same way as configuration files.
139 139
140A good way to get an idea of the configuration files and the class files 140A good way to get an idea of the configuration files and the class files
141used in your execution environment is to run the following BitBake 141used in your execution environment is to run the following BitBake
@@ -184,13 +184,13 @@ Locating and Parsing Recipes
184During the configuration phase, BitBake will have set 184During the configuration phase, BitBake will have set
185:term:`BBFILES`. BitBake now uses it to construct a 185:term:`BBFILES`. BitBake now uses it to construct a
186list of recipes to parse, along with any append files (``.bbappend``) to 186list of recipes to parse, along with any append files (``.bbappend``) to
187apply. ``BBFILES`` is a space-separated list of available files and 187apply. :term:`BBFILES` is a space-separated list of available files and
188supports wildcards. An example would be:: 188supports wildcards. An example would be::
189 189
190 BBFILES = "/path/to/bbfiles/*.bb /path/to/appends/*.bbappend" 190 BBFILES = "/path/to/bbfiles/*.bb /path/to/appends/*.bbappend"
191 191
192BitBake parses each 192BitBake parses each
193recipe and append file located with ``BBFILES`` and stores the values of 193recipe and append file located with :term:`BBFILES` and stores the values of
194various variables into the datastore. 194various variables into the datastore.
195 195
196.. note:: 196.. note::
@@ -201,7 +201,7 @@ For each file, a fresh copy of the base configuration is made, then the
201recipe is parsed line by line. Any inherit statements cause BitBake to 201recipe is parsed line by line. Any inherit statements cause BitBake to
202find and then parse class files (``.bbclass``) using 202find and then parse class files (``.bbclass``) using
203:term:`BBPATH` as the search path. Finally, BitBake 203:term:`BBPATH` as the search path. Finally, BitBake
204parses in order any append files found in ``BBFILES``. 204parses in order any append files found in :term:`BBFILES`.
205 205
206One common convention is to use the recipe filename to define pieces of 206One common convention is to use the recipe filename to define pieces of
207metadata. For example, in ``bitbake.conf`` the recipe name and version 207metadata. For example, in ``bitbake.conf`` the recipe name and version
@@ -212,7 +212,7 @@ are used to set the variables :term:`PN` and
212 PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" 212 PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
213 213
214In this example, a recipe called "something_1.2.3.bb" would set 214In this example, a recipe called "something_1.2.3.bb" would set
215``PN`` to "something" and ``PV`` to "1.2.3". 215:term:`PN` to "something" and :term:`PV` to "1.2.3".
216 216
217By the time parsing is complete for a recipe, BitBake has a list of 217By the time parsing is complete for a recipe, BitBake has a list of
218tasks that the recipe defines and a set of data consisting of keys and 218tasks that the recipe defines and a set of data consisting of keys and
@@ -260,21 +260,21 @@ Providers
260 260
261Assuming BitBake has been instructed to execute a target and that all 261Assuming BitBake has been instructed to execute a target and that all
262the recipe files have been parsed, BitBake starts to figure out how to 262the recipe files have been parsed, BitBake starts to figure out how to
263build the target. BitBake looks through the ``PROVIDES`` list for each 263build the target. BitBake looks through the :term:`PROVIDES` list for each
264of the recipes. A ``PROVIDES`` list is the list of names by which the 264of the recipes. A :term:`PROVIDES` list is the list of names by which the
265recipe can be known. Each recipe's ``PROVIDES`` list is created 265recipe can be known. Each recipe's :term:`PROVIDES` list is created
266implicitly through the recipe's :term:`PN` variable and 266implicitly through the recipe's :term:`PN` variable and
267explicitly through the recipe's :term:`PROVIDES` 267explicitly through the recipe's :term:`PROVIDES`
268variable, which is optional. 268variable, which is optional.
269 269
270When a recipe uses ``PROVIDES``, that recipe's functionality can be 270When a recipe uses :term:`PROVIDES`, that recipe's functionality can be
271found under an alternative name or names other than the implicit ``PN`` 271found under an alternative name or names other than the implicit :term:`PN`
272name. As an example, suppose a recipe named ``keyboard_1.0.bb`` 272name. As an example, suppose a recipe named ``keyboard_1.0.bb``
273contained the following:: 273contained the following::
274 274
275 PROVIDES += "fullkeyboard" 275 PROVIDES += "fullkeyboard"
276 276
277The ``PROVIDES`` 277The :term:`PROVIDES`
278list for this recipe becomes "keyboard", which is implicit, and 278list for this recipe becomes "keyboard", which is implicit, and
279"fullkeyboard", which is explicit. Consequently, the functionality found 279"fullkeyboard", which is explicit. Consequently, the functionality found
280in ``keyboard_1.0.bb`` can be found under two different names. 280in ``keyboard_1.0.bb`` can be found under two different names.
@@ -284,12 +284,12 @@ in ``keyboard_1.0.bb`` can be found under two different names.
284Preferences 284Preferences
285=========== 285===========
286 286
287The ``PROVIDES`` list is only part of the solution for figuring out a 287The :term:`PROVIDES` list is only part of the solution for figuring out a
288target's recipes. Because targets might have multiple providers, BitBake 288target's recipes. Because targets might have multiple providers, BitBake
289needs to prioritize providers by determining provider preferences. 289needs to prioritize providers by determining provider preferences.
290 290
291A common example in which a target has multiple providers is 291A common example in which a target has multiple providers is
292"virtual/kernel", which is on the ``PROVIDES`` list for each kernel 292"virtual/kernel", which is on the :term:`PROVIDES` list for each kernel
293recipe. Each machine often selects the best kernel provider by using a 293recipe. Each machine often selects the best kernel provider by using a
294line similar to the following in the machine configuration file:: 294line similar to the following in the machine configuration file::
295 295
@@ -309,10 +309,10 @@ specify a particular version. You can influence the order by using the
309:term:`DEFAULT_PREFERENCE` variable. 309:term:`DEFAULT_PREFERENCE` variable.
310 310
311By default, files have a preference of "0". Setting 311By default, files have a preference of "0". Setting
312``DEFAULT_PREFERENCE`` to "-1" makes the recipe unlikely to be used 312:term:`DEFAULT_PREFERENCE` to "-1" makes the recipe unlikely to be used
313unless it is explicitly referenced. Setting ``DEFAULT_PREFERENCE`` to 313unless it is explicitly referenced. Setting :term:`DEFAULT_PREFERENCE` to
314"1" makes it likely the recipe is used. ``PREFERRED_VERSION`` overrides 314"1" makes it likely the recipe is used. :term:`PREFERRED_VERSION` overrides
315any ``DEFAULT_PREFERENCE`` setting. ``DEFAULT_PREFERENCE`` is often used 315any :term:`DEFAULT_PREFERENCE` setting. :term:`DEFAULT_PREFERENCE` is often used
316to mark newer and more experimental recipe versions until they have 316to mark newer and more experimental recipe versions until they have
317undergone sufficient testing to be considered stable. 317undergone sufficient testing to be considered stable.
318 318
@@ -394,7 +394,7 @@ ready to run, those tasks have all their dependencies met, and the
394thread threshold has not been exceeded. 394thread threshold has not been exceeded.
395 395
396It is worth noting that you can greatly speed up the build time by 396It is worth noting that you can greatly speed up the build time by
397properly setting the ``BB_NUMBER_THREADS`` variable. 397properly setting the :term:`BB_NUMBER_THREADS` variable.
398 398
399As each task completes, a timestamp is written to the directory 399As each task completes, a timestamp is written to the directory
400specified by the :term:`STAMP` variable. On subsequent 400specified by the :term:`STAMP` variable. On subsequent
@@ -561,7 +561,7 @@ behavior is unchanged from previous versions. ``OE-Core`` uses the
561 561
562 BB_SIGNATURE_HANDLER ?= "OEBasicHash" 562 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
563 563
564The "OEBasicHash" ``BB_SIGNATURE_HANDLER`` is the same as the "OEBasic" 564The "OEBasicHash" :term:`BB_SIGNATURE_HANDLER` is the same as the "OEBasic"
565version but adds the task hash to the stamp files. This results in any 565version but adds the task hash to the stamp files. This results in any
566metadata change that changes the task hash, automatically causing the 566metadata change that changes the task hash, automatically causing the
567task to be run again. This removes the need to bump 567task to be run again. This removes the need to bump
@@ -581,7 +581,7 @@ the build. This information includes:
581- ``BBHASHDEPS_``\ *filename:taskname*: The task dependencies for 581- ``BBHASHDEPS_``\ *filename:taskname*: The task dependencies for
582 each task. 582 each task.
583 583
584- ``BB_TASKHASH``: The hash of the currently running task. 584- :term:`BB_TASKHASH`: The hash of the currently running task.
585 585
586It is worth noting that BitBake's "-S" option lets you debug BitBake's 586It is worth noting that BitBake's "-S" option lets you debug BitBake's
587processing of signatures. The options passed to -S allow different 587processing of signatures. The options passed to -S allow different