diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-07-31 10:00:02 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-16 18:14:08 +0100 |
commit | e3b76c8fc370833a623791cec6e805158d35e9d1 (patch) | |
tree | 9ad3df8166ed0a79dee3a454dcba53281f375f2f /bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst | |
parent | 4324c6e0716915c4d375805ce695a9eedb0fa010 (diff) | |
download | poky-e3b76c8fc370833a623791cec6e805158d35e9d1.tar.gz |
bitbake: sphinx: last manual round of fixes/improvements
Review all pages, and fix up for formatting which was not covered by
pandoc, such as some links and code block sections.
(Bitbake rev: d99760cc687cc9c24d6d9a1c49fa094574476e0c)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 | 237 |
1 files changed, 156 insertions, 81 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 ab61b05a87..019afd22f6 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst | |||
@@ -16,9 +16,13 @@ data, or simply return information about the execution environment. | |||
16 | 16 | ||
17 | This chapter describes BitBake's execution process from start to finish | 17 | This chapter describes BitBake's execution process from start to finish |
18 | when you use it to create an image. The execution process is launched | 18 | when you use it to create an image. The execution process is launched |
19 | using the following command form: $ bitbake target For information on | 19 | using the following command form: :: |
20 | the BitBake command and its options, see "`The BitBake | 20 | |
21 | Command <#bitbake-user-manual-command>`__" section. | 21 | $ bitbake target |
22 | |||
23 | For information on | ||
24 | the BitBake command and its options, see ":ref:`The BitBake Command | ||
25 | <bitbake-user-manual-command>`" section. | ||
22 | 26 | ||
23 | .. note:: | 27 | .. note:: |
24 | 28 | ||
@@ -28,7 +32,11 @@ Command <#bitbake-user-manual-command>`__" section. | |||
28 | your project's ``local.conf`` configuration file. | 32 | your project's ``local.conf`` configuration file. |
29 | 33 | ||
30 | A common method to determine this value for your build host is to run | 34 | A common method to determine this value for your build host is to run |
31 | the following: $ grep processor /proc/cpuinfo This command returns | 35 | the following: :: |
36 | |||
37 | $ grep processor /proc/cpuinfo | ||
38 | |||
39 | This command returns | ||
32 | the number of processors, which takes into account hyper-threading. | 40 | the number of processors, which takes into account hyper-threading. |
33 | 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 |
34 | eight processors, which is the value you would then assign to | 42 | eight processors, which is the value you would then assign to |
@@ -46,12 +54,12 @@ to determine what layers BitBake needs to recognize, all necessary | |||
46 | ``layer.conf`` files (one from each layer), and ``bitbake.conf``. The | 54 | ``layer.conf`` files (one from each layer), and ``bitbake.conf``. The |
47 | data itself is of various types: | 55 | data itself is of various types: |
48 | 56 | ||
49 | - *Recipes:* Details about particular pieces of software. | 57 | - **Recipes:** Details about particular pieces of software. |
50 | 58 | ||
51 | - *Class Data:* An abstraction of common build information (e.g. how to | 59 | - **Class Data:** An abstraction of common build information (e.g. how to |
52 | build a Linux kernel). | 60 | build a Linux kernel). |
53 | 61 | ||
54 | - *Configuration Data:* Machine-specific settings, policy decisions, | 62 | - **Configuration Data:** Machine-specific settings, policy decisions, |
55 | and so forth. Configuration data acts as the glue to bind everything | 63 | and so forth. Configuration data acts as the glue to bind everything |
56 | together. | 64 | together. |
57 | 65 | ||
@@ -72,13 +80,9 @@ Prior to parsing configuration files, BitBake looks at certain | |||
72 | variables, including: | 80 | variables, including: |
73 | 81 | ||
74 | - :term:`BB_ENV_WHITELIST` | 82 | - :term:`BB_ENV_WHITELIST` |
75 | |||
76 | - :term:`BB_ENV_EXTRAWHITE` | 83 | - :term:`BB_ENV_EXTRAWHITE` |
77 | |||
78 | - :term:`BB_PRESERVE_ENV` | 84 | - :term:`BB_PRESERVE_ENV` |
79 | |||
80 | - :term:`BB_ORIGENV` | 85 | - :term:`BB_ORIGENV` |
81 | |||
82 | - :term:`BITBAKE_UI` | 86 | - :term:`BITBAKE_UI` |
83 | 87 | ||
84 | The first four variables in this list relate to how BitBake treats shell | 88 | The first four variables in this list relate to how BitBake treats shell |
@@ -87,8 +91,8 @@ the environment variables and provides tight control over the shell | |||
87 | execution environment. However, through the use of these first four | 91 | execution environment. However, through the use of these first four |
88 | variables, you can apply your control regarding the environment | 92 | variables, you can apply your control regarding the environment |
89 | variables allowed to be used by BitBake in the shell during execution of | 93 | variables allowed to be used by BitBake in the shell during execution of |
90 | tasks. See the "`Passing Information Into the Build Task | 94 | tasks. See the |
91 | Environment <#passing-information-into-the-build-task-environment>`__" | 95 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:Passing Information Into the Build Task Environment`" |
92 | section and the information about these variables in the variable | 96 | section and the information about these variables in the variable |
93 | glossary for more information on how they work and on how to use them. | 97 | glossary for more information on how they work and on how to use them. |
94 | 98 | ||
@@ -118,8 +122,8 @@ Only variable definitions and include directives are allowed in BitBake | |||
118 | ``.conf`` files. Some variables directly influence BitBake's behavior. | 122 | ``.conf`` files. Some variables directly influence BitBake's behavior. |
119 | These variables might have been set from the environment depending on | 123 | These variables might have been set from the environment depending on |
120 | the environment variables previously mentioned or set in the | 124 | the environment variables previously mentioned or set in the |
121 | configuration files. The "`Variables | 125 | configuration files. The ":ref:`bitbake-user-manual/bitbake-user-manual-ref-variables:Variables Glossary`" |
122 | Glossary <#ref-bb-variables-glos>`__" chapter presents a full list of | 126 | chapter presents a full list of |
123 | variables. | 127 | variables. |
124 | 128 | ||
125 | After parsing configuration files, BitBake uses its rudimentary | 129 | After parsing configuration files, BitBake uses its rudimentary |
@@ -135,7 +139,11 @@ in ``BBPATH`` in the same way as configuration files. | |||
135 | 139 | ||
136 | 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 |
137 | used in your execution environment is to run the following BitBake | 141 | used in your execution environment is to run the following BitBake |
138 | command: $ bitbake -e > mybb.log Examining the top of the ``mybb.log`` | 142 | command: :: |
143 | |||
144 | $ bitbake -e > mybb.log | ||
145 | |||
146 | Examining the top of the ``mybb.log`` | ||
139 | shows you the many configuration files and class files used in your | 147 | shows you the many configuration files and class files used in your |
140 | execution environment. | 148 | execution environment. |
141 | 149 | ||
@@ -147,15 +155,28 @@ execution environment. | |||
147 | pair of curly braces in a shell function, the closing curly brace | 155 | pair of curly braces in a shell function, the closing curly brace |
148 | must not be located at the start of the line without leading spaces. | 156 | must not be located at the start of the line without leading spaces. |
149 | 157 | ||
150 | Here is an example that causes BitBake to produce a parsing error: | 158 | Here is an example that causes BitBake to produce a parsing error: :: |
151 | fakeroot create_shar() { cat << "EOF" > | 159 | |
152 | ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh usage() { echo "test" ###### | 160 | fakeroot create_shar() { |
153 | The following "}" at the start of the line causes a parsing error | 161 | cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh |
154 | ###### } EOF } Writing the recipe this way avoids the error: fakeroot | 162 | usage() |
155 | create_shar() { cat << "EOF" > | 163 | { |
156 | ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh usage() { echo "test" | 164 | echo "test" |
157 | ######The following "}" with a leading space at the start of the line | 165 | ###### The following "}" at the start of the line causes a parsing error ###### |
158 | avoids the error ###### } EOF } | 166 | } |
167 | EOF | ||
168 | } | ||
169 | |||
170 | Writing the recipe this way avoids the error: | ||
171 | fakeroot create_shar() { | ||
172 | cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | ||
173 | usage() | ||
174 | { | ||
175 | echo "test" | ||
176 | ###### The following "}" with a leading space at the start of the line avoids the error ###### | ||
177 | } | ||
178 | EOF | ||
179 | } | ||
159 | 180 | ||
160 | Locating and Parsing Recipes | 181 | Locating and Parsing Recipes |
161 | ============================ | 182 | ============================ |
@@ -164,16 +185,17 @@ During the configuration phase, BitBake will have set | |||
164 | :term:`BBFILES`. BitBake now uses it to construct a | 185 | :term:`BBFILES`. BitBake now uses it to construct a |
165 | 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 |
166 | apply. ``BBFILES`` is a space-separated list of available files and | 187 | apply. ``BBFILES`` is a space-separated list of available files and |
167 | supports wildcards. An example would be: BBFILES = | 188 | supports wildcards. An example would be: :: |
168 | "/path/to/bbfiles/*.bb /path/to/appends/*.bbappend" BitBake parses each | 189 | |
190 | BBFILES = "/path/to/bbfiles/*.bb /path/to/appends/*.bbappend" | ||
191 | |||
192 | BitBake parses each | ||
169 | recipe and append file located with ``BBFILES`` and stores the values of | 193 | recipe and append file located with ``BBFILES`` and stores the values of |
170 | various variables into the datastore. | 194 | various variables into the datastore. |
171 | 195 | ||
172 | .. note:: | 196 | .. note:: |
173 | 197 | ||
174 | Append files are applied in the order they are encountered in | 198 | Append files are applied in the order they are encountered in BBFILES. |
175 | BBFILES | ||
176 | . | ||
177 | 199 | ||
178 | For each file, a fresh copy of the base configuration is made, then the | 200 | For each file, a fresh copy of the base configuration is made, then the |
179 | 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 |
@@ -184,11 +206,12 @@ parses in order any append files found in ``BBFILES``. | |||
184 | 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 |
185 | metadata. For example, in ``bitbake.conf`` the recipe name and version | 207 | metadata. For example, in ``bitbake.conf`` the recipe name and version |
186 | are used to set the variables :term:`PN` and | 208 | are used to set the variables :term:`PN` and |
187 | :term:`PV`: PN = | 209 | :term:`PV`: :: |
188 | "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or | 210 | |
189 | 'defaultpkgname'}" PV = | 211 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" |
190 | "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or | 212 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" |
191 | '1.0'}" In this example, a recipe called "something_1.2.3.bb" would set | 213 | |
214 | In this example, a recipe called "something_1.2.3.bb" would set | ||
192 | ``PN`` to "something" and ``PV`` to "1.2.3". | 215 | ``PN`` to "something" and ``PV`` to "1.2.3". |
193 | 216 | ||
194 | 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 |
@@ -215,11 +238,13 @@ Recipe file collections exist to allow the user to have multiple | |||
215 | repositories of ``.bb`` files that contain the same exact package. For | 238 | repositories of ``.bb`` files that contain the same exact package. For |
216 | example, one could easily use them to make one's own local copy of an | 239 | example, one could easily use them to make one's own local copy of an |
217 | upstream repository, but with custom modifications that one does not | 240 | upstream repository, but with custom modifications that one does not |
218 | want upstream. Here is an example: BBFILES = "/stuff/openembedded/*/*.bb | 241 | want upstream. Here is an example: :: |
219 | /stuff/openembedded.modified/*/*.bb" BBFILE_COLLECTIONS = "upstream | 242 | |
220 | local" BBFILE_PATTERN_upstream = "^/stuff/openembedded/" | 243 | BBFILES = "/stuff/openembedded/*/*.bb /stuff/openembedded.modified/*/*.bb" |
221 | BBFILE_PATTERN_local = "^/stuff/openembedded.modified/" | 244 | BBFILE_COLLECTIONS = "upstream local" |
222 | BBFILE_PRIORITY_upstream = "5" BBFILE_PRIORITY_local = "10" | 245 | BBFILE_PATTERN_upstream = "^/stuff/openembedded/" |
246 | BBFILE_PATTERN_local = "^/stuff/openembedded.modified/" | ||
247 | BBFILE_PRIORITY_upstream = "5" BBFILE_PRIORITY_local = "10" | ||
223 | 248 | ||
224 | .. note:: | 249 | .. note:: |
225 | 250 | ||
@@ -244,7 +269,11 @@ variable, which is optional. | |||
244 | When a recipe uses ``PROVIDES``, that recipe's functionality can be | 269 | When a recipe uses ``PROVIDES``, that recipe's functionality can be |
245 | found under an alternative name or names other than the implicit ``PN`` | 270 | found under an alternative name or names other than the implicit ``PN`` |
246 | name. As an example, suppose a recipe named ``keyboard_1.0.bb`` | 271 | name. As an example, suppose a recipe named ``keyboard_1.0.bb`` |
247 | contained the following: PROVIDES += "fullkeyboard" The ``PROVIDES`` | 272 | contained the following: :: |
273 | |||
274 | PROVIDES += "fullkeyboard" | ||
275 | |||
276 | The ``PROVIDES`` | ||
248 | list for this recipe becomes "keyboard", which is implicit, and | 277 | list for this recipe becomes "keyboard", which is implicit, and |
249 | "fullkeyboard", which is explicit. Consequently, the functionality found | 278 | "fullkeyboard", which is explicit. Consequently, the functionality found |
250 | in ``keyboard_1.0.bb`` can be found under two different names. | 279 | in ``keyboard_1.0.bb`` can be found under two different names. |
@@ -261,9 +290,11 @@ needs to prioritize providers by determining provider preferences. | |||
261 | A common example in which a target has multiple providers is | 290 | A common example in which a target has multiple providers is |
262 | "virtual/kernel", which is on the ``PROVIDES`` list for each kernel | 291 | "virtual/kernel", which is on the ``PROVIDES`` list for each kernel |
263 | recipe. Each machine often selects the best kernel provider by using a | 292 | recipe. Each machine often selects the best kernel provider by using a |
264 | line similar to the following in the machine configuration file: | 293 | line similar to the following in the machine configuration file: :: |
265 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" The default | 294 | |
266 | :term:`PREFERRED_PROVIDER` is the provider | 295 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" |
296 | |||
297 | The default :term:`PREFERRED_PROVIDER` is the provider | ||
267 | with the same name as the target. BitBake iterates through each target | 298 | with the same name as the target. BitBake iterates through each target |
268 | it needs to build and resolves them and their dependencies using this | 299 | it needs to build and resolves them and their dependencies using this |
269 | process. | 300 | process. |
@@ -299,8 +330,9 @@ If the first recipe is named ``a_1.1.bb``, then the | |||
299 | 330 | ||
300 | Thus, if a recipe named ``a_1.2.bb`` exists, BitBake will choose 1.2 by | 331 | Thus, if a recipe named ``a_1.2.bb`` exists, BitBake will choose 1.2 by |
301 | default. However, if you define the following variable in a ``.conf`` | 332 | default. However, if you define the following variable in a ``.conf`` |
302 | file that BitBake parses, you can change that preference: | 333 | file that BitBake parses, you can change that preference: :: |
303 | PREFERRED_VERSION_a = "1.1" | 334 | |
335 | PREFERRED_VERSION_a = "1.1" | ||
304 | 336 | ||
305 | .. note:: | 337 | .. note:: |
306 | 338 | ||
@@ -312,7 +344,11 @@ PREFERRED_VERSION_a = "1.1" | |||
312 | For example, in the OpenEmbedded codebase, there is a standard, | 344 | For example, in the OpenEmbedded codebase, there is a standard, |
313 | versioned recipe file for BusyBox, ``busybox_1.22.1.bb``, but there | 345 | versioned recipe file for BusyBox, ``busybox_1.22.1.bb``, but there |
314 | is also a Git-based version, ``busybox_git.bb``, which explicitly | 346 | is also a Git-based version, ``busybox_git.bb``, which explicitly |
315 | contains the line DEFAULT_PREFERENCE = "-1" to ensure that the | 347 | contains the line :: |
348 | |||
349 | DEFAULT_PREFERENCE = "-1" | ||
350 | |||
351 | to ensure that the | ||
316 | numbered, stable version is always preferred unless the developer | 352 | numbered, stable version is always preferred unless the developer |
317 | selects otherwise. | 353 | selects otherwise. |
318 | 354 | ||
@@ -327,15 +363,16 @@ performance on multi-core systems, BitBake considers each task as an | |||
327 | independent entity with its own set of dependencies. | 363 | independent entity with its own set of dependencies. |
328 | 364 | ||
329 | Dependencies are defined through several variables. You can find | 365 | Dependencies are defined through several variables. You can find |
330 | information about variables BitBake uses in the `Variables | 366 | information about variables BitBake uses in the |
331 | Glossary <#ref-bb-variables-glos>`__ near the end of this manual. At a | 367 | :doc:`bitbake-user-manual-ref-variables` near the end of this manual. At a |
332 | basic level, it is sufficient to know that BitBake uses the | 368 | basic level, it is sufficient to know that BitBake uses the |
333 | :term:`DEPENDS` and | 369 | :term:`DEPENDS` and |
334 | :term:`RDEPENDS` variables when calculating | 370 | :term:`RDEPENDS` variables when calculating |
335 | dependencies. | 371 | dependencies. |
336 | 372 | ||
337 | For more information on how BitBake handles dependencies, see the | 373 | For more information on how BitBake handles dependencies, see the |
338 | "`Dependencies <#dependencies>`__" section. | 374 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:Dependencies` |
375 | section. | ||
339 | 376 | ||
340 | .. _ref-bitbake-tasklist: | 377 | .. _ref-bitbake-tasklist: |
341 | 378 | ||
@@ -344,7 +381,8 @@ The Task List | |||
344 | 381 | ||
345 | Based on the generated list of providers and the dependency information, | 382 | Based on the generated list of providers and the dependency information, |
346 | BitBake can now calculate exactly what tasks it needs to run and in what | 383 | BitBake can now calculate exactly what tasks it needs to run and in what |
347 | order it needs to run them. The "`Executing Tasks <#executing-tasks>`__" | 384 | order it needs to run them. The |
385 | :ref:`bitbake-user-manual/bitbake-user-manual-execution:executing tasks` | ||
348 | section has more information on how BitBake chooses which task to | 386 | section has more information on how BitBake chooses which task to |
349 | execute next. | 387 | execute next. |
350 | 388 | ||
@@ -371,8 +409,9 @@ The exact format of the stamps is partly configurable. In modern | |||
371 | versions of BitBake, a hash is appended to the stamp so that if the | 409 | versions of BitBake, a hash is appended to the stamp so that if the |
372 | configuration changes, the stamp becomes invalid and the task is | 410 | configuration changes, the stamp becomes invalid and the task is |
373 | automatically rerun. This hash, or signature used, is governed by the | 411 | automatically rerun. This hash, or signature used, is governed by the |
374 | signature policy that is configured (see the "`Checksums | 412 | signature policy that is configured (see the |
375 | (Signatures) <#checksums>`__" section for information). It is also | 413 | :ref:`bitbake-user-manual/bitbake-user-manual-execution:checksums (signatures)` |
414 | section for information). It is also | ||
376 | possible to append extra metadata to the stamp using the | 415 | possible to append extra metadata to the stamp using the |
377 | ``[stamp-extra-info]`` task flag. For example, OpenEmbedded uses this | 416 | ``[stamp-extra-info]`` task flag. For example, OpenEmbedded uses this |
378 | flag to make some tasks machine-specific. | 417 | flag to make some tasks machine-specific. |
@@ -383,7 +422,8 @@ flag to make some tasks machine-specific. | |||
383 | created when these tasks are run. Consequently, "nostamp" tasks are | 422 | created when these tasks are run. Consequently, "nostamp" tasks are |
384 | always rerun. | 423 | always rerun. |
385 | 424 | ||
386 | For more information on tasks, see the "`Tasks <#tasks>`__" section. | 425 | For more information on tasks, see the |
426 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks` section. | ||
387 | 427 | ||
388 | Executing Tasks | 428 | Executing Tasks |
389 | =============== | 429 | =============== |
@@ -457,14 +497,21 @@ to the task. | |||
457 | 497 | ||
458 | Like the working directory case, situations exist where dependencies | 498 | Like the working directory case, situations exist where dependencies |
459 | should be ignored. For these cases, you can instruct the build process | 499 | should be ignored. For these cases, you can instruct the build process |
460 | to ignore a dependency by using a line like the following: | 500 | to ignore a dependency by using a line like the following: :: |
461 | PACKAGE_ARCHS[vardepsexclude] = "MACHINE" This example ensures that the | 501 | |
502 | PACKAGE_ARCHS[vardepsexclude] = "MACHINE" | ||
503 | |||
504 | This example ensures that the | ||
462 | ``PACKAGE_ARCHS`` variable does not depend on the value of ``MACHINE``, | 505 | ``PACKAGE_ARCHS`` variable does not depend on the value of ``MACHINE``, |
463 | even if it does reference it. | 506 | even if it does reference it. |
464 | 507 | ||
465 | Equally, there are cases where we need to add dependencies BitBake is | 508 | Equally, there are cases where we need to add dependencies BitBake is |
466 | not able to find. You can accomplish this by using a line like the | 509 | not able to find. You can accomplish this by using a line like the |
467 | following: PACKAGE_ARCHS[vardeps] = "MACHINE" This example explicitly | 510 | following: :: |
511 | |||
512 | PACKAGE_ARCHS[vardeps] = "MACHINE" | ||
513 | |||
514 | This example explicitly | ||
468 | adds the ``MACHINE`` variable as a dependency for ``PACKAGE_ARCHS``. | 515 | adds the ``MACHINE`` variable as a dependency for ``PACKAGE_ARCHS``. |
469 | 516 | ||
470 | Consider a case with in-line Python, for example, where BitBake is not | 517 | Consider a case with in-line Python, for example, where BitBake is not |
@@ -488,13 +535,15 @@ configuration file, we can give BitBake some extra information to help | |||
488 | it construct the basehash. The following statement effectively results | 535 | it construct the basehash. The following statement effectively results |
489 | in a list of global variable dependency excludes - variables never | 536 | in a list of global variable dependency excludes - variables never |
490 | included in any checksum. This example uses variables from OpenEmbedded | 537 | included in any checksum. This example uses variables from OpenEmbedded |
491 | to help illustrate the concept: BB_HASHBASE_WHITELIST ?= "TMPDIR FILE | 538 | to help illustrate the concept: :: |
492 | PATH PWD BB_TASKHASH BBPATH DL_DIR \\ SSTATE_DIR THISDIR FILESEXTRAPATHS | 539 | |
493 | FILE_DIRNAME HOME LOGNAME SHELL \\ USER FILESPATH STAGING_DIR_HOST | 540 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \ |
494 | STAGING_DIR_TARGET COREBASE PRSERV_HOST \\ PRSERV_DUMPDIR | 541 | SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL \ |
495 | PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \\ CCACHE_DIR | 542 | USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \ |
496 | EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX" The | 543 | PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \ |
497 | previous example excludes the work directory, which is part of | 544 | CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX" |
545 | |||
546 | The previous example excludes the work directory, which is part of | ||
498 | ``TMPDIR``. | 547 | ``TMPDIR``. |
499 | 548 | ||
500 | The rules for deciding which hashes of dependent tasks to include | 549 | The rules for deciding which hashes of dependent tasks to include |
@@ -507,8 +556,11 @@ OpenEmbedded-Core uses: "OEBasic" and "OEBasicHash". By default, there | |||
507 | is a dummy "noop" signature handler enabled in BitBake. This means that | 556 | is a dummy "noop" signature handler enabled in BitBake. This means that |
508 | behavior is unchanged from previous versions. ``OE-Core`` uses the | 557 | behavior is unchanged from previous versions. ``OE-Core`` uses the |
509 | "OEBasicHash" signature handler by default through this setting in the | 558 | "OEBasicHash" signature handler by default through this setting in the |
510 | ``bitbake.conf`` file: BB_SIGNATURE_HANDLER ?= "OEBasicHash" The | 559 | ``bitbake.conf`` file: :: |
511 | "OEBasicHash" ``BB_SIGNATURE_HANDLER`` is the same as the "OEBasic" | 560 | |
561 | BB_SIGNATURE_HANDLER ?= "OEBasicHash" | ||
562 | |||
563 | The "OEBasicHash" ``BB_SIGNATURE_HANDLER`` is the same as the "OEBasic" | ||
512 | version but adds the task hash to the stamp files. This results in any | 564 | version but adds the task hash to the stamp files. This results in any |
513 | metadata change that changes the task hash, automatically causing the | 565 | metadata change that changes the task hash, automatically causing the |
514 | task to be run again. This removes the need to bump | 566 | task to be run again. This removes the need to bump |
@@ -519,13 +571,13 @@ It is also worth noting that the end result of these signature | |||
519 | generators is to make some dependency and hash information available to | 571 | generators is to make some dependency and hash information available to |
520 | the build. This information includes: | 572 | the build. This information includes: |
521 | 573 | ||
522 | - ``BB_BASEHASH_task-``\ taskname: The base hashes for each task in the | 574 | - ``BB_BASEHASH_task-``\ *taskname*: The base hashes for each task in the |
523 | recipe. | 575 | recipe. |
524 | 576 | ||
525 | - ``BB_BASEHASH_``\ filename\ ``:``\ taskname: The base hashes for each | 577 | - ``BB_BASEHASH_``\ *filename:taskname*: The base hashes for each |
526 | dependent task. | 578 | dependent task. |
527 | 579 | ||
528 | - ``BBHASHDEPS_``\ filename\ ``:``\ taskname: The task dependencies for | 580 | - ``BBHASHDEPS_``\ *filename:taskname*: The task dependencies for |
529 | each task. | 581 | each task. |
530 | 582 | ||
531 | - ``BB_TASKHASH``: The hash of the currently running task. | 583 | - ``BB_TASKHASH``: The hash of the currently running task. |
@@ -547,8 +599,9 @@ where these two stamp trees diverge. | |||
547 | It is likely that future versions of BitBake will provide other | 599 | It is likely that future versions of BitBake will provide other |
548 | signature handlers triggered through additional "-S" parameters. | 600 | signature handlers triggered through additional "-S" parameters. |
549 | 601 | ||
550 | You can find more information on checksum metadata in the "`Task | 602 | You can find more information on checksum metadata in the |
551 | Checksums and Setscene <#task-checksums-and-setscene>`__" section. | 603 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:task checksums and setscene` |
604 | section. | ||
552 | 605 | ||
553 | Setscene | 606 | Setscene |
554 | ======== | 607 | ======== |
@@ -601,8 +654,9 @@ with the list of tasks BitBake thinks has been "covered". The metadata | |||
601 | can then ensure that this list is correct and can inform BitBake that it | 654 | can then ensure that this list is correct and can inform BitBake that it |
602 | wants specific tasks to be run regardless of the setscene result. | 655 | wants specific tasks to be run regardless of the setscene result. |
603 | 656 | ||
604 | You can find more information on setscene metadata in the "`Task | 657 | You can find more information on setscene metadata in the |
605 | Checksums and Setscene <#task-checksums-and-setscene>`__" section. | 658 | :ref:`bitbake-user-manual/bitbake-user-manual-metadata:task checksums and setscene` |
659 | section. | ||
606 | 660 | ||
607 | Logging | 661 | Logging |
608 | ======= | 662 | ======= |
@@ -648,11 +702,32 @@ logging configuration is merged using the following rules: | |||
648 | 702 | ||
649 | As an example, consider the following user logging configuration file | 703 | As an example, consider the following user logging configuration file |
650 | which logs all Hash Equivalence related messages of VERBOSE or higher to | 704 | which logs all Hash Equivalence related messages of VERBOSE or higher to |
651 | a file called ``hashequiv.log`` { "version": 1, "handlers": { | 705 | a file called ``hashequiv.log`` :: |
652 | "autobuilderlog": { "class": "logging.FileHandler", "formatter": | 706 | |
653 | "logfileFormatter", "level": "DEBUG", "filename": "hashequiv.log", | 707 | { |
654 | "mode": "w" } }, "formatters": { "logfileFormatter": { "format": | 708 | "version": 1, |
655 | "%(name)s: %(levelname)s: %(message)s" } }, "loggers": { | 709 | "handlers": { |
656 | "BitBake.SigGen.HashEquiv": { "level": "VERBOSE", "handlers": | 710 | "autobuilderlog": { |
657 | ["autobuilderlog"] }, "BitBake.RunQueue.HashEquiv": { "level": | 711 | "class": "logging.FileHandler", |
658 | "VERBOSE", "handlers": ["autobuilderlog"] } } } | 712 | "formatter": "logfileFormatter", |
713 | "level": "DEBUG", | ||
714 | "filename": "hashequiv.log", | ||
715 | "mode": "w" | ||
716 | } | ||
717 | }, | ||
718 | "formatters": { | ||
719 | "logfileFormatter": { | ||
720 | "format": "%(name)s: %(levelname)s: %(message)s" | ||
721 | } | ||
722 | }, | ||
723 | "loggers": { | ||
724 | "BitBake.SigGen.HashEquiv": { | ||
725 | "level": "VERBOSE", | ||
726 | "handlers": ["autobuilderlog"] | ||
727 | }, | ||
728 | "BitBake.RunQueue.HashEquiv": { | ||
729 | "level": "VERBOSE", | ||
730 | "handlers": ["autobuilderlog"] | ||
731 | } | ||
732 | } | ||
733 | } | ||