Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-2.5 |
| 2 | |
| 3 | ================== |
| 4 | Variables Glossary |
| 5 | ================== |
| 6 | |
| 7 | | |
| 8 | |
| 9 | This chapter lists common variables used by BitBake and gives an |
| 10 | overview of their function and contents. |
| 11 | |
| 12 | .. note:: |
| 13 | |
| 14 | Following are some points regarding the variables listed in this |
| 15 | glossary: |
| 16 | |
| 17 | - The variables listed in this glossary are specific to BitBake. |
| 18 | Consequently, the descriptions are limited to that context. |
| 19 | |
| 20 | - Also, variables exist in other systems that use BitBake (e.g. The |
| 21 | Yocto Project and OpenEmbedded) that have names identical to those |
| 22 | found in this glossary. For such cases, the variables in those |
| 23 | systems extend the functionality of the variable as it is |
| 24 | described here in this glossary. |
| 25 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 26 | .. glossary:: |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 27 | :sorted: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 28 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 29 | :term:`ASSUME_PROVIDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 30 | Lists recipe names (:term:`PN` values) BitBake does not |
| 31 | attempt to build. Instead, BitBake assumes these recipes have already |
| 32 | been built. |
| 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 35 | tools that should not be built. An example is ``git-native``, which |
| 36 | when specified allows for the Git binary from the host to be used |
| 37 | rather than building ``git-native``. |
| 38 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 39 | :term:`AZ_SAS` |
| 40 | Azure Storage Shared Access Signature, when using the |
| 41 | :ref:`Azure Storage fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` |
| 42 | This variable can be defined to be used by the fetcher to authenticate |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 43 | and gain access to non-public artifacts:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 44 | |
| 45 | AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" |
| 46 | |
| 47 | For more information see Microsoft's Azure Storage documentation at |
| 48 | https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview |
| 49 | |
| 50 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 51 | :term:`B` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 52 | The directory in which BitBake executes functions during a recipe's |
| 53 | build process. |
| 54 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 55 | :term:`BB_ALLOWED_NETWORKS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 56 | Specifies a space-delimited list of hosts that the fetcher is allowed |
| 57 | to use to obtain the required source code. Following are |
| 58 | considerations surrounding this variable: |
| 59 | |
| 60 | - This host list is only used if |
| 61 | :term:`BB_NO_NETWORK` is either not set or |
| 62 | set to "0". |
| 63 | |
| 64 | - Limited support for the "``*``" wildcard character for matching |
| 65 | against the beginning of host names exists. For example, the |
| 66 | following setting matches ``git.gnu.org``, ``ftp.gnu.org``, and |
| 67 | ``foo.git.gnu.org``. :: |
| 68 | |
| 69 | BB_ALLOWED_NETWORKS = "\*.gnu.org" |
| 70 | |
| 71 | .. important:: |
| 72 | |
| 73 | The use of the "``*``" character only works at the beginning of |
| 74 | a host name and it must be isolated from the remainder of the |
| 75 | host name. You cannot use the wildcard character in any other |
| 76 | location of the name or combined with the front part of the |
| 77 | name. |
| 78 | |
| 79 | For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` |
| 80 | is not. |
| 81 | |
| 82 | - Mirrors not in the host list are skipped and logged in debug. |
| 83 | |
| 84 | - Attempts to access networks not in the host list cause a failure. |
| 85 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 86 | Using :term:`BB_ALLOWED_NETWORKS` in conjunction with |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 87 | :term:`PREMIRRORS` is very useful. Adding the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 88 | host you want to use to :term:`PREMIRRORS` results in the source code |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 89 | being fetched from an allowed location and avoids raising an error |
| 90 | when a host that is not allowed is in a |
| 91 | :term:`SRC_URI` statement. This is because the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 92 | fetcher does not attempt to use the host listed in :term:`SRC_URI` after |
| 93 | a successful fetch from the :term:`PREMIRRORS` occurs. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 94 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 95 | :term:`BB_BASEHASH_IGNORE_VARS` |
| 96 | Lists variables that are excluded from checksum and dependency data. |
| 97 | Variables that are excluded can therefore change without affecting |
| 98 | the checksum mechanism. A common example would be the variable for |
| 99 | the path of the build. BitBake's output should not (and usually does |
| 100 | not) depend on the directory in which it was built. |
| 101 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 102 | :term:`BB_CACHEDIR` |
| 103 | Specifies the code parser cache directory (distinct from :term:`CACHE` |
| 104 | and :term:`PERSISTENT_DIR` although they can be set to the same value |
| 105 | if desired). The default value is "${TOPDIR}/cache". |
| 106 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 107 | :term:`BB_CHECK_SSL_CERTS` |
| 108 | Specifies if SSL certificates should be checked when fetching. The default |
| 109 | value is ``1`` and certificates are not checked if the value is set to ``0``. |
| 110 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 111 | :term:`BB_HASH_CODEPARSER_VALS` |
| 112 | Specifies values for variables to use when populating the codeparser cache. |
| 113 | This can be used selectively to set dummy values for variables to avoid |
| 114 | the codeparser cache growing on every parse. Variables that would typically |
| 115 | be included are those where the value is not significant for where the |
| 116 | codeparser cache is used (i.e. when calculating variable dependencies for |
| 117 | code fragments.) The value is space-separated without quoting values, for |
| 118 | example:: |
| 119 | |
| 120 | BB_HASH_CODEPARSER_VALS = "T=/ WORKDIR=/ DATE=1234 TIME=1234" |
| 121 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 122 | :term:`BB_CONSOLELOG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 123 | Specifies the path to a log file into which BitBake's user interface |
| 124 | writes output during the build. |
| 125 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 126 | :term:`BB_CURRENTTASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 127 | Contains the name of the currently running task. The name does not |
| 128 | include the ``do_`` prefix. |
| 129 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 130 | :term:`BB_DANGLINGAPPENDS_WARNONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 131 | Defines how BitBake handles situations where an append file |
| 132 | (``.bbappend``) has no corresponding recipe file (``.bb``). This |
| 133 | condition often occurs when layers get out of sync (e.g. ``oe-core`` |
| 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 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 142 | :term:`BB_DEFAULT_TASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 143 | The default task to use when none is specified (e.g. with the ``-c`` |
| 144 | command line option). The task name specified should not include the |
| 145 | ``do_`` prefix. |
| 146 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 147 | :term:`BB_DEFAULT_UMASK` |
| 148 | The default umask to apply to tasks if specified and no task specific |
| 149 | umask flag is set. |
| 150 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 151 | :term:`BB_DISKMON_DIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 152 | Monitors disk space and available inodes during the build and allows |
| 153 | you to control the build based on these parameters. |
| 154 | |
| 155 | Disk space monitoring is disabled by default. When setting this |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 156 | variable, use the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 157 | |
| 158 | BB_DISKMON_DIRS = "<action>,<dir>,<threshold> [...]" |
| 159 | |
| 160 | where: |
| 161 | |
| 162 | <action> is: |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 163 | HALT: Immediately halt the build when |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 164 | a threshold is broken. |
| 165 | STOPTASKS: Stop the build after the currently |
| 166 | executing tasks have finished when |
| 167 | a threshold is broken. |
| 168 | WARN: Issue a warning but continue the |
| 169 | build when a threshold is broken. |
| 170 | Subsequent warnings are issued as |
| 171 | defined by the |
| 172 | BB_DISKMON_WARNINTERVAL variable, |
| 173 | which must be defined. |
| 174 | |
| 175 | <dir> is: |
| 176 | Any directory you choose. You can specify one or |
| 177 | more directories to monitor by separating the |
| 178 | groupings with a space. If two directories are |
| 179 | on the same device, only the first directory |
| 180 | is monitored. |
| 181 | |
| 182 | <threshold> is: |
| 183 | Either the minimum available disk space, |
| 184 | the minimum number of free inodes, or |
| 185 | both. You must specify at least one. To |
| 186 | omit one or the other, simply omit the value. |
| 187 | Specify the threshold using G, M, K for Gbytes, |
| 188 | Mbytes, and Kbytes, respectively. If you do |
| 189 | not specify G, M, or K, Kbytes is assumed by |
| 190 | default. Do not use GB, MB, or KB. |
| 191 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 192 | Here are some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 193 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 194 | BB_DISKMON_DIRS = "HALT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 195 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 196 | BB_DISKMON_DIRS = "HALT,${TMPDIR},,100K" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 197 | |
| 198 | The first example works only if you also set the |
| 199 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 200 | variable. This example causes the build system to immediately halt |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 201 | when either the disk space in ``${TMPDIR}`` drops below 1 Gbyte or |
| 202 | the available free inodes drops below 100 Kbytes. Because two |
| 203 | directories are provided with the variable, the build system also |
| 204 | issues a warning when the disk space in the ``${SSTATE_DIR}`` |
| 205 | directory drops below 1 Gbyte or the number of free inodes drops |
| 206 | below 100 Kbytes. Subsequent warnings are issued during intervals as |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 207 | defined by the :term:`BB_DISKMON_WARNINTERVAL` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 208 | |
| 209 | The second example stops the build after all currently executing |
| 210 | tasks complete when the minimum disk space in the ``${TMPDIR}`` |
| 211 | directory drops below 1 Gbyte. No disk monitoring occurs for the free |
| 212 | inodes in this case. |
| 213 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 214 | The final example immediately halts the build when the number of |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 215 | free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No |
| 216 | disk space monitoring for the directory itself occurs in this case. |
| 217 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 218 | :term:`BB_DISKMON_WARNINTERVAL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 219 | Defines the disk space and free inode warning intervals. |
| 220 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 221 | If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 222 | must also use the :term:`BB_DISKMON_DIRS` |
| 223 | variable and define its action as "WARN". During the build, |
| 224 | subsequent warnings are issued each time disk space or number of free |
| 225 | inodes further reduces by the respective interval. |
| 226 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 227 | If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you |
| 228 | do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 229 | monitoring interval defaults to the following: |
| 230 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 231 | |
| 232 | When specifying the variable in your configuration file, use the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 233 | following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 234 | |
| 235 | BB_DISKMON_WARNINTERVAL = "<disk_space_interval>,<disk_inode_interval>" |
| 236 | |
| 237 | where: |
| 238 | |
| 239 | <disk_space_interval> is: |
| 240 | An interval of memory expressed in either |
| 241 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 242 | respectively. You cannot use GB, MB, or KB. |
| 243 | |
| 244 | <disk_inode_interval> is: |
| 245 | An interval of free inodes expressed in either |
| 246 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
| 247 | respectively. You cannot use GB, MB, or KB. |
| 248 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 249 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 250 | |
| 251 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
| 252 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
| 253 | |
| 254 | These variables cause BitBake to |
| 255 | issue subsequent warnings each time the available disk space further |
| 256 | reduces by 50 Mbytes or the number of free inodes further reduces by |
| 257 | 5 Kbytes in the ``${SSTATE_DIR}`` directory. Subsequent warnings |
| 258 | based on the interval occur each time a respective interval is |
| 259 | reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes). |
| 260 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 261 | :term:`BB_ENV_PASSTHROUGH` |
| 262 | Specifies the internal list of variables to allow through from |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 263 | the external environment into BitBake's datastore. If the value of |
| 264 | this variable is not specified (which is the default), the following |
| 265 | list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`, |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 266 | :term:`BB_ENV_PASSTHROUGH`, and :term:`BB_ENV_PASSTHROUGH_ADDITIONS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 267 | |
| 268 | .. note:: |
| 269 | |
| 270 | You must set this variable in the external environment in order |
| 271 | for it to work. |
| 272 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 273 | :term:`BB_ENV_PASSTHROUGH_ADDITIONS` |
| 274 | Specifies an additional set of variables to allow through from the |
| 275 | external environment into BitBake's datastore. This list of variables |
| 276 | are on top of the internal list set in |
| 277 | :term:`BB_ENV_PASSTHROUGH`. |
| 278 | |
| 279 | .. note:: |
| 280 | |
| 281 | You must set this variable in the external environment in order |
| 282 | for it to work. |
| 283 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 284 | :term:`BB_FETCH_PREMIRRORONLY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 285 | When set to "1", causes BitBake's fetcher module to only search |
| 286 | :term:`PREMIRRORS` for files. BitBake will not |
| 287 | search the main :term:`SRC_URI` or |
| 288 | :term:`MIRRORS`. |
| 289 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 290 | :term:`BB_FILENAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 291 | Contains the filename of the recipe that owns the currently running |
| 292 | task. For example, if the ``do_fetch`` task that resides in the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 293 | ``my-recipe.bb`` is executing, the :term:`BB_FILENAME` variable contains |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 294 | "/foo/path/my-recipe.bb". |
| 295 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 296 | :term:`BB_GENERATE_MIRROR_TARBALLS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 297 | Causes tarballs of the Git repositories, including the Git metadata, |
| 298 | to be placed in the :term:`DL_DIR` directory. Anyone |
| 299 | wishing to create a source mirror would want to enable this variable. |
| 300 | |
| 301 | For performance reasons, creating and placing tarballs of the Git |
| 302 | repositories is not the default action by BitBake. :: |
| 303 | |
| 304 | BB_GENERATE_MIRROR_TARBALLS = "1" |
| 305 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 306 | :term:`BB_GENERATE_SHALLOW_TARBALLS` |
| 307 | Setting this variable to "1" when :term:`BB_GIT_SHALLOW` is also set to |
| 308 | "1" causes bitbake to generate shallow mirror tarballs when fetching git |
| 309 | repositories. The number of commits included in the shallow mirror |
| 310 | tarballs is controlled by :term:`BB_GIT_SHALLOW_DEPTH`. |
| 311 | |
| 312 | If both :term:`BB_GIT_SHALLOW` and :term:`BB_GENERATE_MIRROR_TARBALLS` are |
| 313 | enabled, bitbake will generate shallow mirror tarballs by default for git |
| 314 | repositories. This separate variable exists so that shallow tarball |
| 315 | generation can be enabled without needing to also enable normal mirror |
| 316 | generation if it is not desired. |
| 317 | |
| 318 | For example usage, see :term:`BB_GIT_SHALLOW`. |
| 319 | |
| 320 | :term:`BB_GIT_SHALLOW` |
| 321 | 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>`_. |
| 323 | The external `git-make-shallow <https://git.openembedded.org/bitbake/tree/bin/git-make-shallow>`_ |
| 324 | script is used for shallow mirror tarball creation. |
| 325 | |
| 326 | When :term:`BB_GIT_SHALLOW` is enabled, bitbake will attempt to fetch a shallow |
| 327 | mirror tarball. If the shallow mirror tarball cannot be fetched, it will |
| 328 | try to fetch the full mirror tarball and use that. |
| 329 | |
| 330 | When a mirror tarball is not available, a full git clone will be performed |
| 331 | regardless of whether this variable is set or not. Support for shallow |
| 332 | clones is not currently implemented as git does not directly support |
| 333 | shallow cloning a particular git commit hash (it only supports cloning |
| 334 | from a tag or branch reference). |
| 335 | |
| 336 | See also :term:`BB_GIT_SHALLOW_DEPTH` and |
| 337 | :term:`BB_GENERATE_SHALLOW_TARBALLS`. |
| 338 | |
| 339 | Example usage:: |
| 340 | |
| 341 | BB_GIT_SHALLOW ?= "1" |
| 342 | |
| 343 | # Keep only the top commit |
| 344 | BB_GIT_SHALLOW_DEPTH ?= "1" |
| 345 | |
| 346 | # This defaults to enabled if both BB_GIT_SHALLOW and |
| 347 | # BB_GENERATE_MIRROR_TARBALLS are enabled |
| 348 | BB_GENERATE_SHALLOW_TARBALLS ?= "1" |
| 349 | |
| 350 | :term:`BB_GIT_SHALLOW_DEPTH` |
| 351 | When used with :term:`BB_GENERATE_SHALLOW_TARBALLS`, this variable sets |
| 352 | the number of commits to include in generated shallow mirror tarballs. |
| 353 | With a depth of 1, only the commit referenced in :term:`SRCREV` is |
| 354 | included in the shallow mirror tarball. Increasing the depth includes |
| 355 | additional parent commits, working back through the commit history. |
| 356 | |
| 357 | If this variable is unset, bitbake will default to a depth of 1 when |
| 358 | generating shallow mirror tarballs. |
| 359 | |
| 360 | For example usage, see :term:`BB_GIT_SHALLOW`. |
| 361 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 362 | :term:`BB_GLOBAL_PYMODULES` |
| 363 | Specifies the list of Python modules to place in the global namespace. |
| 364 | It is intended that only the core layer should set this and it is meant |
| 365 | to be a very small list, typically just ``os`` and ``sys``. |
| 366 | :term:`BB_GLOBAL_PYMODULES` is expected to be set before the first |
| 367 | ``addpylib`` directive. |
| 368 | See also ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`". |
| 369 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 370 | :term:`BB_HASHCHECK_FUNCTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 371 | Specifies the name of the function to call during the "setscene" part |
| 372 | of the task's execution in order to validate the list of task hashes. |
| 373 | The function returns the list of setscene tasks that should be |
| 374 | executed. |
| 375 | |
| 376 | At this point in the execution of the code, the objective is to |
| 377 | quickly verify if a given setscene function is likely to work or not. |
| 378 | It's easier to check the list of setscene functions in one pass than |
| 379 | to call many individual tasks. The returned list need not be |
| 380 | completely accurate. A given setscene task can still later fail. |
| 381 | However, the more accurate the data returned, the more efficient the |
| 382 | build will be. |
| 383 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 384 | :term:`BB_HASHCONFIG_IGNORE_VARS` |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 385 | Lists variables that are excluded from base configuration checksum, |
| 386 | which is used to determine if the cache can be reused. |
| 387 | |
| 388 | One of the ways BitBake determines whether to re-parse the main |
| 389 | metadata is through checksums of the variables in the datastore of |
| 390 | the base configuration data. There are variables that you typically |
| 391 | want to exclude when checking whether or not to re-parse and thus |
| 392 | rebuild the cache. As an example, you would usually exclude ``TIME`` |
| 393 | and ``DATE`` because these variables are always changing. If you did |
| 394 | not exclude them, BitBake would never reuse the cache. |
| 395 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 396 | :term:`BB_HASHSERVE` |
| 397 | Specifies the Hash Equivalence server to use. |
| 398 | |
| 399 | If set to ``auto``, BitBake automatically starts its own server |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 400 | over a UNIX domain socket. An option is to connect this server |
| 401 | to an upstream one, by setting :term:`BB_HASHSERVE_UPSTREAM`. |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 402 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 403 | If set to ``unix://path``, BitBake will connect to an existing |
| 404 | hash server available over a UNIX domain socket. |
| 405 | |
| 406 | If set to ``host:port``, BitBake will connect to a remote server on the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 407 | specified host. This allows multiple clients to share the same |
| 408 | hash equivalence data. |
| 409 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 410 | The remote server can be started manually through |
| 411 | the ``bin/bitbake-hashserv`` script provided by BitBake, |
| 412 | which supports UNIX domain sockets too. This script also allows |
| 413 | to start the server in read-only mode, to avoid accepting |
| 414 | equivalences that correspond to Share State caches that are |
| 415 | only available on specific clients. |
| 416 | |
| 417 | :term:`BB_HASHSERVE_UPSTREAM` |
| 418 | Specifies an upstream Hash Equivalence server. |
| 419 | |
| 420 | This optional setting is only useful when a local Hash Equivalence |
| 421 | server is started (setting :term:`BB_HASHSERVE` to ``auto``), |
| 422 | and you wish the local server to query an upstream server for |
| 423 | Hash Equivalence data. |
| 424 | |
| 425 | Example usage:: |
| 426 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 427 | BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 428 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 429 | :term:`BB_INVALIDCONF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 430 | Used in combination with the ``ConfigParsed`` event to trigger |
| 431 | re-parsing the base metadata (i.e. all the recipes). The |
| 432 | ``ConfigParsed`` event can set the variable to trigger the re-parse. |
| 433 | You must be careful to avoid recursive loops with this functionality. |
| 434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 435 | :term:`BB_LOGCONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 436 | Specifies the name of a config file that contains the user logging |
| 437 | configuration. See |
| 438 | :ref:`bitbake-user-manual/bitbake-user-manual-execution:logging` |
| 439 | for additional information |
| 440 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 441 | :term:`BB_LOGFMT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 442 | Specifies the name of the log files saved into |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 443 | ``${``\ :term:`T`\ ``}``. By default, the :term:`BB_LOGFMT` |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 444 | variable is undefined and the log filenames get created using the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 445 | following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 446 | |
| 447 | log.{task}.{pid} |
| 448 | |
| 449 | If you want to force log files to take a specific name, you can set this |
| 450 | variable in a configuration file. |
| 451 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 452 | :term:`BB_MULTI_PROVIDER_ALLOWED` |
| 453 | Allows you to suppress BitBake warnings caused when building two |
| 454 | separate recipes that provide the same output. |
| 455 | |
| 456 | BitBake normally issues a warning when building two different recipes |
| 457 | where each provides the same output. This scenario is usually |
| 458 | something the user does not want. However, cases do exist where it |
| 459 | makes sense, particularly in the ``virtual/*`` namespace. You can use |
| 460 | this variable to suppress BitBake's warnings. |
| 461 | |
| 462 | To use the variable, list provider names (e.g. recipe names, |
| 463 | ``virtual/kernel``, and so forth). |
| 464 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 465 | :term:`BB_NICE_LEVEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 466 | Allows BitBake to run at a specific priority (i.e. nice level). |
| 467 | System permissions usually mean that BitBake can reduce its priority |
| 468 | but not raise it again. See :term:`BB_TASK_NICE_LEVEL` for |
| 469 | additional information. |
| 470 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 471 | :term:`BB_NO_NETWORK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 472 | Disables network access in the BitBake fetcher modules. With this |
| 473 | access disabled, any command that attempts to access the network |
| 474 | becomes an error. |
| 475 | |
| 476 | Disabling network access is useful for testing source mirrors, |
| 477 | running builds when not connected to the Internet, and when operating |
| 478 | in certain kinds of firewall environments. |
| 479 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 480 | :term:`BB_NUMBER_PARSE_THREADS` |
| 481 | Sets the number of threads BitBake uses when parsing. By default, the |
| 482 | number of threads is equal to the number of cores on the system. |
| 483 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 484 | :term:`BB_NUMBER_THREADS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 485 | The maximum number of tasks BitBake should run in parallel at any one |
| 486 | time. If your host development system supports multiple cores, a good |
| 487 | rule of thumb is to set this variable to twice the number of cores. |
| 488 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 489 | :term:`BB_ORIGENV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 490 | Contains a copy of the original external environment in which BitBake |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 491 | was run. The copy is taken before any variable values configured to |
| 492 | pass through from the external environment are filtered into BitBake's |
| 493 | datastore. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 494 | |
| 495 | .. note:: |
| 496 | |
| 497 | The contents of this variable is a datastore object that can be |
| 498 | queried using the normal datastore operations. |
| 499 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 500 | :term:`BB_PRESERVE_ENV` |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 501 | Disables environment filtering and instead allows all variables through |
| 502 | from the external environment into BitBake's datastore. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 503 | |
| 504 | .. note:: |
| 505 | |
| 506 | You must set this variable in the external environment in order |
| 507 | for it to work. |
| 508 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 509 | :term:`BB_PRESSURE_MAX_CPU` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 510 | Specifies a maximum CPU pressure threshold, above which BitBake's |
| 511 | scheduler will not start new tasks (providing there is at least |
| 512 | one active task). If no value is set, CPU pressure is not |
| 513 | monitored when starting tasks. |
| 514 | |
| 515 | The pressure data is calculated based upon what Linux kernels since |
| 516 | version 4.20 expose under ``/proc/pressure``. The threshold represents |
| 517 | the difference in "total" pressure from the previous second. The |
| 518 | minimum value is 1.0 (extremely slow builds) and the maximum is |
| 519 | 1000000 (a pressure value unlikely to ever be reached). |
| 520 | |
| 521 | This threshold can be set in ``conf/local.conf`` as:: |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 522 | |
| 523 | BB_PRESSURE_MAX_CPU = "500" |
| 524 | |
| 525 | :term:`BB_PRESSURE_MAX_IO` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 526 | Specifies a maximum I/O pressure threshold, above which BitBake's |
| 527 | scheduler will not start new tasks (providing there is at least |
| 528 | one active task). If no value is set, I/O pressure is not |
| 529 | monitored when starting tasks. |
| 530 | |
| 531 | The pressure data is calculated based upon what Linux kernels since |
| 532 | version 4.20 expose under ``/proc/pressure``. The threshold represents |
| 533 | the difference in "total" pressure from the previous second. The |
| 534 | minimum value is 1.0 (extremely slow builds) and the maximum is |
| 535 | 1000000 (a pressure value unlikely to ever be reached). |
| 536 | |
| 537 | At this point in time, experiments show that IO pressure tends to |
| 538 | be short-lived and regulating just the CPU with |
| 539 | :term:`BB_PRESSURE_MAX_CPU` can help to reduce it. |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 540 | |
| 541 | :term:`BB_PRESSURE_MAX_MEMORY` |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 542 | |
| 543 | Specifies a maximum memory pressure threshold, above which BitBake's |
| 544 | scheduler will not start new tasks (providing there is at least |
| 545 | one active task). If no value is set, memory pressure is not |
| 546 | monitored when starting tasks. |
| 547 | |
| 548 | The pressure data is calculated based upon what Linux kernels since |
| 549 | version 4.20 expose under ``/proc/pressure``. The threshold represents |
| 550 | the difference in "total" pressure from the previous second. The |
| 551 | minimum value is 1.0 (extremely slow builds) and the maximum is |
| 552 | 1000000 (a pressure value unlikely to ever be reached). |
| 553 | |
| 554 | Memory pressure is experienced when time is spent swapping, |
| 555 | refaulting pages from the page cache or performing direct reclaim. |
| 556 | This is why memory pressure is rarely seen, but setting this variable |
| 557 | might be useful as a last resort to prevent OOM errors if they are |
| 558 | occurring during builds. |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 559 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 560 | :term:`BB_RUNFMT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 561 | Specifies the name of the executable script files (i.e. run files) |
| 562 | saved into ``${``\ :term:`T`\ ``}``. By default, the |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 563 | :term:`BB_RUNFMT` variable is undefined and the run filenames get |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 564 | created using the following form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 565 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 566 | run.{func}.{pid} |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 567 | |
| 568 | If you want to force run files to take a specific name, you can set this |
| 569 | variable in a configuration file. |
| 570 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 571 | :term:`BB_RUNTASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 572 | Contains the name of the currently executing task. The value includes |
| 573 | the "do\_" prefix. For example, if the currently executing task is |
| 574 | ``do_config``, the value is "do_config". |
| 575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 576 | :term:`BB_SCHEDULER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 577 | Selects the name of the scheduler to use for the scheduling of |
| 578 | BitBake tasks. Three options exist: |
| 579 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 580 | - *basic* --- the basic framework from which everything derives. Using |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 581 | this option causes tasks to be ordered numerically as they are |
| 582 | parsed. |
| 583 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 584 | - *speed* --- executes tasks first that have more tasks depending on |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 585 | them. The "speed" option is the default. |
| 586 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 587 | - *completion* --- causes the scheduler to try to complete a given |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 588 | recipe once its build has started. |
| 589 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 590 | :term:`BB_SCHEDULERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 591 | Defines custom schedulers to import. Custom schedulers need to be |
| 592 | derived from the ``RunQueueScheduler`` class. |
| 593 | |
| 594 | For information how to select a scheduler, see the |
| 595 | :term:`BB_SCHEDULER` variable. |
| 596 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 597 | :term:`BB_SETSCENE_DEPVALID` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 598 | Specifies a function BitBake calls that determines whether BitBake |
| 599 | requires a setscene dependency to be met. |
| 600 | |
| 601 | When running a setscene task, BitBake needs to know which |
| 602 | dependencies of that setscene task also need to be run. Whether |
| 603 | dependencies also need to be run is highly dependent on the metadata. |
| 604 | The function specified by this variable returns a "True" or "False" |
| 605 | depending on whether the dependency needs to be met. |
| 606 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 607 | :term:`BB_SIGNATURE_EXCLUDE_FLAGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 608 | Lists variable flags (varflags) that can be safely excluded from |
| 609 | checksum and dependency data for keys in the datastore. When |
| 610 | generating checksum or dependency data for keys in the datastore, the |
| 611 | flags set against that key are normally included in the checksum. |
| 612 | |
| 613 | For more information on varflags, see the |
| 614 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variable flags`" |
| 615 | section. |
| 616 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 617 | :term:`BB_SIGNATURE_HANDLER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 618 | Defines the name of the signature handler BitBake uses. The signature |
| 619 | handler defines the way stamp files are created and handled, if and |
| 620 | how the signature is incorporated into the stamps, and how the |
| 621 | signature itself is generated. |
| 622 | |
| 623 | A new signature handler can be added by injecting a class derived |
| 624 | from the ``SignatureGenerator`` class into the global namespace. |
| 625 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 626 | :term:`BB_SRCREV_POLICY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 627 | Defines the behavior of the fetcher when it interacts with source |
| 628 | control systems and dynamic source revisions. The |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 629 | :term:`BB_SRCREV_POLICY` variable is useful when working without a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 630 | network. |
| 631 | |
| 632 | The variable can be set using one of two policies: |
| 633 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 634 | - *cache* --- retains the value the system obtained previously rather |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 635 | than querying the source control system each time. |
| 636 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 637 | - *clear* --- queries the source controls system every time. With this |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 638 | policy, there is no cache. The "clear" policy is the default. |
| 639 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 640 | :term:`BB_STRICT_CHECKSUM` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 641 | Sets a more strict checksum mechanism for non-local URLs. Setting |
| 642 | this variable to a value causes BitBake to report an error if it |
| 643 | encounters a non-local URL that does not have at least one checksum |
| 644 | specified. |
| 645 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 646 | :term:`BB_TASK_IONICE_LEVEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 647 | Allows adjustment of a task's Input/Output priority. During |
| 648 | Autobuilder testing, random failures can occur for tasks due to I/O |
| 649 | starvation. These failures occur during various QEMU runtime |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 650 | timeouts. You can use the :term:`BB_TASK_IONICE_LEVEL` variable to adjust |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 651 | the I/O priority of these tasks. |
| 652 | |
| 653 | .. note:: |
| 654 | |
| 655 | This variable works similarly to the :term:`BB_TASK_NICE_LEVEL` |
| 656 | variable except with a task's I/O priorities. |
| 657 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 658 | Set the variable as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 659 | |
| 660 | BB_TASK_IONICE_LEVEL = "class.prio" |
| 661 | |
| 662 | For *class*, the default value is "2", which is a best effort. You can use |
| 663 | "1" for realtime and "3" for idle. If you want to use realtime, you |
| 664 | must have superuser privileges. |
| 665 | |
| 666 | For *prio*, you can use any value from "0", which is the highest |
| 667 | priority, to "7", which is the lowest. The default value is "4". You |
| 668 | do not need any special privileges to use this range of priority |
| 669 | values. |
| 670 | |
| 671 | .. note:: |
| 672 | |
| 673 | In order for your I/O priority settings to take effect, you need the |
| 674 | Completely Fair Queuing (CFQ) Scheduler selected for the backing block |
| 675 | device. To select the scheduler, use the following command form where |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 676 | device is the device (e.g. sda, sdb, and so forth):: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 677 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 678 | $ sudo sh -c "echo cfq > /sys/block/device/queu/scheduler" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 679 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 680 | :term:`BB_TASK_NICE_LEVEL` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 681 | Allows specific tasks to change their priority (i.e. nice level). |
| 682 | |
| 683 | You can use this variable in combination with task overrides to raise |
| 684 | or lower priorities of specific tasks. For example, on the `Yocto |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 685 | Project <https://www.yoctoproject.org>`__ autobuilder, QEMU emulation |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 686 | in images is given a higher priority as compared to build tasks to |
| 687 | ensure that images do not suffer timeouts on loaded systems. |
| 688 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 689 | :term:`BB_TASKHASH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 690 | Within an executing task, this variable holds the hash of the task as |
| 691 | returned by the currently enabled signature generator. |
| 692 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 693 | :term:`BB_VERBOSE_LOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 694 | Controls how verbose BitBake is during builds. If set, shell scripts |
| 695 | echo commands and shell script output appears on standard out |
| 696 | (stdout). |
| 697 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 698 | :term:`BB_WORKERCONTEXT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 699 | Specifies if the current context is executing a task. BitBake sets |
| 700 | this variable to "1" when a task is being executed. The value is not |
| 701 | set when the task is in server context during parsing or event |
| 702 | handling. |
| 703 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 704 | :term:`BBCLASSEXTEND` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 705 | Allows you to extend a recipe so that it builds variants of the |
| 706 | software. Some examples of these variants for recipes from the |
| 707 | OpenEmbedded-Core metadata are "natives" such as ``quilt-native``, |
| 708 | which is a copy of Quilt built to run on the build system; "crosses" |
| 709 | such as ``gcc-cross``, which is a compiler built to run on the build |
| 710 | machine but produces binaries that run on the target ``MACHINE``; |
| 711 | "nativesdk", which targets the SDK machine instead of ``MACHINE``; |
| 712 | and "mulitlibs" in the form "``multilib:``\ multilib_name". |
| 713 | |
| 714 | To build a different variant of the recipe with a minimal amount of |
| 715 | code, it usually is as simple as adding the variable to your recipe. |
| 716 | Here are two examples. The "native" variants are from the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 717 | OpenEmbedded-Core metadata:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 718 | |
| 719 | BBCLASSEXTEND =+ "native nativesdk" |
| 720 | BBCLASSEXTEND =+ "multilib:multilib_name" |
| 721 | |
| 722 | .. note:: |
| 723 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 724 | Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 725 | variants by rewriting variable values and applying overrides such |
| 726 | as ``_class-native``. For example, to generate a native version of |
| 727 | a recipe, a :term:`DEPENDS` on "foo" is |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 728 | rewritten to a :term:`DEPENDS` on "foo-native". |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 729 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 730 | Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 731 | Parsing once adds some limitations. For example, it is not |
| 732 | possible to include a different file depending on the variant, |
| 733 | since ``include`` statements are processed when the recipe is |
| 734 | parsed. |
| 735 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 736 | :term:`BBDEBUG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 737 | Sets the BitBake debug output level to a specific value as |
| 738 | incremented by the ``-D`` command line option. |
| 739 | |
| 740 | .. note:: |
| 741 | |
| 742 | You must set this variable in the external environment in order |
| 743 | for it to work. |
| 744 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 745 | :term:`BBFILE_COLLECTIONS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 746 | Lists the names of configured layers. These names are used to find |
| 747 | the other ``BBFILE_*`` variables. Typically, each layer appends its |
| 748 | name to this variable in its ``conf/layer.conf`` file. |
| 749 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 750 | :term:`BBFILE_PATTERN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 751 | Variable that expands to match files from |
| 752 | :term:`BBFILES` in a particular layer. This |
| 753 | variable is used in the ``conf/layer.conf`` file and must be suffixed |
| 754 | with the name of the specific layer (e.g. |
| 755 | ``BBFILE_PATTERN_emenlow``). |
| 756 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 757 | :term:`BBFILE_PRIORITY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 758 | Assigns the priority for recipe files in each layer. |
| 759 | |
| 760 | This variable is useful in situations where the same recipe appears |
| 761 | in more than one layer. Setting this variable allows you to |
| 762 | prioritize a layer against other layers that contain the same recipe |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 763 | --- effectively letting you control the precedence for the multiple |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 764 | layers. The precedence established through this variable stands |
| 765 | regardless of a recipe's version (:term:`PV` variable). |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 766 | For example, a layer that has a recipe with a higher :term:`PV` value but |
| 767 | for which the :term:`BBFILE_PRIORITY` is set to have a lower precedence |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 768 | still has a lower precedence. |
| 769 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 770 | A larger value for the :term:`BBFILE_PRIORITY` variable results in a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 771 | higher precedence. For example, the value 6 has a higher precedence |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 772 | than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable |
| 773 | is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 774 | for more information. The default priority, if unspecified for a |
| 775 | layer with no dependencies, is the lowest defined priority + 1 (or 1 |
| 776 | if no priorities are defined). |
| 777 | |
| 778 | .. tip:: |
| 779 | |
| 780 | You can use the command bitbake-layers show-layers to list all |
| 781 | configured layers along with their priorities. |
| 782 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 783 | :term:`BBFILES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 784 | A space-separated list of recipe files BitBake uses to build |
| 785 | software. |
| 786 | |
| 787 | When specifying recipe files, you can pattern match using Python's |
| 788 | `glob <https://docs.python.org/3/library/glob.html>`_ syntax. |
| 789 | For details on the syntax, see the documentation by following the |
| 790 | previous link. |
| 791 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 792 | :term:`BBFILES_DYNAMIC` |
| 793 | Activates content depending on presence of identified layers. You |
| 794 | identify the layers by the collections that the layers define. |
| 795 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 796 | Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files whose |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 797 | corresponding ``.bb`` file is in a layer that attempts to modify other |
| 798 | layers through ``.bbappend`` but does not want to introduce a hard |
| 799 | dependency on those other layers. |
| 800 | |
| 801 | Additionally you can prefix the rule with "!" to add ``.bbappend`` and |
| 802 | ``.bb`` files in case a layer is not present. Use this avoid hard |
| 803 | dependency on those other layers. |
| 804 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 805 | Use the following form for :term:`BBFILES_DYNAMIC`:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 806 | |
| 807 | collection_name:filename_pattern |
| 808 | |
| 809 | The following example identifies two collection names and two filename |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 810 | patterns:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 811 | |
| 812 | BBFILES_DYNAMIC += "\ |
| 813 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
| 814 | core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ |
| 815 | " |
| 816 | |
| 817 | When the collection name is prefixed with "!" it will add the file pattern in case |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 818 | the layer is absent:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 819 | |
| 820 | BBFILES_DYNAMIC += "\ |
| 821 | !clang-layer:${LAYERDIR}/backfill/meta-clang/*/*/*.bb \ |
| 822 | " |
| 823 | |
| 824 | This next example shows an error message that occurs because invalid |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 825 | entries are found, which cause parsing to fail:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 826 | |
| 827 | ERROR: BBFILES_DYNAMIC entries must be of the form {!}<collection name>:<filename pattern>, not: |
| 828 | /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend |
| 829 | /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend |
| 830 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 831 | :term:`BBINCLUDED` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 832 | Contains a space-separated list of all of all files that BitBake's |
| 833 | parser included during parsing of the current file. |
| 834 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 835 | :term:`BBINCLUDELOGS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 836 | If set to a value, enables printing the task log when reporting a |
| 837 | failed task. |
| 838 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 839 | :term:`BBINCLUDELOGS_LINES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 840 | If :term:`BBINCLUDELOGS` is set, specifies |
| 841 | the maximum number of lines from the task log file to print when |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 842 | reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 843 | the entire log is printed. |
| 844 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 845 | :term:`BBLAYERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 846 | Lists the layers to enable during the build. This variable is defined |
| 847 | in the ``bblayers.conf`` configuration file in the build directory. |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 848 | Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 849 | |
| 850 | BBLAYERS = " \ |
| 851 | /home/scottrif/poky/meta \ |
| 852 | /home/scottrif/poky/meta-yocto \ |
| 853 | /home/scottrif/poky/meta-yocto-bsp \ |
| 854 | /home/scottrif/poky/meta-mykernel \ |
| 855 | " |
| 856 | |
| 857 | This example enables four layers, one of which is a custom, user-defined |
| 858 | layer named ``meta-mykernel``. |
| 859 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 860 | :term:`BBLAYERS_FETCH_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 861 | Sets the base location where layers are stored. This setting is used |
| 862 | in conjunction with ``bitbake-layers layerindex-fetch`` and tells |
| 863 | ``bitbake-layers`` where to place the fetched layers. |
| 864 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 865 | :term:`BBMASK` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 866 | Prevents BitBake from processing recipes and recipe append files. |
| 867 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 868 | You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 869 | ``.bbappend`` files. BitBake ignores any recipe or recipe append |
| 870 | files that match any of the expressions. It is as if BitBake does not |
| 871 | see them at all. Consequently, matching files are not parsed or |
| 872 | otherwise used by BitBake. |
| 873 | |
| 874 | The values you provide are passed to Python's regular expression |
| 875 | compiler. Consequently, the syntax follows Python's Regular |
| 876 | Expression (re) syntax. The expressions are compared against the full |
| 877 | paths to the files. For complete syntax information, see Python's |
| 878 | documentation at http://docs.python.org/3/library/re.html. |
| 879 | |
| 880 | The following example uses a complete regular expression to tell |
| 881 | BitBake to ignore all recipe and recipe append files in the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 882 | ``meta-ti/recipes-misc/`` directory:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 883 | |
| 884 | BBMASK = "meta-ti/recipes-misc/" |
| 885 | |
| 886 | If you want to mask out multiple directories or recipes, you can |
| 887 | specify multiple regular expression fragments. This next example |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 888 | masks out multiple directories and individual recipes:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 889 | |
| 890 | BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" |
| 891 | BBMASK += "/meta-oe/recipes-support/" |
| 892 | BBMASK += "/meta-foo/.*/openldap" |
| 893 | BBMASK += "opencv.*\.bbappend" |
| 894 | BBMASK += "lzma" |
| 895 | |
| 896 | .. note:: |
| 897 | |
| 898 | When specifying a directory name, use the trailing slash character |
| 899 | to ensure you match just that directory name. |
| 900 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 901 | :term:`BBMULTICONFIG` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 902 | Enables BitBake to perform multiple configuration builds and lists |
| 903 | each separate configuration (multiconfig). You can use this variable |
| 904 | to cause BitBake to build multiple targets where each target has a |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 905 | separate configuration. Define :term:`BBMULTICONFIG` in your |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 906 | ``conf/local.conf`` configuration file. |
| 907 | |
| 908 | As an example, the following line specifies three multiconfigs, each |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 909 | having a separate configuration file:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 910 | |
| 911 | BBMULTIFONFIG = "configA configB configC" |
| 912 | |
| 913 | Each configuration file you use must reside in the |
| 914 | build directory within a directory named ``conf/multiconfig`` (e.g. |
| 915 | build_directory\ ``/conf/multiconfig/configA.conf``). |
| 916 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 917 | For information on how to use :term:`BBMULTICONFIG` in an environment |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 918 | that supports building targets with multiple configurations, see the |
| 919 | ":ref:`bitbake-user-manual/bitbake-user-manual-intro:executing a multiple configuration build`" |
| 920 | section. |
| 921 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 922 | :term:`BBPATH` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 923 | A colon-separated list used by BitBake to locate class (``.bbclass``) |
| 924 | and configuration (``.conf``) files. This variable is analogous to the |
| 925 | ``PATH`` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 926 | |
| 927 | If you run BitBake from a directory outside of the build directory, |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 928 | you must be sure to set :term:`BBPATH` to point to the build directory. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 929 | Set the variable as you would any environment variable and then run |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 930 | BitBake:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 931 | |
| 932 | $ BBPATH="build_directory" |
| 933 | $ export BBPATH |
| 934 | $ bitbake target |
| 935 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 936 | :term:`BBSERVER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 937 | Points to the server that runs memory-resident BitBake. The variable |
| 938 | is only used when you employ memory-resident BitBake. |
| 939 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 940 | :term:`BBTARGETS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 941 | Allows you to use a configuration file to add to the list of |
| 942 | command-line target recipes you want to build. |
| 943 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 944 | :term:`BITBAKE_UI` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 945 | Used to specify the UI module to use when running BitBake. Using this |
| 946 | variable is equivalent to using the ``-u`` command-line option. |
| 947 | |
| 948 | .. note:: |
| 949 | |
| 950 | You must set this variable in the external environment in order |
| 951 | for it to work. |
| 952 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 953 | :term:`BUILDNAME` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 954 | A name assigned to the build. The name defaults to a datetime stamp |
| 955 | of when the build was started but can be defined by the metadata. |
| 956 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 957 | :term:`BZRDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 958 | The directory in which files checked out of a Bazaar system are |
| 959 | stored. |
| 960 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 961 | :term:`CACHE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 962 | Specifies the directory BitBake uses to store a cache of the metadata |
| 963 | so it does not need to be parsed every time BitBake is started. |
| 964 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 965 | :term:`CVSDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 966 | The directory in which files checked out under the CVS system are |
| 967 | stored. |
| 968 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 969 | :term:`DEFAULT_PREFERENCE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 970 | Specifies a weak bias for recipe selection priority. |
| 971 | |
| 972 | The most common usage of this is variable is to set it to "-1" within |
| 973 | a recipe for a development version of a piece of software. Using the |
| 974 | variable in this way causes the stable version of the recipe to build |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 975 | by default in the absence of :term:`PREFERRED_VERSION` being used to |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 976 | build the development version. |
| 977 | |
| 978 | .. note:: |
| 979 | |
| 980 | The bias provided by DEFAULT_PREFERENCE is weak and is overridden by |
| 981 | :term:`BBFILE_PRIORITY` if that variable is different between two |
| 982 | layers that contain different versions of the same recipe. |
| 983 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 984 | :term:`DEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 985 | Lists a recipe's build-time dependencies (i.e. other recipe files). |
| 986 | |
| 987 | Consider this simple example for two recipes named "a" and "b" that |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 988 | produce similarly named packages. In this example, the :term:`DEPENDS` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 989 | statement appears in the "a" recipe:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 990 | |
| 991 | DEPENDS = "b" |
| 992 | |
| 993 | Here, the dependency is such that the ``do_configure`` task for recipe "a" |
| 994 | depends on the ``do_populate_sysroot`` task of recipe "b". This means |
| 995 | anything that recipe "b" puts into sysroot is available when recipe "a" is |
| 996 | configuring itself. |
| 997 | |
| 998 | For information on runtime dependencies, see the :term:`RDEPENDS` |
| 999 | variable. |
| 1000 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1001 | :term:`DESCRIPTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1002 | A long description for the recipe. |
| 1003 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1004 | :term:`DL_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1005 | The central download directory used by the build process to store |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1006 | downloads. By default, :term:`DL_DIR` gets files suitable for mirroring for |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1007 | everything except Git repositories. If you want tarballs of Git |
| 1008 | repositories, use the :term:`BB_GENERATE_MIRROR_TARBALLS` variable. |
| 1009 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1010 | :term:`EXCLUDE_FROM_WORLD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1011 | Directs BitBake to exclude a recipe from world builds (i.e. |
| 1012 | ``bitbake world``). During world builds, BitBake locates, parses and |
| 1013 | builds all recipes found in every layer exposed in the |
| 1014 | ``bblayers.conf`` configuration file. |
| 1015 | |
| 1016 | To exclude a recipe from a world build using this variable, set the |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1017 | variable to "1" in the recipe. Set it to "0" to add it back to world build. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1018 | |
| 1019 | .. note:: |
| 1020 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1021 | Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a world |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1022 | build in order to satisfy dependencies of other recipes. Adding a |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1023 | recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1024 | explicitly added to the list of build targets in a world build. |
| 1025 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1026 | :term:`FAKEROOT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1027 | Contains the command to use when running a shell script in a fakeroot |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1028 | environment. The :term:`FAKEROOT` variable is obsolete and has been |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1029 | replaced by the other ``FAKEROOT*`` variables. See these entries in |
| 1030 | the glossary for more information. |
| 1031 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1032 | :term:`FAKEROOTBASEENV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1033 | Lists environment variables to set when executing the command defined |
| 1034 | by :term:`FAKEROOTCMD` that starts the |
| 1035 | bitbake-worker process in the fakeroot environment. |
| 1036 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1037 | :term:`FAKEROOTCMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1038 | Contains the command that starts the bitbake-worker process in the |
| 1039 | fakeroot environment. |
| 1040 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1041 | :term:`FAKEROOTDIRS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1042 | Lists directories to create before running a task in the fakeroot |
| 1043 | environment. |
| 1044 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1045 | :term:`FAKEROOTENV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1046 | Lists environment variables to set when running a task in the |
| 1047 | fakeroot environment. For additional information on environment |
| 1048 | variables and the fakeroot environment, see the |
| 1049 | :term:`FAKEROOTBASEENV` variable. |
| 1050 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1051 | :term:`FAKEROOTNOENV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1052 | Lists environment variables to set when running a task that is not in |
| 1053 | the fakeroot environment. For additional information on environment |
| 1054 | variables and the fakeroot environment, see the |
| 1055 | :term:`FAKEROOTENV` variable. |
| 1056 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1057 | :term:`FETCHCMD` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1058 | Defines the command the BitBake fetcher module executes when running |
| 1059 | fetch operations. You need to use an override suffix when you use the |
| 1060 | variable (e.g. ``FETCHCMD_git`` or ``FETCHCMD_svn``). |
| 1061 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1062 | :term:`FILE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1063 | Points at the current file. BitBake sets this variable during the |
| 1064 | parsing process to identify the file being parsed. BitBake also sets |
| 1065 | this variable when a recipe is being executed to identify the recipe |
| 1066 | file. |
| 1067 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1068 | :term:`FILESPATH` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1069 | Specifies directories BitBake uses when searching for patches and |
| 1070 | files. The "local" fetcher module uses these directories when |
| 1071 | handling ``file://`` URLs. The variable behaves like a shell ``PATH`` |
| 1072 | environment variable. The value is a colon-separated list of |
| 1073 | directories that are searched left-to-right in order. |
| 1074 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1075 | :term:`FILE_LAYERNAME` |
| 1076 | During parsing and task execution, this is set to the name of the |
| 1077 | layer containing the recipe file. Code can use this to identify which |
| 1078 | layer a recipe is from. |
| 1079 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1080 | :term:`GITDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1081 | The directory in which a local copy of a Git repository is stored |
| 1082 | when it is cloned. |
| 1083 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1084 | :term:`HGDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1085 | The directory in which files checked out of a Mercurial system are |
| 1086 | stored. |
| 1087 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1088 | :term:`HOMEPAGE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1089 | Website where more information about the software the recipe is |
| 1090 | building can be found. |
| 1091 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1092 | :term:`INHERIT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1093 | Causes the named class or classes to be inherited globally. Anonymous |
| 1094 | functions in the class or classes are not executed for the base |
| 1095 | configuration and in each individual recipe. The OpenEmbedded build |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1096 | system ignores changes to :term:`INHERIT` in individual recipes. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1097 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1098 | For more information on :term:`INHERIT`, see the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1099 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" |
| 1100 | section. |
| 1101 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1102 | :term:`LAYERDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1103 | Lists the layers, separated by spaces, upon which this recipe |
| 1104 | depends. Optionally, you can specify a specific layer version for a |
| 1105 | dependency by adding it to the end of the layer name with a colon, |
| 1106 | (e.g. "anotherlayer:3" to be compared against |
| 1107 | :term:`LAYERVERSION`\ ``_anotherlayer`` in |
| 1108 | this case). BitBake produces an error if any dependency is missing or |
| 1109 | the version numbers do not match exactly (if specified). |
| 1110 | |
| 1111 | You use this variable in the ``conf/layer.conf`` file. You must also |
| 1112 | use the specific layer name as a suffix to the variable (e.g. |
| 1113 | ``LAYERDEPENDS_mylayer``). |
| 1114 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1115 | :term:`LAYERDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1116 | When used inside the ``layer.conf`` configuration file, this variable |
| 1117 | provides the path of the current layer. This variable is not |
| 1118 | available outside of ``layer.conf`` and references are expanded |
| 1119 | immediately when parsing of the file completes. |
| 1120 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1121 | :term:`LAYERDIR_RE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1122 | When used inside the ``layer.conf`` configuration file, this variable |
| 1123 | provides the path of the current layer, escaped for use in a regular |
| 1124 | expression (:term:`BBFILE_PATTERN`). This |
| 1125 | variable is not available outside of ``layer.conf`` and references |
| 1126 | are expanded immediately when parsing of the file completes. |
| 1127 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 1128 | :term:`LAYERSERIES_COMPAT` |
| 1129 | Lists the versions of the OpenEmbedded-Core (OE-Core) for which |
| 1130 | a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable |
| 1131 | allows the layer maintainer to indicate which combinations of the |
| 1132 | layer and OE-Core can be expected to work. The variable gives the |
| 1133 | system a way to detect when a layer has not been tested with new |
| 1134 | releases of OE-Core (e.g. the layer is not maintained). |
| 1135 | |
| 1136 | To specify the OE-Core versions for which a layer is compatible, use |
| 1137 | this variable in your layer's ``conf/layer.conf`` configuration file. |
| 1138 | For the list, use the Yocto Project release name (e.g. "kirkstone", |
| 1139 | "mickledore"). To specify multiple OE-Core versions for the layer, use |
| 1140 | a space-separated list:: |
| 1141 | |
| 1142 | LAYERSERIES_COMPAT_layer_root_name = "kirkstone mickledore" |
| 1143 | |
| 1144 | .. note:: |
| 1145 | |
| 1146 | Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project |
| 1147 | Compatible version 2 standard. |
| 1148 | The OpenEmbedded build system produces a warning if the variable |
| 1149 | is not set for any given layer. |
| 1150 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1151 | :term:`LAYERVERSION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1152 | Optionally specifies the version of a layer as a single number. You |
| 1153 | can use this variable within |
| 1154 | :term:`LAYERDEPENDS` for another layer in |
| 1155 | order to depend on a specific version of the layer. |
| 1156 | |
| 1157 | You use this variable in the ``conf/layer.conf`` file. You must also |
| 1158 | use the specific layer name as a suffix to the variable (e.g. |
| 1159 | ``LAYERDEPENDS_mylayer``). |
| 1160 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1161 | :term:`LICENSE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1162 | The list of source licenses for the recipe. |
| 1163 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1164 | :term:`MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1165 | Specifies additional paths from which BitBake gets source code. When |
| 1166 | the build system searches for source code, it first tries the local |
| 1167 | download directory. If that location fails, the build system tries |
| 1168 | locations defined by :term:`PREMIRRORS`, the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1169 | upstream source, and then locations specified by :term:`MIRRORS` in that |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1170 | order. |
| 1171 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1172 | :term:`OVERRIDES` |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1173 | A colon-separated list that BitBake uses to control what variables are |
| 1174 | overridden after BitBake parses recipes and configuration files. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1175 | |
| 1176 | Following is a simple example that uses an overrides list based on |
| 1177 | machine architectures: OVERRIDES = "arm:x86:mips:powerpc" You can |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1178 | find information on how to use :term:`OVERRIDES` in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1179 | ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax |
| 1180 | (overrides)`" section. |
| 1181 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1182 | :term:`P4DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1183 | The directory in which a local copy of a Perforce depot is stored |
| 1184 | when it is fetched. |
| 1185 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1186 | :term:`PACKAGES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1187 | The list of packages the recipe creates. |
| 1188 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1189 | :term:`PACKAGES_DYNAMIC` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1190 | A promise that your recipe satisfies runtime dependencies for |
| 1191 | optional modules that are found in other recipes. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1192 | :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1193 | only states that they should be satisfied. For example, if a hard, |
| 1194 | runtime dependency (:term:`RDEPENDS`) of another |
| 1195 | package is satisfied during the build through the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1196 | :term:`PACKAGES_DYNAMIC` variable, but a package with the module name is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1197 | never actually produced, then the other package will be broken. |
| 1198 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1199 | :term:`PE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1200 | The epoch of the recipe. By default, this variable is unset. The |
| 1201 | variable is used to make upgrades possible when the versioning scheme |
| 1202 | changes in some backwards incompatible way. |
| 1203 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1204 | :term:`PERSISTENT_DIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1205 | Specifies the directory BitBake uses to store data that should be |
| 1206 | preserved between builds. In particular, the data stored is the data |
| 1207 | that uses BitBake's persistent data API and the data used by the PR |
| 1208 | Server and PR Service. |
| 1209 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1210 | :term:`PF` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1211 | Specifies the recipe or package name and includes all version and |
| 1212 | revision numbers (i.e. ``eglibc-2.13-r20+svnr15508/`` and |
| 1213 | ``bash-4.2-r1/``). |
| 1214 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1215 | :term:`PN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1216 | The recipe name. |
| 1217 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1218 | :term:`PR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1219 | The revision of the recipe. |
| 1220 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1221 | :term:`PREFERRED_PROVIDER` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1222 | Determines which recipe should be given preference when multiple |
| 1223 | recipes provide the same item. You should always suffix the variable |
| 1224 | with the name of the provided item, and you should set it to the |
| 1225 | :term:`PN` of the recipe to which you want to give |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1226 | precedence. Some examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1227 | |
| 1228 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 1229 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
| 1230 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
| 1231 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1232 | :term:`PREFERRED_PROVIDERS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1233 | Determines which recipe should be given preference for cases where |
| 1234 | multiple recipes provide the same item. Functionally, |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1235 | :term:`PREFERRED_PROVIDERS` is identical to |
| 1236 | :term:`PREFERRED_PROVIDER`. However, the :term:`PREFERRED_PROVIDERS` variable |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1237 | lets you define preferences for multiple situations using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1238 | form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1239 | |
| 1240 | PREFERRED_PROVIDERS = "xxx:yyy aaa:bbb ..." |
| 1241 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1242 | This form is a convenient replacement for the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1243 | |
| 1244 | PREFERRED_PROVIDER_xxx = "yyy" |
| 1245 | PREFERRED_PROVIDER_aaa = "bbb" |
| 1246 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1247 | :term:`PREFERRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1248 | If there are multiple versions of a recipe available, this variable |
| 1249 | determines which version should be given preference. You must always |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1250 | suffix the variable with the :term:`PN` you want to |
| 1251 | select, and you should set :term:`PV` accordingly for |
| 1252 | precedence. |
| 1253 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1254 | The :term:`PREFERRED_VERSION` variable supports limited wildcard use |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1255 | through the "``%``" character. You can use the character to match any |
| 1256 | number of characters, which can be useful when specifying versions |
| 1257 | that contain long revision numbers that potentially change. Here are |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1258 | two examples:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1259 | |
| 1260 | PREFERRED_VERSION_python = "2.7.3" |
| 1261 | PREFERRED_VERSION_linux-yocto = "4.12%" |
| 1262 | |
| 1263 | .. important:: |
| 1264 | |
| 1265 | The use of the " % " character is limited in that it only works at the |
| 1266 | end of the string. You cannot use the wildcard character in any other |
| 1267 | location of the string. |
| 1268 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1269 | If a recipe with the specified version is not available, a warning |
| 1270 | message will be shown. See :term:`REQUIRED_VERSION` if you want this |
| 1271 | to be an error instead. |
| 1272 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1273 | :term:`PREMIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1274 | Specifies additional paths from which BitBake gets source code. When |
| 1275 | the build system searches for source code, it first tries the local |
| 1276 | download directory. If that location fails, the build system tries |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1277 | locations defined by :term:`PREMIRRORS`, the upstream source, and then |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1278 | locations specified by :term:`MIRRORS` in that order. |
| 1279 | |
| 1280 | Typically, you would add a specific server for the build system to |
| 1281 | attempt before any others by adding something like the following to |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1282 | your configuration:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1283 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1284 | PREMIRRORS:prepend = "\ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1285 | git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \ |
| 1286 | ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \ |
| 1287 | http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \ |
| 1288 | https://.*/.* http://downloads.yoctoproject.org/mirror/sources/" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1289 | |
| 1290 | These changes cause the build system to intercept Git, FTP, HTTP, and |
| 1291 | HTTPS requests and direct them to the ``http://`` sources mirror. You can |
| 1292 | use ``file://`` URLs to point to local directories or network shares as |
| 1293 | well. |
| 1294 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1295 | :term:`PROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1296 | A list of aliases by which a particular recipe can be known. By |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1297 | default, a recipe's own :term:`PN` is implicitly already in its |
| 1298 | :term:`PROVIDES` list. If a recipe uses :term:`PROVIDES`, the additional |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1299 | aliases are synonyms for the recipe and can be useful satisfying |
| 1300 | dependencies of other recipes during the build as specified by |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1301 | :term:`DEPENDS`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1302 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1303 | Consider the following example :term:`PROVIDES` statement from a recipe |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1304 | file ``libav_0.8.11.bb``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1305 | |
| 1306 | PROVIDES += "libpostproc" |
| 1307 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1308 | The :term:`PROVIDES` statement results in the "libav" recipe also being known |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1309 | as "libpostproc". |
| 1310 | |
| 1311 | In addition to providing recipes under alternate names, the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1312 | :term:`PROVIDES` mechanism is also used to implement virtual targets. A |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1313 | virtual target is a name that corresponds to some particular |
| 1314 | functionality (e.g. a Linux kernel). Recipes that provide the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1315 | functionality in question list the virtual target in :term:`PROVIDES`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1316 | Recipes that depend on the functionality in question can include the |
| 1317 | virtual target in :term:`DEPENDS` to leave the |
| 1318 | choice of provider open. |
| 1319 | |
| 1320 | Conventionally, virtual targets have names on the form |
| 1321 | "virtual/function" (e.g. "virtual/kernel"). The slash is simply part |
| 1322 | of the name and has no syntactical significance. |
| 1323 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1324 | :term:`PRSERV_HOST` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1325 | The network based :term:`PR` service host and port. |
| 1326 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1327 | Following is an example of how the :term:`PRSERV_HOST` variable is set:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1328 | |
| 1329 | PRSERV_HOST = "localhost:0" |
| 1330 | |
| 1331 | You must set the variable if you want to automatically start a local PR |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1332 | service. You can set :term:`PRSERV_HOST` to other values to use a remote PR |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1333 | service. |
| 1334 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1335 | :term:`PV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1336 | The version of the recipe. |
| 1337 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1338 | :term:`RDEPENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1339 | Lists a package's runtime dependencies (i.e. other packages) that |
| 1340 | must be installed in order for the built package to run correctly. If |
| 1341 | a package in this list cannot be found during the build, you will get |
| 1342 | a build error. |
| 1343 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1344 | Because the :term:`RDEPENDS` variable applies to packages being built, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1345 | you should always use the variable in a form with an attached package |
| 1346 | name. For example, suppose you are building a development package |
| 1347 | that depends on the ``perl`` package. In this case, you would use the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1348 | following :term:`RDEPENDS` statement:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1349 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1350 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1351 | |
| 1352 | In the example, the development package depends on the ``perl`` package. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1353 | Thus, the :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1354 | of the variable. |
| 1355 | |
| 1356 | BitBake supports specifying versioned dependencies. Although the |
| 1357 | syntax varies depending on the packaging format, BitBake hides these |
| 1358 | differences from you. Here is the general syntax to specify versions |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1359 | with the :term:`RDEPENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1360 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1361 | RDEPENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1362 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1363 | For ``operator``, you can specify the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1364 | |
| 1365 | = |
| 1366 | < |
| 1367 | > |
| 1368 | <= |
| 1369 | >= |
| 1370 | |
| 1371 | For example, the following sets up a dependency on version 1.2 or |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1372 | greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1373 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1374 | RDEPENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1375 | |
| 1376 | For information on build-time dependencies, see the :term:`DEPENDS` |
| 1377 | variable. |
| 1378 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1379 | :term:`REPODIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1380 | The directory in which a local copy of a ``google-repo`` directory is |
| 1381 | stored when it is synced. |
| 1382 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1383 | :term:`REQUIRED_VERSION` |
| 1384 | If there are multiple versions of a recipe available, this variable |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1385 | determines which version should be given preference. :term:`REQUIRED_VERSION` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1386 | works in exactly the same manner as :term:`PREFERRED_VERSION`, except |
| 1387 | that if the specified version is not available then an error message |
| 1388 | is shown and the build fails immediately. |
| 1389 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1390 | If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set for |
| 1391 | the same recipe, the :term:`REQUIRED_VERSION` value applies. |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 1392 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1393 | :term:`RPROVIDES` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1394 | A list of package name aliases that a package also provides. These |
| 1395 | aliases are useful for satisfying runtime dependencies of other |
| 1396 | packages both during the build and on the target (as specified by |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1397 | :term:`RDEPENDS`). |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1398 | |
| 1399 | As with all package-controlling variables, you must always use the |
| 1400 | variable in conjunction with a package name override. Here is an |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1401 | example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1402 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1403 | RPROVIDES:${PN} = "widget-abi-2" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1404 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1405 | :term:`RRECOMMENDS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1406 | A list of packages that extends the usability of a package being |
| 1407 | built. The package being built does not depend on this list of |
| 1408 | packages in order to successfully build, but needs them for the |
| 1409 | extended usability. To specify runtime dependencies for packages, see |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1410 | the :term:`RDEPENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1411 | |
| 1412 | BitBake supports specifying versioned recommends. Although the syntax |
| 1413 | varies depending on the packaging format, BitBake hides these |
| 1414 | differences from you. Here is the general syntax to specify versions |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1415 | with the :term:`RRECOMMENDS` variable:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1416 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1417 | RRECOMMENDS:${PN} = "package (operator version)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1418 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1419 | For ``operator``, you can specify the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1420 | |
| 1421 | = |
| 1422 | < |
| 1423 | > |
| 1424 | <= |
| 1425 | >= |
| 1426 | |
| 1427 | For example, the following sets up a recommend on version |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 1428 | 1.2 or greater of the package ``foo``:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1429 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1430 | RRECOMMENDS:${PN} = "foo (>= 1.2)" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1431 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1432 | :term:`SECTION` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1433 | The section in which packages should be categorized. |
| 1434 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1435 | :term:`SRC_URI` |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1436 | The list of source files --- local or remote. This variable tells |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1437 | BitBake which bits to pull for the build and how to pull them. For |
| 1438 | example, if the recipe or append file needs to fetch a single tarball |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1439 | from the Internet, the recipe or append file uses a :term:`SRC_URI` |
| 1440 | entry that specifies that tarball. On the other hand, if the recipe or |
| 1441 | append file needs to fetch a tarball, apply two patches, and include |
| 1442 | a custom file, the recipe or append file needs an :term:`SRC_URI` |
| 1443 | variable that specifies all those sources. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1444 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1445 | The following list explains the available URI protocols. URI |
| 1446 | protocols are highly dependent on particular BitBake Fetcher |
| 1447 | submodules. Depending on the fetcher BitBake uses, various URL |
| 1448 | parameters are employed. For specifics on the supported Fetchers, see |
| 1449 | the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers` |
| 1450 | section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1451 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1452 | - ``az://``: Fetches files from an Azure Storage account using HTTPS. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1453 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1454 | - ``bzr://``: Fetches files from a Bazaar revision control |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1455 | repository. |
| 1456 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1457 | - ``ccrc://``: Fetches files from a ClearCase repository. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1458 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1459 | - ``cvs://``: Fetches files from a CVS revision control |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1460 | repository. |
| 1461 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1462 | - ``file://``: Fetches files, which are usually files shipped |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1463 | with the Metadata, from the local machine. |
| 1464 | The path is relative to the :term:`FILESPATH` |
| 1465 | variable. Thus, the build system searches, in order, from the |
| 1466 | following directories, which are assumed to be a subdirectories of |
| 1467 | the directory in which the recipe file (``.bb``) or append file |
| 1468 | (``.bbappend``) resides: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1469 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1470 | - ``${BPN}``: the base recipe name without any special suffix |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1471 | or version numbers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1472 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1473 | - ``${BP}`` - ``${BPN}-${PV}``: the base recipe name and |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1474 | version but without any special package name suffix. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1475 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1476 | - ``files``: files within a directory, which is named ``files`` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1477 | and is also alongside the recipe or append file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1478 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1479 | - ``ftp://``: Fetches files from the Internet using FTP. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1480 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1481 | - ``git://``: Fetches files from a Git revision control |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1482 | repository. |
| 1483 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1484 | - ``gitsm://``: Fetches submodules from a Git revision control |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1485 | repository. |
| 1486 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1487 | - ``hg://``: Fetches files from a Mercurial (``hg``) revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1488 | control repository. |
| 1489 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1490 | - ``http://``: Fetches files from the Internet using HTTP. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1491 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1492 | - ``https://``: Fetches files from the Internet using HTTPS. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1493 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1494 | - ``npm://``: Fetches JavaScript modules from a registry. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1495 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1496 | - ``osc://``: Fetches files from an OSC (OpenSUSE Build service) |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1497 | revision control repository. |
| 1498 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1499 | - ``p4://``: Fetches files from a Perforce (``p4``) revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1500 | control repository. |
| 1501 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1502 | - ``repo://``: Fetches files from a repo (Git) repository. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1503 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1504 | - ``ssh://``: Fetches files from a secure shell. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1505 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1506 | - ``svn://``: Fetches files from a Subversion (``svn``) revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1507 | control repository. |
| 1508 | |
| 1509 | Here are some additional options worth mentioning: |
| 1510 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1511 | - ``downloadfilename``: Specifies the filename used when storing |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1512 | the downloaded file. |
| 1513 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1514 | - ``name``: Specifies a name to be used for association with |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1515 | :term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one |
| 1516 | file or git repository specified in :term:`SRC_URI`. For example:: |
| 1517 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1518 | SRC_URI = "git://example.com/foo.git;branch=main;name=first \ |
| 1519 | git://example.com/bar.git;branch=main;name=second \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1520 | http://example.com/file.tar.gz;name=third" |
| 1521 | |
| 1522 | SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15" |
| 1523 | SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f" |
| 1524 | SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1525 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1526 | - ``subdir``: Places the file (or extracts its contents) into the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1527 | specified subdirectory. This option is useful for unusual tarballs |
| 1528 | or other archives that do not have their files already in a |
| 1529 | subdirectory within the archive. |
| 1530 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1531 | - ``subpath``: Limits the checkout to a specific subpath of the |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1532 | tree when using the Git fetcher is used. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1533 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1534 | - ``unpack``: Controls whether or not to unpack the file if it is |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1535 | an archive. The default action is to unpack the file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1536 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1537 | :term:`SRCDATE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1538 | The date of the source code used to build the package. This variable |
| 1539 | applies only if the source was fetched from a Source Code Manager |
| 1540 | (SCM). |
| 1541 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1542 | :term:`SRCREV` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1543 | The revision of the source code used to build the package. This |
| 1544 | variable applies only when using Subversion, Git, Mercurial and |
| 1545 | Bazaar. If you want to build a fixed revision and you want to avoid |
| 1546 | performing a query on the remote repository every time BitBake parses |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1547 | your recipe, you should specify a :term:`SRCREV` that is a full revision |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1548 | identifier and not just a tag. |
| 1549 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1550 | :term:`SRCREV_FORMAT` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1551 | Helps construct valid :term:`SRCREV` values when |
| 1552 | multiple source controlled URLs are used in |
| 1553 | :term:`SRC_URI`. |
| 1554 | |
| 1555 | The system needs help constructing these values under these |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1556 | circumstances. Each component in the :term:`SRC_URI` is assigned a name |
| 1557 | and these are referenced in the :term:`SRCREV_FORMAT` variable. Consider |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1558 | an example with URLs named "machine" and "meta". In this case, |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1559 | :term:`SRCREV_FORMAT` could look like "machine_meta" and those names |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1560 | would have the SCM versions substituted into each position. Only one |
| 1561 | ``AUTOINC`` placeholder is added and if needed. And, this placeholder |
| 1562 | is placed at the start of the returned string. |
| 1563 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1564 | :term:`STAMP` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1565 | Specifies the base path used to create recipe stamp files. The path |
| 1566 | to an actual stamp file is constructed by evaluating this string and |
| 1567 | then appending additional information. |
| 1568 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1569 | :term:`STAMPCLEAN` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1570 | Specifies the base path used to create recipe stamp files. Unlike the |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1571 | :term:`STAMP` variable, :term:`STAMPCLEAN` can contain |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1572 | wildcards to match the range of files a clean operation should |
| 1573 | remove. BitBake uses a clean operation to remove any other stamps it |
| 1574 | should be removing when creating a new stamp. |
| 1575 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1576 | :term:`SUMMARY` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1577 | A short summary for the recipe, which is 72 characters or less. |
| 1578 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1579 | :term:`SVNDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1580 | The directory in which files checked out of a Subversion system are |
| 1581 | stored. |
| 1582 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1583 | :term:`T` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1584 | Points to a directory were BitBake places temporary files, which |
| 1585 | consist mostly of task logs and scripts, when building a particular |
| 1586 | recipe. |
| 1587 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1588 | :term:`TOPDIR` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1589 | Points to the build directory. BitBake automatically sets this |
| 1590 | variable. |