blob: 09d09a8d9ed95c5f5c93de9bfa7c5c2e7291d8e0 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001.. SPDX-License-Identifier: CC-BY-2.5
2
3==================
4Variables Glossary
5==================
6
7|
8
9This chapter lists common variables used by BitBake and gives an
10overview 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 Geisslerc9f78652020-09-18 14:11:35 -050026.. glossary::
Patrick Williams213cb262021-08-07 19:21:33 -050027 :sorted:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050028
Andrew Geisslerf0343792020-11-18 10:42:21 -060029 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050030 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 Williams213cb262021-08-07 19:21:33 -050034 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -050035 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 Geissler95ac1b82021-03-31 14:34:31 -050039 :term:`AZ_SAS`
40 Azure Storage Shared Access Signature, when using the
41 :ref:`Azure Storage fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
42 This variable can be defined to be used by the fetcher to authenticate
Andrew Geissler517393d2023-01-13 08:55:19 -060043 and gain access to non-public artifacts::
Andrew Geissler95ac1b82021-03-31 14:34:31 -050044
45 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
46
47 For more information see Microsoft's Azure Storage documentation at
48 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
49
50
Andrew Geisslerf0343792020-11-18 10:42:21 -060051 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050052 The directory in which BitBake executes functions during a recipe's
53 build process.
54
Andrew Geisslerf0343792020-11-18 10:42:21 -060055 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050056 Specifies a space-delimited list of hosts that the fetcher is allowed
57 to use to obtain the required source code. Following are
58 considerations surrounding this variable:
59
60 - This host list is only used if
61 :term:`BB_NO_NETWORK` is either not set or
62 set to "0".
63
64 - Limited support for the "``*``" wildcard character for matching
65 against the beginning of host names exists. For example, the
66 following setting matches ``git.gnu.org``, ``ftp.gnu.org``, and
67 ``foo.git.gnu.org``. ::
68
69 BB_ALLOWED_NETWORKS = "\*.gnu.org"
70
71 .. important::
72
73 The use of the "``*``" character only works at the beginning of
74 a host name and it must be isolated from the remainder of the
75 host name. You cannot use the wildcard character in any other
76 location of the name or combined with the front part of the
77 name.
78
79 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
80 is not.
81
82 - Mirrors not in the host list are skipped and logged in debug.
83
84 - Attempts to access networks not in the host list cause a failure.
85
Patrick Williams213cb262021-08-07 19:21:33 -050086 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -050087 :term:`PREMIRRORS` is very useful. Adding the
Patrick Williams213cb262021-08-07 19:21:33 -050088 host you want to use to :term:`PREMIRRORS` results in the source code
Andrew Geisslerc9f78652020-09-18 14:11:35 -050089 being fetched from an allowed location and avoids raising an error
90 when a host that is not allowed is in a
91 :term:`SRC_URI` statement. This is because the
Patrick Williams213cb262021-08-07 19:21:33 -050092 fetcher does not attempt to use the host listed in :term:`SRC_URI` after
93 a successful fetch from the :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050094
Andrew Geissler9aee5002022-03-30 16:27:02 +000095 :term:`BB_BASEHASH_IGNORE_VARS`
96 Lists variables that are excluded from checksum and dependency data.
97 Variables that are excluded can therefore change without affecting
98 the checksum mechanism. A common example would be the variable for
99 the path of the build. BitBake's output should not (and usually does
100 not) depend on the directory in which it was built.
101
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500102 :term:`BB_CHECK_SSL_CERTS`
103 Specifies if SSL certificates should be checked when fetching. The default
104 value is ``1`` and certificates are not checked if the value is set to ``0``.
105
Andrew Geisslerf0343792020-11-18 10:42:21 -0600106 :term:`BB_CONSOLELOG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500107 Specifies the path to a log file into which BitBake's user interface
108 writes output during the build.
109
Andrew Geisslerf0343792020-11-18 10:42:21 -0600110 :term:`BB_CURRENTTASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500111 Contains the name of the currently running task. The name does not
112 include the ``do_`` prefix.
113
Andrew Geisslerf0343792020-11-18 10:42:21 -0600114 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500115 Defines how BitBake handles situations where an append file
116 (``.bbappend``) has no corresponding recipe file (``.bb``). This
117 condition often occurs when layers get out of sync (e.g. ``oe-core``
118 bumps a recipe version and the old recipe no longer exists and the
119 other layer has not been updated to the new version of the recipe
120 yet).
121
122 The default fatal behavior is safest because it is the sane reaction
123 given something is out of sync. It is important to realize when your
124 changes are no longer being applied.
125
Andrew Geisslerf0343792020-11-18 10:42:21 -0600126 :term:`BB_DEFAULT_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500127 The default task to use when none is specified (e.g. with the ``-c``
128 command line option). The task name specified should not include the
129 ``do_`` prefix.
130
Andrew Geissler9b4d8b02021-02-19 12:26:16 -0600131 :term:`BB_DEFAULT_UMASK`
132 The default umask to apply to tasks if specified and no task specific
133 umask flag is set.
134
Andrew Geisslerf0343792020-11-18 10:42:21 -0600135 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500136 Monitors disk space and available inodes during the build and allows
137 you to control the build based on these parameters.
138
139 Disk space monitoring is disabled by default. When setting this
Andrew Geisslerc926e172021-05-07 16:11:35 -0500140 variable, use the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500141
142 BB_DISKMON_DIRS = "<action>,<dir>,<threshold> [...]"
143
144 where:
145
146 <action> is:
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000147 HALT: Immediately halt the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500148 a threshold is broken.
149 STOPTASKS: Stop the build after the currently
150 executing tasks have finished when
151 a threshold is broken.
152 WARN: Issue a warning but continue the
153 build when a threshold is broken.
154 Subsequent warnings are issued as
155 defined by the
156 BB_DISKMON_WARNINTERVAL variable,
157 which must be defined.
158
159 <dir> is:
160 Any directory you choose. You can specify one or
161 more directories to monitor by separating the
162 groupings with a space. If two directories are
163 on the same device, only the first directory
164 is monitored.
165
166 <threshold> is:
167 Either the minimum available disk space,
168 the minimum number of free inodes, or
169 both. You must specify at least one. To
170 omit one or the other, simply omit the value.
171 Specify the threshold using G, M, K for Gbytes,
172 Mbytes, and Kbytes, respectively. If you do
173 not specify G, M, or K, Kbytes is assumed by
174 default. Do not use GB, MB, or KB.
175
Andrew Geisslerc926e172021-05-07 16:11:35 -0500176 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500177
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000178 BB_DISKMON_DIRS = "HALT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500179 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000180 BB_DISKMON_DIRS = "HALT,${TMPDIR},,100K"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500181
182 The first example works only if you also set the
183 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000184 variable. This example causes the build system to immediately halt
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500185 when either the disk space in ``${TMPDIR}`` drops below 1 Gbyte or
186 the available free inodes drops below 100 Kbytes. Because two
187 directories are provided with the variable, the build system also
188 issues a warning when the disk space in the ``${SSTATE_DIR}``
189 directory drops below 1 Gbyte or the number of free inodes drops
190 below 100 Kbytes. Subsequent warnings are issued during intervals as
Patrick Williams213cb262021-08-07 19:21:33 -0500191 defined by the :term:`BB_DISKMON_WARNINTERVAL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500192
193 The second example stops the build after all currently executing
194 tasks complete when the minimum disk space in the ``${TMPDIR}``
195 directory drops below 1 Gbyte. No disk monitoring occurs for the free
196 inodes in this case.
197
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000198 The final example immediately halts the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500199 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
200 disk space monitoring for the directory itself occurs in this case.
201
Andrew Geisslerf0343792020-11-18 10:42:21 -0600202 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500203 Defines the disk space and free inode warning intervals.
204
Patrick Williams213cb262021-08-07 19:21:33 -0500205 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500206 must also use the :term:`BB_DISKMON_DIRS`
207 variable and define its action as "WARN". During the build,
208 subsequent warnings are issued each time disk space or number of free
209 inodes further reduces by the respective interval.
210
Patrick Williams213cb262021-08-07 19:21:33 -0500211 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
212 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500213 monitoring interval defaults to the following:
214 BB_DISKMON_WARNINTERVAL = "50M,5K"
215
216 When specifying the variable in your configuration file, use the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500217 following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500218
219 BB_DISKMON_WARNINTERVAL = "<disk_space_interval>,<disk_inode_interval>"
220
221 where:
222
223 <disk_space_interval> is:
224 An interval of memory expressed in either
225 G, M, or K for Gbytes, Mbytes, or Kbytes,
226 respectively. You cannot use GB, MB, or KB.
227
228 <disk_inode_interval> is:
229 An interval of free inodes expressed in either
230 G, M, or K for Gbytes, Mbytes, or Kbytes,
231 respectively. You cannot use GB, MB, or KB.
232
Andrew Geisslerc926e172021-05-07 16:11:35 -0500233 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234
235 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
236 BB_DISKMON_WARNINTERVAL = "50M,5K"
237
238 These variables cause BitBake to
239 issue subsequent warnings each time the available disk space further
240 reduces by 50 Mbytes or the number of free inodes further reduces by
241 5 Kbytes in the ``${SSTATE_DIR}`` directory. Subsequent warnings
242 based on the interval occur each time a respective interval is
243 reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes).
244
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000245 :term:`BB_ENV_PASSTHROUGH`
246 Specifies the internal list of variables to allow through from
Patrick Williams213cb262021-08-07 19:21:33 -0500247 the external environment into BitBake's datastore. If the value of
248 this variable is not specified (which is the default), the following
249 list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000250 :term:`BB_ENV_PASSTHROUGH`, and :term:`BB_ENV_PASSTHROUGH_ADDITIONS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500251
252 .. note::
253
254 You must set this variable in the external environment in order
255 for it to work.
256
Andrew Geissler9aee5002022-03-30 16:27:02 +0000257 :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
258 Specifies an additional set of variables to allow through from the
259 external environment into BitBake's datastore. This list of variables
260 are on top of the internal list set in
261 :term:`BB_ENV_PASSTHROUGH`.
262
263 .. note::
264
265 You must set this variable in the external environment in order
266 for it to work.
267
Andrew Geisslerf0343792020-11-18 10:42:21 -0600268 :term:`BB_FETCH_PREMIRRORONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500269 When set to "1", causes BitBake's fetcher module to only search
270 :term:`PREMIRRORS` for files. BitBake will not
271 search the main :term:`SRC_URI` or
272 :term:`MIRRORS`.
273
Andrew Geisslerf0343792020-11-18 10:42:21 -0600274 :term:`BB_FILENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275 Contains the filename of the recipe that owns the currently running
276 task. For example, if the ``do_fetch`` task that resides in the
Patrick Williams213cb262021-08-07 19:21:33 -0500277 ``my-recipe.bb`` is executing, the :term:`BB_FILENAME` variable contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500278 "/foo/path/my-recipe.bb".
279
Andrew Geisslerf0343792020-11-18 10:42:21 -0600280 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500281 Causes tarballs of the Git repositories, including the Git metadata,
282 to be placed in the :term:`DL_DIR` directory. Anyone
283 wishing to create a source mirror would want to enable this variable.
284
285 For performance reasons, creating and placing tarballs of the Git
286 repositories is not the default action by BitBake. ::
287
288 BB_GENERATE_MIRROR_TARBALLS = "1"
289
Andrew Geisslereff27472021-10-29 15:35:00 -0500290 :term:`BB_GENERATE_SHALLOW_TARBALLS`
291 Setting this variable to "1" when :term:`BB_GIT_SHALLOW` is also set to
292 "1" causes bitbake to generate shallow mirror tarballs when fetching git
293 repositories. The number of commits included in the shallow mirror
294 tarballs is controlled by :term:`BB_GIT_SHALLOW_DEPTH`.
295
296 If both :term:`BB_GIT_SHALLOW` and :term:`BB_GENERATE_MIRROR_TARBALLS` are
297 enabled, bitbake will generate shallow mirror tarballs by default for git
298 repositories. This separate variable exists so that shallow tarball
299 generation can be enabled without needing to also enable normal mirror
300 generation if it is not desired.
301
302 For example usage, see :term:`BB_GIT_SHALLOW`.
303
304 :term:`BB_GIT_SHALLOW`
305 Setting this variable to "1" enables the support for fetching, using and
306 generating mirror tarballs of `shallow git repositories <https://riptutorial.com/git/example/4584/shallow-clone>`_.
307 The external `git-make-shallow <https://git.openembedded.org/bitbake/tree/bin/git-make-shallow>`_
308 script is used for shallow mirror tarball creation.
309
310 When :term:`BB_GIT_SHALLOW` is enabled, bitbake will attempt to fetch a shallow
311 mirror tarball. If the shallow mirror tarball cannot be fetched, it will
312 try to fetch the full mirror tarball and use that.
313
314 When a mirror tarball is not available, a full git clone will be performed
315 regardless of whether this variable is set or not. Support for shallow
316 clones is not currently implemented as git does not directly support
317 shallow cloning a particular git commit hash (it only supports cloning
318 from a tag or branch reference).
319
320 See also :term:`BB_GIT_SHALLOW_DEPTH` and
321 :term:`BB_GENERATE_SHALLOW_TARBALLS`.
322
323 Example usage::
324
325 BB_GIT_SHALLOW ?= "1"
326
327 # Keep only the top commit
328 BB_GIT_SHALLOW_DEPTH ?= "1"
329
330 # This defaults to enabled if both BB_GIT_SHALLOW and
331 # BB_GENERATE_MIRROR_TARBALLS are enabled
332 BB_GENERATE_SHALLOW_TARBALLS ?= "1"
333
334 :term:`BB_GIT_SHALLOW_DEPTH`
335 When used with :term:`BB_GENERATE_SHALLOW_TARBALLS`, this variable sets
336 the number of commits to include in generated shallow mirror tarballs.
337 With a depth of 1, only the commit referenced in :term:`SRCREV` is
338 included in the shallow mirror tarball. Increasing the depth includes
339 additional parent commits, working back through the commit history.
340
341 If this variable is unset, bitbake will default to a depth of 1 when
342 generating shallow mirror tarballs.
343
344 For example usage, see :term:`BB_GIT_SHALLOW`.
345
Andrew Geisslerf0343792020-11-18 10:42:21 -0600346 :term:`BB_HASHCHECK_FUNCTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500347 Specifies the name of the function to call during the "setscene" part
348 of the task's execution in order to validate the list of task hashes.
349 The function returns the list of setscene tasks that should be
350 executed.
351
352 At this point in the execution of the code, the objective is to
353 quickly verify if a given setscene function is likely to work or not.
354 It's easier to check the list of setscene functions in one pass than
355 to call many individual tasks. The returned list need not be
356 completely accurate. A given setscene task can still later fail.
357 However, the more accurate the data returned, the more efficient the
358 build will be.
359
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000360 :term:`BB_HASHCONFIG_IGNORE_VARS`
Patrick Williams213cb262021-08-07 19:21:33 -0500361 Lists variables that are excluded from base configuration checksum,
362 which is used to determine if the cache can be reused.
363
364 One of the ways BitBake determines whether to re-parse the main
365 metadata is through checksums of the variables in the datastore of
366 the base configuration data. There are variables that you typically
367 want to exclude when checking whether or not to re-parse and thus
368 rebuild the cache. As an example, you would usually exclude ``TIME``
369 and ``DATE`` because these variables are always changing. If you did
370 not exclude them, BitBake would never reuse the cache.
371
Andrew Geissler09036742021-06-25 14:25:14 -0500372 :term:`BB_HASHSERVE`
373 Specifies the Hash Equivalence server to use.
374
375 If set to ``auto``, BitBake automatically starts its own server
Andrew Geissler595f6302022-01-24 19:11:47 +0000376 over a UNIX domain socket. An option is to connect this server
377 to an upstream one, by setting :term:`BB_HASHSERVE_UPSTREAM`.
Andrew Geissler09036742021-06-25 14:25:14 -0500378
Andrew Geissler595f6302022-01-24 19:11:47 +0000379 If set to ``unix://path``, BitBake will connect to an existing
380 hash server available over a UNIX domain socket.
381
382 If set to ``host:port``, BitBake will connect to a remote server on the
Andrew Geissler09036742021-06-25 14:25:14 -0500383 specified host. This allows multiple clients to share the same
384 hash equivalence data.
385
Andrew Geissler595f6302022-01-24 19:11:47 +0000386 The remote server can be started manually through
387 the ``bin/bitbake-hashserv`` script provided by BitBake,
388 which supports UNIX domain sockets too. This script also allows
389 to start the server in read-only mode, to avoid accepting
390 equivalences that correspond to Share State caches that are
391 only available on specific clients.
392
393 :term:`BB_HASHSERVE_UPSTREAM`
394 Specifies an upstream Hash Equivalence server.
395
396 This optional setting is only useful when a local Hash Equivalence
397 server is started (setting :term:`BB_HASHSERVE` to ``auto``),
398 and you wish the local server to query an upstream server for
399 Hash Equivalence data.
400
401 Example usage::
402
Patrick Williamsdb4c27e2022-08-05 08:10:29 -0500403 BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
Andrew Geissler595f6302022-01-24 19:11:47 +0000404
Andrew Geisslerf0343792020-11-18 10:42:21 -0600405 :term:`BB_INVALIDCONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500406 Used in combination with the ``ConfigParsed`` event to trigger
407 re-parsing the base metadata (i.e. all the recipes). The
408 ``ConfigParsed`` event can set the variable to trigger the re-parse.
409 You must be careful to avoid recursive loops with this functionality.
410
Andrew Geisslerf0343792020-11-18 10:42:21 -0600411 :term:`BB_LOGCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500412 Specifies the name of a config file that contains the user logging
413 configuration. See
414 :ref:`bitbake-user-manual/bitbake-user-manual-execution:logging`
415 for additional information
416
Andrew Geisslerf0343792020-11-18 10:42:21 -0600417 :term:`BB_LOGFMT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500418 Specifies the name of the log files saved into
Patrick Williams213cb262021-08-07 19:21:33 -0500419 ``${``\ :term:`T`\ ``}``. By default, the :term:`BB_LOGFMT`
Andrew Geissler5199d832021-09-24 16:47:35 -0500420 variable is undefined and the log filenames get created using the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500421 following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500422
423 log.{task}.{pid}
424
425 If you want to force log files to take a specific name, you can set this
426 variable in a configuration file.
427
Andrew Geissler9aee5002022-03-30 16:27:02 +0000428 :term:`BB_MULTI_PROVIDER_ALLOWED`
429 Allows you to suppress BitBake warnings caused when building two
430 separate recipes that provide the same output.
431
432 BitBake normally issues a warning when building two different recipes
433 where each provides the same output. This scenario is usually
434 something the user does not want. However, cases do exist where it
435 makes sense, particularly in the ``virtual/*`` namespace. You can use
436 this variable to suppress BitBake's warnings.
437
438 To use the variable, list provider names (e.g. recipe names,
439 ``virtual/kernel``, and so forth).
440
Andrew Geisslerf0343792020-11-18 10:42:21 -0600441 :term:`BB_NICE_LEVEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500442 Allows BitBake to run at a specific priority (i.e. nice level).
443 System permissions usually mean that BitBake can reduce its priority
444 but not raise it again. See :term:`BB_TASK_NICE_LEVEL` for
445 additional information.
446
Andrew Geisslerf0343792020-11-18 10:42:21 -0600447 :term:`BB_NO_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 Disables network access in the BitBake fetcher modules. With this
449 access disabled, any command that attempts to access the network
450 becomes an error.
451
452 Disabling network access is useful for testing source mirrors,
453 running builds when not connected to the Internet, and when operating
454 in certain kinds of firewall environments.
455
Patrick Williams213cb262021-08-07 19:21:33 -0500456 :term:`BB_NUMBER_PARSE_THREADS`
457 Sets the number of threads BitBake uses when parsing. By default, the
458 number of threads is equal to the number of cores on the system.
459
Andrew Geisslerf0343792020-11-18 10:42:21 -0600460 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500461 The maximum number of tasks BitBake should run in parallel at any one
462 time. If your host development system supports multiple cores, a good
463 rule of thumb is to set this variable to twice the number of cores.
464
Andrew Geisslerf0343792020-11-18 10:42:21 -0600465 :term:`BB_ORIGENV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500466 Contains a copy of the original external environment in which BitBake
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000467 was run. The copy is taken before any variable values configured to
468 pass through from the external environment are filtered into BitBake's
469 datastore.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500470
471 .. note::
472
473 The contents of this variable is a datastore object that can be
474 queried using the normal datastore operations.
475
Andrew Geisslerf0343792020-11-18 10:42:21 -0600476 :term:`BB_PRESERVE_ENV`
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000477 Disables environment filtering and instead allows all variables through
478 from the external environment into BitBake's datastore.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500479
480 .. note::
481
482 You must set this variable in the external environment in order
483 for it to work.
484
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500485 :term:`BB_PRESSURE_MAX_CPU`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500486 Specifies a maximum CPU pressure threshold, above which BitBake's
487 scheduler will not start new tasks (providing there is at least
488 one active task). If no value is set, CPU pressure is not
489 monitored when starting tasks.
490
491 The pressure data is calculated based upon what Linux kernels since
492 version 4.20 expose under ``/proc/pressure``. The threshold represents
493 the difference in "total" pressure from the previous second. The
494 minimum value is 1.0 (extremely slow builds) and the maximum is
495 1000000 (a pressure value unlikely to ever be reached).
496
497 This threshold can be set in ``conf/local.conf`` as::
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500498
499 BB_PRESSURE_MAX_CPU = "500"
500
501 :term:`BB_PRESSURE_MAX_IO`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500502 Specifies a maximum I/O pressure threshold, above which BitBake's
503 scheduler will not start new tasks (providing there is at least
504 one active task). If no value is set, I/O pressure is not
505 monitored when starting tasks.
506
507 The pressure data is calculated based upon what Linux kernels since
508 version 4.20 expose under ``/proc/pressure``. The threshold represents
509 the difference in "total" pressure from the previous second. The
510 minimum value is 1.0 (extremely slow builds) and the maximum is
511 1000000 (a pressure value unlikely to ever be reached).
512
513 At this point in time, experiments show that IO pressure tends to
514 be short-lived and regulating just the CPU with
515 :term:`BB_PRESSURE_MAX_CPU` can help to reduce it.
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500516
517 :term:`BB_PRESSURE_MAX_MEMORY`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500518
519 Specifies a maximum memory pressure threshold, above which BitBake's
520 scheduler will not start new tasks (providing there is at least
521 one active task). If no value is set, memory pressure is not
522 monitored when starting tasks.
523
524 The pressure data is calculated based upon what Linux kernels since
525 version 4.20 expose under ``/proc/pressure``. The threshold represents
526 the difference in "total" pressure from the previous second. The
527 minimum value is 1.0 (extremely slow builds) and the maximum is
528 1000000 (a pressure value unlikely to ever be reached).
529
530 Memory pressure is experienced when time is spent swapping,
531 refaulting pages from the page cache or performing direct reclaim.
532 This is why memory pressure is rarely seen, but setting this variable
533 might be useful as a last resort to prevent OOM errors if they are
534 occurring during builds.
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500535
Andrew Geisslerf0343792020-11-18 10:42:21 -0600536 :term:`BB_RUNFMT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500537 Specifies the name of the executable script files (i.e. run files)
538 saved into ``${``\ :term:`T`\ ``}``. By default, the
Andrew Geissler5199d832021-09-24 16:47:35 -0500539 :term:`BB_RUNFMT` variable is undefined and the run filenames get
Andrew Geisslerc926e172021-05-07 16:11:35 -0500540 created using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500541
542 run.{task}.{pid}
543
544 If you want to force run files to take a specific name, you can set this
545 variable in a configuration file.
546
Andrew Geisslerf0343792020-11-18 10:42:21 -0600547 :term:`BB_RUNTASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500548 Contains the name of the currently executing task. The value includes
549 the "do\_" prefix. For example, if the currently executing task is
550 ``do_config``, the value is "do_config".
551
Andrew Geisslerf0343792020-11-18 10:42:21 -0600552 :term:`BB_SCHEDULER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500553 Selects the name of the scheduler to use for the scheduling of
554 BitBake tasks. Three options exist:
555
Andrew Geissler9aee5002022-03-30 16:27:02 +0000556 - *basic* --- the basic framework from which everything derives. Using
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500557 this option causes tasks to be ordered numerically as they are
558 parsed.
559
Andrew Geissler9aee5002022-03-30 16:27:02 +0000560 - *speed* --- executes tasks first that have more tasks depending on
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500561 them. The "speed" option is the default.
562
Andrew Geissler9aee5002022-03-30 16:27:02 +0000563 - *completion* --- causes the scheduler to try to complete a given
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500564 recipe once its build has started.
565
Andrew Geisslerf0343792020-11-18 10:42:21 -0600566 :term:`BB_SCHEDULERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500567 Defines custom schedulers to import. Custom schedulers need to be
568 derived from the ``RunQueueScheduler`` class.
569
570 For information how to select a scheduler, see the
571 :term:`BB_SCHEDULER` variable.
572
Andrew Geisslerf0343792020-11-18 10:42:21 -0600573 :term:`BB_SETSCENE_DEPVALID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500574 Specifies a function BitBake calls that determines whether BitBake
575 requires a setscene dependency to be met.
576
577 When running a setscene task, BitBake needs to know which
578 dependencies of that setscene task also need to be run. Whether
579 dependencies also need to be run is highly dependent on the metadata.
580 The function specified by this variable returns a "True" or "False"
581 depending on whether the dependency needs to be met.
582
Andrew Geisslerf0343792020-11-18 10:42:21 -0600583 :term:`BB_SIGNATURE_EXCLUDE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500584 Lists variable flags (varflags) that can be safely excluded from
585 checksum and dependency data for keys in the datastore. When
586 generating checksum or dependency data for keys in the datastore, the
587 flags set against that key are normally included in the checksum.
588
589 For more information on varflags, see the
590 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variable flags`"
591 section.
592
Andrew Geisslerf0343792020-11-18 10:42:21 -0600593 :term:`BB_SIGNATURE_HANDLER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 Defines the name of the signature handler BitBake uses. The signature
595 handler defines the way stamp files are created and handled, if and
596 how the signature is incorporated into the stamps, and how the
597 signature itself is generated.
598
599 A new signature handler can be added by injecting a class derived
600 from the ``SignatureGenerator`` class into the global namespace.
601
Andrew Geisslerf0343792020-11-18 10:42:21 -0600602 :term:`BB_SRCREV_POLICY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500603 Defines the behavior of the fetcher when it interacts with source
604 control systems and dynamic source revisions. The
Patrick Williams213cb262021-08-07 19:21:33 -0500605 :term:`BB_SRCREV_POLICY` variable is useful when working without a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500606 network.
607
608 The variable can be set using one of two policies:
609
Andrew Geissler9aee5002022-03-30 16:27:02 +0000610 - *cache* --- retains the value the system obtained previously rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500611 than querying the source control system each time.
612
Andrew Geissler9aee5002022-03-30 16:27:02 +0000613 - *clear* --- queries the source controls system every time. With this
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500614 policy, there is no cache. The "clear" policy is the default.
615
Andrew Geisslerf0343792020-11-18 10:42:21 -0600616 :term:`BB_STRICT_CHECKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500617 Sets a more strict checksum mechanism for non-local URLs. Setting
618 this variable to a value causes BitBake to report an error if it
619 encounters a non-local URL that does not have at least one checksum
620 specified.
621
Andrew Geisslerf0343792020-11-18 10:42:21 -0600622 :term:`BB_TASK_IONICE_LEVEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500623 Allows adjustment of a task's Input/Output priority. During
624 Autobuilder testing, random failures can occur for tasks due to I/O
625 starvation. These failures occur during various QEMU runtime
Patrick Williams213cb262021-08-07 19:21:33 -0500626 timeouts. You can use the :term:`BB_TASK_IONICE_LEVEL` variable to adjust
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500627 the I/O priority of these tasks.
628
629 .. note::
630
631 This variable works similarly to the :term:`BB_TASK_NICE_LEVEL`
632 variable except with a task's I/O priorities.
633
Andrew Geisslerc926e172021-05-07 16:11:35 -0500634 Set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500635
636 BB_TASK_IONICE_LEVEL = "class.prio"
637
638 For *class*, the default value is "2", which is a best effort. You can use
639 "1" for realtime and "3" for idle. If you want to use realtime, you
640 must have superuser privileges.
641
642 For *prio*, you can use any value from "0", which is the highest
643 priority, to "7", which is the lowest. The default value is "4". You
644 do not need any special privileges to use this range of priority
645 values.
646
647 .. note::
648
649 In order for your I/O priority settings to take effect, you need the
650 Completely Fair Queuing (CFQ) Scheduler selected for the backing block
651 device. To select the scheduler, use the following command form where
Andrew Geisslerc926e172021-05-07 16:11:35 -0500652 device is the device (e.g. sda, sdb, and so forth)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500653
Andrew Geisslerf0343792020-11-18 10:42:21 -0600654 $ sudo sh -c "echo cfq > /sys/block/device/queu/scheduler"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500655
Andrew Geisslerf0343792020-11-18 10:42:21 -0600656 :term:`BB_TASK_NICE_LEVEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500657 Allows specific tasks to change their priority (i.e. nice level).
658
659 You can use this variable in combination with task overrides to raise
660 or lower priorities of specific tasks. For example, on the `Yocto
Andrew Geisslereff27472021-10-29 15:35:00 -0500661 Project <https://www.yoctoproject.org>`__ autobuilder, QEMU emulation
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500662 in images is given a higher priority as compared to build tasks to
663 ensure that images do not suffer timeouts on loaded systems.
664
Andrew Geisslerf0343792020-11-18 10:42:21 -0600665 :term:`BB_TASKHASH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500666 Within an executing task, this variable holds the hash of the task as
667 returned by the currently enabled signature generator.
668
Andrew Geisslerf0343792020-11-18 10:42:21 -0600669 :term:`BB_VERBOSE_LOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500670 Controls how verbose BitBake is during builds. If set, shell scripts
671 echo commands and shell script output appears on standard out
672 (stdout).
673
Andrew Geisslerf0343792020-11-18 10:42:21 -0600674 :term:`BB_WORKERCONTEXT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500675 Specifies if the current context is executing a task. BitBake sets
676 this variable to "1" when a task is being executed. The value is not
677 set when the task is in server context during parsing or event
678 handling.
679
Andrew Geisslerf0343792020-11-18 10:42:21 -0600680 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500681 Allows you to extend a recipe so that it builds variants of the
682 software. Some examples of these variants for recipes from the
683 OpenEmbedded-Core metadata are "natives" such as ``quilt-native``,
684 which is a copy of Quilt built to run on the build system; "crosses"
685 such as ``gcc-cross``, which is a compiler built to run on the build
686 machine but produces binaries that run on the target ``MACHINE``;
687 "nativesdk", which targets the SDK machine instead of ``MACHINE``;
688 and "mulitlibs" in the form "``multilib:``\ multilib_name".
689
690 To build a different variant of the recipe with a minimal amount of
691 code, it usually is as simple as adding the variable to your recipe.
692 Here are two examples. The "native" variants are from the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500693 OpenEmbedded-Core metadata::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500694
695 BBCLASSEXTEND =+ "native nativesdk"
696 BBCLASSEXTEND =+ "multilib:multilib_name"
697
698 .. note::
699
Patrick Williams213cb262021-08-07 19:21:33 -0500700 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500701 variants by rewriting variable values and applying overrides such
702 as ``_class-native``. For example, to generate a native version of
703 a recipe, a :term:`DEPENDS` on "foo" is
Patrick Williams213cb262021-08-07 19:21:33 -0500704 rewritten to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500705
Patrick Williams213cb262021-08-07 19:21:33 -0500706 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500707 Parsing once adds some limitations. For example, it is not
708 possible to include a different file depending on the variant,
709 since ``include`` statements are processed when the recipe is
710 parsed.
711
Andrew Geisslerf0343792020-11-18 10:42:21 -0600712 :term:`BBDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500713 Sets the BitBake debug output level to a specific value as
714 incremented by the ``-D`` command line option.
715
716 .. note::
717
718 You must set this variable in the external environment in order
719 for it to work.
720
Andrew Geisslerf0343792020-11-18 10:42:21 -0600721 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500722 Lists the names of configured layers. These names are used to find
723 the other ``BBFILE_*`` variables. Typically, each layer appends its
724 name to this variable in its ``conf/layer.conf`` file.
725
Andrew Geisslerf0343792020-11-18 10:42:21 -0600726 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500727 Variable that expands to match files from
728 :term:`BBFILES` in a particular layer. This
729 variable is used in the ``conf/layer.conf`` file and must be suffixed
730 with the name of the specific layer (e.g.
731 ``BBFILE_PATTERN_emenlow``).
732
Andrew Geisslerf0343792020-11-18 10:42:21 -0600733 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500734 Assigns the priority for recipe files in each layer.
735
736 This variable is useful in situations where the same recipe appears
737 in more than one layer. Setting this variable allows you to
738 prioritize a layer against other layers that contain the same recipe
Andrew Geissler9aee5002022-03-30 16:27:02 +0000739 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500740 layers. The precedence established through this variable stands
741 regardless of a recipe's version (:term:`PV` variable).
Patrick Williams213cb262021-08-07 19:21:33 -0500742 For example, a layer that has a recipe with a higher :term:`PV` value but
743 for which the :term:`BBFILE_PRIORITY` is set to have a lower precedence
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500744 still has a lower precedence.
745
Patrick Williams213cb262021-08-07 19:21:33 -0500746 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500747 higher precedence. For example, the value 6 has a higher precedence
Patrick Williams213cb262021-08-07 19:21:33 -0500748 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
749 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750 for more information. The default priority, if unspecified for a
751 layer with no dependencies, is the lowest defined priority + 1 (or 1
752 if no priorities are defined).
753
754 .. tip::
755
756 You can use the command bitbake-layers show-layers to list all
757 configured layers along with their priorities.
758
Andrew Geisslerf0343792020-11-18 10:42:21 -0600759 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500760 A space-separated list of recipe files BitBake uses to build
761 software.
762
763 When specifying recipe files, you can pattern match using Python's
764 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
765 For details on the syntax, see the documentation by following the
766 previous link.
767
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500768 :term:`BBFILES_DYNAMIC`
769 Activates content depending on presence of identified layers. You
770 identify the layers by the collections that the layers define.
771
Patrick Williams213cb262021-08-07 19:21:33 -0500772 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files whose
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500773 corresponding ``.bb`` file is in a layer that attempts to modify other
774 layers through ``.bbappend`` but does not want to introduce a hard
775 dependency on those other layers.
776
777 Additionally you can prefix the rule with "!" to add ``.bbappend`` and
778 ``.bb`` files in case a layer is not present. Use this avoid hard
779 dependency on those other layers.
780
Patrick Williams213cb262021-08-07 19:21:33 -0500781 Use the following form for :term:`BBFILES_DYNAMIC`::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500782
783 collection_name:filename_pattern
784
785 The following example identifies two collection names and two filename
Andrew Geisslerc926e172021-05-07 16:11:35 -0500786 patterns::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500787
788 BBFILES_DYNAMIC += "\
789 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
790 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
791 "
792
793 When the collection name is prefixed with "!" it will add the file pattern in case
Andrew Geisslerc926e172021-05-07 16:11:35 -0500794 the layer is absent::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500795
796 BBFILES_DYNAMIC += "\
797 !clang-layer:${LAYERDIR}/backfill/meta-clang/*/*/*.bb \
798 "
799
800 This next example shows an error message that occurs because invalid
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000801 entries are found, which cause parsing to fail::
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500802
803 ERROR: BBFILES_DYNAMIC entries must be of the form {!}<collection name>:<filename pattern>, not:
804 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
805 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
806
Andrew Geisslerf0343792020-11-18 10:42:21 -0600807 :term:`BBINCLUDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500808 Contains a space-separated list of all of all files that BitBake's
809 parser included during parsing of the current file.
810
Andrew Geisslerf0343792020-11-18 10:42:21 -0600811 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500812 If set to a value, enables printing the task log when reporting a
813 failed task.
814
Andrew Geisslerf0343792020-11-18 10:42:21 -0600815 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500816 If :term:`BBINCLUDELOGS` is set, specifies
817 the maximum number of lines from the task log file to print when
Patrick Williams213cb262021-08-07 19:21:33 -0500818 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500819 the entire log is printed.
820
Andrew Geisslerf0343792020-11-18 10:42:21 -0600821 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822 Lists the layers to enable during the build. This variable is defined
823 in the ``bblayers.conf`` configuration file in the build directory.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500824 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500825
826 BBLAYERS = " \
827 /home/scottrif/poky/meta \
828 /home/scottrif/poky/meta-yocto \
829 /home/scottrif/poky/meta-yocto-bsp \
830 /home/scottrif/poky/meta-mykernel \
831 "
832
833 This example enables four layers, one of which is a custom, user-defined
834 layer named ``meta-mykernel``.
835
Andrew Geisslerf0343792020-11-18 10:42:21 -0600836 :term:`BBLAYERS_FETCH_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500837 Sets the base location where layers are stored. This setting is used
838 in conjunction with ``bitbake-layers layerindex-fetch`` and tells
839 ``bitbake-layers`` where to place the fetched layers.
840
Andrew Geisslerf0343792020-11-18 10:42:21 -0600841 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500842 Prevents BitBake from processing recipes and recipe append files.
843
Patrick Williams213cb262021-08-07 19:21:33 -0500844 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500845 ``.bbappend`` files. BitBake ignores any recipe or recipe append
846 files that match any of the expressions. It is as if BitBake does not
847 see them at all. Consequently, matching files are not parsed or
848 otherwise used by BitBake.
849
850 The values you provide are passed to Python's regular expression
851 compiler. Consequently, the syntax follows Python's Regular
852 Expression (re) syntax. The expressions are compared against the full
853 paths to the files. For complete syntax information, see Python's
854 documentation at http://docs.python.org/3/library/re.html.
855
856 The following example uses a complete regular expression to tell
857 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500858 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500859
860 BBMASK = "meta-ti/recipes-misc/"
861
862 If you want to mask out multiple directories or recipes, you can
863 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500864 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500865
866 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
867 BBMASK += "/meta-oe/recipes-support/"
868 BBMASK += "/meta-foo/.*/openldap"
869 BBMASK += "opencv.*\.bbappend"
870 BBMASK += "lzma"
871
872 .. note::
873
874 When specifying a directory name, use the trailing slash character
875 to ensure you match just that directory name.
876
Andrew Geisslerf0343792020-11-18 10:42:21 -0600877 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500878 Enables BitBake to perform multiple configuration builds and lists
879 each separate configuration (multiconfig). You can use this variable
880 to cause BitBake to build multiple targets where each target has a
Patrick Williams213cb262021-08-07 19:21:33 -0500881 separate configuration. Define :term:`BBMULTICONFIG` in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500882 ``conf/local.conf`` configuration file.
883
884 As an example, the following line specifies three multiconfigs, each
Andrew Geisslerc926e172021-05-07 16:11:35 -0500885 having a separate configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500886
887 BBMULTIFONFIG = "configA configB configC"
888
889 Each configuration file you use must reside in the
890 build directory within a directory named ``conf/multiconfig`` (e.g.
891 build_directory\ ``/conf/multiconfig/configA.conf``).
892
Patrick Williams213cb262021-08-07 19:21:33 -0500893 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500894 that supports building targets with multiple configurations, see the
895 ":ref:`bitbake-user-manual/bitbake-user-manual-intro:executing a multiple configuration build`"
896 section.
897
Andrew Geisslerf0343792020-11-18 10:42:21 -0600898 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500899 Used by BitBake to locate class (``.bbclass``) and configuration
900 (``.conf``) files. This variable is analogous to the ``PATH``
901 variable.
902
903 If you run BitBake from a directory outside of the build directory,
Patrick Williams213cb262021-08-07 19:21:33 -0500904 you must be sure to set :term:`BBPATH` to point to the build directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500905 Set the variable as you would any environment variable and then run
Andrew Geisslerc926e172021-05-07 16:11:35 -0500906 BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500907
908 $ BBPATH="build_directory"
909 $ export BBPATH
910 $ bitbake target
911
Andrew Geisslerf0343792020-11-18 10:42:21 -0600912 :term:`BBSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500913 Points to the server that runs memory-resident BitBake. The variable
914 is only used when you employ memory-resident BitBake.
915
Andrew Geisslerf0343792020-11-18 10:42:21 -0600916 :term:`BBTARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500917 Allows you to use a configuration file to add to the list of
918 command-line target recipes you want to build.
919
Andrew Geisslerf0343792020-11-18 10:42:21 -0600920 :term:`BITBAKE_UI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500921 Used to specify the UI module to use when running BitBake. Using this
922 variable is equivalent to using the ``-u`` command-line option.
923
924 .. note::
925
926 You must set this variable in the external environment in order
927 for it to work.
928
Andrew Geisslerf0343792020-11-18 10:42:21 -0600929 :term:`BUILDNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500930 A name assigned to the build. The name defaults to a datetime stamp
931 of when the build was started but can be defined by the metadata.
932
Andrew Geisslerf0343792020-11-18 10:42:21 -0600933 :term:`BZRDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500934 The directory in which files checked out of a Bazaar system are
935 stored.
936
Andrew Geisslerf0343792020-11-18 10:42:21 -0600937 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500938 Specifies the directory BitBake uses to store a cache of the metadata
939 so it does not need to be parsed every time BitBake is started.
940
Andrew Geisslerf0343792020-11-18 10:42:21 -0600941 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500942 The directory in which files checked out under the CVS system are
943 stored.
944
Andrew Geisslerf0343792020-11-18 10:42:21 -0600945 :term:`DEFAULT_PREFERENCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500946 Specifies a weak bias for recipe selection priority.
947
948 The most common usage of this is variable is to set it to "-1" within
949 a recipe for a development version of a piece of software. Using the
950 variable in this way causes the stable version of the recipe to build
Patrick Williams213cb262021-08-07 19:21:33 -0500951 by default in the absence of :term:`PREFERRED_VERSION` being used to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500952 build the development version.
953
954 .. note::
955
956 The bias provided by DEFAULT_PREFERENCE is weak and is overridden by
957 :term:`BBFILE_PRIORITY` if that variable is different between two
958 layers that contain different versions of the same recipe.
959
Andrew Geisslerf0343792020-11-18 10:42:21 -0600960 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500961 Lists a recipe's build-time dependencies (i.e. other recipe files).
962
963 Consider this simple example for two recipes named "a" and "b" that
Patrick Williams213cb262021-08-07 19:21:33 -0500964 produce similarly named packages. In this example, the :term:`DEPENDS`
Andrew Geisslerc926e172021-05-07 16:11:35 -0500965 statement appears in the "a" recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500966
967 DEPENDS = "b"
968
969 Here, the dependency is such that the ``do_configure`` task for recipe "a"
970 depends on the ``do_populate_sysroot`` task of recipe "b". This means
971 anything that recipe "b" puts into sysroot is available when recipe "a" is
972 configuring itself.
973
974 For information on runtime dependencies, see the :term:`RDEPENDS`
975 variable.
976
Andrew Geisslerf0343792020-11-18 10:42:21 -0600977 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500978 A long description for the recipe.
979
Andrew Geisslerf0343792020-11-18 10:42:21 -0600980 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500981 The central download directory used by the build process to store
Patrick Williams213cb262021-08-07 19:21:33 -0500982 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring for
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500983 everything except Git repositories. If you want tarballs of Git
984 repositories, use the :term:`BB_GENERATE_MIRROR_TARBALLS` variable.
985
Andrew Geisslerf0343792020-11-18 10:42:21 -0600986 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500987 Directs BitBake to exclude a recipe from world builds (i.e.
988 ``bitbake world``). During world builds, BitBake locates, parses and
989 builds all recipes found in every layer exposed in the
990 ``bblayers.conf`` configuration file.
991
992 To exclude a recipe from a world build using this variable, set the
993 variable to "1" in the recipe.
994
995 .. note::
996
Patrick Williams213cb262021-08-07 19:21:33 -0500997 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a world
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500998 build in order to satisfy dependencies of other recipes. Adding a
Patrick Williams213cb262021-08-07 19:21:33 -0500999 recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001000 explicitly added to the list of build targets in a world build.
1001
Andrew Geisslerf0343792020-11-18 10:42:21 -06001002 :term:`FAKEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001003 Contains the command to use when running a shell script in a fakeroot
Patrick Williams213cb262021-08-07 19:21:33 -05001004 environment. The :term:`FAKEROOT` variable is obsolete and has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001005 replaced by the other ``FAKEROOT*`` variables. See these entries in
1006 the glossary for more information.
1007
Andrew Geisslerf0343792020-11-18 10:42:21 -06001008 :term:`FAKEROOTBASEENV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001009 Lists environment variables to set when executing the command defined
1010 by :term:`FAKEROOTCMD` that starts the
1011 bitbake-worker process in the fakeroot environment.
1012
Andrew Geisslerf0343792020-11-18 10:42:21 -06001013 :term:`FAKEROOTCMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001014 Contains the command that starts the bitbake-worker process in the
1015 fakeroot environment.
1016
Andrew Geisslerf0343792020-11-18 10:42:21 -06001017 :term:`FAKEROOTDIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001018 Lists directories to create before running a task in the fakeroot
1019 environment.
1020
Andrew Geisslerf0343792020-11-18 10:42:21 -06001021 :term:`FAKEROOTENV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001022 Lists environment variables to set when running a task in the
1023 fakeroot environment. For additional information on environment
1024 variables and the fakeroot environment, see the
1025 :term:`FAKEROOTBASEENV` variable.
1026
Andrew Geisslerf0343792020-11-18 10:42:21 -06001027 :term:`FAKEROOTNOENV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001028 Lists environment variables to set when running a task that is not in
1029 the fakeroot environment. For additional information on environment
1030 variables and the fakeroot environment, see the
1031 :term:`FAKEROOTENV` variable.
1032
Andrew Geisslerf0343792020-11-18 10:42:21 -06001033 :term:`FETCHCMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001034 Defines the command the BitBake fetcher module executes when running
1035 fetch operations. You need to use an override suffix when you use the
1036 variable (e.g. ``FETCHCMD_git`` or ``FETCHCMD_svn``).
1037
Andrew Geisslerf0343792020-11-18 10:42:21 -06001038 :term:`FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001039 Points at the current file. BitBake sets this variable during the
1040 parsing process to identify the file being parsed. BitBake also sets
1041 this variable when a recipe is being executed to identify the recipe
1042 file.
1043
Andrew Geisslerf0343792020-11-18 10:42:21 -06001044 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001045 Specifies directories BitBake uses when searching for patches and
1046 files. The "local" fetcher module uses these directories when
1047 handling ``file://`` URLs. The variable behaves like a shell ``PATH``
1048 environment variable. The value is a colon-separated list of
1049 directories that are searched left-to-right in order.
1050
Andrew Geisslerf0343792020-11-18 10:42:21 -06001051 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001052 The directory in which a local copy of a Git repository is stored
1053 when it is cloned.
1054
Andrew Geisslerf0343792020-11-18 10:42:21 -06001055 :term:`HGDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001056 The directory in which files checked out of a Mercurial system are
1057 stored.
1058
Andrew Geisslerf0343792020-11-18 10:42:21 -06001059 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001060 Website where more information about the software the recipe is
1061 building can be found.
1062
Andrew Geisslerf0343792020-11-18 10:42:21 -06001063 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001064 Causes the named class or classes to be inherited globally. Anonymous
1065 functions in the class or classes are not executed for the base
1066 configuration and in each individual recipe. The OpenEmbedded build
Patrick Williams213cb262021-08-07 19:21:33 -05001067 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001068
Patrick Williams213cb262021-08-07 19:21:33 -05001069 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001070 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
1071 section.
1072
Andrew Geisslerf0343792020-11-18 10:42:21 -06001073 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001074 Lists the layers, separated by spaces, upon which this recipe
1075 depends. Optionally, you can specify a specific layer version for a
1076 dependency by adding it to the end of the layer name with a colon,
1077 (e.g. "anotherlayer:3" to be compared against
1078 :term:`LAYERVERSION`\ ``_anotherlayer`` in
1079 this case). BitBake produces an error if any dependency is missing or
1080 the version numbers do not match exactly (if specified).
1081
1082 You use this variable in the ``conf/layer.conf`` file. You must also
1083 use the specific layer name as a suffix to the variable (e.g.
1084 ``LAYERDEPENDS_mylayer``).
1085
Andrew Geisslerf0343792020-11-18 10:42:21 -06001086 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001087 When used inside the ``layer.conf`` configuration file, this variable
1088 provides the path of the current layer. This variable is not
1089 available outside of ``layer.conf`` and references are expanded
1090 immediately when parsing of the file completes.
1091
Andrew Geisslerf0343792020-11-18 10:42:21 -06001092 :term:`LAYERDIR_RE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001093 When used inside the ``layer.conf`` configuration file, this variable
1094 provides the path of the current layer, escaped for use in a regular
1095 expression (:term:`BBFILE_PATTERN`). This
1096 variable is not available outside of ``layer.conf`` and references
1097 are expanded immediately when parsing of the file completes.
1098
Andrew Geisslerf0343792020-11-18 10:42:21 -06001099 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001100 Optionally specifies the version of a layer as a single number. You
1101 can use this variable within
1102 :term:`LAYERDEPENDS` for another layer in
1103 order to depend on a specific version of the layer.
1104
1105 You use this variable in the ``conf/layer.conf`` file. You must also
1106 use the specific layer name as a suffix to the variable (e.g.
1107 ``LAYERDEPENDS_mylayer``).
1108
Andrew Geisslerf0343792020-11-18 10:42:21 -06001109 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001110 The list of source licenses for the recipe.
1111
Andrew Geisslerf0343792020-11-18 10:42:21 -06001112 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001113 Specifies additional paths from which BitBake gets source code. When
1114 the build system searches for source code, it first tries the local
1115 download directory. If that location fails, the build system tries
1116 locations defined by :term:`PREMIRRORS`, the
Patrick Williams213cb262021-08-07 19:21:33 -05001117 upstream source, and then locations specified by :term:`MIRRORS` in that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001118 order.
1119
Andrew Geisslerf0343792020-11-18 10:42:21 -06001120 :term:`OVERRIDES`
Patrick Williams213cb262021-08-07 19:21:33 -05001121 BitBake uses :term:`OVERRIDES` to control what variables are overridden
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001122 after BitBake parses recipes and configuration files.
1123
1124 Following is a simple example that uses an overrides list based on
1125 machine architectures: OVERRIDES = "arm:x86:mips:powerpc" You can
Patrick Williams213cb262021-08-07 19:21:33 -05001126 find information on how to use :term:`OVERRIDES` in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001127 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax
1128 (overrides)`" section.
1129
Andrew Geisslerf0343792020-11-18 10:42:21 -06001130 :term:`P4DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001131 The directory in which a local copy of a Perforce depot is stored
1132 when it is fetched.
1133
Andrew Geisslerf0343792020-11-18 10:42:21 -06001134 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001135 The list of packages the recipe creates.
1136
Andrew Geisslerf0343792020-11-18 10:42:21 -06001137 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001138 A promise that your recipe satisfies runtime dependencies for
1139 optional modules that are found in other recipes.
Patrick Williams213cb262021-08-07 19:21:33 -05001140 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001141 only states that they should be satisfied. For example, if a hard,
1142 runtime dependency (:term:`RDEPENDS`) of another
1143 package is satisfied during the build through the
Patrick Williams213cb262021-08-07 19:21:33 -05001144 :term:`PACKAGES_DYNAMIC` variable, but a package with the module name is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001145 never actually produced, then the other package will be broken.
1146
Andrew Geisslerf0343792020-11-18 10:42:21 -06001147 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001148 The epoch of the recipe. By default, this variable is unset. The
1149 variable is used to make upgrades possible when the versioning scheme
1150 changes in some backwards incompatible way.
1151
Andrew Geisslerf0343792020-11-18 10:42:21 -06001152 :term:`PERSISTENT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001153 Specifies the directory BitBake uses to store data that should be
1154 preserved between builds. In particular, the data stored is the data
1155 that uses BitBake's persistent data API and the data used by the PR
1156 Server and PR Service.
1157
Andrew Geisslerf0343792020-11-18 10:42:21 -06001158 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001159 Specifies the recipe or package name and includes all version and
1160 revision numbers (i.e. ``eglibc-2.13-r20+svnr15508/`` and
1161 ``bash-4.2-r1/``).
1162
Andrew Geisslerf0343792020-11-18 10:42:21 -06001163 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001164 The recipe name.
1165
Andrew Geisslerf0343792020-11-18 10:42:21 -06001166 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001167 The revision of the recipe.
1168
Andrew Geisslerf0343792020-11-18 10:42:21 -06001169 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001170 Determines which recipe should be given preference when multiple
1171 recipes provide the same item. You should always suffix the variable
1172 with the name of the provided item, and you should set it to the
1173 :term:`PN` of the recipe to which you want to give
Andrew Geisslerc926e172021-05-07 16:11:35 -05001174 precedence. Some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001175
1176 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
1177 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
1178 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
1179
Andrew Geisslerf0343792020-11-18 10:42:21 -06001180 :term:`PREFERRED_PROVIDERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001181 Determines which recipe should be given preference for cases where
1182 multiple recipes provide the same item. Functionally,
Patrick Williams213cb262021-08-07 19:21:33 -05001183 :term:`PREFERRED_PROVIDERS` is identical to
1184 :term:`PREFERRED_PROVIDER`. However, the :term:`PREFERRED_PROVIDERS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001185 lets you define preferences for multiple situations using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001186 form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001187
1188 PREFERRED_PROVIDERS = "xxx:yyy aaa:bbb ..."
1189
Andrew Geisslerc926e172021-05-07 16:11:35 -05001190 This form is a convenient replacement for the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001191
1192 PREFERRED_PROVIDER_xxx = "yyy"
1193 PREFERRED_PROVIDER_aaa = "bbb"
1194
Andrew Geisslerf0343792020-11-18 10:42:21 -06001195 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001196 If there are multiple versions of a recipe available, this variable
1197 determines which version should be given preference. You must always
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001198 suffix the variable with the :term:`PN` you want to
1199 select, and you should set :term:`PV` accordingly for
1200 precedence.
1201
Patrick Williams213cb262021-08-07 19:21:33 -05001202 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001203 through the "``%``" character. You can use the character to match any
1204 number of characters, which can be useful when specifying versions
1205 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05001206 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207
1208 PREFERRED_VERSION_python = "2.7.3"
1209 PREFERRED_VERSION_linux-yocto = "4.12%"
1210
1211 .. important::
1212
1213 The use of the " % " character is limited in that it only works at the
1214 end of the string. You cannot use the wildcard character in any other
1215 location of the string.
1216
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001217 If a recipe with the specified version is not available, a warning
1218 message will be shown. See :term:`REQUIRED_VERSION` if you want this
1219 to be an error instead.
1220
Andrew Geisslerf0343792020-11-18 10:42:21 -06001221 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001222 Specifies additional paths from which BitBake gets source code. When
1223 the build system searches for source code, it first tries the local
1224 download directory. If that location fails, the build system tries
Patrick Williams213cb262021-08-07 19:21:33 -05001225 locations defined by :term:`PREMIRRORS`, the upstream source, and then
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001226 locations specified by :term:`MIRRORS` in that order.
1227
1228 Typically, you would add a specific server for the build system to
1229 attempt before any others by adding something like the following to
Andrew Geisslerc926e172021-05-07 16:11:35 -05001230 your configuration::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001231
Patrick Williams213cb262021-08-07 19:21:33 -05001232 PREMIRRORS:prepend = "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001233 git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
1234 ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
1235 http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
1236 https://.*/.* http://downloads.yoctoproject.org/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001237
1238 These changes cause the build system to intercept Git, FTP, HTTP, and
1239 HTTPS requests and direct them to the ``http://`` sources mirror. You can
1240 use ``file://`` URLs to point to local directories or network shares as
1241 well.
1242
Andrew Geisslerf0343792020-11-18 10:42:21 -06001243 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001244 A list of aliases by which a particular recipe can be known. By
Patrick Williams213cb262021-08-07 19:21:33 -05001245 default, a recipe's own :term:`PN` is implicitly already in its
1246 :term:`PROVIDES` list. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001247 aliases are synonyms for the recipe and can be useful satisfying
1248 dependencies of other recipes during the build as specified by
Patrick Williams213cb262021-08-07 19:21:33 -05001249 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001250
Patrick Williams213cb262021-08-07 19:21:33 -05001251 Consider the following example :term:`PROVIDES` statement from a recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05001252 file ``libav_0.8.11.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001253
1254 PROVIDES += "libpostproc"
1255
Patrick Williams213cb262021-08-07 19:21:33 -05001256 The :term:`PROVIDES` statement results in the "libav" recipe also being known
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001257 as "libpostproc".
1258
1259 In addition to providing recipes under alternate names, the
Patrick Williams213cb262021-08-07 19:21:33 -05001260 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001261 virtual target is a name that corresponds to some particular
1262 functionality (e.g. a Linux kernel). Recipes that provide the
Patrick Williams213cb262021-08-07 19:21:33 -05001263 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001264 Recipes that depend on the functionality in question can include the
1265 virtual target in :term:`DEPENDS` to leave the
1266 choice of provider open.
1267
1268 Conventionally, virtual targets have names on the form
1269 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
1270 of the name and has no syntactical significance.
1271
Andrew Geisslerf0343792020-11-18 10:42:21 -06001272 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001273 The network based :term:`PR` service host and port.
1274
Patrick Williams213cb262021-08-07 19:21:33 -05001275 Following is an example of how the :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001276
1277 PRSERV_HOST = "localhost:0"
1278
1279 You must set the variable if you want to automatically start a local PR
Patrick Williams213cb262021-08-07 19:21:33 -05001280 service. You can set :term:`PRSERV_HOST` to other values to use a remote PR
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001281 service.
1282
Andrew Geisslerf0343792020-11-18 10:42:21 -06001283 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001284 The version of the recipe.
1285
Andrew Geisslerf0343792020-11-18 10:42:21 -06001286 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001287 Lists a package's runtime dependencies (i.e. other packages) that
1288 must be installed in order for the built package to run correctly. If
1289 a package in this list cannot be found during the build, you will get
1290 a build error.
1291
Patrick Williams213cb262021-08-07 19:21:33 -05001292 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001293 you should always use the variable in a form with an attached package
1294 name. For example, suppose you are building a development package
1295 that depends on the ``perl`` package. In this case, you would use the
Patrick Williams213cb262021-08-07 19:21:33 -05001296 following :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001297
Patrick Williams213cb262021-08-07 19:21:33 -05001298 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001299
1300 In the example, the development package depends on the ``perl`` package.
Patrick Williams213cb262021-08-07 19:21:33 -05001301 Thus, the :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001302 of the variable.
1303
1304 BitBake supports specifying versioned dependencies. Although the
1305 syntax varies depending on the packaging format, BitBake hides these
1306 differences from you. Here is the general syntax to specify versions
Patrick Williams213cb262021-08-07 19:21:33 -05001307 with the :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001308
Patrick Williams213cb262021-08-07 19:21:33 -05001309 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001310
Andrew Geisslerc926e172021-05-07 16:11:35 -05001311 For ``operator``, you can specify the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001312
1313 =
1314 <
1315 >
1316 <=
1317 >=
1318
1319 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05001320 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001321
Patrick Williams213cb262021-08-07 19:21:33 -05001322 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001323
1324 For information on build-time dependencies, see the :term:`DEPENDS`
1325 variable.
1326
Andrew Geisslerf0343792020-11-18 10:42:21 -06001327 :term:`REPODIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001328 The directory in which a local copy of a ``google-repo`` directory is
1329 stored when it is synced.
1330
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001331 :term:`REQUIRED_VERSION`
1332 If there are multiple versions of a recipe available, this variable
Patrick Williams213cb262021-08-07 19:21:33 -05001333 determines which version should be given preference. :term:`REQUIRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001334 works in exactly the same manner as :term:`PREFERRED_VERSION`, except
1335 that if the specified version is not available then an error message
1336 is shown and the build fails immediately.
1337
Patrick Williams213cb262021-08-07 19:21:33 -05001338 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set for
1339 the same recipe, the :term:`REQUIRED_VERSION` value applies.
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001340
Andrew Geisslerf0343792020-11-18 10:42:21 -06001341 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001342 A list of package name aliases that a package also provides. These
1343 aliases are useful for satisfying runtime dependencies of other
1344 packages both during the build and on the target (as specified by
Patrick Williams213cb262021-08-07 19:21:33 -05001345 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001346
1347 As with all package-controlling variables, you must always use the
1348 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05001349 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350
Patrick Williams213cb262021-08-07 19:21:33 -05001351 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001352
Andrew Geisslerf0343792020-11-18 10:42:21 -06001353 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001354 A list of packages that extends the usability of a package being
1355 built. The package being built does not depend on this list of
1356 packages in order to successfully build, but needs them for the
1357 extended usability. To specify runtime dependencies for packages, see
Patrick Williams213cb262021-08-07 19:21:33 -05001358 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001359
1360 BitBake supports specifying versioned recommends. Although the syntax
1361 varies depending on the packaging format, BitBake hides these
1362 differences from you. Here is the general syntax to specify versions
Patrick Williams213cb262021-08-07 19:21:33 -05001363 with the :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364
Patrick Williams213cb262021-08-07 19:21:33 -05001365 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001366
Andrew Geisslerc926e172021-05-07 16:11:35 -05001367 For ``operator``, you can specify the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001368
1369 =
1370 <
1371 >
1372 <=
1373 >=
1374
1375 For example, the following sets up a recommend on version
Andrew Geisslerc926e172021-05-07 16:11:35 -05001376 1.2 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001377
Patrick Williams213cb262021-08-07 19:21:33 -05001378 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001379
Andrew Geisslerf0343792020-11-18 10:42:21 -06001380 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001381 The section in which packages should be categorized.
1382
Andrew Geisslerf0343792020-11-18 10:42:21 -06001383 :term:`SRC_URI`
Andrew Geissler9aee5002022-03-30 16:27:02 +00001384 The list of source files --- local or remote. This variable tells
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001385 BitBake which bits to pull for the build and how to pull them. For
1386 example, if the recipe or append file needs to fetch a single tarball
Andrew Geissler595f6302022-01-24 19:11:47 +00001387 from the Internet, the recipe or append file uses a :term:`SRC_URI`
1388 entry that specifies that tarball. On the other hand, if the recipe or
1389 append file needs to fetch a tarball, apply two patches, and include
1390 a custom file, the recipe or append file needs an :term:`SRC_URI`
1391 variable that specifies all those sources.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001392
Andrew Geissler595f6302022-01-24 19:11:47 +00001393 The following list explains the available URI protocols. URI
1394 protocols are highly dependent on particular BitBake Fetcher
1395 submodules. Depending on the fetcher BitBake uses, various URL
1396 parameters are employed. For specifics on the supported Fetchers, see
1397 the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`
1398 section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001399
Andrew Geissler9aee5002022-03-30 16:27:02 +00001400 - ``az://``: Fetches files from an Azure Storage account using HTTPS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001401
Andrew Geissler9aee5002022-03-30 16:27:02 +00001402 - ``bzr://``: Fetches files from a Bazaar revision control
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001403 repository.
1404
Andrew Geissler9aee5002022-03-30 16:27:02 +00001405 - ``ccrc://``: Fetches files from a ClearCase repository.
Andrew Geissler595f6302022-01-24 19:11:47 +00001406
Andrew Geissler9aee5002022-03-30 16:27:02 +00001407 - ``cvs://``: Fetches files from a CVS revision control
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001408 repository.
1409
Andrew Geissler9aee5002022-03-30 16:27:02 +00001410 - ``file://``: Fetches files, which are usually files shipped
Andrew Geissler595f6302022-01-24 19:11:47 +00001411 with the Metadata, from the local machine.
1412 The path is relative to the :term:`FILESPATH`
1413 variable. Thus, the build system searches, in order, from the
1414 following directories, which are assumed to be a subdirectories of
1415 the directory in which the recipe file (``.bb``) or append file
1416 (``.bbappend``) resides:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001417
Andrew Geissler9aee5002022-03-30 16:27:02 +00001418 - ``${BPN}``: the base recipe name without any special suffix
Andrew Geissler595f6302022-01-24 19:11:47 +00001419 or version numbers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001420
Andrew Geissler9aee5002022-03-30 16:27:02 +00001421 - ``${BP}`` - ``${BPN}-${PV}``: the base recipe name and
Andrew Geissler595f6302022-01-24 19:11:47 +00001422 version but without any special package name suffix.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001423
Andrew Geissler9aee5002022-03-30 16:27:02 +00001424 - ``files``: files within a directory, which is named ``files``
Andrew Geissler595f6302022-01-24 19:11:47 +00001425 and is also alongside the recipe or append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001426
Andrew Geissler9aee5002022-03-30 16:27:02 +00001427 - ``ftp://``: Fetches files from the Internet using FTP.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428
Andrew Geissler9aee5002022-03-30 16:27:02 +00001429 - ``git://``: Fetches files from a Git revision control
Andrew Geissler595f6302022-01-24 19:11:47 +00001430 repository.
1431
Andrew Geissler9aee5002022-03-30 16:27:02 +00001432 - ``gitsm://``: Fetches submodules from a Git revision control
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001433 repository.
1434
Andrew Geissler9aee5002022-03-30 16:27:02 +00001435 - ``hg://``: Fetches files from a Mercurial (``hg``) revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001436 control repository.
1437
Andrew Geissler9aee5002022-03-30 16:27:02 +00001438 - ``http://``: Fetches files from the Internet using HTTP.
Andrew Geissler595f6302022-01-24 19:11:47 +00001439
Andrew Geissler9aee5002022-03-30 16:27:02 +00001440 - ``https://``: Fetches files from the Internet using HTTPS.
Andrew Geissler595f6302022-01-24 19:11:47 +00001441
Andrew Geissler9aee5002022-03-30 16:27:02 +00001442 - ``npm://``: Fetches JavaScript modules from a registry.
Andrew Geissler595f6302022-01-24 19:11:47 +00001443
Andrew Geissler9aee5002022-03-30 16:27:02 +00001444 - ``osc://``: Fetches files from an OSC (OpenSUSE Build service)
Andrew Geissler595f6302022-01-24 19:11:47 +00001445 revision control repository.
1446
Andrew Geissler9aee5002022-03-30 16:27:02 +00001447 - ``p4://``: Fetches files from a Perforce (``p4``) revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001448 control repository.
1449
Andrew Geissler9aee5002022-03-30 16:27:02 +00001450 - ``repo://``: Fetches files from a repo (Git) repository.
Andrew Geissler595f6302022-01-24 19:11:47 +00001451
Andrew Geissler9aee5002022-03-30 16:27:02 +00001452 - ``ssh://``: Fetches files from a secure shell.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001453
Andrew Geissler9aee5002022-03-30 16:27:02 +00001454 - ``svn://``: Fetches files from a Subversion (``svn``) revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001455 control repository.
1456
1457 Here are some additional options worth mentioning:
1458
Andrew Geissler9aee5002022-03-30 16:27:02 +00001459 - ``downloadfilename``: Specifies the filename used when storing
Andrew Geissler595f6302022-01-24 19:11:47 +00001460 the downloaded file.
1461
Andrew Geissler9aee5002022-03-30 16:27:02 +00001462 - ``name``: Specifies a name to be used for association with
Andrew Geissler595f6302022-01-24 19:11:47 +00001463 :term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one
1464 file or git repository specified in :term:`SRC_URI`. For example::
1465
Andrew Geissler9aee5002022-03-30 16:27:02 +00001466 SRC_URI = "git://example.com/foo.git;branch=main;name=first \
1467 git://example.com/bar.git;branch=main;name=second \
Andrew Geissler595f6302022-01-24 19:11:47 +00001468 http://example.com/file.tar.gz;name=third"
1469
1470 SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
1471 SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
1472 SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001473
Andrew Geissler9aee5002022-03-30 16:27:02 +00001474 - ``subdir``: Places the file (or extracts its contents) into the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001475 specified subdirectory. This option is useful for unusual tarballs
1476 or other archives that do not have their files already in a
1477 subdirectory within the archive.
1478
Andrew Geissler9aee5002022-03-30 16:27:02 +00001479 - ``subpath``: Limits the checkout to a specific subpath of the
Andrew Geissler595f6302022-01-24 19:11:47 +00001480 tree when using the Git fetcher is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001481
Andrew Geissler9aee5002022-03-30 16:27:02 +00001482 - ``unpack``: Controls whether or not to unpack the file if it is
Andrew Geissler595f6302022-01-24 19:11:47 +00001483 an archive. The default action is to unpack the file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001484
Andrew Geisslerf0343792020-11-18 10:42:21 -06001485 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001486 The date of the source code used to build the package. This variable
1487 applies only if the source was fetched from a Source Code Manager
1488 (SCM).
1489
Andrew Geisslerf0343792020-11-18 10:42:21 -06001490 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001491 The revision of the source code used to build the package. This
1492 variable applies only when using Subversion, Git, Mercurial and
1493 Bazaar. If you want to build a fixed revision and you want to avoid
1494 performing a query on the remote repository every time BitBake parses
Patrick Williams213cb262021-08-07 19:21:33 -05001495 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001496 identifier and not just a tag.
1497
Andrew Geisslerf0343792020-11-18 10:42:21 -06001498 :term:`SRCREV_FORMAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001499 Helps construct valid :term:`SRCREV` values when
1500 multiple source controlled URLs are used in
1501 :term:`SRC_URI`.
1502
1503 The system needs help constructing these values under these
Patrick Williams213cb262021-08-07 19:21:33 -05001504 circumstances. Each component in the :term:`SRC_URI` is assigned a name
1505 and these are referenced in the :term:`SRCREV_FORMAT` variable. Consider
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001506 an example with URLs named "machine" and "meta". In this case,
Patrick Williams213cb262021-08-07 19:21:33 -05001507 :term:`SRCREV_FORMAT` could look like "machine_meta" and those names
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001508 would have the SCM versions substituted into each position. Only one
1509 ``AUTOINC`` placeholder is added and if needed. And, this placeholder
1510 is placed at the start of the returned string.
1511
Andrew Geisslerf0343792020-11-18 10:42:21 -06001512 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001513 Specifies the base path used to create recipe stamp files. The path
1514 to an actual stamp file is constructed by evaluating this string and
1515 then appending additional information.
1516
Andrew Geisslerf0343792020-11-18 10:42:21 -06001517 :term:`STAMPCLEAN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001518 Specifies the base path used to create recipe stamp files. Unlike the
Patrick Williams213cb262021-08-07 19:21:33 -05001519 :term:`STAMP` variable, :term:`STAMPCLEAN` can contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001520 wildcards to match the range of files a clean operation should
1521 remove. BitBake uses a clean operation to remove any other stamps it
1522 should be removing when creating a new stamp.
1523
Andrew Geisslerf0343792020-11-18 10:42:21 -06001524 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001525 A short summary for the recipe, which is 72 characters or less.
1526
Andrew Geisslerf0343792020-11-18 10:42:21 -06001527 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001528 The directory in which files checked out of a Subversion system are
1529 stored.
1530
Andrew Geisslerf0343792020-11-18 10:42:21 -06001531 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001532 Points to a directory were BitBake places temporary files, which
1533 consist mostly of task logs and scripts, when building a particular
1534 recipe.
1535
Andrew Geisslerf0343792020-11-18 10:42:21 -06001536 :term:`TOPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001537 Points to the build directory. BitBake automatically sets this
1538 variable.