diff options
Diffstat (limited to 'bitbake/doc')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | 25 | ||||
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst | 174 | ||||
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-library-functions.rst | 59 | ||||
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 144 | ||||
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 129 | ||||
-rw-r--r-- | bitbake/doc/conf.py | 7 | ||||
-rw-r--r-- | bitbake/doc/index.rst | 1 | ||||
-rw-r--r-- | bitbake/doc/releases.rst | 39 |
8 files changed, 439 insertions, 139 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst index fb4f0a23d7..a2c2432db1 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | |||
@@ -39,10 +39,10 @@ variable and then calls the ``download`` method to download the files. | |||
39 | 39 | ||
40 | The instantiation of the fetch class is usually followed by:: | 40 | The instantiation of the fetch class is usually followed by:: |
41 | 41 | ||
42 | rootdir = l.getVar('WORKDIR') | 42 | rootdir = l.getVar('UNPACKDIR') |
43 | fetcher.unpack(rootdir) | 43 | fetcher.unpack(rootdir) |
44 | 44 | ||
45 | This code unpacks the downloaded files to the specified by ``WORKDIR``. | 45 | This code unpacks the downloaded files to the specified by ``UNPACKDIR``. |
46 | 46 | ||
47 | .. note:: | 47 | .. note:: |
48 | 48 | ||
@@ -51,7 +51,7 @@ This code unpacks the downloaded files to the specified by ``WORKDIR``. | |||
51 | examine the OpenEmbedded class file ``base.bbclass`` | 51 | examine the OpenEmbedded class file ``base.bbclass`` |
52 | . | 52 | . |
53 | 53 | ||
54 | The :term:`SRC_URI` and ``WORKDIR`` variables are not hardcoded into the | 54 | The :term:`SRC_URI` and ``UNPACKDIR`` variables are not hardcoded into the |
55 | fetcher, since those fetcher methods can be (and are) called with | 55 | fetcher, since those fetcher methods can be (and are) called with |
56 | different variable names. In OpenEmbedded for example, the shared state | 56 | different variable names. In OpenEmbedded for example, the shared state |
57 | (sstate) code uses the fetch module to fetch the sstate files. | 57 | (sstate) code uses the fetch module to fetch the sstate files. |
@@ -463,13 +463,6 @@ Here are some example URLs:: | |||
463 | 463 | ||
464 | .. note:: | 464 | .. note:: |
465 | 465 | ||
466 | When using ``git`` as the fetcher of the main source code of your software, | ||
467 | ``S`` should be set accordingly:: | ||
468 | |||
469 | S = "${WORKDIR}/git" | ||
470 | |||
471 | .. note:: | ||
472 | |||
473 | Specifying passwords directly in ``git://`` urls is not supported. | 466 | Specifying passwords directly in ``git://`` urls is not supported. |
474 | There are several reasons: :term:`SRC_URI` is often written out to logs and | 467 | There are several reasons: :term:`SRC_URI` is often written out to logs and |
475 | other places, and that could easily leak passwords; it is also all too | 468 | other places, and that could easily leak passwords; it is also all too |
@@ -598,7 +591,7 @@ and port, username, and password, and fetches the Head Revision:: | |||
598 | SRC_URI = "p4://example-depot/main/source/..." | 591 | SRC_URI = "p4://example-depot/main/source/..." |
599 | SRCREV = "${AUTOREV}" | 592 | SRCREV = "${AUTOREV}" |
600 | PV = "p4-${SRCPV}" | 593 | PV = "p4-${SRCPV}" |
601 | S = "${WORKDIR}/p4" | 594 | S = "${UNPACKDIR}/p4" |
602 | 595 | ||
603 | Here is an example that specifies the server URL and port, username, and | 596 | Here is an example that specifies the server URL and port, username, and |
604 | password, and fetches a Revision based on a Label:: | 597 | password, and fetches a Revision based on a Label:: |
@@ -607,15 +600,15 @@ password, and fetches a Revision based on a Label:: | |||
607 | SRC_URI = "p4://user:passwd@example-depot/main/source/..." | 600 | SRC_URI = "p4://user:passwd@example-depot/main/source/..." |
608 | SRCREV = "release-1.0" | 601 | SRCREV = "release-1.0" |
609 | PV = "p4-${SRCPV}" | 602 | PV = "p4-${SRCPV}" |
610 | S = "${WORKDIR}/p4" | 603 | S = "${UNPACKDIR}/p4" |
611 | 604 | ||
612 | .. note:: | 605 | .. note:: |
613 | 606 | ||
614 | You should always set S to "${WORKDIR}/p4" in your recipe. | 607 | You should always set S to "${UNPACKDIR}/p4" in your recipe. |
615 | 608 | ||
616 | By default, the fetcher strips the depot location from the local file paths. In | 609 | By default, the fetcher strips the depot location from the local file paths. In |
617 | the above example, the content of ``example-depot/main/source/`` will be placed | 610 | the above example, the content of ``example-depot/main/source/`` will be placed |
618 | in ``${WORKDIR}/p4``. For situations where preserving parts of the remote depot | 611 | in ``${UNPACKDIR}/p4``. For situations where preserving parts of the remote depot |
619 | paths locally is desirable, the fetcher supports two parameters: | 612 | paths locally is desirable, the fetcher supports two parameters: |
620 | 613 | ||
621 | - *"module":* | 614 | - *"module":* |
@@ -686,9 +679,9 @@ Such functionality is set by the variable: | |||
686 | delegate access to resources, if this variable is set, the Az Fetcher will | 679 | delegate access to resources, if this variable is set, the Az Fetcher will |
687 | use it when fetching artifacts from the cloud. | 680 | use it when fetching artifacts from the cloud. |
688 | 681 | ||
689 | You can specify the AZ_SAS variable as shown below:: | 682 | You can specify the AZ_SAS variable prefixed with a ? as shown below:: |
690 | 683 | ||
691 | AZ_SAS = "se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>" | 684 | AZ_SAS = "?se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>" |
692 | 685 | ||
693 | Here is an example URL:: | 686 | Here is an example URL:: |
694 | 687 | ||
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst index 35ffb88b02..539bb62d81 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst | |||
@@ -349,40 +349,84 @@ Usage and syntax | |||
349 | Following is the usage and syntax for BitBake:: | 349 | Following is the usage and syntax for BitBake:: |
350 | 350 | ||
351 | $ bitbake -h | 351 | $ bitbake -h |
352 | Usage: bitbake [options] [recipename/target recipe:do_task ...] | 352 | usage: bitbake [-s] [-e] [-g] [-u UI] [--version] [-h] [-f] [-c CMD] |
353 | 353 | [-C INVALIDATE_STAMP] [--runall RUNALL] [--runonly RUNONLY] | |
354 | Executes the specified task (default is 'build') for a given set of target recipes (.bb files). | 354 | [--no-setscene] [--skip-setscene] [--setscene-only] [-n] [-p] |
355 | It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which | 355 | [-k] [-P] [-S SIGNATURE_HANDLER] [--revisions-changed] |
356 | will provide the layer, BBFILES and other configuration information. | 356 | [-b BUILDFILE] [-D] [-l DEBUG_DOMAINS] [-v] [-q] |
357 | [-w WRITEEVENTLOG] [-B BIND] [-T SERVER_TIMEOUT] | ||
358 | [--remote-server REMOTE_SERVER] [-m] [--token XMLRPCTOKEN] | ||
359 | [--observe-only] [--status-only] [--server-only] [-r PREFILE] | ||
360 | [-R POSTFILE] [-I EXTRA_ASSUME_PROVIDED] | ||
361 | [recipename/target ...] | ||
362 | |||
363 | It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH | ||
364 | which will provide the layer, BBFILES and other configuration information. | ||
365 | |||
366 | General options: | ||
367 | recipename/target Execute the specified task (default is 'build') for | ||
368 | these target recipes (.bb files). | ||
369 | -s, --show-versions Show current and preferred versions of all recipes. | ||
370 | -e, --environment Show the global or per-recipe environment complete | ||
371 | with information about where variables were | ||
372 | set/changed. | ||
373 | -g, --graphviz Save dependency tree information for the specified | ||
374 | targets in the dot syntax. | ||
375 | -u UI, --ui UI The user interface to use (knotty, ncurses, taskexp, | ||
376 | taskexp_ncurses or teamcity - default knotty). | ||
377 | --version Show programs version and exit. | ||
378 | -h, --help Show this help message and exit. | ||
357 | 379 | ||
358 | Options: | 380 | Task control options: |
359 | --version show program's version number and exit | ||
360 | -h, --help show this help message and exit | ||
361 | -b BUILDFILE, --buildfile=BUILDFILE | ||
362 | Execute tasks from a specific .bb recipe directly. | ||
363 | WARNING: Does not handle any dependencies from other | ||
364 | recipes. | ||
365 | -k, --continue Continue as much as possible after an error. While the | ||
366 | target that failed and anything depending on it cannot | ||
367 | be built, as much as possible will be built before | ||
368 | stopping. | ||
369 | -f, --force Force the specified targets/task to run (invalidating | 381 | -f, --force Force the specified targets/task to run (invalidating |
370 | any existing stamp file). | 382 | any existing stamp file). |
371 | -c CMD, --cmd=CMD Specify the task to execute. The exact options | 383 | -c CMD, --cmd CMD Specify the task to execute. The exact options |
372 | available depend on the metadata. Some examples might | 384 | available depend on the metadata. Some examples might |
373 | be 'compile' or 'populate_sysroot' or 'listtasks' may | 385 | be 'compile' or 'populate_sysroot' or 'listtasks' may |
374 | give a list of the tasks available. | 386 | give a list of the tasks available. |
375 | -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP | 387 | -C INVALIDATE_STAMP, --clear-stamp INVALIDATE_STAMP |
376 | Invalidate the stamp for the specified task such as | 388 | Invalidate the stamp for the specified task such as |
377 | 'compile' and then run the default task for the | 389 | 'compile' and then run the default task for the |
378 | specified target(s). | 390 | specified target(s). |
379 | -r PREFILE, --read=PREFILE | 391 | --runall RUNALL Run the specified task for any recipe in the taskgraph |
380 | Read the specified file before bitbake.conf. | 392 | of the specified target (even if it wouldn't otherwise |
381 | -R POSTFILE, --postread=POSTFILE | 393 | have run). |
382 | Read the specified file after bitbake.conf. | 394 | --runonly RUNONLY Run only the specified task within the taskgraph of |
383 | -v, --verbose Enable tracing of shell tasks (with 'set -x'). Also | 395 | the specified targets (and any task dependencies those |
384 | print bb.note(...) messages to stdout (in addition to | 396 | tasks may have). |
385 | writing them to ${T}/log.do_<task>). | 397 | --no-setscene Do not run any setscene tasks. sstate will be ignored |
398 | and everything needed, built. | ||
399 | --skip-setscene Skip setscene tasks if they would be executed. Tasks | ||
400 | previously restored from sstate will be kept, unlike | ||
401 | --no-setscene. | ||
402 | --setscene-only Only run setscene tasks, don't run any real tasks. | ||
403 | |||
404 | Execution control options: | ||
405 | -n, --dry-run Don't execute, just go through the motions. | ||
406 | -p, --parse-only Quit after parsing the BB recipes. | ||
407 | -k, --continue Continue as much as possible after an error. While the | ||
408 | target that failed and anything depending on it cannot | ||
409 | be built, as much as possible will be built before | ||
410 | stopping. | ||
411 | -P, --profile Profile the command and save reports. | ||
412 | -S SIGNATURE_HANDLER, --dump-signatures SIGNATURE_HANDLER | ||
413 | Dump out the signature construction information, with | ||
414 | no task execution. The SIGNATURE_HANDLER parameter is | ||
415 | passed to the handler. Two common values are none and | ||
416 | printdiff but the handler may define more/less. none | ||
417 | means only dump the signature, printdiff means | ||
418 | recursively compare the dumped signature with the most | ||
419 | recent one in a local build or sstate cache (can be | ||
420 | used to find out why tasks re-run when that is not | ||
421 | expected) | ||
422 | --revisions-changed Set the exit code depending on whether upstream | ||
423 | floating revisions have changed or not. | ||
424 | -b BUILDFILE, --buildfile BUILDFILE | ||
425 | Execute tasks from a specific .bb recipe directly. | ||
426 | WARNING: Does not handle any dependencies from other | ||
427 | recipes. | ||
428 | |||
429 | Logging/output control options: | ||
386 | -D, --debug Increase the debug level. You can specify this more | 430 | -D, --debug Increase the debug level. You can specify this more |
387 | than once. -D sets the debug level to 1, where only | 431 | than once. -D sets the debug level to 1, where only |
388 | bb.debug(1, ...) messages are printed to stdout; -DD | 432 | bb.debug(1, ...) messages are printed to stdout; -DD |
@@ -392,65 +436,47 @@ Following is the usage and syntax for BitBake:: | |||
392 | -D only affects output to stdout. All debug messages | 436 | -D only affects output to stdout. All debug messages |
393 | are written to ${T}/log.do_taskname, regardless of the | 437 | are written to ${T}/log.do_taskname, regardless of the |
394 | debug level. | 438 | debug level. |
439 | -l DEBUG_DOMAINS, --log-domains DEBUG_DOMAINS | ||
440 | Show debug logging for the specified logging domains. | ||
441 | -v, --verbose Enable tracing of shell tasks (with 'set -x'). Also | ||
442 | print bb.note(...) messages to stdout (in addition to | ||
443 | writing them to ${T}/log.do_<task>). | ||
395 | -q, --quiet Output less log message data to the terminal. You can | 444 | -q, --quiet Output less log message data to the terminal. You can |
396 | specify this more than once. | 445 | specify this more than once. |
397 | -n, --dry-run Don't execute, just go through the motions. | 446 | -w WRITEEVENTLOG, --write-log WRITEEVENTLOG |
398 | -S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER | 447 | Writes the event log of the build to a bitbake event |
399 | Dump out the signature construction information, with | 448 | json file. Use '' (empty string) to assign the name |
400 | no task execution. The SIGNATURE_HANDLER parameter is | 449 | automatically. |
401 | passed to the handler. Two common values are none and | 450 | |
402 | printdiff but the handler may define more/less. none | 451 | Server options: |
403 | means only dump the signature, printdiff means compare | 452 | -B BIND, --bind BIND The name/address for the bitbake xmlrpc server to bind |
404 | the dumped signature with the cached one. | ||
405 | -p, --parse-only Quit after parsing the BB recipes. | ||
406 | -s, --show-versions Show current and preferred versions of all recipes. | ||
407 | -e, --environment Show the global or per-recipe environment complete | ||
408 | with information about where variables were | ||
409 | set/changed. | ||
410 | -g, --graphviz Save dependency tree information for the specified | ||
411 | targets in the dot syntax. | ||
412 | -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED | ||
413 | Assume these dependencies don't exist and are already | ||
414 | provided (equivalent to ASSUME_PROVIDED). Useful to | ||
415 | make dependency graphs more appealing | ||
416 | -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS | ||
417 | Show debug logging for the specified logging domains | ||
418 | -P, --profile Profile the command and save reports. | ||
419 | -u UI, --ui=UI The user interface to use (knotty, ncurses, taskexp or | ||
420 | teamcity - default knotty). | ||
421 | --token=XMLRPCTOKEN Specify the connection token to be used when | ||
422 | connecting to a remote server. | ||
423 | --revisions-changed Set the exit code depending on whether upstream | ||
424 | floating revisions have changed or not. | ||
425 | --server-only Run bitbake without a UI, only starting a server | ||
426 | (cooker) process. | ||
427 | -B BIND, --bind=BIND The name/address for the bitbake xmlrpc server to bind | ||
428 | to. | 453 | to. |
429 | -T SERVER_TIMEOUT, --idle-timeout=SERVER_TIMEOUT | 454 | -T SERVER_TIMEOUT, --idle-timeout SERVER_TIMEOUT |
430 | Set timeout to unload bitbake server due to | 455 | Set timeout to unload bitbake server due to |
431 | inactivity, set to -1 means no unload, default: | 456 | inactivity, set to -1 means no unload, default: |
432 | Environment variable BB_SERVER_TIMEOUT. | 457 | Environment variable BB_SERVER_TIMEOUT. |
433 | --no-setscene Do not run any setscene tasks. sstate will be ignored | 458 | --remote-server REMOTE_SERVER |
434 | and everything needed, built. | ||
435 | --skip-setscene Skip setscene tasks if they would be executed. Tasks | ||
436 | previously restored from sstate will be kept, unlike | ||
437 | --no-setscene | ||
438 | --setscene-only Only run setscene tasks, don't run any real tasks. | ||
439 | --remote-server=REMOTE_SERVER | ||
440 | Connect to the specified server. | 459 | Connect to the specified server. |
441 | -m, --kill-server Terminate any running bitbake server. | 460 | -m, --kill-server Terminate any running bitbake server. |
461 | --token XMLRPCTOKEN Specify the connection token to be used when | ||
462 | connecting to a remote server. | ||
442 | --observe-only Connect to a server as an observing-only client. | 463 | --observe-only Connect to a server as an observing-only client. |
443 | --status-only Check the status of the remote bitbake server. | 464 | --status-only Check the status of the remote bitbake server. |
444 | -w WRITEEVENTLOG, --write-log=WRITEEVENTLOG | 465 | --server-only Run bitbake without a UI, only starting a server |
445 | Writes the event log of the build to a bitbake event | 466 | (cooker) process. |
446 | json file. Use '' (empty string) to assign the name | 467 | |
447 | automatically. | 468 | Configuration options: |
448 | --runall=RUNALL Run the specified task for any recipe in the taskgraph | 469 | -r PREFILE, --read PREFILE |
449 | of the specified target (even if it wouldn't otherwise | 470 | Read the specified file before bitbake.conf. |
450 | have run). | 471 | -R POSTFILE, --postread POSTFILE |
451 | --runonly=RUNONLY Run only the specified task within the taskgraph of | 472 | Read the specified file after bitbake.conf. |
452 | the specified targets (and any task dependencies those | 473 | -I EXTRA_ASSUME_PROVIDED, --ignore-deps EXTRA_ASSUME_PROVIDED |
453 | tasks may have). | 474 | Assume these dependencies don't exist and are already |
475 | provided (equivalent to ASSUME_PROVIDED). Useful to | ||
476 | make dependency graphs more appealing. | ||
477 | |||
478 | .. | ||
479 | Bitbake help output generated with "stty columns 80; bin/bitbake -h" | ||
454 | 480 | ||
455 | .. _bitbake-examples: | 481 | .. _bitbake-examples: |
456 | 482 | ||
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-library-functions.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-library-functions.rst new file mode 100644 index 0000000000..09e353945b --- /dev/null +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-library-functions.rst | |||
@@ -0,0 +1,59 @@ | |||
1 | .. SPDX-License-Identifier: CC-BY-2.5 | ||
2 | |||
3 | ================= | ||
4 | Library Functions | ||
5 | ================= | ||
6 | |||
7 | | | ||
8 | |||
9 | This chapter lists common library functions available under the ``lib/`` | ||
10 | directory in BitBake. | ||
11 | |||
12 | These functions can be used in recipes or configuration files with | ||
13 | :ref:`inline-Python <bitbake-user-manual/bitbake-user-manual-metadata:Inline | ||
14 | Python Variable Expansion>` or :ref:`Python | ||
15 | <bitbake-user-manual/bitbake-user-manual-metadata:BitBake-Style Python | ||
16 | Functions>` functions. | ||
17 | |||
18 | Logging utilities | ||
19 | ================= | ||
20 | |||
21 | Different logging utilities can be used from Python code in recipes or | ||
22 | configuration files. | ||
23 | |||
24 | The strings passed below can be formatted with ``str.format()``, for example:: | ||
25 | |||
26 | bb.warn("Houston, we have a %s", "bit of a problem") | ||
27 | |||
28 | Formatted string can also be used directly:: | ||
29 | |||
30 | bb.error("%s, we have a %s" % ("Houston", "big problem")) | ||
31 | |||
32 | Python f-strings may also be used:: | ||
33 | |||
34 | h = "Houston" | ||
35 | bb.fatal(f"{h}, we have a critical problem") | ||
36 | |||
37 | .. automodule:: bb | ||
38 | :members: | ||
39 | debug, | ||
40 | error, | ||
41 | erroronce, | ||
42 | fatal, | ||
43 | note, | ||
44 | plain, | ||
45 | verbnote, | ||
46 | warn, | ||
47 | warnonce, | ||
48 | |||
49 | ``bb.utils`` | ||
50 | ============ | ||
51 | |||
52 | .. automodule:: bb.utils | ||
53 | :members: | ||
54 | :exclude-members: | ||
55 | LogCatcher, | ||
56 | PrCtlError, | ||
57 | VersionStringException, | ||
58 | better_compile, | ||
59 | better_exec, | ||
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index 58975f4c88..f60a9d8312 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | |||
@@ -754,7 +754,9 @@ share the task. | |||
754 | This section presents the mechanisms BitBake provides to allow you to | 754 | This section presents the mechanisms BitBake provides to allow you to |
755 | share functionality between recipes. Specifically, the mechanisms | 755 | share functionality between recipes. Specifically, the mechanisms |
756 | include ``include``, ``inherit``, :term:`INHERIT`, and ``require`` | 756 | include ``include``, ``inherit``, :term:`INHERIT`, and ``require`` |
757 | directives. | 757 | directives. There is also a higher-level abstraction called |
758 | ``configuration fragments`` that is enabled with ``addfragments`` | ||
759 | directive. | ||
758 | 760 | ||
759 | Locating Include and Class Files | 761 | Locating Include and Class Files |
760 | -------------------------------- | 762 | -------------------------------- |
@@ -771,6 +773,8 @@ In order for include and class files to be found by BitBake, they need | |||
771 | to be located in a "classes" subdirectory that can be found in | 773 | to be located in a "classes" subdirectory that can be found in |
772 | :term:`BBPATH`. | 774 | :term:`BBPATH`. |
773 | 775 | ||
776 | .. _ref-bitbake-user-manual-metadata-inherit: | ||
777 | |||
774 | ``inherit`` Directive | 778 | ``inherit`` Directive |
775 | --------------------- | 779 | --------------------- |
776 | 780 | ||
@@ -809,19 +813,43 @@ An advantage with the inherit directive as compared to both the | |||
809 | :ref:`include <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` and :ref:`require <bitbake-user-manual/bitbake-user-manual-metadata:\`\`require\`\` directive>` | 813 | :ref:`include <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` and :ref:`require <bitbake-user-manual/bitbake-user-manual-metadata:\`\`require\`\` directive>` |
810 | directives is that you can inherit class files conditionally. You can | 814 | directives is that you can inherit class files conditionally. You can |
811 | accomplish this by using a variable expression after the ``inherit`` | 815 | accomplish this by using a variable expression after the ``inherit`` |
812 | statement. Here is an example:: | 816 | statement. |
817 | |||
818 | For inheriting classes conditionally, using the :ref:`inherit_defer | ||
819 | <ref-bitbake-user-manual-metadata-inherit-defer>` directive is advised as | ||
820 | :ref:`inherit_defer <ref-bitbake-user-manual-metadata-inherit-defer>` is | ||
821 | evaluated at the end of parsing. | ||
822 | |||
823 | .. _ref-bitbake-user-manual-metadata-inherit-defer: | ||
824 | |||
825 | ``inherit_defer`` Directive | ||
826 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
827 | |||
828 | The :ref:`inherit_defer <ref-bitbake-user-manual-metadata-inherit-defer>` | ||
829 | directive works like the :ref:`inherit | ||
830 | <ref-bitbake-user-manual-metadata-inherit>` directive, except that it is only | ||
831 | evaluated at the end of parsing. Its usage is recommended when a conditional | ||
832 | expression is used. | ||
813 | 833 | ||
814 | inherit ${VARNAME} | 834 | This allows conditional expressions to be evaluated "late", meaning changes to |
835 | the variable after the line is parsed will take effect. With the :ref:`inherit | ||
836 | <ref-bitbake-user-manual-metadata-inherit>` directive this is not the case. | ||
837 | |||
838 | Here is an example:: | ||
839 | |||
840 | inherit_defer ${VARNAME} | ||
815 | 841 | ||
816 | If ``VARNAME`` is | 842 | If ``VARNAME`` is |
817 | going to be set, it needs to be set before the ``inherit`` statement is | 843 | going to be set, it needs to be set before the ``inherit_defer`` statement is |
818 | parsed. One way to achieve a conditional inherit in this case is to use | 844 | parsed. One way to achieve a conditional inherit in this case is to use |
819 | overrides:: | 845 | overrides:: |
820 | 846 | ||
821 | VARIABLE = "" | 847 | VARIABLE = "" |
822 | VARIABLE:someoverride = "myclass" | 848 | VARIABLE:someoverride = "myclass" |
823 | 849 | ||
824 | Another method is by using anonymous Python. Here is an example:: | 850 | Another method is by using :ref:`anonymous Python |
851 | <bitbake-user-manual/bitbake-user-manual-metadata:Anonymous Python Functions>`. | ||
852 | Here is an example:: | ||
825 | 853 | ||
826 | python () { | 854 | python () { |
827 | if condition == value: | 855 | if condition == value: |
@@ -830,11 +858,14 @@ Another method is by using anonymous Python. Here is an example:: | |||
830 | d.setVar('VARIABLE', '') | 858 | d.setVar('VARIABLE', '') |
831 | } | 859 | } |
832 | 860 | ||
833 | Alternatively, you could use an in-line Python expression in the | 861 | Alternatively, you could use an inline Python expression in the |
834 | following form:: | 862 | following form:: |
835 | 863 | ||
836 | inherit ${@'classname' if condition else ''} | 864 | inherit_defer ${@'classname' if condition else ''} |
837 | inherit ${@functionname(params)} | 865 | |
866 | Or:: | ||
867 | |||
868 | inherit_defer ${@bb.utils.contains('VARIABLE', 'something', 'classname', '', d)} | ||
838 | 869 | ||
839 | In all cases, if the expression evaluates to an | 870 | In all cases, if the expression evaluates to an |
840 | empty string, the statement does not trigger a syntax error because it | 871 | empty string, the statement does not trigger a syntax error because it |
@@ -869,6 +900,33 @@ definitions:: | |||
869 | of include . Doing so makes sure that an error is produced if the file cannot | 900 | of include . Doing so makes sure that an error is produced if the file cannot |
870 | be found. | 901 | be found. |
871 | 902 | ||
903 | ``include_all`` Directive | ||
904 | ------------------------- | ||
905 | |||
906 | The ``include_all`` directive works like the :ref:`include | ||
907 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | ||
908 | directive but will include all of the files that match the specified path in | ||
909 | the enabled layers (layers part of :term:`BBLAYERS`). | ||
910 | |||
911 | For example, let's say a ``maintainers.inc`` file is present in different layers | ||
912 | and is conventionally placed in the ``conf/distro/include`` directory of each | ||
913 | layer. In that case the ``include_all`` directive can be used to include | ||
914 | the ``maintainers.inc`` file for all of these layers:: | ||
915 | |||
916 | include_all conf/distro/include/maintainers.inc | ||
917 | |||
918 | In other words, the ``maintainers.inc`` file for each layer is included through | ||
919 | the :ref:`include <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | ||
920 | directive. | ||
921 | |||
922 | BitBake will iterate through the colon-separated :term:`BBPATH` list to look for | ||
923 | matching files to include, from left to right. As a consequence, matching files | ||
924 | are included in that order. | ||
925 | |||
926 | As the ``include_all`` directive uses the :ref:`include | ||
927 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | ||
928 | directive in the background, no error is produced if no files are matched. | ||
929 | |||
872 | .. _require-inclusion: | 930 | .. _require-inclusion: |
873 | 931 | ||
874 | ``require`` Directive | 932 | ``require`` Directive |
@@ -933,6 +991,65 @@ the ``autotools`` and ``pkgconfig`` classes:: | |||
933 | 991 | ||
934 | INHERIT += "autotools pkgconfig" | 992 | INHERIT += "autotools pkgconfig" |
935 | 993 | ||
994 | ``addfragments`` Directive | ||
995 | -------------------------- | ||
996 | |||
997 | This directive allows fine-tuning local configurations with configuration | ||
998 | snippets contained in layers in a structured, controlled way. Typically it would | ||
999 | go into ``bitbake.conf``, for example:: | ||
1000 | |||
1001 | addfragments conf/fragments OE_FRAGMENTS OE_FRAGMENTS_METADATA_VARS OE_BUILTIN_FRAGMENTS | ||
1002 | |||
1003 | ``addfragments`` takes four parameters: | ||
1004 | |||
1005 | - path prefix for fragment files inside the layer file tree that bitbake | ||
1006 | uses to construct full paths to the fragment files | ||
1007 | |||
1008 | - name of variable that holds the list of enabled fragments in an | ||
1009 | active build | ||
1010 | |||
1011 | - name of variable that contains a list of variable names containing | ||
1012 | fragment-specific metadata (such as descriptions) | ||
1013 | |||
1014 | - name of variable that contains definitions for built-in fragments | ||
1015 | |||
1016 | This allows listing enabled configuration fragments in ``OE_FRAGMENTS`` | ||
1017 | variable like this:: | ||
1018 | |||
1019 | OE_FRAGMENTS = "core/domain/somefragment core/someotherfragment anotherlayer/anotherdomain/anotherfragment" | ||
1020 | |||
1021 | Fragment names listed in this variable must be prefixed by the layer name | ||
1022 | where a fragment file is located, defined by :term:`BBFILE_COLLECTIONS` in ``layer.conf``. | ||
1023 | |||
1024 | The implementation then expands this list into | ||
1025 | :ref:`require <bitbake-user-manual/bitbake-user-manual-metadata:\`\`require\`\` directive>` | ||
1026 | directives with full paths to respective layers:: | ||
1027 | |||
1028 | require /path/to/core-layer/conf/fragments/domain/somefragment.conf | ||
1029 | require /path/to/core-layer/conf/fragments/someotherfragment.conf | ||
1030 | require /path/to/another-layer/conf/fragments/anotherdomain/anotherfragment.conf | ||
1031 | |||
1032 | The variable containing a list of fragment metadata variables could look like this:: | ||
1033 | |||
1034 | OE_FRAGMENTS_METADATA_VARS = "BB_CONF_FRAGMENT_SUMMARY BB_CONF_FRAGMENT_DESCRIPTION" | ||
1035 | |||
1036 | The implementation will add a flag containing the fragment name to each of those variables | ||
1037 | when parsing fragments, so that the variables are namespaced by fragment name, and do not override | ||
1038 | each other when several fragments are enabled. | ||
1039 | |||
1040 | The variable containing a built-in fragment definitions could look like this:: | ||
1041 | |||
1042 | OE_BUILTIN_FRAGMENTS = "someprefix:SOMEVARIABLE anotherprefix:ANOTHERVARIABLE" | ||
1043 | |||
1044 | and then if 'someprefix/somevalue' is added to the variable that holds the list | ||
1045 | of enabled fragments: | ||
1046 | |||
1047 | OE_FRAGMENTS = "... someprefix/somevalue" | ||
1048 | |||
1049 | bitbake will treat that as direct value assignment in its configuration:: | ||
1050 | |||
1051 | SOMEVARIABLE = "somevalue" | ||
1052 | |||
936 | Functions | 1053 | Functions |
937 | ========= | 1054 | ========= |
938 | 1055 | ||
@@ -1303,8 +1420,8 @@ the task and other tasks. Here is an example that shows how to define a | |||
1303 | task and declare some dependencies:: | 1420 | task and declare some dependencies:: |
1304 | 1421 | ||
1305 | python do_printdate () { | 1422 | python do_printdate () { |
1306 | import time | 1423 | import datetime |
1307 | print time.strftime('%Y%m%d', time.gmtime()) | 1424 | bb.plain('Date: %s' % (datetime.date.today())) |
1308 | } | 1425 | } |
1309 | addtask printdate after do_fetch before do_build | 1426 | addtask printdate after do_fetch before do_build |
1310 | 1427 | ||
@@ -1972,11 +2089,8 @@ access. Here is a list of available operations: | |||
1972 | Other Functions | 2089 | Other Functions |
1973 | --------------- | 2090 | --------------- |
1974 | 2091 | ||
1975 | You can find many other functions that can be called from Python by | 2092 | Other functions are documented in the |
1976 | looking at the source code of the ``bb`` module, which is in | 2093 | :doc:`/bitbake-user-manual/bitbake-user-manual-library-functions` document. |
1977 | ``bitbake/lib/bb``. For example, ``bitbake/lib/bb/utils.py`` includes | ||
1978 | the commonly used functions ``bb.utils.contains()`` and | ||
1979 | ``bb.utils.mkdirhier()``, which come with docstrings. | ||
1980 | 2094 | ||
1981 | Extending Python Library Code | 2095 | Extending Python Library Code |
1982 | ----------------------------- | 2096 | ----------------------------- |
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 | ||
diff --git a/bitbake/doc/conf.py b/bitbake/doc/conf.py index fc2ee08111..f61241e28b 100644 --- a/bitbake/doc/conf.py +++ b/bitbake/doc/conf.py | |||
@@ -17,6 +17,8 @@ | |||
17 | import sys | 17 | import sys |
18 | import datetime | 18 | import datetime |
19 | 19 | ||
20 | from pathlib import Path | ||
21 | |||
20 | current_version = "dev" | 22 | current_version = "dev" |
21 | 23 | ||
22 | # String used in sidebar | 24 | # String used in sidebar |
@@ -47,6 +49,7 @@ extlinks = { | |||
47 | extensions = [ | 49 | extensions = [ |
48 | 'sphinx.ext.autosectionlabel', | 50 | 'sphinx.ext.autosectionlabel', |
49 | 'sphinx.ext.extlinks', | 51 | 'sphinx.ext.extlinks', |
52 | 'sphinx.ext.autodoc', | ||
50 | ] | 53 | ] |
51 | autosectionlabel_prefix_document = True | 54 | autosectionlabel_prefix_document = True |
52 | 55 | ||
@@ -99,3 +102,7 @@ html_last_updated_fmt = '%b %d, %Y' | |||
99 | 102 | ||
100 | # Remove the trailing 'dot' in section numbers | 103 | # Remove the trailing 'dot' in section numbers |
101 | html_secnumber_suffix = " " | 104 | html_secnumber_suffix = " " |
105 | |||
106 | # autoconf needs the modules available to auto-generate documentation from the | ||
107 | # code | ||
108 | sys.path.insert(0, str(Path('..', 'lib').resolve())) | ||
diff --git a/bitbake/doc/index.rst b/bitbake/doc/index.rst index ee1660ac15..546ef36c16 100644 --- a/bitbake/doc/index.rst +++ b/bitbake/doc/index.rst | |||
@@ -16,6 +16,7 @@ BitBake User Manual | |||
16 | bitbake-user-manual/bitbake-user-manual-ref-variables-context | 16 | bitbake-user-manual/bitbake-user-manual-ref-variables-context |
17 | bitbake-user-manual/bitbake-user-manual-fetching | 17 | bitbake-user-manual/bitbake-user-manual-fetching |
18 | bitbake-user-manual/bitbake-user-manual-ref-variables | 18 | bitbake-user-manual/bitbake-user-manual-ref-variables |
19 | bitbake-user-manual/bitbake-user-manual-library-functions | ||
19 | bitbake-user-manual/bitbake-user-manual-hello | 20 | bitbake-user-manual/bitbake-user-manual-hello |
20 | 21 | ||
21 | .. toctree:: | 22 | .. toctree:: |
diff --git a/bitbake/doc/releases.rst b/bitbake/doc/releases.rst index b38b1c0652..676db66ec5 100644 --- a/bitbake/doc/releases.rst +++ b/bitbake/doc/releases.rst | |||
@@ -4,11 +4,17 @@ | |||
4 | BitBake Supported Release Manuals | 4 | BitBake Supported Release Manuals |
5 | ================================= | 5 | ================================= |
6 | 6 | ||
7 | ****************************** | ||
8 | Release Series 5.2 (walnascar) | ||
9 | ****************************** | ||
10 | |||
11 | - :yocto_docs:`BitBake 2.12 User Manual </bitbake/2.12/>` | ||
12 | |||
7 | ******************************* | 13 | ******************************* |
8 | Release Series 4.2 (mickledore) | 14 | Release Series 5.0 (scarthgap) |
9 | ******************************* | 15 | ******************************* |
10 | 16 | ||
11 | - :yocto_docs:`BitBake 2.4 User Manual </bitbake/2.4/>` | 17 | - :yocto_docs:`BitBake 2.8 User Manual </bitbake/2.8/>` |
12 | 18 | ||
13 | ****************************** | 19 | ****************************** |
14 | Release Series 4.0 (kirkstone) | 20 | Release Series 4.0 (kirkstone) |
@@ -16,15 +22,27 @@ Release Series 4.0 (kirkstone) | |||
16 | 22 | ||
17 | - :yocto_docs:`BitBake 2.0 User Manual </bitbake/2.0/>` | 23 | - :yocto_docs:`BitBake 2.0 User Manual </bitbake/2.0/>` |
18 | 24 | ||
25 | ================================ | ||
26 | BitBake Outdated Release Manuals | ||
27 | ================================ | ||
28 | |||
19 | **************************** | 29 | **************************** |
20 | Release Series 3.1 (dunfell) | 30 | Release Series 5.1 (styhead) |
21 | **************************** | 31 | **************************** |
22 | 32 | ||
23 | - :yocto_docs:`BitBake 1.46 User Manual </bitbake/1.46/>` | 33 | - :yocto_docs:`BitBake 2.10 User Manual </bitbake/2.10/>` |
24 | 34 | ||
25 | ================================ | 35 | ******************************* |
26 | BitBake Outdated Release Manuals | 36 | Release Series 4.3 (nanbield) |
27 | ================================ | 37 | ******************************* |
38 | |||
39 | - :yocto_docs:`BitBake 2.6 User Manual </bitbake/2.6/>` | ||
40 | |||
41 | ******************************* | ||
42 | Release Series 4.2 (mickledore) | ||
43 | ******************************* | ||
44 | |||
45 | - :yocto_docs:`BitBake 2.4 User Manual </bitbake/2.4/>` | ||
28 | 46 | ||
29 | ***************************** | 47 | ***************************** |
30 | Release Series 4.1 (langdale) | 48 | Release Series 4.1 (langdale) |
@@ -50,10 +68,11 @@ Release Series 3.2 (gatesgarth) | |||
50 | 68 | ||
51 | - :yocto_docs:`BitBake 1.48 User Manual </bitbake/1.48/>` | 69 | - :yocto_docs:`BitBake 1.48 User Manual </bitbake/1.48/>` |
52 | 70 | ||
53 | ******************************************* | 71 | **************************** |
54 | Release Series 3.1 (dunfell first versions) | 72 | Release Series 3.1 (dunfell) |
55 | ******************************************* | 73 | **************************** |
56 | 74 | ||
75 | - :yocto_docs:`BitBake 1.46 User Manual </bitbake/1.46/>` | ||
57 | - :yocto_docs:`3.1 BitBake User Manual </3.1/bitbake-user-manual/bitbake-user-manual.html>` | 76 | - :yocto_docs:`3.1 BitBake User Manual </3.1/bitbake-user-manual/bitbake-user-manual.html>` |
58 | - :yocto_docs:`3.1.1 BitBake User Manual </3.1.1/bitbake-user-manual/bitbake-user-manual.html>` | 77 | - :yocto_docs:`3.1.1 BitBake User Manual </3.1.1/bitbake-user-manual/bitbake-user-manual.html>` |
59 | - :yocto_docs:`3.1.2 BitBake User Manual </3.1.2/bitbake-user-manual/bitbake-user-manual.html>` | 78 | - :yocto_docs:`3.1.2 BitBake User Manual </3.1.2/bitbake-user-manual/bitbake-user-manual.html>` |