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.rst129
1 files changed, 105 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 899e584f91..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
@@ -525,11 +538,28 @@ overview of their function and contents.
525 version 4.20 expose under ``/proc/pressure``. The threshold represents 538 version 4.20 expose under ``/proc/pressure``. The threshold represents
526 the difference in "total" pressure from the previous second. The 539 the difference in "total" pressure from the previous second. The
527 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
528 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::
529 546
530 This threshold can be set in ``conf/local.conf`` as:: 547 BB_PRESSURE_MAX_CPU = "15000"
531 548
532 BB_PRESSURE_MAX_CPU = "500" 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.
552
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.
533 563
534 :term:`BB_PRESSURE_MAX_IO` 564 :term:`BB_PRESSURE_MAX_IO`
535 Specifies a maximum I/O pressure threshold, above which BitBake's 565 Specifies a maximum I/O pressure threshold, above which BitBake's
@@ -541,14 +571,34 @@ overview of their function and contents.
541 version 4.20 expose under ``/proc/pressure``. The threshold represents 571 version 4.20 expose under ``/proc/pressure``. The threshold represents
542 the difference in "total" pressure from the previous second. The 572 the difference in "total" pressure from the previous second. The
543 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
544 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.
545 576
546 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
547 be short-lived and regulating just the CPU with 578 be short-lived and regulating just the CPU with
548 :term:`BB_PRESSURE_MAX_CPU` can help to reduce it. 579 :term:`BB_PRESSURE_MAX_CPU` can help to reduce it.
549 580
550 :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"
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.
551 600
601 :term:`BB_PRESSURE_MAX_MEMORY`
552 Specifies a maximum memory pressure threshold, above which BitBake's 602 Specifies a maximum memory pressure threshold, above which BitBake's
553 scheduler will not start new tasks (providing there is at least 603 scheduler will not start new tasks (providing there is at least
554 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
@@ -558,7 +608,8 @@ overview of their function and contents.
558 version 4.20 expose under ``/proc/pressure``. The threshold represents 608 version 4.20 expose under ``/proc/pressure``. The threshold represents
559 the difference in "total" pressure from the previous second. The 609 the difference in "total" pressure from the previous second. The
560 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
561 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.
562 613
563 Memory pressure is experienced when time is spent swapping, 614 Memory pressure is experienced when time is spent swapping,
564 refaulting pages from the page cache or performing direct reclaim. 615 refaulting pages from the page cache or performing direct reclaim.
@@ -566,6 +617,26 @@ overview of their function and contents.
566 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
567 occurring during builds. 618 occurring during builds.
568 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
569 :term:`BB_RUNFMT` 640 :term:`BB_RUNFMT`
570 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)
571 saved into ``${``\ :term:`T`\ ``}``. By default, the 642 saved into ``${``\ :term:`T`\ ``}``. By default, the
@@ -699,6 +770,12 @@ overview of their function and contents.
699 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
700 returned by the currently enabled signature generator. 771 returned by the currently enabled signature generator.
701 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
702 :term:`BB_VERBOSE_LOGS` 779 :term:`BB_VERBOSE_LOGS`
703 Controls how verbose BitBake is during builds. If set, shell scripts 780 Controls how verbose BitBake is during builds. If set, shell scripts
704 echo commands and shell script output appears on standard out 781 echo commands and shell script output appears on standard out
@@ -766,6 +843,10 @@ overview of their function and contents.
766 :term:`BBFILE_PRIORITY` 843 :term:`BBFILE_PRIORITY`
767 Assigns the priority for recipe files in each layer. 844 Assigns the priority for recipe files in each layer.
768 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
769 This variable is useful in situations where the same recipe appears 850 This variable is useful in situations where the same recipe appears
770 in more than one layer. Setting this variable allows you to 851 in more than one layer. Setting this variable allows you to
771 prioritize a layer against other layers that contain the same recipe 852 prioritize a layer against other layers that contain the same recipe
@@ -780,7 +861,7 @@ overview of their function and contents.
780 higher precedence. For example, the value 6 has a higher precedence 861 higher precedence. For example, the value 6 has a higher precedence
781 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
782 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable 863 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
783 for more information. The default priority, if unspecified for a 864 for more information). The default priority, if unspecified for a
784 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
785 if no priorities are defined). 866 if no priorities are defined).
786 867