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