diff options
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.rst | 457 |
1 files changed, 278 insertions, 179 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 61516a0115..b82661c697 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 | |||
@@ -55,9 +55,11 @@ overview of their function and contents. | |||
55 | - Limited support for the "``*``" wildcard character for matching | 55 | - Limited support for the "``*``" wildcard character for matching |
56 | against the beginning of host names exists. For example, the | 56 | against the beginning of host names exists. For example, the |
57 | following setting matches ``git.gnu.org``, ``ftp.gnu.org``, and | 57 | following setting matches ``git.gnu.org``, ``ftp.gnu.org``, and |
58 | ``foo.git.gnu.org``. BB_ALLOWED_NETWORKS = "\*.gnu.org" | 58 | ``foo.git.gnu.org``. :: |
59 | 59 | ||
60 | .. note:: | 60 | BB_ALLOWED_NETWORKS = "\*.gnu.org" |
61 | |||
62 | .. important:: | ||
61 | 63 | ||
62 | The use of the "``*``" character only works at the beginning of | 64 | The use of the "``*``" character only works at the beginning of |
63 | a host name and it must be isolated from the remainder of the | 65 | a host name and it must be isolated from the remainder of the |
@@ -111,26 +113,48 @@ overview of their function and contents. | |||
111 | you to control the build based on these parameters. | 113 | you to control the build based on these parameters. |
112 | 114 | ||
113 | Disk space monitoring is disabled by default. When setting this | 115 | Disk space monitoring is disabled by default. When setting this |
114 | variable, use the following form: BB_DISKMON_DIRS = | 116 | variable, use the following form: :: |
115 | "<action>,<dir>,<threshold> [...]" where: <action> is: ABORT: | 117 | |
116 | Immediately abort the build when a threshold is broken. STOPTASKS: | 118 | BB_DISKMON_DIRS = "<action>,<dir>,<threshold> [...]" |
117 | Stop the build after the currently executing tasks have finished when | 119 | |
118 | a threshold is broken. WARN: Issue a warning but continue the build | 120 | where: |
119 | when a threshold is broken. Subsequent warnings are issued as defined | 121 | |
120 | by the :term:`BB_DISKMON_WARNINTERVAL` | 122 | <action> is: |
121 | variable, which must be defined. <dir> is: Any directory you choose. | 123 | ABORT: Immediately abort the build when |
122 | You can specify one or more directories to monitor by separating the | 124 | a threshold is broken. |
123 | groupings with a space. If two directories are on the same device, | 125 | STOPTASKS: Stop the build after the currently |
124 | only the first directory is monitored. <threshold> is: Either the | 126 | executing tasks have finished when |
125 | minimum available disk space, the minimum number of free inodes, or | 127 | a threshold is broken. |
126 | both. You must specify at least one. To omit one or the other, simply | 128 | WARN: Issue a warning but continue the |
127 | omit the value. Specify the threshold using G, M, K for Gbytes, | 129 | build when a threshold is broken. |
128 | Mbytes, and Kbytes, respectively. If you do not specify G, M, or K, | 130 | Subsequent warnings are issued as |
129 | Kbytes is assumed by default. Do not use GB, MB, or KB. | 131 | defined by the |
130 | 132 | BB_DISKMON_WARNINTERVAL variable, | |
131 | Here are some examples: BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K | 133 | which must be defined. |
132 | WARN,${SSTATE_DIR},1G,100K" BB_DISKMON_DIRS = | 134 | |
133 | "STOPTASKS,${TMPDIR},1G" BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" | 135 | <dir> is: |
136 | Any directory you choose. You can specify one or | ||
137 | more directories to monitor by separating the | ||
138 | groupings with a space. If two directories are | ||
139 | on the same device, only the first directory | ||
140 | is monitored. | ||
141 | |||
142 | <threshold> is: | ||
143 | Either the minimum available disk space, | ||
144 | the minimum number of free inodes, or | ||
145 | both. You must specify at least one. To | ||
146 | omit one or the other, simply omit the value. | ||
147 | Specify the threshold using G, M, K for Gbytes, | ||
148 | Mbytes, and Kbytes, respectively. If you do | ||
149 | not specify G, M, or K, Kbytes is assumed by | ||
150 | default. Do not use GB, MB, or KB. | ||
151 | |||
152 | Here are some examples: :: | ||
153 | |||
154 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" | ||
155 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" | ||
156 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" | ||
157 | |||
134 | The first example works only if you also set the | 158 | The first example works only if you also set the |
135 | :term:`BB_DISKMON_WARNINTERVAL` | 159 | :term:`BB_DISKMON_WARNINTERVAL` |
136 | variable. This example causes the build system to immediately abort | 160 | variable. This example causes the build system to immediately abort |
@@ -166,16 +190,28 @@ overview of their function and contents. | |||
166 | BB_DISKMON_WARNINTERVAL = "50M,5K" | 190 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
167 | 191 | ||
168 | When specifying the variable in your configuration file, use the | 192 | When specifying the variable in your configuration file, use the |
169 | following form: BB_DISKMON_WARNINTERVAL = | 193 | following form: :: |
170 | "<disk_space_interval>,<disk_inode_interval>" where: | 194 | |
171 | <disk_space_interval> is: An interval of memory expressed in either | 195 | BB_DISKMON_WARNINTERVAL = "<disk_space_interval>,<disk_inode_interval>" |
172 | G, M, or K for Gbytes, Mbytes, or Kbytes, respectively. You cannot | 196 | |
173 | use GB, MB, or KB. <disk_inode_interval> is: An interval of free | 197 | where: |
174 | inodes expressed in either G, M, or K for Gbytes, Mbytes, or Kbytes, | 198 | |
175 | respectively. You cannot use GB, MB, or KB. | 199 | <disk_space_interval> is: |
176 | 200 | An interval of memory expressed in either | |
177 | Here is an example: BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" | 201 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
178 | BB_DISKMON_WARNINTERVAL = "50M,5K" These variables cause BitBake to | 202 | respectively. You cannot use GB, MB, or KB. |
203 | |||
204 | <disk_inode_interval> is: | ||
205 | An interval of free inodes expressed in either | ||
206 | G, M, or K for Gbytes, Mbytes, or Kbytes, | ||
207 | respectively. You cannot use GB, MB, or KB. | ||
208 | |||
209 | Here is an example: :: | ||
210 | |||
211 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" | ||
212 | BB_DISKMON_WARNINTERVAL = "50M,5K" | ||
213 | |||
214 | These variables cause BitBake to | ||
179 | issue subsequent warnings each time the available disk space further | 215 | issue subsequent warnings each time the available disk space further |
180 | reduces by 50 Mbytes or the number of free inodes further reduces by | 216 | reduces by 50 Mbytes or the number of free inodes further reduces by |
181 | 5 Kbytes in the ``${SSTATE_DIR}`` directory. Subsequent warnings | 217 | 5 Kbytes in the ``${SSTATE_DIR}`` directory. Subsequent warnings |
@@ -186,10 +222,8 @@ overview of their function and contents. | |||
186 | Specifies the internal whitelist of variables to allow through from | 222 | Specifies the internal whitelist of variables to allow through from |
187 | the external environment into BitBake's datastore. If the value of | 223 | the external environment into BitBake's datastore. If the value of |
188 | this variable is not specified (which is the default), the following | 224 | this variable is not specified (which is the default), the following |
189 | list is used: :term:`BBPATH`, | 225 | list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`, |
190 | :term:`BB_PRESERVE_ENV`, | 226 | :term:`BB_ENV_WHITELIST`, and :term:`BB_ENV_EXTRAWHITE`. |
191 | :term:`BB_ENV_WHITELIST`, and | ||
192 | :term:`BB_ENV_EXTRAWHITE`. | ||
193 | 227 | ||
194 | .. note:: | 228 | .. note:: |
195 | 229 | ||
@@ -264,8 +298,9 @@ overview of their function and contents. | |||
264 | wishing to create a source mirror would want to enable this variable. | 298 | wishing to create a source mirror would want to enable this variable. |
265 | 299 | ||
266 | For performance reasons, creating and placing tarballs of the Git | 300 | For performance reasons, creating and placing tarballs of the Git |
267 | repositories is not the default action by BitBake. | 301 | repositories is not the default action by BitBake. :: |
268 | BB_GENERATE_MIRROR_TARBALLS = "1" | 302 | |
303 | BB_GENERATE_MIRROR_TARBALLS = "1" | ||
269 | 304 | ||
270 | BB_HASHCONFIG_WHITELIST | 305 | BB_HASHCONFIG_WHITELIST |
271 | Lists variables that are excluded from base configuration checksum, | 306 | Lists variables that are excluded from base configuration checksum, |
@@ -308,21 +343,25 @@ overview of their function and contents. | |||
308 | 343 | ||
309 | BB_LOGCONFIG | 344 | BB_LOGCONFIG |
310 | Specifies the name of a config file that contains the user logging | 345 | Specifies the name of a config file that contains the user logging |
311 | configuration. See `Logging <#logging>`__ for additional information | 346 | configuration. See |
347 | :ref:`bitbake-user-manual/bitbake-user-manual-execution:logging` | ||
348 | for additional information | ||
312 | 349 | ||
313 | BB_LOGFMT | 350 | BB_LOGFMT |
314 | Specifies the name of the log files saved into | 351 | Specifies the name of the log files saved into |
315 | ``${``\ :term:`T`\ ``}``. By default, the ``BB_LOGFMT`` | 352 | ``${``\ :term:`T`\ ``}``. By default, the ``BB_LOGFMT`` |
316 | variable is undefined and the log file names get created using the | 353 | variable is undefined and the log file names get created using the |
317 | following form: log.{task}.{pid} If you want to force log files to | 354 | following form: :: |
318 | take a specific name, you can set this variable in a configuration | 355 | |
319 | file. | 356 | log.{task}.{pid} |
357 | |||
358 | If you want to force log files to take a specific name, you can set this | ||
359 | variable in a configuration file. | ||
320 | 360 | ||
321 | BB_NICE_LEVEL | 361 | BB_NICE_LEVEL |
322 | Allows BitBake to run at a specific priority (i.e. nice level). | 362 | Allows BitBake to run at a specific priority (i.e. nice level). |
323 | System permissions usually mean that BitBake can reduce its priority | 363 | System permissions usually mean that BitBake can reduce its priority |
324 | but not raise it again. See | 364 | but not raise it again. See :term:`BB_TASK_NICE_LEVEL` for |
325 | :term:`BB_TASK_NICE_LEVEL` for | ||
326 | additional information. | 365 | additional information. |
327 | 366 | ||
328 | BB_NO_NETWORK | 367 | BB_NO_NETWORK |
@@ -366,9 +405,12 @@ overview of their function and contents. | |||
366 | Specifies the name of the executable script files (i.e. run files) | 405 | Specifies the name of the executable script files (i.e. run files) |
367 | saved into ``${``\ :term:`T`\ ``}``. By default, the | 406 | saved into ``${``\ :term:`T`\ ``}``. By default, the |
368 | ``BB_RUNFMT`` variable is undefined and the run file names get | 407 | ``BB_RUNFMT`` variable is undefined and the run file names get |
369 | created using the following form: run.{task}.{pid} If you want to | 408 | created using the following form: :: |
370 | force run files to take a specific name, you can set this variable in | 409 | |
371 | a configuration file. | 410 | run.{task}.{pid} |
411 | |||
412 | If you want to force run files to take a specific name, you can set this | ||
413 | variable in a configuration file. | ||
372 | 414 | ||
373 | BB_RUNTASK | 415 | BB_RUNTASK |
374 | Contains the name of the currently executing task. The value includes | 416 | Contains the name of the currently executing task. The value includes |
@@ -423,8 +465,9 @@ overview of their function and contents. | |||
423 | generating checksum or dependency data for keys in the datastore, the | 465 | generating checksum or dependency data for keys in the datastore, the |
424 | flags set against that key are normally included in the checksum. | 466 | flags set against that key are normally included in the checksum. |
425 | 467 | ||
426 | For more information on varflags, see the "`Variable | 468 | For more information on varflags, see the |
427 | Flags <#variable-flags>`__" section. | 469 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variable flags`" |
470 | section. | ||
428 | 471 | ||
429 | BB_SIGNATURE_HANDLER | 472 | BB_SIGNATURE_HANDLER |
430 | Defines the name of the signature handler BitBake uses. The signature | 473 | Defines the name of the signature handler BitBake uses. The signature |
@@ -487,32 +530,30 @@ overview of their function and contents. | |||
487 | 530 | ||
488 | .. note:: | 531 | .. note:: |
489 | 532 | ||
490 | This variable works similarly to the | 533 | This variable works similarly to the :term:`BB_TASK_NICE_LEVEL` |
491 | :term:`BB_TASK_NICE_LEVEL` | ||
492 | variable except with a task's I/O priorities. | 534 | variable except with a task's I/O priorities. |
493 | 535 | ||
494 | Set the variable as follows: BB_TASK_IONICE_LEVEL = "class.prio" For | 536 | Set the variable as follows: :: |
495 | class, the default value is "2", which is a best effort. You can use | 537 | |
538 | BB_TASK_IONICE_LEVEL = "class.prio" | ||
539 | |||
540 | For *class*, the default value is "2", which is a best effort. You can use | ||
496 | "1" for realtime and "3" for idle. If you want to use realtime, you | 541 | "1" for realtime and "3" for idle. If you want to use realtime, you |
497 | must have superuser privileges. | 542 | must have superuser privileges. |
498 | 543 | ||
499 | For prio, you can use any value from "0", which is the highest | 544 | For *prio*, you can use any value from "0", which is the highest |
500 | priority, to "7", which is the lowest. The default value is "4". You | 545 | priority, to "7", which is the lowest. The default value is "4". You |
501 | do not need any special privileges to use this range of priority | 546 | do not need any special privileges to use this range of priority |
502 | values. | 547 | values. |
503 | 548 | ||
504 | .. note:: | 549 | .. note:: |
505 | 550 | ||
506 | In order for your I/O priority settings to take effect, you need | 551 | In order for your I/O priority settings to take effect, you need the |
507 | the Completely Fair Queuing (CFQ) Scheduler selected for the | 552 | Completely Fair Queuing (CFQ) Scheduler selected for the backing block |
508 | backing block device. To select the scheduler, use the following | 553 | device. To select the scheduler, use the following command form where |
509 | command form where | 554 | device is the device (e.g. sda, sdb, and so forth): :: |
510 | device | ||
511 | is the device (e.g. sda, sdb, and so forth): | ||
512 | :: | ||
513 | |||
514 | $ sudo sh -c “echo cfq > /sys/block/device/queu/scheduler | ||
515 | 555 | ||
556 | $ sudo sh -c “echo cfq > /sys/block/device/queu/scheduler | ||
516 | 557 | ||
517 | BB_TASK_NICE_LEVEL | 558 | BB_TASK_NICE_LEVEL |
518 | Allows specific tasks to change their priority (i.e. nice level). | 559 | Allows specific tasks to change their priority (i.e. nice level). |
@@ -551,8 +592,10 @@ overview of their function and contents. | |||
551 | To build a different variant of the recipe with a minimal amount of | 592 | To build a different variant of the recipe with a minimal amount of |
552 | code, it usually is as simple as adding the variable to your recipe. | 593 | code, it usually is as simple as adding the variable to your recipe. |
553 | Here are two examples. The "native" variants are from the | 594 | Here are two examples. The "native" variants are from the |
554 | OpenEmbedded-Core metadata: BBCLASSEXTEND =+ "native nativesdk" | 595 | OpenEmbedded-Core metadata: :: |
555 | BBCLASSEXTEND =+ "multilib:multilib_name" | 596 | |
597 | BBCLASSEXTEND =+ "native nativesdk" | ||
598 | BBCLASSEXTEND =+ "multilib:multilib_name" | ||
556 | 599 | ||
557 | .. note:: | 600 | .. note:: |
558 | 601 | ||
@@ -612,9 +655,8 @@ overview of their function and contents. | |||
612 | 655 | ||
613 | .. tip:: | 656 | .. tip:: |
614 | 657 | ||
615 | You can use the command | 658 | You can use the command bitbake-layers show-layers to list all |
616 | bitbake-layers show-layers | 659 | configured layers along with their priorities. |
617 | to list all configured layers along with their priorities. | ||
618 | 660 | ||
619 | BBFILES | 661 | BBFILES |
620 | A space-separated list of recipe files BitBake uses to build | 662 | A space-separated list of recipe files BitBake uses to build |
@@ -642,11 +684,17 @@ overview of their function and contents. | |||
642 | BBLAYERS | 684 | BBLAYERS |
643 | Lists the layers to enable during the build. This variable is defined | 685 | Lists the layers to enable during the build. This variable is defined |
644 | in the ``bblayers.conf`` configuration file in the build directory. | 686 | in the ``bblayers.conf`` configuration file in the build directory. |
645 | Here is an example: BBLAYERS = " \\ /home/scottrif/poky/meta \\ | 687 | Here is an example: :: |
646 | /home/scottrif/poky/meta-yocto \\ /home/scottrif/poky/meta-yocto-bsp | 688 | |
647 | \\ /home/scottrif/poky/meta-mykernel \\ " This example enables four | 689 | BBLAYERS = " \ |
648 | layers, one of which is a custom, user-defined layer named | 690 | /home/scottrif/poky/meta \ |
649 | ``meta-mykernel``. | 691 | /home/scottrif/poky/meta-yocto \ |
692 | /home/scottrif/poky/meta-yocto-bsp \ | ||
693 | /home/scottrif/poky/meta-mykernel \ | ||
694 | " | ||
695 | |||
696 | This example enables four layers, one of which is a custom, user-defined | ||
697 | layer named ``meta-mykernel``. | ||
650 | 698 | ||
651 | BBLAYERS_FETCH_DIR | 699 | BBLAYERS_FETCH_DIR |
652 | Sets the base location where layers are stored. This setting is used | 700 | Sets the base location where layers are stored. This setting is used |
@@ -670,13 +718,19 @@ overview of their function and contents. | |||
670 | 718 | ||
671 | The following example uses a complete regular expression to tell | 719 | The following example uses a complete regular expression to tell |
672 | BitBake to ignore all recipe and recipe append files in the | 720 | BitBake to ignore all recipe and recipe append files in the |
673 | ``meta-ti/recipes-misc/`` directory: BBMASK = "meta-ti/recipes-misc/" | 721 | ``meta-ti/recipes-misc/`` directory: :: |
722 | |||
723 | BBMASK = "meta-ti/recipes-misc/" | ||
724 | |||
674 | If you want to mask out multiple directories or recipes, you can | 725 | If you want to mask out multiple directories or recipes, you can |
675 | specify multiple regular expression fragments. This next example | 726 | specify multiple regular expression fragments. This next example |
676 | masks out multiple directories and individual recipes: BBMASK += | 727 | masks out multiple directories and individual recipes: :: |
677 | "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" BBMASK += | 728 | |
678 | "/meta-oe/recipes-support/" BBMASK += "/meta-foo/.*/openldap" BBMASK | 729 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
679 | += "opencv.*\.bbappend" BBMASK += "lzma" | 730 | BBMASK += "/meta-oe/recipes-support/" |
731 | BBMASK += "/meta-foo/.*/openldap" | ||
732 | BBMASK += "opencv.*\.bbappend" | ||
733 | BBMASK += "lzma" | ||
680 | 734 | ||
681 | .. note:: | 735 | .. note:: |
682 | 736 | ||
@@ -691,15 +745,18 @@ overview of their function and contents. | |||
691 | ``conf/local.conf`` configuration file. | 745 | ``conf/local.conf`` configuration file. |
692 | 746 | ||
693 | As an example, the following line specifies three multiconfigs, each | 747 | As an example, the following line specifies three multiconfigs, each |
694 | having a separate configuration file: BBMULTIFONFIG = "configA | 748 | having a separate configuration file: :: |
695 | configB configC" Each configuration file you use must reside in the | 749 | |
750 | BBMULTIFONFIG = "configA configB configC" | ||
751 | |||
752 | Each configuration file you use must reside in the | ||
696 | build directory within a directory named ``conf/multiconfig`` (e.g. | 753 | build directory within a directory named ``conf/multiconfig`` (e.g. |
697 | build_directory\ ``/conf/multiconfig/configA.conf``). | 754 | build_directory\ ``/conf/multiconfig/configA.conf``). |
698 | 755 | ||
699 | For information on how to use ``BBMULTICONFIG`` in an environment | 756 | For information on how to use ``BBMULTICONFIG`` in an environment |
700 | that supports building targets with multiple configurations, see the | 757 | that supports building targets with multiple configurations, see the |
701 | "`Executing a Multiple Configuration | 758 | ":ref:`bitbake-user-manual/bitbake-user-manual-intro:executing a multiple configuration build`" |
702 | Build <#executing-a-multiple-configuration-build>`__" section. | 759 | section. |
703 | 760 | ||
704 | BBPATH | 761 | BBPATH |
705 | Used by BitBake to locate class (``.bbclass``) and configuration | 762 | Used by BitBake to locate class (``.bbclass``) and configuration |
@@ -709,7 +766,11 @@ overview of their function and contents. | |||
709 | If you run BitBake from a directory outside of the build directory, | 766 | If you run BitBake from a directory outside of the build directory, |
710 | you must be sure to set ``BBPATH`` to point to the build directory. | 767 | you must be sure to set ``BBPATH`` to point to the build directory. |
711 | Set the variable as you would any environment variable and then run | 768 | Set the variable as you would any environment variable and then run |
712 | BitBake: $ BBPATH="build_directory" $ export BBPATH $ bitbake target | 769 | BitBake: :: |
770 | |||
771 | $ BBPATH="build_directory" | ||
772 | $ export BBPATH | ||
773 | $ bitbake target | ||
713 | 774 | ||
714 | BBSERVER | 775 | BBSERVER |
715 | Points to the server that runs memory-resident BitBake. The variable | 776 | Points to the server that runs memory-resident BitBake. The variable |
@@ -725,8 +786,8 @@ overview of their function and contents. | |||
725 | using the :term:`OVERRIDES` mechanism for a | 786 | using the :term:`OVERRIDES` mechanism for a |
726 | single version or for an optionally named range of versions. | 787 | single version or for an optionally named range of versions. |
727 | 788 | ||
728 | For more information on ``BBVERSIONS``, see the "`Variants - Class | 789 | For more information on ``BBVERSIONS``, see the |
729 | Extension Mechanism <#variants-class-extension-mechanism>`__" | 790 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variants - class extension mechanism`" |
730 | section. | 791 | section. |
731 | 792 | ||
732 | BITBAKE_UI | 793 | BITBAKE_UI |
@@ -765,37 +826,35 @@ overview of their function and contents. | |||
765 | 826 | ||
766 | .. note:: | 827 | .. note:: |
767 | 828 | ||
768 | The bias provided by | 829 | The bias provided by DEFAULT_PREFERENCE is weak and is overridden by |
769 | DEFAULT_PREFERENCE | 830 | :term:`BBFILE_PRIORITY` if that variable is different between two |
770 | is weak and is overridden by | 831 | layers that contain different versions of the same recipe. |
771 | :term:`BBFILE_PRIORITY` | ||
772 | if that variable is different between two layers that contain | ||
773 | different versions of the same recipe. | ||
774 | 832 | ||
775 | DEPENDS | 833 | DEPENDS |
776 | Lists a recipe's build-time dependencies (i.e. other recipe files). | 834 | Lists a recipe's build-time dependencies (i.e. other recipe files). |
777 | 835 | ||
778 | Consider this simple example for two recipes named "a" and "b" that | 836 | Consider this simple example for two recipes named "a" and "b" that |
779 | produce similarly named packages. In this example, the ``DEPENDS`` | 837 | produce similarly named packages. In this example, the ``DEPENDS`` |
780 | statement appears in the "a" recipe: DEPENDS = "b" Here, the | 838 | statement appears in the "a" recipe: :: |
781 | dependency is such that the ``do_configure`` task for recipe "a" | 839 | |
840 | DEPENDS = "b" | ||
841 | |||
842 | Here, the dependency is such that the ``do_configure`` task for recipe "a" | ||
782 | depends on the ``do_populate_sysroot`` task of recipe "b". This means | 843 | depends on the ``do_populate_sysroot`` task of recipe "b". This means |
783 | anything that recipe "b" puts into sysroot is available when recipe | 844 | anything that recipe "b" puts into sysroot is available when recipe "a" is |
784 | "a" is configuring itself. | 845 | configuring itself. |
785 | 846 | ||
786 | For information on runtime dependencies, see the | 847 | For information on runtime dependencies, see the :term:`RDEPENDS` |
787 | :term:`RDEPENDS` variable. | 848 | variable. |
788 | 849 | ||
789 | DESCRIPTION | 850 | DESCRIPTION |
790 | A long description for the recipe. | 851 | A long description for the recipe. |
791 | 852 | ||
792 | DL_DIR | 853 | DL_DIR |
793 | The central download directory used by the build process to store | 854 | The central download directory used by the build process to store |
794 | downloads. By default, ``DL_DIR`` gets files suitable for mirroring | 855 | downloads. By default, ``DL_DIR`` gets files suitable for mirroring for |
795 | for everything except Git repositories. If you want tarballs of Git | 856 | everything except Git repositories. If you want tarballs of Git |
796 | repositories, use the | 857 | repositories, use the :term:`BB_GENERATE_MIRROR_TARBALLS` variable. |
797 | :term:`BB_GENERATE_MIRROR_TARBALLS` | ||
798 | variable. | ||
799 | 858 | ||
800 | EXCLUDE_FROM_WORLD | 859 | EXCLUDE_FROM_WORLD |
801 | Directs BitBake to exclude a recipe from world builds (i.e. | 860 | Directs BitBake to exclude a recipe from world builds (i.e. |
@@ -808,13 +867,10 @@ overview of their function and contents. | |||
808 | 867 | ||
809 | .. note:: | 868 | .. note:: |
810 | 869 | ||
811 | Recipes added to | 870 | Recipes added to ``EXCLUDE_FROM_WORLD`` may still be built during a world |
812 | EXCLUDE_FROM_WORLD | 871 | build in order to satisfy dependencies of other recipes. Adding a |
813 | may still be built during a world build in order to satisfy | 872 | recipe to ``EXCLUDE_FROM_WORLD`` only ensures that the recipe is not |
814 | dependencies of other recipes. Adding a recipe to | 873 | explicitly added to the list of build targets in a world build. |
815 | EXCLUDE_FROM_WORLD | ||
816 | only ensures that the recipe is not explicitly added to the list | ||
817 | of build targets in a world build. | ||
818 | 874 | ||
819 | FAKEROOT | 875 | FAKEROOT |
820 | Contains the command to use when running a shell script in a fakeroot | 876 | Contains the command to use when running a shell script in a fakeroot |
@@ -883,8 +939,8 @@ overview of their function and contents. | |||
883 | configuration and in each individual recipe. The OpenEmbedded build | 939 | configuration and in each individual recipe. The OpenEmbedded build |
884 | system ignores changes to ``INHERIT`` in individual recipes. | 940 | system ignores changes to ``INHERIT`` in individual recipes. |
885 | 941 | ||
886 | For more information on ``INHERIT``, see the "```INHERIT`` | 942 | For more information on ``INHERIT``, see the |
887 | Configuration Directive <#inherit-configuration-directive>`__" | 943 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
888 | section. | 944 | section. |
889 | 945 | ||
890 | LAYERDEPENDS | 946 | LAYERDEPENDS |
@@ -953,8 +1009,9 @@ overview of their function and contents. | |||
953 | 1009 | ||
954 | Following is a simple example that uses an overrides list based on | 1010 | Following is a simple example that uses an overrides list based on |
955 | machine architectures: OVERRIDES = "arm:x86:mips:powerpc" You can | 1011 | machine architectures: OVERRIDES = "arm:x86:mips:powerpc" You can |
956 | find information on how to use ``OVERRIDES`` in the "`Conditional | 1012 | find information on how to use ``OVERRIDES`` in the |
957 | Syntax (Overrides) <#conditional-syntax-overrides>`__" section. | 1013 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax |
1014 | (overrides)`" section. | ||
958 | 1015 | ||
959 | P4DIR | 1016 | P4DIR |
960 | The directory in which a local copy of a Perforce depot is stored | 1017 | The directory in which a local copy of a Perforce depot is stored |
@@ -1000,20 +1057,26 @@ overview of their function and contents. | |||
1000 | recipes provide the same item. You should always suffix the variable | 1057 | recipes provide the same item. You should always suffix the variable |
1001 | with the name of the provided item, and you should set it to the | 1058 | with the name of the provided item, and you should set it to the |
1002 | :term:`PN` of the recipe to which you want to give | 1059 | :term:`PN` of the recipe to which you want to give |
1003 | precedence. Some examples: PREFERRED_PROVIDER_virtual/kernel ?= | 1060 | precedence. Some examples: :: |
1004 | "linux-yocto" PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" | 1061 | |
1005 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | 1062 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
1063 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" | ||
1064 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | ||
1006 | 1065 | ||
1007 | PREFERRED_PROVIDERS | 1066 | PREFERRED_PROVIDERS |
1008 | Determines which recipe should be given preference for cases where | 1067 | Determines which recipe should be given preference for cases where |
1009 | multiple recipes provide the same item. Functionally, | 1068 | multiple recipes provide the same item. Functionally, |
1010 | ``PREFERRED_PROVIDERS`` is identical to | 1069 | ``PREFERRED_PROVIDERS`` is identical to |
1011 | :term:`PREFERRED_PROVIDER`. However, the | 1070 | :term:`PREFERRED_PROVIDER`. However, the ``PREFERRED_PROVIDERS`` variable |
1012 | ``PREFERRED_PROVIDERS`` variable lets you define preferences for | 1071 | lets you define preferences for multiple situations using the following |
1013 | multiple situations using the following form: PREFERRED_PROVIDERS = | 1072 | form: :: |
1014 | "xxx:yyy aaa:bbb ..." This form is a convenient replacement for the | 1073 | |
1015 | following: PREFERRED_PROVIDER_xxx = "yyy" PREFERRED_PROVIDER_aaa = | 1074 | PREFERRED_PROVIDERS = "xxx:yyy aaa:bbb ..." |
1016 | "bbb" | 1075 | |
1076 | This form is a convenient replacement for the following: :: | ||
1077 | |||
1078 | PREFERRED_PROVIDER_xxx = "yyy" | ||
1079 | PREFERRED_PROVIDER_aaa = "bbb" | ||
1017 | 1080 | ||
1018 | PREFERRED_VERSION | 1081 | PREFERRED_VERSION |
1019 | If there are multiple versions of recipes available, this variable | 1082 | If there are multiple versions of recipes available, this variable |
@@ -1026,15 +1089,15 @@ overview of their function and contents. | |||
1026 | through the "``%``" character. You can use the character to match any | 1089 | through the "``%``" character. You can use the character to match any |
1027 | number of characters, which can be useful when specifying versions | 1090 | number of characters, which can be useful when specifying versions |
1028 | that contain long revision numbers that potentially change. Here are | 1091 | that contain long revision numbers that potentially change. Here are |
1029 | two examples: PREFERRED_VERSION_python = "2.7.3" | 1092 | two examples: :: |
1030 | PREFERRED_VERSION_linux-yocto = "4.12%" | ||
1031 | 1093 | ||
1032 | .. note:: | 1094 | PREFERRED_VERSION_python = "2.7.3" |
1095 | PREFERRED_VERSION_linux-yocto = "4.12%" | ||
1033 | 1096 | ||
1034 | The use of the " | 1097 | .. important:: |
1035 | % | 1098 | |
1036 | " character is limited in that it only works at the end of the | 1099 | The use of the " % " character is limited in that it only works at the |
1037 | string. You cannot use the wildcard character in any other | 1100 | end of the string. You cannot use the wildcard character in any other |
1038 | location of the string. | 1101 | location of the string. |
1039 | 1102 | ||
1040 | PREMIRRORS | 1103 | PREMIRRORS |
@@ -1042,19 +1105,21 @@ overview of their function and contents. | |||
1042 | the build system searches for source code, it first tries the local | 1105 | the build system searches for source code, it first tries the local |
1043 | download directory. If that location fails, the build system tries | 1106 | download directory. If that location fails, the build system tries |
1044 | locations defined by ``PREMIRRORS``, the upstream source, and then | 1107 | locations defined by ``PREMIRRORS``, the upstream source, and then |
1045 | locations specified by :term:`MIRRORS` in that | 1108 | locations specified by :term:`MIRRORS` in that order. |
1046 | order. | ||
1047 | 1109 | ||
1048 | Typically, you would add a specific server for the build system to | 1110 | Typically, you would add a specific server for the build system to |
1049 | attempt before any others by adding something like the following to | 1111 | attempt before any others by adding something like the following to |
1050 | your configuration: PREMIRRORS_prepend = "\\ git://.*/.\* | 1112 | your configuration: :: |
1051 | http://www.yoctoproject.org/sources/ \\n \\ ftp://.*/.\* | 1113 | |
1052 | http://www.yoctoproject.org/sources/ \\n \\ http://.*/.\* | 1114 | PREMIRRORS_prepend = "\ |
1053 | http://www.yoctoproject.org/sources/ \\n \\ https://.*/.\* | 1115 | git://.*/.* http://www.yoctoproject.org/sources/ \n \ |
1054 | http://www.yoctoproject.org/sources/ \\n" These changes cause the | 1116 | ftp://.*/.* http://www.yoctoproject.org/sources/ \n \ |
1055 | build system to intercept Git, FTP, HTTP, and HTTPS requests and | 1117 | http://.*/.* http://www.yoctoproject.org/sources/ \n \ |
1056 | direct them to the ``http://`` sources mirror. You can use | 1118 | https://.*/.* http://www.yoctoproject.org/sources/ \n" |
1057 | ``file://`` URLs to point to local directories or network shares as | 1119 | |
1120 | These changes cause the build system to intercept Git, FTP, HTTP, and | ||
1121 | HTTPS requests and direct them to the ``http://`` sources mirror. You can | ||
1122 | use ``file://`` URLs to point to local directories or network shares as | ||
1058 | well. | 1123 | well. |
1059 | 1124 | ||
1060 | PROVIDES | 1125 | PROVIDES |
@@ -1066,9 +1131,12 @@ overview of their function and contents. | |||
1066 | ``DEPENDS``. | 1131 | ``DEPENDS``. |
1067 | 1132 | ||
1068 | Consider the following example ``PROVIDES`` statement from a recipe | 1133 | Consider the following example ``PROVIDES`` statement from a recipe |
1069 | file ``libav_0.8.11.bb``: PROVIDES += "libpostproc" The ``PROVIDES`` | 1134 | file ``libav_0.8.11.bb``: :: |
1070 | statement results in the "libav" recipe also being known as | 1135 | |
1071 | "libpostproc". | 1136 | PROVIDES += "libpostproc" |
1137 | |||
1138 | The ``PROVIDES`` statement results in the "libav" recipe also being known | ||
1139 | as "libpostproc". | ||
1072 | 1140 | ||
1073 | In addition to providing recipes under alternate names, the | 1141 | In addition to providing recipes under alternate names, the |
1074 | ``PROVIDES`` mechanism is also used to implement virtual targets. A | 1142 | ``PROVIDES`` mechanism is also used to implement virtual targets. A |
@@ -1086,10 +1154,13 @@ overview of their function and contents. | |||
1086 | PRSERV_HOST | 1154 | PRSERV_HOST |
1087 | The network based :term:`PR` service host and port. | 1155 | The network based :term:`PR` service host and port. |
1088 | 1156 | ||
1089 | Following is an example of how the ``PRSERV_HOST`` variable is set: | 1157 | Following is an example of how the ``PRSERV_HOST`` variable is set: :: |
1090 | PRSERV_HOST = "localhost:0" You must set the variable if you want to | 1158 | |
1091 | automatically start a local PR service. You can set ``PRSERV_HOST`` | 1159 | PRSERV_HOST = "localhost:0" |
1092 | to other values to use a remote PR service. | 1160 | |
1161 | You must set the variable if you want to automatically start a local PR | ||
1162 | service. You can set ``PRSERV_HOST`` to other values to use a remote PR | ||
1163 | service. | ||
1093 | 1164 | ||
1094 | PV | 1165 | PV |
1095 | The version of the recipe. | 1166 | The version of the recipe. |
@@ -1104,21 +1175,36 @@ overview of their function and contents. | |||
1104 | you should always use the variable in a form with an attached package | 1175 | you should always use the variable in a form with an attached package |
1105 | name. For example, suppose you are building a development package | 1176 | name. For example, suppose you are building a development package |
1106 | that depends on the ``perl`` package. In this case, you would use the | 1177 | that depends on the ``perl`` package. In this case, you would use the |
1107 | following ``RDEPENDS`` statement: RDEPENDS_${PN}-dev += "perl" In the | 1178 | following ``RDEPENDS`` statement: :: |
1108 | example, the development package depends on the ``perl`` package. | 1179 | |
1109 | Thus, the ``RDEPENDS`` variable has the ``${PN}-dev`` package name as | 1180 | RDEPENDS_${PN}-dev += "perl" |
1110 | part of the variable. | 1181 | |
1182 | In the example, the development package depends on the ``perl`` package. | ||
1183 | Thus, the ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part | ||
1184 | of the variable. | ||
1111 | 1185 | ||
1112 | BitBake supports specifying versioned dependencies. Although the | 1186 | BitBake supports specifying versioned dependencies. Although the |
1113 | syntax varies depending on the packaging format, BitBake hides these | 1187 | syntax varies depending on the packaging format, BitBake hides these |
1114 | differences from you. Here is the general syntax to specify versions | 1188 | differences from you. Here is the general syntax to specify versions |
1115 | with the ``RDEPENDS`` variable: RDEPENDS_${PN} = "package (operator | 1189 | with the ``RDEPENDS`` variable: :: |
1116 | version)" For ``operator``, you can specify the following: = < > <= | 1190 | |
1117 | >= For example, the following sets up a dependency on version 1.2 or | 1191 | RDEPENDS_${PN} = "package (operator version)" |
1118 | greater of the package ``foo``: RDEPENDS_${PN} = "foo (>= 1.2)" | ||
1119 | 1192 | ||
1120 | For information on build-time dependencies, see the | 1193 | For ``operator``, you can specify the following: :: |
1121 | :term:`DEPENDS` variable. | 1194 | |
1195 | = | ||
1196 | < | ||
1197 | > | ||
1198 | <= | ||
1199 | >= | ||
1200 | |||
1201 | For example, the following sets up a dependency on version 1.2 or | ||
1202 | greater of the package ``foo``: :: | ||
1203 | |||
1204 | RDEPENDS_${PN} = "foo (>= 1.2)" | ||
1205 | |||
1206 | For information on build-time dependencies, see the :term:`DEPENDS` | ||
1207 | variable. | ||
1122 | 1208 | ||
1123 | REPODIR | 1209 | REPODIR |
1124 | The directory in which a local copy of a ``google-repo`` directory is | 1210 | The directory in which a local copy of a ``google-repo`` directory is |
@@ -1132,7 +1218,9 @@ overview of their function and contents. | |||
1132 | 1218 | ||
1133 | As with all package-controlling variables, you must always use the | 1219 | As with all package-controlling variables, you must always use the |
1134 | variable in conjunction with a package name override. Here is an | 1220 | variable in conjunction with a package name override. Here is an |
1135 | example: RPROVIDES_${PN} = "widget-abi-2" | 1221 | example: :: |
1222 | |||
1223 | RPROVIDES_${PN} = "widget-abi-2" | ||
1136 | 1224 | ||
1137 | RRECOMMENDS | 1225 | RRECOMMENDS |
1138 | A list of packages that extends the usability of a package being | 1226 | A list of packages that extends the usability of a package being |
@@ -1144,11 +1232,22 @@ overview of their function and contents. | |||
1144 | BitBake supports specifying versioned recommends. Although the syntax | 1232 | BitBake supports specifying versioned recommends. Although the syntax |
1145 | varies depending on the packaging format, BitBake hides these | 1233 | varies depending on the packaging format, BitBake hides these |
1146 | differences from you. Here is the general syntax to specify versions | 1234 | differences from you. Here is the general syntax to specify versions |
1147 | with the ``RRECOMMENDS`` variable: RRECOMMENDS_${PN} = "package | 1235 | with the ``RRECOMMENDS`` variable: :: |
1148 | (operator version)" For ``operator``, you can specify the following: | 1236 | |
1149 | = < > <= >= For example, the following sets up a recommend on version | 1237 | RRECOMMENDS_${PN} = "package (operator version)" |
1150 | 1.2 or greater of the package ``foo``: RRECOMMENDS_${PN} = "foo (>= | 1238 | |
1151 | 1.2)" | 1239 | For ``operator``, you can specify the following: :: |
1240 | |||
1241 | = | ||
1242 | < | ||
1243 | > | ||
1244 | <= | ||
1245 | >= | ||
1246 | |||
1247 | For example, the following sets up a recommend on version | ||
1248 | 1.2 or greater of the package ``foo``: :: | ||
1249 | |||
1250 | RRECOMMENDS_${PN} = "foo (>= 1.2)" | ||
1152 | 1251 | ||
1153 | SECTION | 1252 | SECTION |
1154 | The section in which packages should be categorized. | 1253 | The section in which packages should be categorized. |
@@ -1165,56 +1264,56 @@ overview of their function and contents. | |||
1165 | 1264 | ||
1166 | The following list explains the available URI protocols: | 1265 | The following list explains the available URI protocols: |
1167 | 1266 | ||
1168 | - *``file://`` -* Fetches files, which are usually files shipped | 1267 | - ``file://`` : Fetches files, which are usually files shipped |
1169 | with the metadata, from the local machine. The path is relative to | 1268 | with the metadata, from the local machine. The path is relative to |
1170 | the :term:`FILESPATH` variable. | 1269 | the :term:`FILESPATH` variable. |
1171 | 1270 | ||
1172 | - *``bzr://`` -* Fetches files from a Bazaar revision control | 1271 | - ``bzr://`` : Fetches files from a Bazaar revision control |
1173 | repository. | 1272 | repository. |
1174 | 1273 | ||
1175 | - *``git://`` -* Fetches files from a Git revision control | 1274 | - ``git://`` : Fetches files from a Git revision control |
1176 | repository. | 1275 | repository. |
1177 | 1276 | ||
1178 | - *``osc://`` -* Fetches files from an OSC (OpenSUSE Build service) | 1277 | - ``osc://`` : Fetches files from an OSC (OpenSUSE Build service) |
1179 | revision control repository. | 1278 | revision control repository. |
1180 | 1279 | ||
1181 | - *``repo://`` -* Fetches files from a repo (Git) repository. | 1280 | - ``repo://`` : Fetches files from a repo (Git) repository. |
1182 | 1281 | ||
1183 | - *``http://`` -* Fetches files from the Internet using HTTP. | 1282 | - ``http://`` : Fetches files from the Internet using HTTP. |
1184 | 1283 | ||
1185 | - *``https://`` -* Fetches files from the Internet using HTTPS. | 1284 | - ``https://`` : Fetches files from the Internet using HTTPS. |
1186 | 1285 | ||
1187 | - *``ftp://`` -* Fetches files from the Internet using FTP. | 1286 | - ``ftp://`` : Fetches files from the Internet using FTP. |
1188 | 1287 | ||
1189 | - *``cvs://`` -* Fetches files from a CVS revision control | 1288 | - ``cvs://`` : Fetches files from a CVS revision control |
1190 | repository. | 1289 | repository. |
1191 | 1290 | ||
1192 | - *``hg://`` -* Fetches files from a Mercurial (``hg``) revision | 1291 | - ``hg://`` : Fetches files from a Mercurial (``hg``) revision |
1193 | control repository. | 1292 | control repository. |
1194 | 1293 | ||
1195 | - *``p4://`` -* Fetches files from a Perforce (``p4``) revision | 1294 | - ``p4://`` : Fetches files from a Perforce (``p4``) revision |
1196 | control repository. | 1295 | control repository. |
1197 | 1296 | ||
1198 | - *``ssh://`` -* Fetches files from a secure shell. | 1297 | - ``ssh://`` : Fetches files from a secure shell. |
1199 | 1298 | ||
1200 | - *``svn://`` -* Fetches files from a Subversion (``svn``) revision | 1299 | - ``svn://`` : Fetches files from a Subversion (``svn``) revision |
1201 | control repository. | 1300 | control repository. |
1202 | 1301 | ||
1203 | Here are some additional options worth mentioning: | 1302 | Here are some additional options worth mentioning: |
1204 | 1303 | ||
1205 | - *``unpack`` -* Controls whether or not to unpack the file if it is | 1304 | - ``unpack`` : Controls whether or not to unpack the file if it is |
1206 | an archive. The default action is to unpack the file. | 1305 | an archive. The default action is to unpack the file. |
1207 | 1306 | ||
1208 | - *``subdir`` -* Places the file (or extracts its contents) into the | 1307 | - ``subdir`` : Places the file (or extracts its contents) into the |
1209 | specified subdirectory. This option is useful for unusual tarballs | 1308 | specified subdirectory. This option is useful for unusual tarballs |
1210 | or other archives that do not have their files already in a | 1309 | or other archives that do not have their files already in a |
1211 | subdirectory within the archive. | 1310 | subdirectory within the archive. |
1212 | 1311 | ||
1213 | - *``name`` -* Specifies a name to be used for association with | 1312 | - ``name`` : Specifies a name to be used for association with |
1214 | ``SRC_URI`` checksums when you have more than one file specified | 1313 | ``SRC_URI`` checksums when you have more than one file specified |
1215 | in ``SRC_URI``. | 1314 | in ``SRC_URI``. |
1216 | 1315 | ||
1217 | - *``downloadfilename`` -* Specifies the filename used when storing | 1316 | - ``downloadfilename`` : Specifies the filename used when storing |
1218 | the downloaded file. | 1317 | the downloaded file. |
1219 | 1318 | ||
1220 | SRCDATE | 1319 | SRCDATE |