diff options
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.rst | 54 |
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 | ||
66 | The ``layer.conf`` files are used to construct key variables such as | 66 | The ``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 |
70 | to locate both recipe and recipe append files (``.bb`` and | 70 | to 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 |
72 | user has set the ``BBPATH`` and ``BBFILES`` directly in the environment. | 72 | user has set the :term:`BBPATH` and :term:`BBFILES` directly in the environment. |
73 | 73 | ||
74 | Next, the ``bitbake.conf`` file is located using the ``BBPATH`` variable | 74 | Next, the ``bitbake.conf`` file is located using the :term:`BBPATH` variable |
75 | that was just constructed. The ``bitbake.conf`` file may also include | 75 | that was just constructed. The ``bitbake.conf`` file may also include |
76 | other configuration files using the ``include`` or ``require`` | 76 | other configuration files using the ``include`` or ``require`` |
77 | directives. | 77 | directives. |
@@ -104,7 +104,7 @@ BitBake first searches the current working directory for an optional | |||
104 | contain a :term:`BBLAYERS` variable that is a | 104 | contain a :term:`BBLAYERS` variable that is a |
105 | space-delimited list of 'layer' directories. Recall that if BitBake | 105 | space-delimited list of 'layer' directories. Recall that if BitBake |
106 | cannot find a ``bblayers.conf`` file, then it is assumed the user has | 106 | cannot find a ``bblayers.conf`` file, then it is assumed the user has |
107 | set the ``BBPATH`` and ``BBFILES`` variables directly in the | 107 | set the :term:`BBPATH` and :term:`BBFILES` variables directly in the |
108 | environment. | 108 | environment. |
109 | 109 | ||
110 | For each directory (layer) in this list, a ``conf/layer.conf`` file is | 110 | For each directory (layer) in this list, a ``conf/layer.conf`` file is |
@@ -114,7 +114,7 @@ files automatically set up :term:`BBPATH` and other | |||
114 | variables correctly for a given build directory. | 114 | variables correctly for a given build directory. |
115 | 115 | ||
116 | BitBake then expects to find the ``conf/bitbake.conf`` file somewhere in | 116 | BitBake then expects to find the ``conf/bitbake.conf`` file somewhere in |
117 | the user-specified ``BBPATH``. That configuration file generally has | 117 | the user-specified :term:`BBPATH`. That configuration file generally has |
118 | include directives to pull in any other metadata such as files specific | 118 | include directives to pull in any other metadata such as files specific |
119 | to the architecture, the machine, the local environment, and so forth. | 119 | to 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 | |||
135 | specified in the configuration using the | 135 | specified in the configuration using the |
136 | :term:`INHERIT` variable are also included. BitBake | 136 | :term:`INHERIT` variable are also included. BitBake |
137 | searches for class files in a ``classes`` subdirectory under the paths | 137 | searches for class files in a ``classes`` subdirectory under the paths |
138 | in ``BBPATH`` in the same way as configuration files. | 138 | in :term:`BBPATH` in the same way as configuration files. |
139 | 139 | ||
140 | A good way to get an idea of the configuration files and the class files | 140 | A good way to get an idea of the configuration files and the class files |
141 | used in your execution environment is to run the following BitBake | 141 | used in your execution environment is to run the following BitBake |
@@ -184,13 +184,13 @@ Locating and Parsing Recipes | |||
184 | During the configuration phase, BitBake will have set | 184 | During 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 |
186 | list of recipes to parse, along with any append files (``.bbappend``) to | 186 | list of recipes to parse, along with any append files (``.bbappend``) to |
187 | apply. ``BBFILES`` is a space-separated list of available files and | 187 | apply. :term:`BBFILES` is a space-separated list of available files and |
188 | supports wildcards. An example would be:: | 188 | supports 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 | ||
192 | BitBake parses each | 192 | BitBake parses each |
193 | recipe and append file located with ``BBFILES`` and stores the values of | 193 | recipe and append file located with :term:`BBFILES` and stores the values of |
194 | various variables into the datastore. | 194 | various 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 | |||
201 | recipe is parsed line by line. Any inherit statements cause BitBake to | 201 | recipe is parsed line by line. Any inherit statements cause BitBake to |
202 | find and then parse class files (``.bbclass``) using | 202 | find 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 |
204 | parses in order any append files found in ``BBFILES``. | 204 | parses in order any append files found in :term:`BBFILES`. |
205 | 205 | ||
206 | One common convention is to use the recipe filename to define pieces of | 206 | One common convention is to use the recipe filename to define pieces of |
207 | metadata. For example, in ``bitbake.conf`` the recipe name and version | 207 | metadata. 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 | ||
214 | In this example, a recipe called "something_1.2.3.bb" would set | 214 | In 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 | ||
217 | By the time parsing is complete for a recipe, BitBake has a list of | 217 | By the time parsing is complete for a recipe, BitBake has a list of |
218 | tasks that the recipe defines and a set of data consisting of keys and | 218 | tasks that the recipe defines and a set of data consisting of keys and |
@@ -260,21 +260,21 @@ Providers | |||
260 | 260 | ||
261 | Assuming BitBake has been instructed to execute a target and that all | 261 | Assuming BitBake has been instructed to execute a target and that all |
262 | the recipe files have been parsed, BitBake starts to figure out how to | 262 | the recipe files have been parsed, BitBake starts to figure out how to |
263 | build the target. BitBake looks through the ``PROVIDES`` list for each | 263 | build the target. BitBake looks through the :term:`PROVIDES` list for each |
264 | of the recipes. A ``PROVIDES`` list is the list of names by which the | 264 | of the recipes. A :term:`PROVIDES` list is the list of names by which the |
265 | recipe can be known. Each recipe's ``PROVIDES`` list is created | 265 | recipe can be known. Each recipe's :term:`PROVIDES` list is created |
266 | implicitly through the recipe's :term:`PN` variable and | 266 | implicitly through the recipe's :term:`PN` variable and |
267 | explicitly through the recipe's :term:`PROVIDES` | 267 | explicitly through the recipe's :term:`PROVIDES` |
268 | variable, which is optional. | 268 | variable, which is optional. |
269 | 269 | ||
270 | When a recipe uses ``PROVIDES``, that recipe's functionality can be | 270 | When a recipe uses :term:`PROVIDES`, that recipe's functionality can be |
271 | found under an alternative name or names other than the implicit ``PN`` | 271 | found under an alternative name or names other than the implicit :term:`PN` |
272 | name. As an example, suppose a recipe named ``keyboard_1.0.bb`` | 272 | name. As an example, suppose a recipe named ``keyboard_1.0.bb`` |
273 | contained the following:: | 273 | contained the following:: |
274 | 274 | ||
275 | PROVIDES += "fullkeyboard" | 275 | PROVIDES += "fullkeyboard" |
276 | 276 | ||
277 | The ``PROVIDES`` | 277 | The :term:`PROVIDES` |
278 | list for this recipe becomes "keyboard", which is implicit, and | 278 | list 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 |
280 | in ``keyboard_1.0.bb`` can be found under two different names. | 280 | in ``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. | |||
284 | Preferences | 284 | Preferences |
285 | =========== | 285 | =========== |
286 | 286 | ||
287 | The ``PROVIDES`` list is only part of the solution for figuring out a | 287 | The :term:`PROVIDES` list is only part of the solution for figuring out a |
288 | target's recipes. Because targets might have multiple providers, BitBake | 288 | target's recipes. Because targets might have multiple providers, BitBake |
289 | needs to prioritize providers by determining provider preferences. | 289 | needs to prioritize providers by determining provider preferences. |
290 | 290 | ||
291 | A common example in which a target has multiple providers is | 291 | A 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 |
293 | recipe. Each machine often selects the best kernel provider by using a | 293 | recipe. Each machine often selects the best kernel provider by using a |
294 | line similar to the following in the machine configuration file:: | 294 | line 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 | ||
311 | By default, files have a preference of "0". Setting | 311 | By 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 |
313 | unless it is explicitly referenced. Setting ``DEFAULT_PREFERENCE`` to | 313 | unless 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 |
315 | any ``DEFAULT_PREFERENCE`` setting. ``DEFAULT_PREFERENCE`` is often used | 315 | any :term:`DEFAULT_PREFERENCE` setting. :term:`DEFAULT_PREFERENCE` is often used |
316 | to mark newer and more experimental recipe versions until they have | 316 | to mark newer and more experimental recipe versions until they have |
317 | undergone sufficient testing to be considered stable. | 317 | undergone sufficient testing to be considered stable. |
318 | 318 | ||
@@ -394,7 +394,7 @@ ready to run, those tasks have all their dependencies met, and the | |||
394 | thread threshold has not been exceeded. | 394 | thread threshold has not been exceeded. |
395 | 395 | ||
396 | It is worth noting that you can greatly speed up the build time by | 396 | It is worth noting that you can greatly speed up the build time by |
397 | properly setting the ``BB_NUMBER_THREADS`` variable. | 397 | properly setting the :term:`BB_NUMBER_THREADS` variable. |
398 | 398 | ||
399 | As each task completes, a timestamp is written to the directory | 399 | As each task completes, a timestamp is written to the directory |
400 | specified by the :term:`STAMP` variable. On subsequent | 400 | specified 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 | ||
564 | The "OEBasicHash" ``BB_SIGNATURE_HANDLER`` is the same as the "OEBasic" | 564 | The "OEBasicHash" :term:`BB_SIGNATURE_HANDLER` is the same as the "OEBasic" |
565 | version but adds the task hash to the stamp files. This results in any | 565 | version but adds the task hash to the stamp files. This results in any |
566 | metadata change that changes the task hash, automatically causing the | 566 | metadata change that changes the task hash, automatically causing the |
567 | task to be run again. This removes the need to bump | 567 | task 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 | ||
586 | It is worth noting that BitBake's "-S" option lets you debug BitBake's | 586 | It is worth noting that BitBake's "-S" option lets you debug BitBake's |
587 | processing of signatures. The options passed to -S allow different | 587 | processing of signatures. The options passed to -S allow different |