summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst138
1 files changed, 114 insertions, 24 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index d3936935cd..6be8dbbf63 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -127,17 +127,10 @@ overview of their function and contents.
127 Contains the name of the currently running task. The name does not 127 Contains the name of the currently running task. The name does not
128 include the ``do_`` prefix. 128 include the ``do_`` prefix.
129 129
130 :term:`BB_DANGLINGAPPENDS_WARNONLY` 130 :term:`BB_CURRENT_MC`
131 Defines how BitBake handles situations where an append file 131 Contains the name of the current multiconfig a task is being run under.
132 (``.bbappend``) has no corresponding recipe file (``.bb``). This 132 The name is taken from the multiconfig configuration file (a file
133 condition often occurs when layers get out of sync (e.g. ``oe-core`` 133 ``mc1.conf`` would make this variable equal to ``mc1``).
134 bumps a recipe version and the old recipe no longer exists and the
135 other layer has not been updated to the new version of the recipe
136 yet).
137
138 The default fatal behavior is safest because it is the sane reaction
139 given something is out of sync. It is important to realize when your
140 changes are no longer being applied.
141 134
142 :term:`BB_DEFAULT_TASK` 135 :term:`BB_DEFAULT_TASK`
143 The default task to use when none is specified (e.g. with the ``-c`` 136 The default task to use when none is specified (e.g. with the ``-c``
@@ -317,6 +310,11 @@ overview of their function and contents.
317 310
318 For example usage, see :term:`BB_GIT_SHALLOW`. 311 For example usage, see :term:`BB_GIT_SHALLOW`.
319 312
313 :term:`BB_GIT_DEFAULT_DESTSUFFIX`
314 The default destination directory where the Git fetcher unpacks the
315 source code. If this variable is not set, the source code is unpacked in a
316 directory named "git".
317
320 :term:`BB_GIT_SHALLOW` 318 :term:`BB_GIT_SHALLOW`
321 Setting this variable to "1" enables the support for fetching, using and 319 Setting this variable to "1" enables the support for fetching, using and
322 generating mirror tarballs of `shallow git repositories <https://riptutorial.com/git/example/4584/shallow-clone>`_. 320 generating mirror tarballs of `shallow git repositories <https://riptutorial.com/git/example/4584/shallow-clone>`_.
@@ -327,11 +325,26 @@ overview of their function and contents.
327 mirror tarball. If the shallow mirror tarball cannot be fetched, it will 325 mirror tarball. If the shallow mirror tarball cannot be fetched, it will
328 try to fetch the full mirror tarball and use that. 326 try to fetch the full mirror tarball and use that.
329 327
330 When a mirror tarball is not available, a full git clone will be performed 328 This setting causes an initial shallow clone instead of an initial full bare clone.
331 regardless of whether this variable is set or not. Support for shallow 329 The amount of data transferred during the initial clone will be significantly reduced.
332 clones is not currently implemented as git does not directly support 330
333 shallow cloning a particular git commit hash (it only supports cloning 331 However, every time the source revision (referenced in :term:`SRCREV`)
334 from a tag or branch reference). 332 changes, regardless of whether the cache within the download directory
333 (defined by :term:`DL_DIR`) has been cleaned up or not,
334 the data transfer may be significantly higher because entirely
335 new shallow clones are required for each source revision change.
336
337 Over time, numerous shallow clones may cumulatively transfer
338 the same amount of data as an initial full bare clone.
339 This is especially the case with very large repositories.
340
341 Existing initial full bare clones, created without this setting,
342 will still be utilized.
343
344 If the Git error "Server does not allow request for unadvertised object"
345 occurs, an initial full bare clone is fetched automatically.
346 This may happen if the Git server does not allow the request
347 or if the Git client has issues with this functionality.
335 348
336 See also :term:`BB_GIT_SHALLOW_DEPTH` and 349 See also :term:`BB_GIT_SHALLOW_DEPTH` and
337 :term:`BB_GENERATE_SHALLOW_TARBALLS`. 350 :term:`BB_GENERATE_SHALLOW_TARBALLS`.
@@ -424,7 +437,7 @@ overview of their function and contents.
424 437
425 Example usage:: 438 Example usage::
426 439
427 BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687" 440 BB_HASHSERVE_UPSTREAM = "hashserv.yoctoproject.org:8686"
428 441
429 :term:`BB_INVALIDCONF` 442 :term:`BB_INVALIDCONF`
430 Used in combination with the ``ConfigParsed`` event to trigger 443 Used in combination with the ``ConfigParsed`` event to trigger
@@ -432,6 +445,15 @@ overview of their function and contents.
432 ``ConfigParsed`` event can set the variable to trigger the re-parse. 445 ``ConfigParsed`` event can set the variable to trigger the re-parse.
433 You must be careful to avoid recursive loops with this functionality. 446 You must be careful to avoid recursive loops with this functionality.
434 447
448 :term:`BB_LOADFACTOR_MAX`
449 Setting this to a value will cause BitBake to check the system load
450 average before executing new tasks. If the load average is above the
451 the number of CPUs multipled by this factor, no new task will be started
452 unless there is no task executing. A value of "1.5" has been found to
453 work reasonably. This is helpful for systems which don't have pressure
454 regulation enabled, which is more granular. Pressure values take
455 precedence over loadfactor.
456
435 :term:`BB_LOGCONFIG` 457 :term:`BB_LOGCONFIG`
436 Specifies the name of a config file that contains the user logging 458 Specifies the name of a config file that contains the user logging
437 configuration. See 459 configuration. See
@@ -516,11 +538,28 @@ overview of their function and contents.
516 version 4.20 expose under ``/proc/pressure``. The threshold represents 538 version 4.20 expose under ``/proc/pressure``. The threshold represents
517 the difference in "total" pressure from the previous second. The 539 the difference in "total" pressure from the previous second. The
518 minimum value is 1.0 (extremely slow builds) and the maximum is 540 minimum value is 1.0 (extremely slow builds) and the maximum is
519 1000000 (a pressure value unlikely to ever be reached). 541 1000000 (a pressure value unlikely to ever be reached). See
542 https://docs.kernel.org/accounting/psi.html for more information.
543
544 A default value to limit the CPU pressure to be set in ``conf/local.conf``
545 could be::
546
547 BB_PRESSURE_MAX_CPU = "15000"
520 548
521 This threshold can be set in ``conf/local.conf`` as:: 549 Multiple values should be tested on the build host to determine what suits
550 best, depending on the need for performances versus load average during
551 the build.
522 552
523 BB_PRESSURE_MAX_CPU = "500" 553 .. note::
554
555 You may see numerous messages printed by BitBake in the case the
556 :term:`BB_PRESSURE_MAX_CPU` is too low:
557
558 Pressure status changed to CPU: True, IO: False, Mem: False (CPU: 1105.9/2.0, IO: 0.0/2.0, Mem: 0.0/2.0) - using 1/64 bitbake threads
559
560 This means that the :term:`BB_PRESSURE_MAX_CPU` should be increased to
561 a reasonable value for limiting the CPU pressure on the system.
562 Monitor the varying value after ``IO:`` above to set a sensible value.
524 563
525 :term:`BB_PRESSURE_MAX_IO` 564 :term:`BB_PRESSURE_MAX_IO`
526 Specifies a maximum I/O pressure threshold, above which BitBake's 565 Specifies a maximum I/O pressure threshold, above which BitBake's
@@ -532,14 +571,34 @@ overview of their function and contents.
532 version 4.20 expose under ``/proc/pressure``. The threshold represents 571 version 4.20 expose under ``/proc/pressure``. The threshold represents
533 the difference in "total" pressure from the previous second. The 572 the difference in "total" pressure from the previous second. The
534 minimum value is 1.0 (extremely slow builds) and the maximum is 573 minimum value is 1.0 (extremely slow builds) and the maximum is
535 1000000 (a pressure value unlikely to ever be reached). 574 1000000 (a pressure value unlikely to ever be reached). See
575 https://docs.kernel.org/accounting/psi.html for more information.
536 576
537 At this point in time, experiments show that IO pressure tends to 577 At this point in time, experiments show that IO pressure tends to
538 be short-lived and regulating just the CPU with 578 be short-lived and regulating just the CPU with
539 :term:`BB_PRESSURE_MAX_CPU` can help to reduce it. 579 :term:`BB_PRESSURE_MAX_CPU` can help to reduce it.
540 580
541 :term:`BB_PRESSURE_MAX_MEMORY` 581 A default value to limit the IO pressure to be set in ``conf/local.conf``
582 could be::
583
584 BB_PRESSURE_MAX_IO = "15000"
542 585
586 Multiple values should be tested on the build host to determine what suits
587 best, depending on the need for performances versus I/O usage during the
588 build.
589
590 .. note::
591
592 You may see numerous messages printed by BitBake in the case the
593 :term:`BB_PRESSURE_MAX_IO` is too low::
594
595 Pressure status changed to CPU: None, IO: True, Mem: False (CPU: 2236.0/None, IO: 153.6/2.0, Mem: 0.0/2.0) - using 19/64 bitbake threads
596
597 This means that the :term:`BB_PRESSURE_MAX_IO` should be increased to
598 a reasonable value for limiting the I/O pressure on the system.
599 Monitor the varying value after ``IO:`` above to set a sensible value.
600
601 :term:`BB_PRESSURE_MAX_MEMORY`
543 Specifies a maximum memory pressure threshold, above which BitBake's 602 Specifies a maximum memory pressure threshold, above which BitBake's
544 scheduler will not start new tasks (providing there is at least 603 scheduler will not start new tasks (providing there is at least
545 one active task). If no value is set, memory pressure is not 604 one active task). If no value is set, memory pressure is not
@@ -549,7 +608,8 @@ overview of their function and contents.
549 version 4.20 expose under ``/proc/pressure``. The threshold represents 608 version 4.20 expose under ``/proc/pressure``. The threshold represents
550 the difference in "total" pressure from the previous second. The 609 the difference in "total" pressure from the previous second. The
551 minimum value is 1.0 (extremely slow builds) and the maximum is 610 minimum value is 1.0 (extremely slow builds) and the maximum is
552 1000000 (a pressure value unlikely to ever be reached). 611 1000000 (a pressure value unlikely to ever be reached). See
612 https://docs.kernel.org/accounting/psi.html for more information.
553 613
554 Memory pressure is experienced when time is spent swapping, 614 Memory pressure is experienced when time is spent swapping,
555 refaulting pages from the page cache or performing direct reclaim. 615 refaulting pages from the page cache or performing direct reclaim.
@@ -557,6 +617,26 @@ overview of their function and contents.
557 might be useful as a last resort to prevent OOM errors if they are 617 might be useful as a last resort to prevent OOM errors if they are
558 occurring during builds. 618 occurring during builds.
559 619
620 A default value to limit the memory pressure to be set in
621 ``conf/local.conf`` could be::
622
623 BB_PRESSURE_MAX_MEMORY = "15000"
624
625 Multiple values should be tested on the build host to determine what suits
626 best, depending on the need for performances versus memory consumption
627 during the build.
628
629 .. note::
630
631 You may see numerous messages printed by BitBake in the case the
632 :term:`BB_PRESSURE_MAX_MEMORY` is too low::
633
634 Pressure status changed to CPU: None, IO: False, Mem: True (CPU: 29.5/None, IO: 0.0/2.0, Mem: 2553.3/2.0) - using 17/64 bitbake threads
635
636 This means that the :term:`BB_PRESSURE_MAX_MEMORY` should be increased to
637 a reasonable value for limiting the memory pressure on the system.
638 Monitor the varying value after ``Mem:`` above to set a sensible value.
639
560 :term:`BB_RUNFMT` 640 :term:`BB_RUNFMT`
561 Specifies the name of the executable script files (i.e. run files) 641 Specifies the name of the executable script files (i.e. run files)
562 saved into ``${``\ :term:`T`\ ``}``. By default, the 642 saved into ``${``\ :term:`T`\ ``}``. By default, the
@@ -690,6 +770,12 @@ overview of their function and contents.
690 Within an executing task, this variable holds the hash of the task as 770 Within an executing task, this variable holds the hash of the task as
691 returned by the currently enabled signature generator. 771 returned by the currently enabled signature generator.
692 772
773 :term:`BB_USE_HOME_NPMRC`
774 Controls whether or not BitBake uses the user's .npmrc file within their
775 home directory within the npm fetcher. This can be used for authentication
776 of private NPM registries, among other uses. This is turned off by default
777 and requires the user to explicitly set it to "1" to enable.
778
693 :term:`BB_VERBOSE_LOGS` 779 :term:`BB_VERBOSE_LOGS`
694 Controls how verbose BitBake is during builds. If set, shell scripts 780 Controls how verbose BitBake is during builds. If set, shell scripts
695 echo commands and shell script output appears on standard out 781 echo commands and shell script output appears on standard out
@@ -757,6 +843,10 @@ overview of their function and contents.
757 :term:`BBFILE_PRIORITY` 843 :term:`BBFILE_PRIORITY`
758 Assigns the priority for recipe files in each layer. 844 Assigns the priority for recipe files in each layer.
759 845
846 This variable is used in the ``conf/layer.conf`` file and must be
847 suffixed with a `_` followed by the name of the specific layer (e.g.
848 ``BBFILE_PRIORITY_emenlow``). Colon as separator is not supported.
849
760 This variable is useful in situations where the same recipe appears 850 This variable is useful in situations where the same recipe appears
761 in more than one layer. Setting this variable allows you to 851 in more than one layer. Setting this variable allows you to
762 prioritize a layer against other layers that contain the same recipe 852 prioritize a layer against other layers that contain the same recipe
@@ -771,7 +861,7 @@ overview of their function and contents.
771 higher precedence. For example, the value 6 has a higher precedence 861 higher precedence. For example, the value 6 has a higher precedence
772 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable 862 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
773 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable 863 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
774 for more information. The default priority, if unspecified for a 864 for more information). The default priority, if unspecified for a
775 layer with no dependencies, is the lowest defined priority + 1 (or 1 865 layer with no dependencies, is the lowest defined priority + 1 (or 1
776 if no priorities are defined). 866 if no priorities are defined).
777 867