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