blob: 0310429bdcabbb83b496dd0c9e995b79af83cc78 [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3******************
4Variables Glossary
5******************
6
7This chapter lists common variables used in the OpenEmbedded build
8system and gives an overview of their function and contents.
9
Andrew Geisslerf0343792020-11-18 10:42:21 -060010:term:`A <ABIEXTENSION>` :term:`B` :term:`C <CACHE>`
11:term:`D` :term:`E <EFI_PROVIDER>` :term:`F <FEATURE_PACKAGES>`
12:term:`G <GCCPIE>` :term:`H <HOMEPAGE>` :term:`I <ICECC_DISABLED>`
13:term:`K <KARCH>` :term:`L <LABELS>` :term:`M <MACHINE>`
14:term:`N <NATIVELSBSTRING>` :term:`O <OBJCOPY>` :term:`P`
15:term:`R <RANLIB>` :term:`S` :term:`T`
16:term:`U <UBOOT_CONFIG>` :term:`V <VOLATILE_LOG_DIR>`
17:term:`W <WARN_QA>` :term:`X <XSERVER>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050018
19.. glossary::
20
Andrew Geisslerf0343792020-11-18 10:42:21 -060021 :term:`ABIEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050022 Extension to the Application Binary Interface (ABI) field of the GNU
23 canonical architecture name (e.g. "eabi").
24
25 ABI extensions are set in the machine include files. For example, the
26 ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the
27 following extension:
28 ::
29
30 ABIEXTENSION = "eabi"
31
Andrew Geisslerf0343792020-11-18 10:42:21 -060032 :term:`ALLOW_EMPTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050033 Specifies whether to produce an output package even if it is empty.
34 By default, BitBake does not produce empty packages. This default
35 behavior can cause issues when there is an
36 :term:`RDEPENDS` or some other hard runtime
37 requirement on the existence of the package.
38
39 Like all package-controlling variables, you must always use them in
40 conjunction with a package name override, as in:
41 ::
42
43 ALLOW_EMPTY_${PN} = "1"
44 ALLOW_EMPTY_${PN}-dev = "1"
45 ALLOW_EMPTY_${PN}-staticdev = "1"
46
Andrew Geisslerf0343792020-11-18 10:42:21 -060047 :term:`ALTERNATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050048 Lists commands in a package that need an alternative binary naming
49 scheme. Sometimes the same command is provided in multiple packages.
50 When this occurs, the OpenEmbedded build system needs to use the
51 alternatives system to create a different binary naming scheme so the
52 commands can co-exist.
53
54 To use the variable, list out the package's commands that also exist
55 as part of another package. For example, if the ``busybox`` package
56 has four commands that also exist as part of another package, you
57 identify them as follows:
58 ::
59
60 ALTERNATIVE_busybox = "sh sed test bracket"
61
62 For more information on the alternatives system, see the
63 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
64 section.
65
Andrew Geisslerf0343792020-11-18 10:42:21 -060066 :term:`ALTERNATIVE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050067 Used by the alternatives system to map duplicated commands to actual
68 locations. For example, if the ``bracket`` command provided by the
69 ``busybox`` package is duplicated through another package, you must
70 use the ``ALTERNATIVE_LINK_NAME`` variable to specify the actual
71 location:
72 ::
73
74 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
75
76 In this example, the binary for the ``bracket`` command (i.e. ``[``)
77 from the ``busybox`` package resides in ``/usr/bin/``.
78
79 .. note::
80
Andrew Geissler4c19ea12020-10-27 13:52:24 -050081 If ``ALTERNATIVE_LINK_NAME`` is not defined, it defaults to ``${bindir}/name``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050082
83 For more information on the alternatives system, see the
84 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
85 section.
86
Andrew Geisslerf0343792020-11-18 10:42:21 -060087 :term:`ALTERNATIVE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050088 Used by the alternatives system to create default priorities for
89 duplicated commands. You can use the variable to create a single
90 default regardless of the command name or package, a default for
91 specific duplicated commands regardless of the package, or a default
92 for specific commands tied to particular packages. Here are the
93 available syntax forms:
94 ::
95
96 ALTERNATIVE_PRIORITY = "priority"
97 ALTERNATIVE_PRIORITY[name] = "priority"
98 ALTERNATIVE_PRIORITY_pkg[name] = "priority"
99
100 For more information on the alternatives system, see the
101 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
102 section.
103
Andrew Geisslerf0343792020-11-18 10:42:21 -0600104 :term:`ALTERNATIVE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500105 Used by the alternatives system to create default link locations for
106 duplicated commands. You can use the variable to create a single
107 default location for all duplicated commands regardless of the
108 command name or package, a default for specific duplicated commands
109 regardless of the package, or a default for specific commands tied to
110 particular packages. Here are the available syntax forms:
111 ::
112
113 ALTERNATIVE_TARGET = "target"
114 ALTERNATIVE_TARGET[name] = "target"
115 ALTERNATIVE_TARGET_pkg[name] = "target"
116
117 .. note::
118
119 If ``ALTERNATIVE_TARGET`` is not defined, it inherits the value
120 from the :term:`ALTERNATIVE_LINK_NAME` variable.
121
122 If ``ALTERNATIVE_LINK_NAME`` and ``ALTERNATIVE_TARGET`` are the
123 same, the target for ``ALTERNATIVE_TARGET`` has "``.{BPN}``"
124 appended to it.
125
126 Finally, if the file referenced has not been renamed, the
127 alternatives system will rename it to avoid the need to rename
128 alternative files in the :ref:`ref-tasks-install`
129 task while retaining support for the command if necessary.
130
131 For more information on the alternatives system, see the
132 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
133 section.
134
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600135 :term:`ANY_OF_DISTRO_FEATURES`
136 When inheriting the
137 :ref:`features_check <ref-classes-features_check>`
138 class, this variable identifies a list of distribution features where
139 at least one must be enabled in the current configuration in order
140 for the OpenEmbedded build system to build the recipe. In other words,
141 if none of the features listed in ``ANY_OF_DISTRO_FEATURES``
142 appear in ``DISTRO_FEATURES`` within the current configuration, then
143 the recipe will be skipped, and if the build system attempts to build
144 the recipe then an error will be triggered.
145
146
Andrew Geisslerf0343792020-11-18 10:42:21 -0600147 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500148 An override list of append strings for each target specified with
149 :term:`LABELS`.
150
151 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
152 information on how this variable is used.
153
Andrew Geisslerf0343792020-11-18 10:42:21 -0600154 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500155 The minimal command and arguments used to run ``ar``.
156
Andrew Geisslerf0343792020-11-18 10:42:21 -0600157 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500158 When used with the :ref:`archiver <ref-classes-archiver>` class,
159 determines the type of information used to create a released archive.
160 You can use this variable to create archives of patched source,
161 original source, configured source, and so forth by employing the
162 following variable flags (varflags):
163 ::
164
165 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
166 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
167 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
168 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
169 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
170 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
171 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
172 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
173
174 For information on how the variable works, see the
175 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
176
Andrew Geisslerf0343792020-11-18 10:42:21 -0600177 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500178 Minimal command and arguments needed to run the assembler.
179
Andrew Geisslerf0343792020-11-18 10:42:21 -0600180 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500181 Lists recipe names (:term:`PN` values) BitBake does not
182 attempt to build. Instead, BitBake assumes these recipes have already
183 been built.
184
185 In OpenEmbedded-Core, ``ASSUME_PROVIDED`` mostly specifies native
186 tools that should not be built. An example is ``git-native``, which
187 when specified, allows for the Git binary from the host to be used
188 rather than building ``git-native``.
189
Andrew Geisslerf0343792020-11-18 10:42:21 -0600190 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500191 Provides additional ``shlibs`` provider mapping information, which
192 adds to or overwrites the information provided automatically by the
193 system. Separate multiple entries using spaces.
194
195 As an example, use the following form to add an ``shlib`` provider of
196 shlibname in packagename with the optional version:
197 ::
198
199 shlibname:packagename[_version]
200
201 Here is an example that adds a shared library named ``libEGL.so.1``
202 as being provided by the ``libegl-implementation`` package:
203 ::
204
205 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
206
Andrew Geisslerf0343792020-11-18 10:42:21 -0600207 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500208 The email address used to contact the original author or authors in
209 order to send patches and forward bugs.
210
Andrew Geisslerf0343792020-11-18 10:42:21 -0600211 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500212 When the :ref:`debian <ref-classes-debian>` class is inherited,
213 which is the default behavior, ``AUTO_LIBNAME_PKGS`` specifies which
214 packages should be checked for libraries and renamed according to
215 Debian library package naming.
216
217 The default value is "${PACKAGES}", which causes the debian class to
218 act on all packages that are explicitly generated by the recipe.
219
Andrew Geisslerf0343792020-11-18 10:42:21 -0600220 :term:`AUTO_SYSLINUXMENU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500221 Enables creating an automatic menu for the syslinux bootloader. You
222 must set this variable in your recipe. The
223 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
224
Andrew Geisslerf0343792020-11-18 10:42:21 -0600225 :term:`AUTOREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500226 When ``SRCREV`` is set to the value of this variable, it specifies to
227 use the latest source revision in the repository. Here is an example:
228 ::
229
230 SRCREV = "${AUTOREV}"
231
232 If you use the previous statement to retrieve the latest version of
233 software, you need to be sure :term:`PV` contains
234 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
235 have a kernel recipe that inherits the
236 :ref:`kernel <ref-classes-kernel>` class and you use the previous
237 statement. In this example, ``${SRCPV}`` does not automatically get
238 into ``PV``. Consequently, you need to change ``PV`` in your recipe
239 so that it does contain ``${SRCPV}``.
240
241 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600242 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243 section in the Yocto Project Development Tasks Manual.
244
Andrew Geisslerf0343792020-11-18 10:42:21 -0600245 :term:`AVAILABLE_LICENSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500246 List of licenses found in the directories specified by
247 :term:`COMMON_LICENSE_DIR` and
248 :term:`LICENSE_PATH`.
249
250 .. note::
251
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500252 It is assumed that all changes to ``COMMON_LICENSE_DIR`` and
253 ``LICENSE_PATH`` have been done before ``AVAILABLE_LICENSES``
254 is defined (in :ref:`ref-classes-license`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500255
Andrew Geisslerf0343792020-11-18 10:42:21 -0600256 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500257 The list of defined CPU and Application Binary Interface (ABI)
258 tunings (i.e. "tunes") available for use by the OpenEmbedded build
259 system.
260
261 The list simply presents the tunes that are available. Not all tunes
262 may be compatible with a particular machine configuration, or with
263 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600264 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500265 configuration.
266
267 To add a tune to the list, be sure to append it with spaces using the
268 "+=" BitBake operator. Do not simply replace the list by using the
269 "=" operator. See the
270 ":ref:`Basic Syntax <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax>`" section in the BitBake
271 User Manual for more information.
272
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500273 :term:`AZ_SAS`
274 Azure Storage Shared Access Signature, when using the
275 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
276 This variable can be defined to be used by the fetcher to authenticate
277 and gain access to non-public artifacts.
278 ::
279
280 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
281
282 For more information see Microsoft's Azure Storage documentation at
283 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
284
Andrew Geisslerf0343792020-11-18 10:42:21 -0600285 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500286 The directory within the :term:`Build Directory` in
287 which the OpenEmbedded build system places generated objects during a
288 recipe's build process. By default, this directory is the same as the
289 :term:`S` directory, which is defined as:
290 ::
291
292 S = "${WORKDIR}/${BP}"
293
294 You can separate the (``S``) directory and the directory pointed to
295 by the ``B`` variable. Most Autotools-based recipes support
296 separating these directories. The build system defaults to using
297 separate directories for ``gcc`` and some kernel recipes.
298
Andrew Geisslerf0343792020-11-18 10:42:21 -0600299 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500300 Lists "recommended-only" packages to not install. Recommended-only
301 packages are packages installed only through the
302 :term:`RRECOMMENDS` variable. You can prevent any
303 of these "recommended" packages from being installed by listing them
304 with the ``BAD_RECOMMENDATIONS`` variable:
305 ::
306
307 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
308
309 You can set this variable globally in your ``local.conf`` file or you
310 can attach it to a specific image recipe by using the recipe name
311 override:
312 ::
313
314 BAD_RECOMMENDATIONS_pn-target_image = "package_name"
315
316 It is important to realize that if you choose to not install packages
317 using this variable and some other packages are dependent on them
318 (i.e. listed in a recipe's :term:`RDEPENDS`
319 variable), the OpenEmbedded build system ignores your request and
320 will install the packages to avoid dependency errors.
321
322 Support for this variable exists only when using the IPK and RPM
323 packaging backend. Support does not exist for DEB.
324
325 See the :term:`NO_RECOMMENDATIONS` and the
326 :term:`PACKAGE_EXCLUDE` variables for related
327 information.
328
Andrew Geisslerf0343792020-11-18 10:42:21 -0600329 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500330 The library directory name for the CPU or Application Binary
331 Interface (ABI) tune. The ``BASE_LIB`` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600332 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500333 section in the Yocto Project Development Tasks Manual for information
334 on Multilib.
335
336 The ``BASE_LIB`` variable is defined in the machine include files in
337 the :term:`Source Directory`. If Multilib is not
338 being used, the value defaults to "lib".
339
Andrew Geisslerf0343792020-11-18 10:42:21 -0600340 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500341 Points to the base of the work directory for all recipes. The default
342 value is "${TMPDIR}/work".
343
Andrew Geisslerf0343792020-11-18 10:42:21 -0600344 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500345 Specifies a space-delimited list of hosts that the fetcher is allowed
346 to use to obtain the required source code. Following are
347 considerations surrounding this variable:
348
349 - This host list is only used if ``BB_NO_NETWORK`` is either not set
350 or set to "0".
351
352 - Limited support for wildcard matching against the beginning of
353 host names exists. For example, the following setting matches
354 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
355 ::
356
357 BB_ALLOWED_NETWORKS = "*.gnu.org"
358
359 .. note::
360
361 The use of the "``*``" character only works at the beginning of
362 a host name and it must be isolated from the remainder of the
363 host name. You cannot use the wildcard character in any other
364 location of the name or combined with the front part of the
365 name.
366
367 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
368 is not.
369
370 - Mirrors not in the host list are skipped and logged in debug.
371
372 - Attempts to access networks not in the host list cause a failure.
373
374 Using ``BB_ALLOWED_NETWORKS`` in conjunction with
375 :term:`PREMIRRORS` is very useful. Adding the host
376 you want to use to ``PREMIRRORS`` results in the source code being
377 fetched from an allowed location and avoids raising an error when a
378 host that is not allowed is in a :term:`SRC_URI`
379 statement. This is because the fetcher does not attempt to use the
380 host listed in ``SRC_URI`` after a successful fetch from the
381 ``PREMIRRORS`` occurs.
382
Andrew Geisslerf0343792020-11-18 10:42:21 -0600383 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384 Defines how BitBake handles situations where an append file
385 (``.bbappend``) has no corresponding recipe file (``.bb``). This
386 condition often occurs when layers get out of sync (e.g. ``oe-core``
387 bumps a recipe version and the old recipe no longer exists and the
388 other layer has not been updated to the new version of the recipe
389 yet).
390
391 The default fatal behavior is safest because it is the sane reaction
392 given something is out of sync. It is important to realize when your
393 changes are no longer being applied.
394
395 You can change the default behavior by setting this variable to "1",
396 "yes", or "true" in your ``local.conf`` file, which is located in the
397 :term:`Build Directory`: Here is an example:
398 ::
399
400 BB_DANGLINGAPPENDS_WARNONLY = "1"
401
Andrew Geisslerf0343792020-11-18 10:42:21 -0600402 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500403 Monitors disk space and available inodes during the build and allows
404 you to control the build based on these parameters.
405
406 Disk space monitoring is disabled by default. To enable monitoring,
407 add the ``BB_DISKMON_DIRS`` variable to your ``conf/local.conf`` file
408 found in the :term:`Build Directory`. Use the
409 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500410
411 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500412
413 BB_DISKMON_DIRS = "action,dir,threshold [...]"
414
415 where:
416
417 action is:
418 ABORT: Immediately abort the build when
419 a threshold is broken.
420 STOPTASKS: Stop the build after the currently
421 executing tasks have finished when
422 a threshold is broken.
423 WARN: Issue a warning but continue the
424 build when a threshold is broken.
425 Subsequent warnings are issued as
426 defined by the BB_DISKMON_WARNINTERVAL
427 variable, which must be defined in
428 the conf/local.conf file.
429
430 dir is:
431 Any directory you choose. You can specify one or
432 more directories to monitor by separating the
433 groupings with a space. If two directories are
434 on the same device, only the first directory
435 is monitored.
436
437 threshold is:
438 Either the minimum available disk space,
439 the minimum number of free inodes, or
440 both. You must specify at least one. To
441 omit one or the other, simply omit the value.
442 Specify the threshold using G, M, K for Gbytes,
443 Mbytes, and Kbytes, respectively. If you do
444 not specify G, M, or K, Kbytes is assumed by
445 default. Do not use GB, MB, or KB.
446
447 Here are some examples:
448 ::
449
450 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
451 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
452 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
453
454 The first example works only if you also provide the
455 :term:`BB_DISKMON_WARNINTERVAL`
456 variable in the ``conf/local.conf``. This example causes the build
457 system to immediately abort when either the disk space in
458 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
459 below 100 Kbytes. Because two directories are provided with the
460 variable, the build system also issue a warning when the disk space
461 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
462 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
463 during intervals as defined by the ``BB_DISKMON_WARNINTERVAL``
464 variable.
465
466 The second example stops the build after all currently executing
467 tasks complete when the minimum disk space in the ``${TMPDIR}``
468 directory drops below 1 Gbyte. No disk monitoring occurs for the free
469 inodes in this case.
470
471 The final example immediately aborts the build when the number of
472 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
473 disk space monitoring for the directory itself occurs in this case.
474
Andrew Geisslerf0343792020-11-18 10:42:21 -0600475 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500476 Defines the disk space and free inode warning intervals. To set these
477 intervals, define the variable in your ``conf/local.conf`` file in
478 the :term:`Build Directory`.
479
480 If you are going to use the ``BB_DISKMON_WARNINTERVAL`` variable, you
481 must also use the :term:`BB_DISKMON_DIRS`
482 variable and define its action as "WARN". During the build,
483 subsequent warnings are issued each time disk space or number of free
484 inodes further reduces by the respective interval.
485
486 If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you
487 do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk
488 monitoring interval defaults to the following:
489 ::
490
491 BB_DISKMON_WARNINTERVAL = "50M,5K"
492
493 When specifying the variable in your configuration file, use the
494 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500495
496 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500497
498 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
499
500 where:
501
502 disk_space_interval is:
503 An interval of memory expressed in either
504 G, M, or K for Gbytes, Mbytes, or Kbytes,
505 respectively. You cannot use GB, MB, or KB.
506
507 disk_inode_interval is:
508 An interval of free inodes expressed in either
509 G, M, or K for Gbytes, Mbytes, or Kbytes,
510 respectively. You cannot use GB, MB, or KB.
511
512 Here is an example:
513 ::
514
515 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
516 BB_DISKMON_WARNINTERVAL = "50M,5K"
517
518 These variables cause the
519 OpenEmbedded build system to issue subsequent warnings each time the
520 available disk space further reduces by 50 Mbytes or the number of
521 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
522 directory. Subsequent warnings based on the interval occur each time
523 a respective interval is reached beyond the initial warning (i.e. 1
524 Gbytes and 100 Kbytes).
525
Andrew Geisslerf0343792020-11-18 10:42:21 -0600526 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500527 Causes tarballs of the source control repositories (e.g. Git
528 repositories), including metadata, to be placed in the
529 :term:`DL_DIR` directory.
530
531 For performance reasons, creating and placing tarballs of these
532 repositories is not the default action by the OpenEmbedded build
533 system.
534 ::
535
536 BB_GENERATE_MIRROR_TARBALLS = "1"
537
538 Set this variable in your
539 ``local.conf`` file in the :term:`Build Directory`.
540
541 Once you have the tarballs containing your source files, you can
542 clean up your ``DL_DIR`` directory by deleting any Git or other
543 source control work directories.
544
Andrew Geisslerf0343792020-11-18 10:42:21 -0600545 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500546 The maximum number of tasks BitBake should run in parallel at any one
547 time. The OpenEmbedded build system automatically configures this
548 variable to be equal to the number of cores on the build system. For
549 example, a system with a dual core processor that also uses
550 hyper-threading causes the ``BB_NUMBER_THREADS`` variable to default
551 to "4".
552
553 For single socket systems (i.e. one CPU), you should not have to
554 override this variable to gain optimal parallelism during builds.
555 However, if you have very large systems that employ multiple physical
556 CPUs, you might want to make sure the ``BB_NUMBER_THREADS`` variable
557 is not set higher than "20".
558
559 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600560 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500561 section in the Yocto Project Development Tasks Manual.
562
Andrew Geisslerf0343792020-11-18 10:42:21 -0600563 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500564 Specifies the time (in seconds) after which to unload the BitBake
565 server due to inactivity. Set ``BB_SERVER_TIMEOUT`` to determine how
566 long the BitBake server stays resident between invocations.
567
568 For example, the following statement in your ``local.conf`` file
569 instructs the server to be unloaded after 20 seconds of inactivity:
570 ::
571
572 BB_SERVER_TIMEOUT = "20"
573
574 If you want the server to never be unloaded,
575 set ``BB_SERVER_TIMEOUT`` to "-1".
576
Andrew Geisslerf0343792020-11-18 10:42:21 -0600577 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500578 Allows you to extend a recipe so that it builds variants of the
579 software. Common variants for recipes exist such as "natives" like
580 ``quilt-native``, which is a copy of Quilt built to run on the build
581 system; "crosses" such as ``gcc-cross``, which is a compiler built to
582 run on the build machine but produces binaries that run on the target
583 :term:`MACHINE`; "nativesdk", which targets the SDK
584 machine instead of ``MACHINE``; and "mulitlibs" in the form
585 "``multilib:``\ multilib_name".
586
587 To build a different variant of the recipe with a minimal amount of
588 code, it usually is as simple as adding the following to your recipe:
589 ::
590
591 BBCLASSEXTEND =+ "native nativesdk"
592 BBCLASSEXTEND =+ "multilib:multilib_name"
593
594 .. note::
595
596 Internally, the ``BBCLASSEXTEND`` mechanism generates recipe
597 variants by rewriting variable values and applying overrides such
598 as ``_class-native``. For example, to generate a native version of
599 a recipe, a :term:`DEPENDS` on "foo" is rewritten
600 to a ``DEPENDS`` on "foo-native".
601
602 Even when using ``BBCLASSEXTEND``, the recipe is only parsed once.
603 Parsing once adds some limitations. For example, it is not
604 possible to include a different file depending on the variant,
605 since ``include`` statements are processed when the recipe is
606 parsed.
607
Andrew Geisslerf0343792020-11-18 10:42:21 -0600608 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500609 Lists the names of configured layers. These names are used to find
610 the other ``BBFILE_*`` variables. Typically, each layer will append
611 its name to this variable in its ``conf/layer.conf`` file.
612
Andrew Geisslerf0343792020-11-18 10:42:21 -0600613 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500614 Variable that expands to match files from
615 :term:`BBFILES` in a particular layer. This variable
616 is used in the ``conf/layer.conf`` file and must be suffixed with the
617 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
618
Andrew Geisslerf0343792020-11-18 10:42:21 -0600619 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500620 Assigns the priority for recipe files in each layer.
621
622 This variable is useful in situations where the same recipe appears
623 in more than one layer. Setting this variable allows you to
624 prioritize a layer against other layers that contain the same recipe
625 - effectively letting you control the precedence for the multiple
626 layers. The precedence established through this variable stands
627 regardless of a recipe's version (:term:`PV` variable). For
628 example, a layer that has a recipe with a higher ``PV`` value but for
629 which the ``BBFILE_PRIORITY`` is set to have a lower precedence still
630 has a lower precedence.
631
632 A larger value for the ``BBFILE_PRIORITY`` variable results in a
633 higher precedence. For example, the value 6 has a higher precedence
634 than the value 5. If not specified, the ``BBFILE_PRIORITY`` variable
635 is set based on layer dependencies (see the ``LAYERDEPENDS`` variable
636 for more information. The default priority, if unspecified for a
637 layer with no dependencies, is the lowest defined priority + 1 (or 1
638 if no priorities are defined).
639
640 .. tip::
641
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500642 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500643 to list all configured layers along with their priorities.
644
Andrew Geisslerf0343792020-11-18 10:42:21 -0600645 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500646 A space-separated list of recipe files BitBake uses to build
647 software.
648
649 When specifying recipe files, you can pattern match using Python's
650 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
651 For details on the syntax, see the documentation by following the
652 previous link.
653
Andrew Geisslerf0343792020-11-18 10:42:21 -0600654 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500655 Activates content when identified layers are present. You identify
656 the layers by the collections that the layers define.
657
658 Use the ``BBFILES_DYNAMIC`` variable to avoid ``.bbappend`` files
659 whose corresponding ``.bb`` file is in a layer that attempts to
660 modify other layers through ``.bbappend`` but does not want to
661 introduce a hard dependency on those other layers.
662
663 Use the following form for ``BBFILES_DYNAMIC``:
664 collection_name:filename_pattern The following example identifies two
665 collection names and two filename patterns:
666 ::
667
668 BBFILES_DYNAMIC += " \
669 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
670 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
671 "
672
673 This next example shows an error message that occurs because invalid
674 entries are found, which cause parsing to abort:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500675
676 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500677
678 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
679 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
680 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
681
Andrew Geisslerf0343792020-11-18 10:42:21 -0600682 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500683 Variable that controls how BitBake displays logs on build failure.
684
Andrew Geisslerf0343792020-11-18 10:42:21 -0600685 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500686 If :term:`BBINCLUDELOGS` is set, specifies the
687 maximum number of lines from the task log file to print when
688 reporting a failed task. If you do not set ``BBINCLUDELOGS_LINES``,
689 the entire log is printed.
690
Andrew Geisslerf0343792020-11-18 10:42:21 -0600691 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500692 Lists the layers to enable during the build. This variable is defined
693 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
694 Here is an example:
695 ::
696
697 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500698 /home/scottrif/poky/meta \
699 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700 /home/scottrif/poky/meta-yocto-bsp \
701 /home/scottrif/poky/meta-mykernel \
702 "
703
704 This example enables four layers, one of which is a custom,
705 user-defined layer named ``meta-mykernel``.
706
Andrew Geisslerf0343792020-11-18 10:42:21 -0600707 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500708 Prevents BitBake from processing recipes and recipe append files.
709
710 You can use the ``BBMASK`` variable to "hide" these ``.bb`` and
711 ``.bbappend`` files. BitBake ignores any recipe or recipe append
712 files that match any of the expressions. It is as if BitBake does not
713 see them at all. Consequently, matching files are not parsed or
714 otherwise used by BitBake.
715
716 The values you provide are passed to Python's regular expression
717 compiler. Consequently, the syntax follows Python's Regular
718 Expression (re) syntax. The expressions are compared against the full
719 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500720 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500721
722 The following example uses a complete regular expression to tell
723 BitBake to ignore all recipe and recipe append files in the
724 ``meta-ti/recipes-misc/`` directory:
725 ::
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 Specifies each additional separate configuration when you are
746 building targets with multiple configurations. Use this variable in
747 your ``conf/local.conf`` configuration file. Specify a
748 multiconfigname for each configuration file you are using. For
749 example, the following line specifies three configuration files:
750 ::
751
752 BBMULTICONFIG = "configA configB configC"
753
754 Each configuration file you
755 use must reside in the :term:`Build Directory`
756 ``conf/multiconfig`` directory (e.g.
757 build_directory\ ``/conf/multiconfig/configA.conf``).
758
759 For information on how to use ``BBMULTICONFIG`` in an environment
760 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600761 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500762 section in the Yocto Project Development Tasks Manual.
763
Andrew Geisslerf0343792020-11-18 10:42:21 -0600764 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500765 Used by BitBake to locate ``.bbclass`` and configuration files. This
766 variable is analogous to the ``PATH`` variable.
767
768 .. note::
769
770 If you run BitBake from a directory outside of the
771 Build Directory
772 , you must be sure to set
773 BBPATH
774 to point to the Build Directory. Set the variable as you would any
775 environment variable and then run BitBake:
776 ::
777
778 $ BBPATH = "build_directory"
779 $ export BBPATH
780 $ bitbake target
781
782
Andrew Geisslerf0343792020-11-18 10:42:21 -0600783 :term:`BBSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500784 If defined in the BitBake environment, ``BBSERVER`` points to the
785 BitBake remote server.
786
787 Use the following format to export the variable to the BitBake
788 environment:
789 ::
790
791 export BBSERVER=localhost:$port
792
793 By default, ``BBSERVER`` also appears in
794 :term:`bitbake:BB_HASHBASE_WHITELIST`.
795 Consequently, ``BBSERVER`` is excluded from checksum and dependency
796 data.
797
Andrew Geisslerf0343792020-11-18 10:42:21 -0600798 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500799 When inheriting the
800 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
801 this variable specifies binary configuration scripts to disable in
802 favor of using ``pkg-config`` to query the information. The
803 ``binconfig-disabled`` class will modify the specified scripts to
804 return an error so that calls to them can be easily found and
805 replaced.
806
807 To add multiple scripts, separate them by spaces. Here is an example
808 from the ``libpng`` recipe:
809 ::
810
811 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
812
Andrew Geisslerf0343792020-11-18 10:42:21 -0600813 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500814 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
815 this variable specifies a wildcard for configuration scripts that
816 need editing. The scripts are edited to correct any paths that have
817 been set up during compilation so that they are correct for use when
818 installed into the sysroot and called by the build processes of other
819 recipes.
820
821 .. note::
822
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500823 The ``BINCONFIG_GLOB`` variable uses
824 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
825 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500826 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500827 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
828 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500829
830 For more information on how this variable works, see
831 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
832 You can also find general
833 information on the class in the
834 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
835
Andrew Geisslerf0343792020-11-18 10:42:21 -0600836 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500837 The base recipe name and version but without any special recipe name
838 suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is
839 comprised of the following:
840 ::
841
842 ${BPN}-${PV}
843
Andrew Geisslerf0343792020-11-18 10:42:21 -0600844 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500845 This variable is a version of the :term:`PN` variable with
846 common prefixes and suffixes removed, such as ``nativesdk-``,
847 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
848 The exact lists of prefixes and suffixes removed are specified by the
849 :term:`MLPREFIX` and
850 :term:`SPECIAL_PKGSUFFIX` variables,
851 respectively.
852
Andrew Geisslerf0343792020-11-18 10:42:21 -0600853 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500854 Specifies a URL for an upstream bug tracking website for a recipe.
855 The OpenEmbedded build system does not use this variable. Rather, the
856 variable is a useful pointer in case a bug in the software being
857 built needs to be manually reported.
858
Andrew Geisslerf0343792020-11-18 10:42:21 -0600859 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500860 Specifies the architecture of the build host (e.g. ``i686``). The
861 OpenEmbedded build system sets the value of ``BUILD_ARCH`` from the
862 machine name reported by the ``uname`` command.
863
Andrew Geisslerf0343792020-11-18 10:42:21 -0600864 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500865 Specifies the architecture-specific assembler flags for the build
866 host. By default, the value of ``BUILD_AS_ARCH`` is empty.
867
Andrew Geisslerf0343792020-11-18 10:42:21 -0600868 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500869 Specifies the architecture-specific C compiler flags for the build
870 host. By default, the value of ``BUILD_CC_ARCH`` is empty.
871
Andrew Geisslerf0343792020-11-18 10:42:21 -0600872 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873 Specifies the linker command to be used for the build host when the C
874 compiler is being used as the linker. By default, ``BUILD_CCLD``
875 points to GCC and passes as arguments the value of
876 :term:`BUILD_CC_ARCH`, assuming
877 ``BUILD_CC_ARCH`` is set.
878
Andrew Geisslerf0343792020-11-18 10:42:21 -0600879 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500880 Specifies the flags to pass to the C compiler when building for the
881 build host. When building in the ``-native`` context,
882 :term:`CFLAGS` is set to the value of this variable by
883 default.
884
Andrew Geisslerf0343792020-11-18 10:42:21 -0600885 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500886 Specifies the flags to pass to the C preprocessor (i.e. to both the C
887 and the C++ compilers) when building for the build host. When
888 building in the ``-native`` context, :term:`CPPFLAGS`
889 is set to the value of this variable by default.
890
Andrew Geisslerf0343792020-11-18 10:42:21 -0600891 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500892 Specifies the flags to pass to the C++ compiler when building for the
893 build host. When building in the ``-native`` context,
894 :term:`CXXFLAGS` is set to the value of this variable
895 by default.
896
Andrew Geisslerf0343792020-11-18 10:42:21 -0600897 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500898 Specifies the Fortran compiler command for the build host. By
899 default, ``BUILD_FC`` points to Gfortran and passes as arguments the
900 value of :term:`BUILD_CC_ARCH`, assuming
901 ``BUILD_CC_ARCH`` is set.
902
Andrew Geisslerf0343792020-11-18 10:42:21 -0600903 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500904 Specifies the linker command for the build host. By default,
905 ``BUILD_LD`` points to the GNU linker (ld) and passes as arguments
906 the value of :term:`BUILD_LD_ARCH`, assuming
907 ``BUILD_LD_ARCH`` is set.
908
Andrew Geisslerf0343792020-11-18 10:42:21 -0600909 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500910 Specifies architecture-specific linker flags for the build host. By
911 default, the value of ``BUILD_LD_ARCH`` is empty.
912
Andrew Geisslerf0343792020-11-18 10:42:21 -0600913 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500914 Specifies the flags to pass to the linker when building for the build
915 host. When building in the ``-native`` context,
916 :term:`LDFLAGS` is set to the value of this variable
917 by default.
918
Andrew Geisslerf0343792020-11-18 10:42:21 -0600919 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500920 Specifies the optimization flags passed to the C compiler when
921 building for the build host or the SDK. The flags are passed through
922 the :term:`BUILD_CFLAGS` and
923 :term:`BUILDSDK_CFLAGS` default values.
924
925 The default value of the ``BUILD_OPTIMIZATION`` variable is "-O2
926 -pipe".
927
Andrew Geisslerf0343792020-11-18 10:42:21 -0600928 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500929 Specifies the operating system in use on the build host (e.g.
930 "linux"). The OpenEmbedded build system sets the value of
931 ``BUILD_OS`` from the OS reported by the ``uname`` command - the
932 first word, converted to lower-case characters.
933
Andrew Geisslerf0343792020-11-18 10:42:21 -0600934 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500935 The toolchain binary prefix used for native recipes. The OpenEmbedded
936 build system uses the ``BUILD_PREFIX`` value to set the
937 :term:`TARGET_PREFIX` when building for
938 ``native`` recipes.
939
Andrew Geisslerf0343792020-11-18 10:42:21 -0600940 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941 Specifies the command to be used to strip debugging symbols from
942 binaries produced for the build host. By default, ``BUILD_STRIP``
943 points to
944 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
945
Andrew Geisslerf0343792020-11-18 10:42:21 -0600946 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500947 Specifies the system, including the architecture and the operating
948 system, to use when building for the build host (i.e. when building
949 ``native`` recipes).
950
951 The OpenEmbedded build system automatically sets this variable based
952 on :term:`BUILD_ARCH`,
953 :term:`BUILD_VENDOR`, and
954 :term:`BUILD_OS`. You do not need to set the
955 ``BUILD_SYS`` variable yourself.
956
Andrew Geisslerf0343792020-11-18 10:42:21 -0600957 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500958 Specifies the vendor name to use when building for the build host.
959 The default value is an empty string ("").
960
Andrew Geisslerf0343792020-11-18 10:42:21 -0600961 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500962 Points to the location of the :term:`Build Directory`.
963 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500964 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500965 Directory path when you run the script. If you run the script and do
966 not provide a Build Directory path, the ``BUILDDIR`` defaults to
967 ``build`` in the current directory.
968
Andrew Geisslerf0343792020-11-18 10:42:21 -0600969 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500970 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
971 class, this variable specifies whether or not to commit the build
972 history output in a local Git repository. If set to "1", this local
973 repository will be maintained automatically by the ``buildhistory``
974 class and a commit will be created on every build for changes to each
975 top-level subdirectory of the build history output (images, packages,
976 and sdk). If you want to track changes to build history over time,
977 you should set this value to "1".
978
979 By default, the ``buildhistory`` class does not commit the build
980 history output in a local Git repository:
981 ::
982
983 BUILDHISTORY_COMMIT ?= "0"
984
Andrew Geisslerf0343792020-11-18 10:42:21 -0600985 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500986 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
987 class, this variable specifies the author to use for each Git commit.
988 In order for the ``BUILDHISTORY_COMMIT_AUTHOR`` variable to work, the
989 :term:`BUILDHISTORY_COMMIT` variable must
990 be set to "1".
991
992 Git requires that the value you provide for the
993 ``BUILDHISTORY_COMMIT_AUTHOR`` variable takes the form of "name
994 email@host". Providing an email address or host that is not valid
995 does not produce an error.
996
997 By default, the ``buildhistory`` class sets the variable as follows:
998 ::
999
1000 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
1001
Andrew Geisslerf0343792020-11-18 10:42:21 -06001002 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001003 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1004 class, this variable specifies the directory in which build history
1005 information is kept. For more information on how the variable works,
1006 see the ``buildhistory.class``.
1007
1008 By default, the ``buildhistory`` class sets the directory as follows:
1009 ::
1010
1011 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1012
Andrew Geisslerf0343792020-11-18 10:42:21 -06001013 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001014 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1015 class, this variable specifies the build history features to be
1016 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001017 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001018 section in the Yocto Project Development Tasks Manual.
1019
1020 You can specify these features in the form of a space-separated list:
1021
1022 - *image:* Analysis of the contents of images, which includes the
1023 list of installed packages among other things.
1024
1025 - *package:* Analysis of the contents of individual packages.
1026
1027 - *sdk:* Analysis of the contents of the software development kit
1028 (SDK).
1029
1030 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -06001031 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001032 (sstate) tasks.
1033 This saves one file per task and lists the SHA-256 checksums for
1034 each file staged (i.e. the output of the task).
1035
1036 By default, the ``buildhistory`` class enables the following
1037 features:
1038 ::
1039
1040 BUILDHISTORY_FEATURES ?= "image package sdk"
1041
Andrew Geisslerf0343792020-11-18 10:42:21 -06001042 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001043 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1044 class, this variable specifies a list of paths to files copied from
1045 the image contents into the build history directory under an
1046 "image-files" directory in the directory for the image, so that you
1047 can track the contents of each file. The default is to copy
1048 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1049 changes in user and group entries. You can modify the list to include
1050 any file. Specifying an invalid path does not produce an error.
1051 Consequently, you can include files that might not always be present.
1052
1053 By default, the ``buildhistory`` class provides paths to the
1054 following files:
1055 ::
1056
1057 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1058
Andrew Geisslerf0343792020-11-18 10:42:21 -06001059 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001060 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1061 class, this variable optionally specifies a remote repository to
1062 which build history pushes Git changes. In order for
1063 ``BUILDHISTORY_PUSH_REPO`` to work,
1064 :term:`BUILDHISTORY_COMMIT` must be set to
1065 "1".
1066
1067 The repository should correspond to a remote address that specifies a
1068 repository as understood by Git, or alternatively to a remote name
1069 that you have set up manually using ``git remote`` within the local
1070 repository.
1071
1072 By default, the ``buildhistory`` class sets the variable as follows:
1073 ::
1074
1075 BUILDHISTORY_PUSH_REPO ?= ""
1076
Andrew Geisslerf0343792020-11-18 10:42:21 -06001077 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001078 Specifies the flags to pass to the C compiler when building for the
1079 SDK. When building in the ``nativesdk-`` context,
1080 :term:`CFLAGS` is set to the value of this variable by
1081 default.
1082
Andrew Geisslerf0343792020-11-18 10:42:21 -06001083 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001084 Specifies the flags to pass to the C pre-processor (i.e. to both the
1085 C and the C++ compilers) when building for the SDK. When building in
1086 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1087 to the value of this variable by default.
1088
Andrew Geisslerf0343792020-11-18 10:42:21 -06001089 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001090 Specifies the flags to pass to the C++ compiler when building for the
1091 SDK. When building in the ``nativesdk-`` context,
1092 :term:`CXXFLAGS` is set to the value of this variable
1093 by default.
1094
Andrew Geisslerf0343792020-11-18 10:42:21 -06001095 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 Specifies the flags to pass to the linker when building for the SDK.
1097 When building in the ``nativesdk-`` context,
1098 :term:`LDFLAGS` is set to the value of this variable
1099 by default.
1100
Andrew Geisslerf0343792020-11-18 10:42:21 -06001101 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001102 Points to the location of the directory that holds build statistics
1103 when you use and enable the
1104 :ref:`buildstats <ref-classes-buildstats>` class. The
1105 ``BUILDSTATS_BASE`` directory defaults to
1106 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1107
Andrew Geisslerf0343792020-11-18 10:42:21 -06001108 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001109 For the BusyBox recipe, specifies whether to split the output
1110 executable file into two parts: one for features that require
1111 ``setuid root``, and one for the remaining features (i.e. those that
1112 do not require ``setuid root``).
1113
1114 The ``BUSYBOX_SPLIT_SUID`` variable defaults to "1", which results in
1115 splitting the output executable file. Set the variable to "0" to get
1116 a single output executable file.
1117
Andrew Geisslerf0343792020-11-18 10:42:21 -06001118 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001119 Specifies the directory BitBake uses to store a cache of the
1120 :term:`Metadata` so it does not need to be parsed every time
1121 BitBake is started.
1122
Andrew Geisslerf0343792020-11-18 10:42:21 -06001123 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001124 The minimal command and arguments used to run the C compiler.
1125
Andrew Geisslerf0343792020-11-18 10:42:21 -06001126 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001127 Specifies the flags to pass to the C compiler. This variable is
1128 exported to an environment variable and thus made visible to the
1129 software being built during the compilation step.
1130
1131 Default initialization for ``CFLAGS`` varies depending on what is
1132 being built:
1133
1134 - :term:`TARGET_CFLAGS` when building for the
1135 target
1136
1137 - :term:`BUILD_CFLAGS` when building for the
1138 build host (i.e. ``-native``)
1139
1140 - :term:`BUILDSDK_CFLAGS` when building for
1141 an SDK (i.e. ``nativesdk-``)
1142
Andrew Geisslerf0343792020-11-18 10:42:21 -06001143 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001144 An internal variable specifying the special class override that
1145 should currently apply (e.g. "class-target", "class-native", and so
1146 forth). The classes that use this variable (e.g.
1147 :ref:`native <ref-classes-native>`,
1148 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1149 variable to appropriate values.
1150
1151 .. note::
1152
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001153 ``CLASSOVERRIDE`` gets its default "class-target" value from the
1154 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001155
1156 As an example, the following override allows you to install extra
1157 files, but only when building for the target:
1158 ::
1159
1160 do_install_append_class-target() {
1161 install my-extra-file ${D}${sysconfdir}
1162 }
1163
1164 Here is an example where ``FOO`` is set to
1165 "native" when building for the build host, and to "other" when not
1166 building for the build host:
1167 ::
1168
1169 FOO_class-native = "native"
1170 FOO = "other"
1171
1172 The underlying mechanism behind ``CLASSOVERRIDE`` is simply
1173 that it is included in the default value of
1174 :term:`OVERRIDES`.
1175
Andrew Geisslerf0343792020-11-18 10:42:21 -06001176 :term:`CLEANBROKEN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001177 If set to "1" within a recipe, ``CLEANBROKEN`` specifies that the
1178 ``make clean`` command does not work for the software being built.
1179 Consequently, the OpenEmbedded build system will not try to run
1180 ``make clean`` during the :ref:`ref-tasks-configure`
1181 task, which is the default behavior.
1182
Andrew Geisslerf0343792020-11-18 10:42:21 -06001183 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001184 Provides a list of hardware features that are enabled in both
1185 :term:`MACHINE_FEATURES` and
1186 :term:`DISTRO_FEATURES`. This select list of
1187 features contains features that make sense to be controlled both at
1188 the machine and distribution configuration level. For example, the
1189 "bluetooth" feature requires hardware support but should also be
1190 optional at the distribution level, in case the hardware supports
1191 Bluetooth but you do not ever intend to use it.
1192
Andrew Geisslerf0343792020-11-18 10:42:21 -06001193 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001194 Points to ``meta/files/common-licenses`` in the
1195 :term:`Source Directory`, which is where generic license
1196 files reside.
1197
Andrew Geisslerf0343792020-11-18 10:42:21 -06001198 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001199 A regular expression that resolves to one or more hosts (when the
1200 recipe is native) or one or more targets (when the recipe is
1201 non-native) with which a recipe is compatible. The regular expression
1202 is matched against :term:`HOST_SYS`. You can use the
1203 variable to stop recipes from being built for classes of systems with
1204 which the recipes are not compatible. Stopping these builds is
1205 particularly useful with kernels. The variable also helps to increase
1206 parsing speed since the build system skips parsing recipes not
1207 compatible with the current system.
1208
Andrew Geisslerf0343792020-11-18 10:42:21 -06001209 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001210 A regular expression that resolves to one or more target machines
1211 with which a recipe is compatible. The regular expression is matched
1212 against :term:`MACHINEOVERRIDES`. You can use
1213 the variable to stop recipes from being built for machines with which
1214 the recipes are not compatible. Stopping these builds is particularly
1215 useful with kernels. The variable also helps to increase parsing
1216 speed since the build system skips parsing recipes not compatible
1217 with the current machine.
1218
Andrew Geisslerf0343792020-11-18 10:42:21 -06001219 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001220 Defines wildcards to match when installing a list of complementary
1221 packages for all the packages explicitly (or implicitly) installed in
1222 an image.
1223
1224 .. note::
1225
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001226 The ``COMPLEMENTARY_GLOB`` variable uses Unix filename pattern matching
1227 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1228 which is similar to the Unix style pathname pattern expansion
1229 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001230
1231 The resulting list of complementary packages is associated with an
1232 item that can be added to
1233 :term:`IMAGE_FEATURES`. An example usage of
1234 this is the "dev-pkgs" item that when added to ``IMAGE_FEATURES``
1235 will install -dev packages (containing headers and other development
1236 files) for every package in the image.
1237
1238 To add a new feature item pointing to a wildcard, use a variable flag
1239 to specify the feature item name and use the value to specify the
1240 wildcard. Here is an example:
1241 ::
1242
1243 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1244
Andrew Geisslerf0343792020-11-18 10:42:21 -06001245 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001246 Stores sysroot components for each recipe. The OpenEmbedded build
1247 system uses ``COMPONENTS_DIR`` when constructing recipe-specific
1248 sysroots for other recipes.
1249
1250 The default is
1251 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1252 (i.e.
1253 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1254
Andrew Geisslerf0343792020-11-18 10:42:21 -06001255 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001256 Tracks the version of the local configuration file (i.e.
1257 ``local.conf``). The value for ``CONF_VERSION`` increments each time
1258 ``build/conf/`` compatibility changes.
1259
Andrew Geisslerf0343792020-11-18 10:42:21 -06001260 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001261 Identifies editable or configurable files that are part of a package.
1262 If the Package Management System (PMS) is being used to update
1263 packages on the target system, it is possible that configuration
1264 files you have changed after the original installation and that you
1265 now want to remain unchanged are overwritten. In other words,
1266 editable files might exist in the package that you do not want reset
1267 as part of the package update process. You can use the ``CONFFILES``
1268 variable to list the files in the package that you wish to prevent
1269 the PMS from overwriting during this update process.
1270
1271 To use the ``CONFFILES`` variable, provide a package name override
1272 that identifies the resulting package. Then, provide a
1273 space-separated list of files. Here is an example:
1274 ::
1275
1276 CONFFILES_${PN} += "${sysconfdir}/file1 \
1277 ${sysconfdir}/file2 ${sysconfdir}/file3"
1278
1279 A relationship exists between the ``CONFFILES`` and ``FILES``
1280 variables. The files listed within ``CONFFILES`` must be a subset of
1281 the files listed within ``FILES``. Because the configuration files
1282 you provide with ``CONFFILES`` are simply being identified so that
1283 the PMS will not overwrite them, it makes sense that the files must
1284 already be included as part of the package through the ``FILES``
1285 variable.
1286
1287 .. note::
1288
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001289 When specifying paths as part of the ``CONFFILES`` variable, it is
1290 good practice to use appropriate path variables.
1291 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1292 rather than ``/usr/bin``. You can find a list of these variables at
1293 the top of the ``meta/conf/bitbake.conf`` file in the
1294 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001295
Andrew Geisslerf0343792020-11-18 10:42:21 -06001296 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001297 Identifies the initial RAM filesystem (initramfs) source files. The
1298 OpenEmbedded build system receives and uses this kernel Kconfig
1299 variable as an environment variable. By default, the variable is set
1300 to null ("").
1301
1302 The ``CONFIG_INITRAMFS_SOURCE`` can be either a single cpio archive
1303 with a ``.cpio`` suffix or a space-separated list of directories and
1304 files for building the initramfs image. A cpio archive should contain
1305 a filesystem archive to be used as an initramfs image. Directories
1306 should contain a filesystem layout to be included in the initramfs
1307 image. Files should contain entries according to the format described
1308 by the ``usr/gen_init_cpio`` program in the kernel tree.
1309
1310 If you specify multiple directories and files, the initramfs image
1311 will be the aggregate of all of them.
1312
1313 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001314 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001315 in the Yocto Project Development Tasks Manual.
1316
Andrew Geisslerf0343792020-11-18 10:42:21 -06001317 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001318 A list of files that contains ``autoconf`` test results relevant to
1319 the current build. This variable is used by the Autotools utilities
1320 when running ``configure``.
1321
Andrew Geisslerf0343792020-11-18 10:42:21 -06001322 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001323 The minimal arguments for GNU configure.
1324
Andrew Geisslerf0343792020-11-18 10:42:21 -06001325 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001326 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001327 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001328 class, this variable identifies distribution features that would be
1329 in conflict should the recipe be built. In other words, if the
1330 ``CONFLICT_DISTRO_FEATURES`` variable lists a feature that also
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001331 appears in ``DISTRO_FEATURES`` within the current configuration, then
1332 the recipe will be skipped, and if the build system attempts to build
1333 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001334
Andrew Geisslerf0343792020-11-18 10:42:21 -06001335 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001336 A space-separated list of licenses to exclude from the source
1337 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1338 other words, if a license in a recipe's
1339 :term:`LICENSE` value is in the value of
1340 ``COPYLEFT_LICENSE_EXCLUDE``, then its source is not archived by the
1341 class.
1342
1343 .. note::
1344
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001345 The ``COPYLEFT_LICENSE_EXCLUDE`` variable takes precedence over the
1346 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001347
1348 The default value, which is "CLOSED Proprietary", for
1349 ``COPYLEFT_LICENSE_EXCLUDE`` is set by the
1350 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1351 is inherited by the ``archiver`` class.
1352
Andrew Geisslerf0343792020-11-18 10:42:21 -06001353 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001354 A space-separated list of licenses to include in the source archived
1355 by the :ref:`archiver <ref-classes-archiver>` class. In other
1356 words, if a license in a recipe's :term:`LICENSE`
1357 value is in the value of ``COPYLEFT_LICENSE_INCLUDE``, then its
1358 source is archived by the class.
1359
1360 The default value is set by the
1361 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1362 is inherited by the ``archiver`` class. The default value includes
1363 "GPL*", "LGPL*", and "AGPL*".
1364
Andrew Geisslerf0343792020-11-18 10:42:21 -06001365 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001366 A list of recipes to exclude in the source archived by the
1367 :ref:`archiver <ref-classes-archiver>` class. The
1368 ``COPYLEFT_PN_EXCLUDE`` variable overrides the license inclusion and
1369 exclusion caused through the
1370 :term:`COPYLEFT_LICENSE_INCLUDE` and
1371 :term:`COPYLEFT_LICENSE_EXCLUDE`
1372 variables, respectively.
1373
1374 The default value, which is "" indicating to not explicitly exclude
1375 any recipes by name, for ``COPYLEFT_PN_EXCLUDE`` is set by the
1376 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1377 is inherited by the ``archiver`` class.
1378
Andrew Geisslerf0343792020-11-18 10:42:21 -06001379 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001380 A list of recipes to include in the source archived by the
1381 :ref:`archiver <ref-classes-archiver>` class. The
1382 ``COPYLEFT_PN_INCLUDE`` variable overrides the license inclusion and
1383 exclusion caused through the
1384 :term:`COPYLEFT_LICENSE_INCLUDE` and
1385 :term:`COPYLEFT_LICENSE_EXCLUDE`
1386 variables, respectively.
1387
1388 The default value, which is "" indicating to not explicitly include
1389 any recipes by name, for ``COPYLEFT_PN_INCLUDE`` is set by the
1390 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1391 is inherited by the ``archiver`` class.
1392
Andrew Geisslerf0343792020-11-18 10:42:21 -06001393 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001394 A space-separated list of recipe types to include in the source
1395 archived by the :ref:`archiver <ref-classes-archiver>` class.
1396 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1397 ``crosssdk``, and ``cross-canadian``.
1398
1399 The default value, which is "target*", for ``COPYLEFT_RECIPE_TYPES``
1400 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
1401 class, which is inherited by the ``archiver`` class.
1402
Andrew Geisslerf0343792020-11-18 10:42:21 -06001403 :term:`COPY_LIC_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001404 If set to "1" along with the
1405 :term:`COPY_LIC_MANIFEST` variable, the
1406 OpenEmbedded build system copies into the image the license files,
1407 which are located in ``/usr/share/common-licenses``, for each
1408 package. The license files are placed in directories within the image
1409 itself during build time.
1410
1411 .. note::
1412
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001413 The ``COPY_LIC_DIRS`` does not offer a path for adding licenses for
1414 newly installed packages to an image, which might be most suitable for
1415 read-only filesystems that cannot be upgraded. See the
1416 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001417 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001418 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001419 information on providing license text.
1420
Andrew Geisslerf0343792020-11-18 10:42:21 -06001421 :term:`COPY_LIC_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001422 If set to "1", the OpenEmbedded build system copies the license
1423 manifest for the image to
1424 ``/usr/share/common-licenses/license.manifest`` within the image
1425 itself during build time.
1426
1427 .. note::
1428
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001429 The ``COPY_LIC_MANIFEST`` does not offer a path for adding licenses for
1430 newly installed packages to an image, which might be most suitable for
1431 read-only filesystems that cannot be upgraded. See the
1432 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001433 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001434 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001435 information on providing license text.
1436
Andrew Geisslerf0343792020-11-18 10:42:21 -06001437 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001438 Specifies the list of packages to be added to the image. You should
1439 only set this variable in the ``local.conf`` configuration file found
1440 in the :term:`Build Directory`.
1441
1442 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1443 supported.
1444
Andrew Geisslerf0343792020-11-18 10:42:21 -06001445 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001446 Specifies the parent directory of the OpenEmbedded-Core Metadata
1447 layer (i.e. ``meta``).
1448
1449 It is an important distinction that ``COREBASE`` points to the parent
1450 of this layer and not the layer itself. Consider an example where you
1451 have cloned the Poky Git repository and retained the ``poky`` name
1452 for your local copy of the repository. In this case, ``COREBASE``
1453 points to the ``poky`` folder because it is the parent directory of
1454 the ``poky/meta`` layer.
1455
Andrew Geisslerf0343792020-11-18 10:42:21 -06001456 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001457 Lists files from the :term:`COREBASE` directory that
1458 should be copied other than the layers listed in the
1459 ``bblayers.conf`` file. The ``COREBASE_FILES`` variable exists for
1460 the purpose of copying metadata from the OpenEmbedded build system
1461 into the extensible SDK.
1462
1463 Explicitly listing files in ``COREBASE`` is needed because it
1464 typically contains build directories and other files that should not
1465 normally be copied into the extensible SDK. Consequently, the value
1466 of ``COREBASE_FILES`` is used in order to only copy the files that
1467 are actually needed.
1468
Andrew Geisslerf0343792020-11-18 10:42:21 -06001469 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001470 The minimal command and arguments used to run the C preprocessor.
1471
Andrew Geisslerf0343792020-11-18 10:42:21 -06001472 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001473 Specifies the flags to pass to the C pre-processor (i.e. to both the
1474 C and the C++ compilers). This variable is exported to an environment
1475 variable and thus made visible to the software being built during the
1476 compilation step.
1477
1478 Default initialization for ``CPPFLAGS`` varies depending on what is
1479 being built:
1480
1481 - :term:`TARGET_CPPFLAGS` when building for
1482 the target
1483
1484 - :term:`BUILD_CPPFLAGS` when building for the
1485 build host (i.e. ``-native``)
1486
1487 - :term:`BUILDSDK_CPPFLAGS` when building
1488 for an SDK (i.e. ``nativesdk-``)
1489
Andrew Geisslerf0343792020-11-18 10:42:21 -06001490 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001491 The toolchain binary prefix for the target tools. The
1492 ``CROSS_COMPILE`` variable is the same as the
1493 :term:`TARGET_PREFIX` variable.
1494
1495 .. note::
1496
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001497 The OpenEmbedded build system sets the ``CROSS_COMPILE``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001498 variable only in certain contexts (e.g. when building for kernel
1499 and kernel module recipes).
1500
Andrew Geisslerf0343792020-11-18 10:42:21 -06001501 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001502 The directory in which files checked out under the CVS system are
1503 stored.
1504
Andrew Geisslerf0343792020-11-18 10:42:21 -06001505 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001506 The minimal command and arguments used to run the C++ compiler.
1507
Andrew Geisslerf0343792020-11-18 10:42:21 -06001508 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001509 Specifies the flags to pass to the C++ compiler. This variable is
1510 exported to an environment variable and thus made visible to the
1511 software being built during the compilation step.
1512
1513 Default initialization for ``CXXFLAGS`` varies depending on what is
1514 being built:
1515
1516 - :term:`TARGET_CXXFLAGS` when building for
1517 the target
1518
1519 - :term:`BUILD_CXXFLAGS` when building for the
1520 build host (i.e. ``-native``)
1521
1522 - :term:`BUILDSDK_CXXFLAGS` when building
1523 for an SDK (i.e. ``nativesdk-``)
1524
Andrew Geisslerf0343792020-11-18 10:42:21 -06001525 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001526 The destination directory. The location in the :term:`Build Directory`
1527 where components are installed by the
1528 :ref:`ref-tasks-install` task. This location defaults
1529 to:
1530 ::
1531
1532 ${WORKDIR}/image
1533
1534 .. note::
1535
1536 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001537 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001538
Andrew Geisslerf0343792020-11-18 10:42:21 -06001539 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001540 The date the build was started. Dates appear using the year, month,
1541 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1542
Andrew Geisslerf0343792020-11-18 10:42:21 -06001543 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001544 The date and time on which the current build started. The format is
1545 suitable for timestamps.
1546
Andrew Geisslerf0343792020-11-18 10:42:21 -06001547 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001548 When the :ref:`debian <ref-classes-debian>` class is inherited,
1549 which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a
1550 particular package should not be renamed according to Debian library
1551 package naming. You must use the package name as an override when you
1552 set this variable. Here is an example from the ``fontconfig`` recipe:
1553 ::
1554
1555 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
1556
Andrew Geisslerf0343792020-11-18 10:42:21 -06001557 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001558 When the :ref:`debian <ref-classes-debian>` class is inherited,
1559 which is the default behavior, ``DEBIANNAME`` allows you to override
1560 the library name for an individual package. Overriding the library
1561 name in these cases is rare. You must use the package name as an
1562 override when you set this variable. Here is an example from the
1563 ``dbus`` recipe:
1564 ::
1565
1566 DEBIANNAME_${PN} = "dbus-1"
1567
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001568 :term:`DEBUGINFOD_URLS`
1569 Points to the URL of the "debuginfod" server. Such that for every
1570 debugging information lookup, the debuginfod client will query the
1571 server and return the requested information. You set this variable
1572 in your ``local.conf`` file.
1573
Andrew Geisslerf0343792020-11-18 10:42:21 -06001574 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001575 Specifies to build packages with debugging information. This
1576 influences the value of the ``SELECTED_OPTIMIZATION`` variable.
1577
Andrew Geisslerf0343792020-11-18 10:42:21 -06001578 :term:`DEBUG_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001579 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
1580 compiling a system for debugging. This variable defaults to "-O
1581 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1582
Andrew Geisslerf0343792020-11-18 10:42:21 -06001583 :term:`DEFAULT_PREFERENCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001584 Specifies a weak bias for recipe selection priority.
1585
1586 The most common usage of this is variable is to set it to "-1" within
1587 a recipe for a development version of a piece of software. Using the
1588 variable in this way causes the stable version of the recipe to build
1589 by default in the absence of ``PREFERRED_VERSION`` being used to
1590 build the development version.
1591
1592 .. note::
1593
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001594 The bias provided by ``DEFAULT_PREFERENCE`` is weak and is overridden
1595 by :term:`BBFILE_PRIORITY` if that variable is different between two
1596 layers that contain different versions of the same recipe.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001597
Andrew Geisslerf0343792020-11-18 10:42:21 -06001598 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001599 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1600 the "tune") used by the OpenEmbedded build system. The
1601 ``DEFAULTTUNE`` helps define
1602 :term:`TUNE_FEATURES`.
1603
1604 The default tune is either implicitly or explicitly set by the
1605 machine (:term:`MACHINE`). However, you can override
1606 the setting using available tunes as defined with
1607 :term:`AVAILTUNES`.
1608
Andrew Geisslerf0343792020-11-18 10:42:21 -06001609 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001610 Lists a recipe's build-time dependencies. These are dependencies on
1611 other recipes whose contents (e.g. headers and shared libraries) are
1612 needed by the recipe at build time.
1613
1614 As an example, consider a recipe ``foo`` that contains the following
1615 assignment:
1616 ::
1617
1618 DEPENDS = "bar"
1619
1620 The practical effect of the previous
1621 assignment is that all files installed by bar will be available in
1622 the appropriate staging sysroot, given by the
1623 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1624 :ref:`ref-tasks-configure` task for ``foo`` runs.
1625 This mechanism is implemented by having ``do_configure`` depend on
1626 the :ref:`ref-tasks-populate_sysroot` task of
1627 each recipe listed in ``DEPENDS``, through a
1628 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1629 declaration in the :ref:`base <ref-classes-base>` class.
1630
1631 .. note::
1632
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001633 It seldom is necessary to reference, for example, ``STAGING_DIR_HOST``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001634 explicitly. The standard classes and build-related variables are
1635 configured to automatically use the appropriate staging sysroots.
1636
1637 As another example, ``DEPENDS`` can also be used to add utilities
1638 that run on the build machine during the build. For example, a recipe
1639 that makes use of a code generator built by the recipe ``codegen``
1640 might have the following:
1641 ::
1642
1643 DEPENDS = "codegen-native"
1644
1645 For more
1646 information, see the :ref:`native <ref-classes-native>` class and
1647 the :term:`EXTRANATIVEPATH` variable.
1648
1649 .. note::
1650
1651 - ``DEPENDS`` is a list of recipe names. Or, to be more precise,
1652 it is a list of :term:`PROVIDES` names, which
1653 usually match recipe names. Putting a package name such as
1654 "foo-dev" in ``DEPENDS`` does not make sense. Use "foo"
1655 instead, as this will put files from all the packages that make
1656 up ``foo``, which includes those from ``foo-dev``, into the
1657 sysroot.
1658
1659 - One recipe having another recipe in ``DEPENDS`` does not by
1660 itself add any runtime dependencies between the packages
1661 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001662 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001663 section in the Yocto Project Overview and Concepts Manual,
1664 runtime dependencies will often be added automatically, meaning
1665 ``DEPENDS`` alone is sufficient for most recipes.
1666
1667 - Counterintuitively, ``DEPENDS`` is often necessary even for
1668 recipes that install precompiled components. For example, if
1669 ``libfoo`` is a precompiled library that links against
1670 ``libbar``, then linking against ``libfoo`` requires both
1671 ``libfoo`` and ``libbar`` to be available in the sysroot.
1672 Without a ``DEPENDS`` from the recipe that installs ``libfoo``
1673 to the recipe that installs ``libbar``, other recipes might
1674 fail to link against ``libfoo``.
1675
1676 For information on runtime dependencies, see the
1677 :term:`RDEPENDS` variable. You can also see the
1678 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
1679 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
1680 BitBake User Manual for additional information on tasks and
1681 dependencies.
1682
Andrew Geisslerf0343792020-11-18 10:42:21 -06001683 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001684 Points to the general area that the OpenEmbedded build system uses to
1685 place images, packages, SDKs, and other output files that are ready
1686 to be used outside of the build system. By default, this directory
1687 resides within the :term:`Build Directory` as
1688 ``${TMPDIR}/deploy``.
1689
1690 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001691 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001692 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001693 ":ref:`overview-manual/concepts:images`",
1694 ":ref:`overview-manual/concepts:package feeds`", and
1695 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001696 Yocto Project Overview and Concepts Manual.
1697
Andrew Geisslerf0343792020-11-18 10:42:21 -06001698 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001699 Points to the area that the OpenEmbedded build system uses to place
1700 Debian packages that are ready to be used outside of the build
1701 system. This variable applies only when
1702 :term:`PACKAGE_CLASSES` contains
1703 "package_deb".
1704
1705 The BitBake configuration file initially defines the
1706 ``DEPLOY_DIR_DEB`` variable as a sub-folder of
1707 :term:`DEPLOY_DIR`:
1708 ::
1709
1710 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1711
1712 The :ref:`package_deb <ref-classes-package_deb>` class uses the
1713 ``DEPLOY_DIR_DEB`` variable to make sure the
1714 :ref:`ref-tasks-package_write_deb` task
1715 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001716 information on how packaging works, see the
1717 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001718 in the Yocto Project Overview and Concepts Manual.
1719
Andrew Geisslerf0343792020-11-18 10:42:21 -06001720 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001721 Points to the area that the OpenEmbedded build system uses to place
1722 images and other associated output files that are ready to be
1723 deployed onto the target machine. The directory is machine-specific
1724 as it contains the ``${MACHINE}`` name. By default, this directory
1725 resides within the :term:`Build Directory` as
1726 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1727
1728 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001729 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001730 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001731 ":ref:`overview-manual/concepts:images`" and
1732 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001733 the Yocto Project Overview and Concepts Manual.
1734
Andrew Geisslerf0343792020-11-18 10:42:21 -06001735 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001736 Points to the area that the OpenEmbedded build system uses to place
1737 IPK packages that are ready to be used outside of the build system.
1738 This variable applies only when
1739 :term:`PACKAGE_CLASSES` contains
1740 "package_ipk".
1741
1742 The BitBake configuration file initially defines this variable as a
1743 sub-folder of :term:`DEPLOY_DIR`:
1744 ::
1745
1746 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1747
1748 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
1749 ``DEPLOY_DIR_IPK`` variable to make sure the
1750 :ref:`ref-tasks-package_write_ipk` task
1751 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001752 on how packaging works, see the
1753 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001754 in the Yocto Project Overview and Concepts Manual.
1755
Andrew Geisslerf0343792020-11-18 10:42:21 -06001756 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001757 Points to the area that the OpenEmbedded build system uses to place
1758 RPM packages that are ready to be used outside of the build system.
1759 This variable applies only when
1760 :term:`PACKAGE_CLASSES` contains
1761 "package_rpm".
1762
1763 The BitBake configuration file initially defines this variable as a
1764 sub-folder of :term:`DEPLOY_DIR`:
1765 ::
1766
1767 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1768
1769 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
1770 ``DEPLOY_DIR_RPM`` variable to make sure the
1771 :ref:`ref-tasks-package_write_rpm` task
1772 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001773 on how packaging works, see the
1774 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001775 in the Yocto Project Overview and Concepts Manual.
1776
Andrew Geisslerf0343792020-11-18 10:42:21 -06001777 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001778 Points to the area that the OpenEmbedded build system uses to place
1779 tarballs that are ready to be used outside of the build system. This
1780 variable applies only when
1781 :term:`PACKAGE_CLASSES` contains
1782 "package_tar".
1783
1784 The BitBake configuration file initially defines this variable as a
1785 sub-folder of :term:`DEPLOY_DIR`:
1786 ::
1787
1788 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1789
1790 The :ref:`package_tar <ref-classes-package_tar>` class uses the
1791 ``DEPLOY_DIR_TAR`` variable to make sure the
1792 :ref:`ref-tasks-package_write_tar` task
1793 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001794 on how packaging works, see the
1795 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001796 in the Yocto Project Overview and Concepts Manual.
1797
Andrew Geisslerf0343792020-11-18 10:42:21 -06001798 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001799 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
1800 ``DEPLOYDIR`` points to a temporary work area for deployed files that
1801 is set in the ``deploy`` class as follows:
1802 ::
1803
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001804 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001805
1806 Recipes inheriting the ``deploy`` class should copy files to be
1807 deployed into ``DEPLOYDIR``, and the class will take care of copying
1808 them into :term:`DEPLOY_DIR_IMAGE`
1809 afterwards.
1810
Andrew Geisslerf0343792020-11-18 10:42:21 -06001811 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001812 The package description used by package managers. If not set,
1813 ``DESCRIPTION`` takes the value of the :term:`SUMMARY`
1814 variable.
1815
Andrew Geisslerf0343792020-11-18 10:42:21 -06001816 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001817 The short name of the distribution. For information on the long name
1818 of the distribution, see the :term:`DISTRO_NAME`
1819 variable.
1820
1821 The ``DISTRO`` variable corresponds to a distribution configuration
1822 file whose root name is the same as the variable's argument and whose
1823 filename extension is ``.conf``. For example, the distribution
1824 configuration file for the Poky distribution is named ``poky.conf``
1825 and resides in the ``meta-poky/conf/distro`` directory of the
1826 :term:`Source Directory`.
1827
1828 Within that ``poky.conf`` file, the ``DISTRO`` variable is set as
1829 follows:
1830 ::
1831
1832 DISTRO = "poky"
1833
1834 Distribution configuration files are located in a ``conf/distro``
1835 directory within the :term:`Metadata` that contains the
1836 distribution configuration. The value for ``DISTRO`` must not contain
1837 spaces, and is typically all lower-case.
1838
1839 .. note::
1840
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001841 If the ``DISTRO`` variable is blank, a set of default configurations
1842 are used, which are specified within
1843 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001844
Andrew Geisslerf0343792020-11-18 10:42:21 -06001845 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001846 Specifies a codename for the distribution being built.
1847
Andrew Geisslerf0343792020-11-18 10:42:21 -06001848 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001849 Specifies a list of distro-specific packages to add to all images.
1850 This variable takes affect through ``packagegroup-base`` so the
1851 variable only really applies to the more full-featured images that
1852 include ``packagegroup-base``. You can use this variable to keep
1853 distro policy out of generic images. As with all other distro
1854 variables, you set this variable in the distro ``.conf`` file.
1855
Andrew Geisslerf0343792020-11-18 10:42:21 -06001856 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001857 Specifies a list of distro-specific packages to add to all images if
1858 the packages exist. The packages might not exist or be empty (e.g.
1859 kernel modules). The list of packages are automatically installed but
1860 you can remove them.
1861
Andrew Geisslerf0343792020-11-18 10:42:21 -06001862 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001863 The software support you want in your distribution for various
1864 features. You define your distribution features in the distribution
1865 configuration file.
1866
1867 In most cases, the presence or absence of a feature in
1868 ``DISTRO_FEATURES`` is translated to the appropriate option supplied
1869 to the configure script during the
1870 :ref:`ref-tasks-configure` task for recipes that
1871 optionally support the feature. For example, specifying "x11" in
1872 ``DISTRO_FEATURES``, causes every piece of software built for the
1873 target that can optionally support X11 to have its X11 support
1874 enabled.
1875
1876 Two more examples are Bluetooth and NFS support. For a more complete
1877 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001878 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001879
Andrew Geisslerf0343792020-11-18 10:42:21 -06001880 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001881 Features to be added to ``DISTRO_FEATURES`` if not also present in
1882 ``DISTRO_FEATURES_BACKFILL_CONSIDERED``.
1883
1884 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1885 not intended to be user-configurable. It is best to just reference
1886 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001887 all distro configurations. See the ":ref:`ref-features-backfill`" section
1888 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001889
Andrew Geisslerf0343792020-11-18 10:42:21 -06001890 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001891 Features from ``DISTRO_FEATURES_BACKFILL`` that should not be
1892 backfilled (i.e. added to ``DISTRO_FEATURES``) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001893 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001894
Andrew Geisslerf0343792020-11-18 10:42:21 -06001895 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001896 A convenience variable that gives you the default list of distro
1897 features with the exception of any features specific to the C library
1898 (``libc``).
1899
1900 When creating a custom distribution, you might find it useful to be
1901 able to reuse the default
1902 :term:`DISTRO_FEATURES` options without the
1903 need to write out the full set. Here is an example that uses
1904 ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file:
1905 ::
1906
1907 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1908
Andrew Geisslerf0343792020-11-18 10:42:21 -06001909 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001910 Specifies a list of features that if present in the target
1911 :term:`DISTRO_FEATURES` value should be
1912 included in ``DISTRO_FEATURES`` when building native recipes. This
1913 variable is used in addition to the features filtered using the
1914 :term:`DISTRO_FEATURES_NATIVE`
1915 variable.
1916
Andrew Geisslerf0343792020-11-18 10:42:21 -06001917 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001918 Specifies a list of features that if present in the target
1919 :term:`DISTRO_FEATURES` value should be
1920 included in ``DISTRO_FEATURES`` when building nativesdk recipes. This
1921 variable is used in addition to the features filtered using the
1922 :term:`DISTRO_FEATURES_NATIVESDK`
1923 variable.
1924
Andrew Geisslerf0343792020-11-18 10:42:21 -06001925 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001926 Specifies a list of features that should be included in
1927 :term:`DISTRO_FEATURES` when building native
1928 recipes. This variable is used in addition to the features filtered
1929 using the
1930 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1931 variable.
1932
Andrew Geisslerf0343792020-11-18 10:42:21 -06001933 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001934 Specifies a list of features that should be included in
1935 :term:`DISTRO_FEATURES` when building
1936 nativesdk recipes. This variable is used in addition to the features
1937 filtered using the
1938 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1939 variable.
1940
Andrew Geisslerf0343792020-11-18 10:42:21 -06001941 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001942 The long name of the distribution. For information on the short name
1943 of the distribution, see the :term:`DISTRO` variable.
1944
1945 The ``DISTRO_NAME`` variable corresponds to a distribution
1946 configuration file whose root name is the same as the variable's
1947 argument and whose filename extension is ``.conf``. For example, the
1948 distribution configuration file for the Poky distribution is named
1949 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1950 of the :term:`Source Directory`.
1951
1952 Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set
1953 as follows:
1954 ::
1955
1956 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1957
1958 Distribution configuration files are located in a ``conf/distro``
1959 directory within the :term:`Metadata` that contains the
1960 distribution configuration.
1961
1962 .. note::
1963
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001964 If the ``DISTRO_NAME`` variable is blank, a set of default
1965 configurations are used, which are specified within
1966 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001967
Andrew Geisslerf0343792020-11-18 10:42:21 -06001968 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001969 The version of the distribution.
1970
Andrew Geisslerf0343792020-11-18 10:42:21 -06001971 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001972 A colon-separated list of overrides specific to the current
1973 distribution. By default, this list includes the value of
1974 :term:`DISTRO`.
1975
1976 You can extend ``DISTROOVERRIDES`` to add extra overrides that should
1977 apply to the distribution.
1978
1979 The underlying mechanism behind ``DISTROOVERRIDES`` is simply that it
1980 is included in the default value of
1981 :term:`OVERRIDES`.
1982
Andrew Geisslerf0343792020-11-18 10:42:21 -06001983 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001984 The central download directory used by the build process to store
1985 downloads. By default, ``DL_DIR`` gets files suitable for mirroring
1986 for everything except Git repositories. If you want tarballs of Git
1987 repositories, use the
1988 :term:`BB_GENERATE_MIRROR_TARBALLS`
1989 variable.
1990
1991 You can set this directory by defining the ``DL_DIR`` variable in the
1992 ``conf/local.conf`` file. This directory is self-maintaining and you
1993 should not have to touch it. By default, the directory is
1994 ``downloads`` in the :term:`Build Directory`.
1995 ::
1996
1997 #DL_DIR ?= "${TOPDIR}/downloads"
1998
1999 To specify a different download directory,
2000 simply remove the comment from the line and provide your directory.
2001
2002 During a first build, the system downloads many different source code
2003 tarballs from various upstream projects. Downloading can take a
2004 while, particularly if your network connection is slow. Tarballs are
2005 all stored in the directory defined by ``DL_DIR`` and the build
2006 system looks there first to find source tarballs.
2007
2008 .. note::
2009
2010 When wiping and rebuilding, you can preserve this directory to
2011 speed up this part of subsequent builds.
2012
2013 You can safely share this directory between multiple builds on the
2014 same development machine. For additional information on how the build
2015 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002016 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002017 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002018 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002019 Wiki page.
2020
Andrew Geisslerf0343792020-11-18 10:42:21 -06002021 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002022 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2023 class, this variable sets the compression policy used when the
2024 OpenEmbedded build system compresses man pages and info pages. By
2025 default, the compression method used is gz (gzip). Other policies
2026 available are xz and bz2.
2027
2028 For information on policies and on how to use this variable, see the
2029 comments in the ``meta/classes/compress_doc.bbclass`` file.
2030
Andrew Geisslerf0343792020-11-18 10:42:21 -06002031 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002032 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2033 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
2034 ``EFI_PROVIDER`` variable specifies the EFI bootloader to use. The
2035 default is "grub-efi", but "systemd-boot" can be used instead.
2036
2037 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2038 :ref:`image-live <ref-classes-image-live>` classes for more
2039 information.
2040
Andrew Geisslerf0343792020-11-18 10:42:21 -06002041 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002042 Variable that controls which locales for ``glibc`` are generated
2043 during the build (useful if the target device has 64Mbytes of RAM or
2044 less).
2045
Andrew Geisslerf0343792020-11-18 10:42:21 -06002046 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002047 When used with the :ref:`report-error <ref-classes-report-error>`
2048 class, specifies the path used for storing the debug files created by
2049 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002050 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002051 allows you to submit build errors you encounter to a central
2052 database. By default, the value of this variable is
2053 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2054
2055 You can set ``ERR_REPORT_DIR`` to the path you want the error
2056 reporting tool to store the debug files as follows in your
2057 ``local.conf`` file:
2058 ::
2059
2060 ERR_REPORT_DIR = "path"
2061
Andrew Geisslerf0343792020-11-18 10:42:21 -06002062 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002063 Specifies the quality assurance checks whose failures are reported as
2064 errors by the OpenEmbedded build system. You set this variable in
2065 your distribution configuration file. For a list of the checks you
2066 can control with this variable, see the
2067 ":ref:`insane.bbclass <ref-classes-insane>`" section.
2068
Andrew Geisslerf0343792020-11-18 10:42:21 -06002069 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002070 Triggers the OpenEmbedded build system's shared libraries resolver to
2071 exclude an entire package when scanning for shared libraries.
2072
2073 .. note::
2074
2075 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002076 the internal function ``package_do_shlibs``, which is part of the
2077 :ref:`ref-tasks-package` task. You should be aware that the shared
2078 libraries resolver might implicitly define some dependencies between
2079 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002080
2081 The ``EXCLUDE_FROM_SHLIBS`` variable is similar to the
2082 :term:`PRIVATE_LIBS` variable, which excludes a
2083 package's particular libraries only and not the whole package.
2084
2085 Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a
2086 particular package:
2087 ::
2088
2089 EXCLUDE_FROM_SHLIBS = "1"
2090
Andrew Geisslerf0343792020-11-18 10:42:21 -06002091 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002092 Directs BitBake to exclude a recipe from world builds (i.e.
2093 ``bitbake world``). During world builds, BitBake locates, parses and
2094 builds all recipes found in every layer exposed in the
2095 ``bblayers.conf`` configuration file.
2096
2097 To exclude a recipe from a world build using this variable, set the
2098 variable to "1" in the recipe.
2099
2100 .. note::
2101
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002102 Recipes added to ``EXCLUDE_FROM_WORLD`` may still be built during a
2103 world build in order to satisfy dependencies of other recipes. Adding
2104 a recipe to ``EXCLUDE_FROM_WORLD`` only ensures that the recipe is not
2105 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002106
Andrew Geisslerf0343792020-11-18 10:42:21 -06002107 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002108 Used with file and pathnames to create a prefix for a recipe's
2109 version based on the recipe's :term:`PE` value. If ``PE``
2110 is set and greater than zero for a recipe, ``EXTENDPE`` becomes that
2111 value (e.g if ``PE`` is equal to "1" then ``EXTENDPE`` becomes "1").
2112 If a recipe's ``PE`` is not set (the default) or is equal to zero,
2113 ``EXTENDPE`` becomes "".
2114
2115 See the :term:`STAMP` variable for an example.
2116
Andrew Geisslerf0343792020-11-18 10:42:21 -06002117 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002118 The full package version specification as it appears on the final
2119 packages produced by a recipe. The variable's value is normally used
2120 to fix a runtime dependency to the exact same version of another
2121 package in the same recipe:
2122 ::
2123
2124 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2125
2126 The dependency relationships are intended to force the package
2127 manager to upgrade these types of packages in lock-step.
2128
Andrew Geisslerf0343792020-11-18 10:42:21 -06002129 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002130 When set, the ``EXTERNAL_KERNEL_TOOLS`` variable indicates that these
2131 tools are not in the source tree.
2132
2133 When kernel tools are available in the tree, they are preferred over
2134 any externally installed tools. Setting the ``EXTERNAL_KERNEL_TOOLS``
2135 variable tells the OpenEmbedded build system to prefer the installed
2136 external tools. See the
2137 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2138 ``meta/classes`` to see how the variable is used.
2139
Andrew Geisslerf0343792020-11-18 10:42:21 -06002140 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002141 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2142 class, this variable points to the source tree, which is outside of
2143 the OpenEmbedded build system. When set, this variable sets the
2144 :term:`S` variable, which is what the OpenEmbedded build
2145 system uses to locate unpacked recipe source code.
2146
2147 For more information on ``externalsrc.bbclass``, see the
2148 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2149 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002150 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151 section in the Yocto Project Development Tasks Manual.
2152
Andrew Geisslerf0343792020-11-18 10:42:21 -06002153 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002154 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2155 class, this variable points to the directory in which the recipe's
2156 source code is built, which is outside of the OpenEmbedded build
2157 system. When set, this variable sets the :term:`B` variable,
2158 which is what the OpenEmbedded build system uses to locate the Build
2159 Directory.
2160
2161 For more information on ``externalsrc.bbclass``, see the
2162 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2163 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002164 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002165 section in the Yocto Project Development Tasks Manual.
2166
Andrew Geisslerf0343792020-11-18 10:42:21 -06002167 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002168 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
2169 class, you can use ``EXTRA_AUTORECONF`` to specify extra options to
2170 pass to the ``autoreconf`` command that is executed during the
2171 :ref:`ref-tasks-configure` task.
2172
2173 The default value is "--exclude=autopoint".
2174
Andrew Geisslerf0343792020-11-18 10:42:21 -06002175 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002176 A list of additional features to include in an image. When listing
2177 more than one feature, separate them with a space.
2178
2179 Typically, you configure this variable in your ``local.conf`` file,
2180 which is found in the :term:`Build Directory`.
2181 Although you can use this variable from within a recipe, best
2182 practices dictate that you do not.
2183
2184 .. note::
2185
2186 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002187 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002188
2189 Here are some examples of features you can add:
2190
2191 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2192 symbol information for debugging and profiling.
2193
2194 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2195 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002196 'post-install-logging' features in the ":ref:`ref-features-image`"
2197 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002198 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2199 useful if you want to develop against the libraries in the image.
2200 - "read-only-rootfs" - Creates an image whose root filesystem is
2201 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002202 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002203 section in the Yocto Project Development Tasks Manual for more
2204 information
2205 - "tools-debug" - Adds debugging tools such as gdb and strace.
2206 - "tools-sdk" - Adds development tools such as gcc, make,
2207 pkgconfig and so forth.
2208 - "tools-testapps" - Adds useful testing tools
2209 such as ts_print, aplay, arecord and so forth.
2210
2211 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002212 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002213
2214 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002215 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002216 section in the Yocto Project Development Tasks Manual.
2217
Andrew Geisslerf0343792020-11-18 10:42:21 -06002218 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002219 Specifies additional options for the image creation command that has
2220 been specified in :term:`IMAGE_CMD`. When setting
2221 this variable, use an override for the associated image type. Here is
2222 an example:
2223 ::
2224
2225 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
2226
Andrew Geisslerf0343792020-11-18 10:42:21 -06002227 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002228 A list of recipes to build that do not provide packages for
2229 installing into the root filesystem.
2230
2231 Sometimes a recipe is required to build the final image but is not
2232 needed in the root filesystem. You can use the ``EXTRA_IMAGEDEPENDS``
2233 variable to list these recipes and thus specify the dependencies. A
2234 typical example is a required bootloader in a machine configuration.
2235
2236 .. note::
2237
2238 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002239 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002240
Andrew Geisslerf0343792020-11-18 10:42:21 -06002241 :term:`EXTRANATIVEPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002242 A list of subdirectories of
2243 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2244 added to the beginning of the environment variable ``PATH``. As an
2245 example, the following prepends
2246 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2247 ``PATH``:
2248 ::
2249
2250 EXTRANATIVEPATH = "foo bar"
2251
Andrew Geisslerf0343792020-11-18 10:42:21 -06002252 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002253 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2254 :ref:`cmake <ref-classes-cmake>` class for additional information.
2255
Andrew Geisslerf0343792020-11-18 10:42:21 -06002256 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002257 Additional ``configure`` script options. See
2258 :term:`PACKAGECONFIG_CONFARGS` for
2259 additional information on passing configure script options.
2260
Andrew Geisslerf0343792020-11-18 10:42:21 -06002261 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002262 Additional GNU ``make`` options.
2263
2264 Because the ``EXTRA_OEMAKE`` defaults to "", you need to set the
2265 variable to specify any required GNU options.
2266
2267 :term:`PARALLEL_MAKE` and
2268 :term:`PARALLEL_MAKEINST` also make use of
2269 ``EXTRA_OEMAKE`` to pass the required flags.
2270
Andrew Geisslerf0343792020-11-18 10:42:21 -06002271 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002272 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2273 variable specifies additional configuration options you want to pass
2274 to the ``scons`` command line.
2275
Andrew Geisslerf0343792020-11-18 10:42:21 -06002276 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002277 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2278 class, this variable provides image level user and group operations.
2279 This is a more global method of providing user and group
2280 configuration as compared to using the
2281 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2282 group configurations to a specific recipe.
2283
2284 The set list of commands you can configure using the
2285 ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These
2286 commands map to the normal Unix commands of the same names:
2287 ::
2288
2289 # EXTRA_USERS_PARAMS = "\
2290 # useradd -p '' tester; \
2291 # groupadd developers; \
2292 # userdel nobody; \
2293 # groupdel -g video; \
2294 # groupmod -g 1020 developers; \
2295 # usermod -s /bin/sh tester; \
2296 # "
2297
Andrew Geisslerf0343792020-11-18 10:42:21 -06002298 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002299 Defines one or more packages to include in an image when a specific
2300 item is included in :term:`IMAGE_FEATURES`.
2301 When setting the value, ``FEATURE_PACKAGES`` should have the name of
2302 the feature item as an override. Here is an example:
2303 ::
2304
2305 FEATURE_PACKAGES_widget = "package1 package2"
2306
2307 In this example, if "widget" were added to ``IMAGE_FEATURES``,
2308 package1 and package2 would be included in the image.
2309
2310 .. note::
2311
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002312 Packages installed by features defined through ``FEATURE_PACKAGES``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002313 are often package groups. While similarly named, you should not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002314 confuse the ``FEATURE_PACKAGES`` variable with package groups, which
2315 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002316
Andrew Geisslerf0343792020-11-18 10:42:21 -06002317 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002318 Points to the base URL of the server and location within the
2319 document-root that provides the metadata and packages required by
2320 OPKG to support runtime package management of IPK packages. You set
2321 this variable in your ``local.conf`` file.
2322
2323 Consider the following example:
2324 ::
2325
2326 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2327
2328 This example assumes you are serving
2329 your packages over HTTP and your databases are located in a directory
2330 named ``BOARD-dir``, which is underneath your HTTP server's
2331 document-root. In this case, the OpenEmbedded build system generates
2332 a set of configuration files for you in your target that work with
2333 the feed.
2334
Andrew Geisslerf0343792020-11-18 10:42:21 -06002335 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002336 The list of files and directories that are placed in a package. The
2337 :term:`PACKAGES` variable lists the packages
2338 generated by a recipe.
2339
2340 To use the ``FILES`` variable, provide a package name override that
2341 identifies the resulting package. Then, provide a space-separated
2342 list of files or paths that identify the files you want included as
2343 part of the resulting package. Here is an example:
2344 ::
2345
2346 FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
2347
2348 .. note::
2349
2350 - When specifying files or paths, you can pattern match using
2351 Python's
2352 `glob <https://docs.python.org/3/library/glob.html>`_
2353 syntax. For details on the syntax, see the documentation by
2354 following the previous link.
2355
2356 - When specifying paths as part of the ``FILES`` variable, it is
2357 good practice to use appropriate path variables. For example,
2358 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2359 rather than ``/usr/bin``. You can find a list of these
2360 variables at the top of the ``meta/conf/bitbake.conf`` file in
2361 the :term:`Source Directory`. You will also
2362 find the default values of the various ``FILES_*`` variables in
2363 this file.
2364
2365 If some of the files you provide with the ``FILES`` variable are
2366 editable and you know they should not be overwritten during the
2367 package update process by the Package Management System (PMS), you
2368 can identify these files so that the PMS will not overwrite them. See
2369 the :term:`CONFFILES` variable for information on
2370 how to identify these files to the PMS.
2371
Andrew Geisslerf0343792020-11-18 10:42:21 -06002372 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002373 Defines the file specification to match
2374 :term:`SOLIBSDEV`. In other words,
2375 ``FILES_SOLIBSDEV`` defines the full path name of the development
2376 symbolic link (symlink) for shared libraries on the target platform.
2377
2378 The following statement from the ``bitbake.conf`` shows how it is
2379 set:
2380 ::
2381
2382 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2383
Andrew Geisslerf0343792020-11-18 10:42:21 -06002384 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002385 Extends the search path the OpenEmbedded build system uses when
2386 looking for files and patches as it processes recipes and append
2387 files. The default directories BitBake uses when it processes recipes
2388 are initially defined by the :term:`FILESPATH`
2389 variable. You can extend ``FILESPATH`` variable by using
2390 ``FILESEXTRAPATHS``.
2391
2392 Best practices dictate that you accomplish this by using
2393 ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you
2394 prepend paths as follows:
2395 ::
2396
2397 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2398
2399 In the above example, the build system first
2400 looks for files in a directory that has the same name as the
2401 corresponding append file.
2402
2403 .. note::
2404
2405 When extending ``FILESEXTRAPATHS``, be sure to use the immediate
2406 expansion (``:=``) operator. Immediate expansion makes sure that
2407 BitBake evaluates :term:`THISDIR` at the time the
2408 directive is encountered rather than at some later time when
2409 expansion might result in a directory that does not contain the
2410 files you need.
2411
2412 Also, include the trailing separating colon character if you are
2413 prepending. The trailing colon character is necessary because you
2414 are directing BitBake to extend the path by prepending directories
2415 to the search path.
2416
2417 Here is another common use:
2418 ::
2419
2420 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2421
2422 In this example, the build system extends the
2423 ``FILESPATH`` variable to include a directory named ``files`` that is
2424 in the same directory as the corresponding append file.
2425
2426 This next example specifically adds three paths:
2427 ::
2428
2429 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2430
2431 A final example shows how you can extend the search path and include
2432 a :term:`MACHINE`-specific override, which is useful
2433 in a BSP layer:
2434 ::
2435
2436 FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2437
2438 The previous statement appears in the
2439 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002440 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002441 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2442 override is a special :term:`PACKAGE_ARCH`
2443 definition for multiple ``meta-intel`` machines.
2444
2445 .. note::
2446
2447 For a layer that supports a single BSP, the override could just be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002448 the value of ``MACHINE``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002449
2450 By prepending paths in ``.bbappend`` files, you allow multiple append
2451 files that reside in different layers but are used for the same
2452 recipe to correctly extend the path.
2453
Andrew Geisslerf0343792020-11-18 10:42:21 -06002454 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002455 A subset of :term:`OVERRIDES` used by the
2456 OpenEmbedded build system for creating
2457 :term:`FILESPATH`. The ``FILESOVERRIDES`` variable
2458 uses overrides to automatically extend the
2459 :term:`FILESPATH` variable. For an example of how
2460 that works, see the :term:`FILESPATH` variable
2461 description. Additionally, you find more information on how overrides
2462 are handled in the
2463 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2464 section of the BitBake User Manual.
2465
2466 By default, the ``FILESOVERRIDES`` variable is defined as:
2467 ::
2468
2469 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2470
2471 .. note::
2472
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002473 Do not hand-edit the ``FILESOVERRIDES`` variable. The values match up
2474 with expected overrides and are used in an expected manner by the
2475 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002476
Andrew Geisslerf0343792020-11-18 10:42:21 -06002477 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002478 The default set of directories the OpenEmbedded build system uses
2479 when searching for patches and files.
2480
2481 During the build process, BitBake searches each directory in
2482 ``FILESPATH`` in the specified order when looking for files and
2483 patches specified by each ``file://`` URI in a recipe's
2484 :term:`SRC_URI` statements.
2485
2486 The default value for the ``FILESPATH`` variable is defined in the
2487 ``base.bbclass`` class found in ``meta/classes`` in the
2488 :term:`Source Directory`:
2489 ::
2490
2491 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2492 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2493
2494 The
2495 ``FILESPATH`` variable is automatically extended using the overrides
2496 from the :term:`FILESOVERRIDES` variable.
2497
2498 .. note::
2499
2500 - Do not hand-edit the ``FILESPATH`` variable. If you want the
2501 build system to look in directories other than the defaults,
2502 extend the ``FILESPATH`` variable by using the
2503 :term:`FILESEXTRAPATHS` variable.
2504
2505 - Be aware that the default ``FILESPATH`` directories do not map
2506 to directories in custom layers where append files
2507 (``.bbappend``) are used. If you want the build system to find
2508 patches or files that reside with your append files, you need
2509 to extend the ``FILESPATH`` variable by using the
2510 ``FILESEXTRAPATHS`` variable.
2511
2512 You can take advantage of this searching behavior in useful ways. For
2513 example, consider a case where the following directory structure
2514 exists for general and machine-specific configurations:
2515 ::
2516
2517 files/defconfig
2518 files/MACHINEA/defconfig
2519 files/MACHINEB/defconfig
2520
2521 Also in the example, the ``SRC_URI`` statement contains
2522 "file://defconfig". Given this scenario, you can set
2523 :term:`MACHINE` to "MACHINEA" and cause the build
2524 system to use files from ``files/MACHINEA``. Set ``MACHINE`` to
2525 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2526 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2527 build system uses files from ``files/defconfig``.
2528
2529 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002530 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002531 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002532 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002533 the Yocto Project Development Tasks Manual. See the
2534 :ref:`ref-tasks-patch` task as well.
2535
Andrew Geisslerf0343792020-11-18 10:42:21 -06002536 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002537 Allows you to define your own file permissions settings table as part
2538 of your configuration for the packaging process. For example, suppose
2539 you need a consistent set of custom permissions for a set of groups
2540 and users across an entire work project. It is best to do this in the
2541 packages themselves but this is not always possible.
2542
2543 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2544 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2545 If you create your own file
2546 permissions setting table, you should place it in your layer or the
2547 distro's layer.
2548
2549 You define the ``FILESYSTEM_PERMS_TABLES`` variable in the
2550 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2551 to point to your custom
2552 ``fs-perms.txt``. You can specify more than a single file permissions
2553 setting table. The paths you specify to these files must be defined
2554 within the :term:`BBPATH` variable.
2555
2556 For guidance on how to create your own file permissions settings
2557 table file, examine the existing ``fs-perms.txt``.
2558
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002559 :term:`FIT_DESC`
2560 Specifies the description string encoded into a fitImage. The default
2561 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2562 class as follows::
2563
2564 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2565
Andrew Geisslerf0343792020-11-18 10:42:21 -06002566 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002567 Decides whether to generate the keys for signing fitImage if they
2568 don't already exist. The keys are created in ``UBOOT_SIGN_KEYDIR``.
2569 The default value is 0.
2570
Andrew Geisslerf0343792020-11-18 10:42:21 -06002571 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002572 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2573
Andrew Geisslerf0343792020-11-18 10:42:21 -06002574 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002575 Arguments to openssl genrsa for generating RSA private key for signing
2576 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2577 use.
2578
Andrew Geisslerf0343792020-11-18 10:42:21 -06002579 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002580 Arguments to openssl req for generating certificate for signing fitImage.
2581 The default value is "-batch -new". batch for non interactive mode
2582 and new for generating new keys.
2583
Andrew Geisslerf0343792020-11-18 10:42:21 -06002584 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002585 Format for public key ceritifcate used in signing fitImage.
2586 The default value is "x509".
2587
Andrew Geisslerf0343792020-11-18 10:42:21 -06002588 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002589 Specifies the signature algorithm used in creating the FIT Image.
2590 For e.g. rsa2048.
2591
Andrew Geisslerf0343792020-11-18 10:42:21 -06002592 :term:`FIT_SIGN_NUMBITS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002593 Size of private key in number of bits used in fitImage. The default
2594 value is "2048".
2595
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002596 :term:`FIT_SIGN_INDIVIDUAL`
2597 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2598 class will sign the kernel, dtb and ramdisk images individually in addition
2599 to signing the fitImage itself. This could be useful if you are
2600 intending to verify signatures in another context than booting via
2601 U-Boot.
2602
Andrew Geisslerf0343792020-11-18 10:42:21 -06002603 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002604 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2605 this variable specifies the runtime dependencies for font packages.
2606 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils".
2607
Andrew Geisslerf0343792020-11-18 10:42:21 -06002608 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002609 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2610 this variable identifies packages containing font files that need to
2611 be cached by Fontconfig. By default, the ``fontcache`` class assumes
2612 that fonts are in the recipe's main package (i.e.
2613 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2614 need are in a package other than that main package.
2615
Andrew Geisslerf0343792020-11-18 10:42:21 -06002616 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002617 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2618 during the generation of the root filesystem.
2619
2620 Set the variable to "1" to force the removal of these packages.
2621
Andrew Geisslerf0343792020-11-18 10:42:21 -06002622 :term:`FULL_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002623 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
2624 compiling an optimized system. This variable defaults to "-O2 -pipe
2625 ${DEBUG_FLAGS}".
2626
Andrew Geisslerf0343792020-11-18 10:42:21 -06002627 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002628 Enables Position Independent Executables (PIE) within the GNU C
2629 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2630 Programming (ROP) attacks much more difficult to execute.
2631
2632 By default the ``security_flags.inc`` file enables PIE by setting the
2633 variable as follows:
2634 ::
2635
2636 GCCPIE ?= "--enable-default-pie"
2637
Andrew Geisslerf0343792020-11-18 10:42:21 -06002638 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002639 Specifies the default version of the GNU C Compiler (GCC) used for
2640 compilation. By default, ``GCCVERSION`` is set to "8.x" in the
2641 ``meta/conf/distro/include/tcmode-default.inc`` include file:
2642 ::
2643
2644 GCCVERSION ?= "8.%"
2645
2646 You can override this value by setting it in a
2647 configuration file such as the ``local.conf``.
2648
Andrew Geisslerf0343792020-11-18 10:42:21 -06002649 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002650 The minimal command and arguments to run the GNU Debugger.
2651
Andrew Geisslerf0343792020-11-18 10:42:21 -06002652 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002653 The directory in which a local copy of a Git repository is stored
2654 when it is cloned.
2655
Andrew Geisslerf0343792020-11-18 10:42:21 -06002656 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002657 Specifies the list of GLIBC locales to generate should you not wish
2658 to generate all LIBC locals, which can be time consuming.
2659
2660 .. note::
2661
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002662 If you specifically remove the locale ``en_US.UTF-8``, you must set
2663 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002664
2665 You can set ``GLIBC_GENERATE_LOCALES`` in your ``local.conf`` file.
2666 By default, all locales are generated.
2667 ::
2668
2669 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2670
Andrew Geisslerf0343792020-11-18 10:42:21 -06002671 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002672 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2673 this variable specifies for a package what parameters should be
2674 passed to the ``groupadd`` command if you wish to add a group to the
2675 system when the package is installed.
2676
2677 Here is an example from the ``dbus`` recipe:
2678 ::
2679
2680 GROUPADD_PARAM_${PN} = "-r netdev"
2681
2682 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002683 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002684
Andrew Geisslerf0343792020-11-18 10:42:21 -06002685 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002686 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2687 this variable specifies for a package what parameters should be
2688 passed to the ``groupmems`` command if you wish to modify the members
2689 of a group when the package is installed.
2690
2691 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002692 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002693
Andrew Geisslerf0343792020-11-18 10:42:21 -06002694 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002695 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2696 and serial in the boot menu. Set this variable to "1" in your
2697 ``local.conf`` or distribution configuration file to enable graphics
2698 and serial in the menu.
2699
2700 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2701 information on how this variable is used.
2702
Andrew Geisslerf0343792020-11-18 10:42:21 -06002703 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002704 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2705 configuration. Use a semi-colon character (``;``) to separate
2706 multiple options.
2707
2708 The ``GRUB_OPTS`` variable is optional. See the
2709 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2710 on how this variable is used.
2711
Andrew Geisslerf0343792020-11-18 10:42:21 -06002712 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002713 Specifies the timeout before executing the default ``LABEL`` in the
2714 GNU GRand Unified Bootloader (GRUB).
2715
2716 The ``GRUB_TIMEOUT`` variable is optional. See the
2717 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2718 on how this variable is used.
2719
Andrew Geisslerf0343792020-11-18 10:42:21 -06002720 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002721 When inheriting the
2722 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2723 this variable specifies the packages that contain the GTK+ input
2724 method modules being installed when the modules are in packages other
2725 than the main package.
2726
Andrew Geisslerf0343792020-11-18 10:42:21 -06002727 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002728 Website where more information about the software the recipe is
2729 building can be found.
2730
Andrew Geisslerf0343792020-11-18 10:42:21 -06002731 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002732 The name of the target architecture, which is normally the same as
2733 :term:`TARGET_ARCH`. The OpenEmbedded build system
2734 supports many architectures. Here is an example list of architectures
2735 supported. This list is by no means complete as the architecture is
2736 configurable:
2737
2738 - arm
2739 - i586
2740 - x86_64
2741 - powerpc
2742 - powerpc64
2743 - mips
2744 - mipsel
2745
Andrew Geisslerf0343792020-11-18 10:42:21 -06002746 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002747 Specifies architecture-specific compiler flags that are passed to the
2748 C compiler.
2749
2750 Default initialization for ``HOST_CC_ARCH`` varies depending on what
2751 is being built:
2752
2753 - :term:`TARGET_CC_ARCH` when building for the
2754 target
2755
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002756 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002757 ``-native``)
2758
2759 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2760 ``nativesdk-``)
2761
Andrew Geisslerf0343792020-11-18 10:42:21 -06002762 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002763 Specifies the name of the target operating system, which is normally
2764 the same as the :term:`TARGET_OS`. The variable can
2765 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2766 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2767 "linux-musleabi" values possible.
2768
Andrew Geisslerf0343792020-11-18 10:42:21 -06002769 :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002770 Specifies the prefix for the cross-compile toolchain. ``HOST_PREFIX``
2771 is normally the same as :term:`TARGET_PREFIX`.
2772
Andrew Geisslerf0343792020-11-18 10:42:21 -06002773 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002774 Specifies the system, including the architecture and the operating
2775 system, for which the build is occurring in the context of the
2776 current recipe.
2777
2778 The OpenEmbedded build system automatically sets this variable based
2779 on :term:`HOST_ARCH`,
2780 :term:`HOST_VENDOR`, and
2781 :term:`HOST_OS` variables.
2782
2783 .. note::
2784
2785 You do not need to set the variable yourself.
2786
2787 Consider these two examples:
2788
2789 - Given a native recipe on a 32-bit x86 machine running Linux, the
2790 value is "i686-linux".
2791
2792 - Given a recipe being built for a little-endian MIPS target running
2793 Linux, the value might be "mipsel-linux".
2794
Andrew Geisslerf0343792020-11-18 10:42:21 -06002795 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002796 A space-separated list (filter) of tools on the build host that
2797 should be allowed to be called from within build tasks. Using this
2798 filter helps reduce the possibility of host contamination. If a tool
2799 specified in the value of ``HOSTTOOLS`` is not found on the build
2800 host, the OpenEmbedded build system produces an error and the build
2801 is not started.
2802
2803 For additional information, see
2804 :term:`HOSTTOOLS_NONFATAL`.
2805
Andrew Geisslerf0343792020-11-18 10:42:21 -06002806 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002807 A space-separated list (filter) of tools on the build host that
2808 should be allowed to be called from within build tasks. Using this
2809 filter helps reduce the possibility of host contamination. Unlike
2810 :term:`HOSTTOOLS`, the OpenEmbedded build system
2811 does not produce an error if a tool specified in the value of
2812 ``HOSTTOOLS_NONFATAL`` is not found on the build host. Thus, you can
2813 use ``HOSTTOOLS_NONFATAL`` to filter optional host tools.
2814
Andrew Geisslerf0343792020-11-18 10:42:21 -06002815 :term:`HOST_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002816 Specifies the name of the vendor. ``HOST_VENDOR`` is normally the
2817 same as :term:`TARGET_VENDOR`.
2818
Andrew Geisslerf0343792020-11-18 10:42:21 -06002819 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002820 Disables or enables the ``icecc`` (Icecream) function. For more
2821 information on this function and best practices for using this
2822 variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`"
2823 section.
2824
2825 Setting this variable to "1" in your ``local.conf`` disables the
2826 function:
2827 ::
2828
2829 ICECC_DISABLED ??= "1"
2830
2831 To enable the function, set the variable as follows:
2832 ::
2833
2834 ICECC_DISABLED = ""
2835
Andrew Geisslerf0343792020-11-18 10:42:21 -06002836 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002837 Points to the ``icecc-create-env`` script that you provide. This
2838 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2839 set this variable in your ``local.conf`` file.
2840
2841 If you do not point to a script that you provide, the OpenEmbedded
2842 build system uses the default script provided by the
2843 ``icecc-create-env.bb`` recipe, which is a modified version and not
2844 the one that comes with ``icecc``.
2845
Andrew Geisslerf0343792020-11-18 10:42:21 -06002846 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002847 Extra options passed to the ``make`` command during the
2848 :ref:`ref-tasks-compile` task that specify parallel
2849 compilation. This variable usually takes the form of "-j x", where x
2850 represents the maximum number of parallel threads ``make`` can run.
2851
2852 .. note::
2853
2854 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002855 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002856
2857 If your enabled machines support multiple cores, coming up with the
2858 maximum number of parallel threads that gives you the best
2859 performance could take some experimentation since machine speed,
2860 network lag, available memory, and existing machine loads can all
2861 affect build time. Consequently, unlike the
2862 :term:`PARALLEL_MAKE` variable, there is no
2863 rule-of-thumb for setting ``ICECC_PARALLEL_MAKE`` to achieve optimal
2864 performance.
2865
2866 If you do not set ``ICECC_PARALLEL_MAKE``, the build system does not
2867 use it (i.e. the system does not detect and assign the number of
2868 cores as is done with ``PARALLEL_MAKE``).
2869
Andrew Geisslerf0343792020-11-18 10:42:21 -06002870 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002871 The location of the ``icecc`` binary. You can set this variable in
2872 your ``local.conf`` file. If your ``local.conf`` file does not define
2873 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2874 to define it by locating ``icecc`` using ``which``.
2875
Andrew Geisslerf0343792020-11-18 10:42:21 -06002876 :term:`ICECC_USER_CLASS_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002877 Identifies user classes that you do not want the Icecream distributed
2878 compile support to consider. This variable is used by the
2879 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2880 your ``local.conf`` file.
2881
2882 When you list classes using this variable, you are "blacklisting"
2883 them from distributed compilation across remote hosts. Any classes
2884 you list will be distributed and compiled locally.
2885
Andrew Geisslerf0343792020-11-18 10:42:21 -06002886 :term:`ICECC_USER_PACKAGE_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002887 Identifies user recipes that you do not want the Icecream distributed
2888 compile support to consider. This variable is used by the
2889 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2890 your ``local.conf`` file.
2891
2892 When you list packages using this variable, you are "blacklisting"
2893 them from distributed compilation across remote hosts. Any packages
2894 you list will be distributed and compiled locally.
2895
Andrew Geisslerf0343792020-11-18 10:42:21 -06002896 :term:`ICECC_USER_PACKAGE_WL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002897 Identifies user recipes that use an empty
2898 :term:`PARALLEL_MAKE` variable that you want to
2899 force remote distributed compilation on using the Icecream
2900 distributed compile support. This variable is used by the
2901 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2902 your ``local.conf`` file.
2903
Andrew Geisslerf0343792020-11-18 10:42:21 -06002904 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002905 The base name of image output files. This variable defaults to the
2906 recipe name (``${``\ :term:`PN`\ ``}``).
2907
Andrew Geisslerf0343792020-11-18 10:42:21 -06002908 :term:`IMAGE_EFI_BOOT_FILES`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002909 A space-separated list of files installed into the boot partition
2910 when preparing an image using the Wic tool with the
2911 ``bootimg-efi`` source plugin. By default,
2912 the files are
2913 installed under the same name as the source files. To change the
2914 installed name, separate it from the original name with a semi-colon
2915 (;). Source files need to be located in
2916 :term:`DEPLOY_DIR_IMAGE`. Here are two
2917 examples:
2918 ::
2919
2920 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
2921 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
2922
2923 Alternatively, source files can be picked up using a glob pattern. In
2924 this case, the destination file must have the same name as the base
2925 name of the source file path. To install files into a directory
2926 within the target location, pass its name after a semi-colon (;).
2927 Here are two examples:
2928 ::
2929
2930 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
2931 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
2932
2933 The first example
2934 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
2935 into the root of the target partition. The second example installs
2936 the same files into a ``boot`` directory within the target partition.
2937
2938 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002939 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002940 section of the Yocto Project Development Tasks Manual. Reference
2941 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002942 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002943
Andrew Geisslerf0343792020-11-18 10:42:21 -06002944 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002945 A space-separated list of files installed into the boot partition
2946 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002947 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002948 the files are
2949 installed under the same name as the source files. To change the
2950 installed name, separate it from the original name with a semi-colon
2951 (;). Source files need to be located in
2952 :term:`DEPLOY_DIR_IMAGE`. Here are two
2953 examples:
2954 ::
2955
2956 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2957 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2958
2959 Alternatively, source files can be picked up using a glob pattern. In
2960 this case, the destination file must have the same name as the base
2961 name of the source file path. To install files into a directory
2962 within the target location, pass its name after a semi-colon (;).
2963 Here are two examples:
2964 ::
2965
2966 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2967 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2968
2969 The first example
2970 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2971 into the root of the target partition. The second example installs
2972 the same files into a ``boot`` directory within the target partition.
2973
2974 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002975 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002976 section of the Yocto Project Development Tasks Manual. Reference
2977 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002978 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002979
Andrew Geisslerf0343792020-11-18 10:42:21 -06002980 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002981 A list of classes that all images should inherit. You typically use
2982 this variable to specify the list of classes that register the
2983 different types of images the OpenEmbedded build system creates.
2984
2985 The default value for ``IMAGE_CLASSES`` is ``image_types``. You can
2986 set this variable in your ``local.conf`` or in a distribution
2987 configuration file.
2988
2989 For more information, see ``meta/classes/image_types.bbclass`` in the
2990 :term:`Source Directory`.
2991
Andrew Geisslerf0343792020-11-18 10:42:21 -06002992 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002993 Specifies the command to create the image file for a specific image
2994 type, which corresponds to the value set set in
2995 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
2996 ``btrfs``, and so forth). When setting this variable, you should use
2997 an override for the associated type. Here is an example:
2998 ::
2999
3000 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \
3001 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
3002 ${EXTRA_IMAGECMD}"
3003
3004 You typically do not need to set this variable unless you are adding
3005 support for a new image type. For more examples on how to set this
3006 variable, see the :ref:`image_types <ref-classes-image_types>`
3007 class file, which is ``meta/classes/image_types.bbclass``.
3008
Andrew Geisslerf0343792020-11-18 10:42:21 -06003009 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003010 Specifies one or more files that contain custom device tables that
3011 are passed to the ``makedevs`` command as part of creating an image.
3012 These files list basic device nodes that should be created under
3013 ``/dev`` within the image. If ``IMAGE_DEVICE_TABLES`` is not set,
3014 ``files/device_table-minimal.txt`` is used, which is located by
3015 :term:`BBPATH`. For details on how you should write
3016 device table files, see ``meta/files/device_table-minimal.txt`` as an
3017 example.
3018
Andrew Geisslerf0343792020-11-18 10:42:21 -06003019 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003020 The primary list of features to include in an image. Typically, you
3021 configure this variable in an image recipe. Although you can use this
3022 variable from your ``local.conf`` file, which is found in the
3023 :term:`Build Directory`, best practices dictate that you do
3024 not.
3025
3026 .. note::
3027
3028 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003029 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003030
3031 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003032 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003033
3034 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003035 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003036 section in the Yocto Project Development Tasks Manual.
3037
Andrew Geisslerf0343792020-11-18 10:42:21 -06003038 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003039 Specifies the formats the OpenEmbedded build system uses during the
3040 build when creating the root filesystem. For example, setting
3041 ``IMAGE_FSTYPES`` as follows causes the build system to create root
3042 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:
3043 ::
3044
3045 IMAGE_FSTYPES = "ext3 tar.bz2"
3046
3047 For the complete list of supported image formats from which you can
3048 choose, see :term:`IMAGE_TYPES`.
3049
3050 .. note::
3051
3052 - If an image recipe uses the "inherit image" line and you are
3053 setting ``IMAGE_FSTYPES`` inside the recipe, you must set
3054 ``IMAGE_FSTYPES`` prior to using the "inherit image" line.
3055
3056 - Due to the way the OpenEmbedded build system processes this
3057 variable, you cannot update its contents by using ``_append``
3058 or ``_prepend``. You must use the ``+=`` operator to add one or
3059 more options to the ``IMAGE_FSTYPES`` variable.
3060
Andrew Geisslerf0343792020-11-18 10:42:21 -06003061 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003062 Used by recipes to specify the packages to install into an image
3063 through the :ref:`image <ref-classes-image>` class. Use the
3064 ``IMAGE_INSTALL`` variable with care to avoid ordering issues.
3065
3066 Image recipes set ``IMAGE_INSTALL`` to specify the packages to
3067 install into an image through ``image.bbclass``. Additionally,
3068 "helper" classes such as the
3069 :ref:`core-image <ref-classes-core-image>` class exist that can
3070 take lists used with ``IMAGE_FEATURES`` and turn them into
3071 auto-generated entries in ``IMAGE_INSTALL`` in addition to its
3072 default contents.
3073
3074 When you use this variable, it is best to use it as follows:
3075 ::
3076
3077 IMAGE_INSTALL_append = " package-name"
3078
3079 Be sure to include the space
3080 between the quotation character and the start of the package name or
3081 names.
3082
3083 .. note::
3084
3085 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003086 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003087 image, do not use the ``IMAGE_INSTALL`` variable to specify
3088 packages for installation. Instead, use the
3089 :term:`PACKAGE_INSTALL` variable, which
3090 allows the initial RAM filesystem (initramfs) recipe to use a
3091 fixed set of packages and not be affected by ``IMAGE_INSTALL``.
3092 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003093 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003094 section in the Yocto Project Development Tasks Manual.
3095
3096 - Using ``IMAGE_INSTALL`` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003097 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003098 BitBake operator within the ``/conf/local.conf`` file or from
3099 within an image recipe is not recommended. Use of this operator
3100 in these ways can cause ordering issues. Since
3101 ``core-image.bbclass`` sets ``IMAGE_INSTALL`` to a default
3102 value using the
3103 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
3104 operator, using a ``+=`` operation against ``IMAGE_INSTALL``
3105 results in unexpected behavior when used within
3106 ``conf/local.conf``. Furthermore, the same operation from
3107 within an image recipe may or may not succeed depending on the
3108 specific situation. In both these cases, the behavior is
3109 contrary to how most users expect the ``+=`` operator to work.
3110
Andrew Geisslerf0343792020-11-18 10:42:21 -06003111 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003112 Specifies the list of locales to install into the image during the
3113 root filesystem construction process. The OpenEmbedded build system
3114 automatically splits locale files, which are used for localization,
3115 into separate packages. Setting the ``IMAGE_LINGUAS`` variable
3116 ensures that any locale packages that correspond to packages already
3117 selected for installation into the image are also installed. Here is
3118 an example:
3119 ::
3120
3121 IMAGE_LINGUAS = "pt-br de-de"
3122
3123 In this example, the build system ensures any Brazilian Portuguese
3124 and German locale files that correspond to packages in the image are
3125 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3126 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3127 only provide locale files by language and not by country-specific
3128 language).
3129
3130 See the :term:`GLIBC_GENERATE_LOCALES`
3131 variable for information on generating GLIBC locales.
3132
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003133
3134 :term:`IMAGE_LINK_NAME`
3135 The name of the output image symlink (which does not include
3136 the version part as :term:`IMAGE_NAME` does). The default value
3137 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
3138 variables:
3139 ::
3140
3141 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3142
3143
Andrew Geisslerf0343792020-11-18 10:42:21 -06003144 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003145 The manifest file for the image. This file lists all the installed
3146 packages that make up the image. The file contains package
3147 information on a line-per-package basis as follows:
3148 ::
3149
3150 packagename packagearch version
3151
3152 The :ref:`image <ref-classes-image>` class defines the manifest
3153 file as follows:
3154 ::
3155
3156 IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
3157
3158 The location is
3159 derived using the :term:`DEPLOY_DIR_IMAGE`
3160 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003161 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003162 section in the Yocto Project Overview and Concepts Manual.
3163
Andrew Geisslerf0343792020-11-18 10:42:21 -06003164 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003165 The name of the output image files minus the extension. This variable
3166 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003167 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003168 variables:
3169 ::
3170
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003171 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3172
3173 :term:`IMAGE_NAME_SUFFIX`
3174 Suffix used for the image output file name - defaults to ``".rootfs"``
3175 to distinguish the image file from other files created during image
3176 building; however if this suffix is redundant or not desired you can
3177 clear the value of this variable (set the value to ""). For example,
3178 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003179
Andrew Geisslerf0343792020-11-18 10:42:21 -06003180 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003181 Defines a multiplier that the build system applies to the initial
3182 image size for cases when the multiplier times the returned disk
3183 usage value for the image is greater than the sum of
3184 ``IMAGE_ROOTFS_SIZE`` and ``IMAGE_ROOTFS_EXTRA_SPACE``. The result of
3185 the multiplier applied to the initial image size creates free disk
3186 space in the image as overhead. By default, the build process uses a
3187 multiplier of 1.3 for this variable. This default value results in
3188 30% free disk space added to the image when this method is used to
3189 determine the final generated image size. You should be aware that
3190 post install scripts and the package management system uses disk
3191 space inside this overhead area. Consequently, the multiplier does
3192 not produce an image with all the theoretical free disk space. See
3193 ``IMAGE_ROOTFS_SIZE`` for information on how the build system
3194 determines the overall image size.
3195
3196 The default 30% free disk space typically gives the image enough room
3197 to boot and allows for basic post installs while still leaving a
3198 small amount of free disk space. If 30% free space is inadequate, you
3199 can increase the default value. For example, the following setting
3200 gives you 50% free space added to the image:
3201 ::
3202
3203 IMAGE_OVERHEAD_FACTOR = "1.5"
3204
3205 Alternatively, you can ensure a specific amount of free disk space is
3206 added to the image by using the ``IMAGE_ROOTFS_EXTRA_SPACE``
3207 variable.
3208
Andrew Geisslerf0343792020-11-18 10:42:21 -06003209 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003210 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3211 OpenEmbedded build system. The variable is defined appropriately by
3212 the :ref:`package_deb <ref-classes-package_deb>`,
3213 :ref:`package_rpm <ref-classes-package_rpm>`,
3214 :ref:`package_ipk <ref-classes-package_ipk>`, or
3215 :ref:`package_tar <ref-classes-package_tar>` class.
3216
3217 .. note::
3218
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003219 The ``package_tar`` class is broken and is not supported. It is
3220 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003221
3222 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
3223 :ref:`image <ref-classes-image>` classes use the ``IMAGE_PKGTYPE``
3224 for packaging up images and SDKs.
3225
3226 You should not set the ``IMAGE_PKGTYPE`` manually. Rather, the
3227 variable is set indirectly through the appropriate
3228 :ref:`package_* <ref-classes-package>` class using the
3229 :term:`PACKAGE_CLASSES` variable. The
3230 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3231 or IPK) that appears with the variable
3232
3233 .. note::
3234
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003235 Files using the ``.tar`` format are never used as a substitute
3236 packaging format for DEB, RPM, and IPK formatted files for your image
3237 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003238
Andrew Geisslerf0343792020-11-18 10:42:21 -06003239 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003240 Specifies a list of functions to call once the OpenEmbedded build
3241 system creates the final image output files. You can specify
3242 functions separated by semicolons:
3243 ::
3244
3245 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3246
3247 If you need to pass the root filesystem path to a command within the
3248 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3249 directory that becomes the root filesystem image. See the
3250 :term:`IMAGE_ROOTFS` variable for more
3251 information.
3252
Andrew Geisslerf0343792020-11-18 10:42:21 -06003253 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003254 Specifies a list of functions to call before the OpenEmbedded build
3255 system creates the final image output files. You can specify
3256 functions separated by semicolons:
3257 ::
3258
3259 IMAGE_PREPROCESS_COMMAND += "function; ... "
3260
3261 If you need to pass the root filesystem path to a command within the
3262 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3263 directory that becomes the root filesystem image. See the
3264 :term:`IMAGE_ROOTFS` variable for more
3265 information.
3266
Andrew Geisslerf0343792020-11-18 10:42:21 -06003267 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003268 The location of the root filesystem while it is under construction
3269 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3270 variable is not configurable. Do not change it.
3271
Andrew Geisslerf0343792020-11-18 10:42:21 -06003272 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003273 Specifies the alignment for the output image file in Kbytes. If the
3274 size of the image is not a multiple of this value, then the size is
3275 rounded up to the nearest multiple of the value. The default value is
3276 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3277 additional information.
3278
Andrew Geisslerf0343792020-11-18 10:42:21 -06003279 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003280 Defines additional free disk space created in the image in Kbytes. By
3281 default, this variable is set to "0". This free disk space is added
3282 to the image after the build system determines the image size as
3283 described in ``IMAGE_ROOTFS_SIZE``.
3284
3285 This variable is particularly useful when you want to ensure that a
3286 specific amount of free disk space is available on a device after an
3287 image is installed and running. For example, to be sure 5 Gbytes of
3288 free disk space is available, set the variable as follows:
3289 ::
3290
3291 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3292
3293 For example, the Yocto Project Build Appliance specifically requests
3294 40 Gbytes of extra space with the line:
3295 ::
3296
3297 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3298
Andrew Geisslerf0343792020-11-18 10:42:21 -06003299 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003300 Defines the size in Kbytes for the generated image. The OpenEmbedded
3301 build system determines the final size for the generated image using
3302 an algorithm that takes into account the initial disk space used for
3303 the generated image, a requested size for the image, and requested
3304 additional free disk space to be added to the image. Programatically,
3305 the build system determines the final size of the generated image as
3306 follows:
3307 ::
3308
3309 if (image-du * overhead) < rootfs-size:
3310 internal-rootfs-size = rootfs-size + xspace
3311 else:
3312 internal-rootfs-size = (image-du * overhead) + xspace
3313 where:
3314 image-du = Returned value of the du command on the image.
3315 overhead = IMAGE_OVERHEAD_FACTOR
3316 rootfs-size = IMAGE_ROOTFS_SIZE
3317 internal-rootfs-size = Initial root filesystem size before any modifications.
3318 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3319
3320 See the :term:`IMAGE_OVERHEAD_FACTOR`
3321 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3322 variables for related information.
3323
Andrew Geisslerf0343792020-11-18 10:42:21 -06003324 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003325 Specifies a dependency from one image type on another. Here is an
3326 example from the :ref:`image-live <ref-classes-image-live>` class:
3327 ::
3328
3329 IMAGE_TYPEDEP_live = "ext3"
3330
3331 In the previous example, the variable ensures that when "live" is
3332 listed with the :term:`IMAGE_FSTYPES` variable,
3333 the OpenEmbedded build system produces an ``ext3`` image first since
3334 one of the components of the live image is an ``ext3`` formatted
3335 partition containing the root filesystem.
3336
Andrew Geisslerf0343792020-11-18 10:42:21 -06003337 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003338 Specifies the complete list of supported image types by default:
3339
3340 - btrfs
3341 - container
3342 - cpio
3343 - cpio.gz
3344 - cpio.lz4
3345 - cpio.lzma
3346 - cpio.xz
3347 - cramfs
3348 - ext2
3349 - ext2.bz2
3350 - ext2.gz
3351 - ext2.lzma
3352 - ext3
3353 - ext3.gz
3354 - ext4
3355 - ext4.gz
3356 - f2fs
3357 - hddimg
3358 - iso
3359 - jffs2
3360 - jffs2.sum
3361 - multiubi
3362 - squashfs
3363 - squashfs-lz4
3364 - squashfs-lzo
3365 - squashfs-xz
3366 - tar
3367 - tar.bz2
3368 - tar.gz
3369 - tar.lz4
3370 - tar.xz
3371 - tar.zst
3372 - ubi
3373 - ubifs
3374 - wic
3375 - wic.bz2
3376 - wic.gz
3377 - wic.lzma
3378
3379 For more information about these types of images, see
3380 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3381
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003382 :term:`IMAGE_VERSION_SUFFIX`
3383 Version suffix that is part of the default :term:`IMAGE_NAME` and
3384 :term:`KERNEL_ARTIFACT_NAME` values.
3385 Defaults to ``"-${DATETIME}"``, however you could set this to a
3386 version string that comes from your external build environment if
3387 desired, and this suffix would then be used consistently across
3388 the build artifacts.
3389
Andrew Geisslerf0343792020-11-18 10:42:21 -06003390 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003391 Helps define the recipe revision for recipes that share a common
3392 ``include`` file. You can think of this variable as part of the
3393 recipe revision as set from within an include file.
3394
3395 Suppose, for example, you have a set of recipes that are used across
3396 several projects. And, within each of those recipes the revision (its
3397 :term:`PR` value) is set accordingly. In this case, when
3398 the revision of those recipes changes, the burden is on you to find
3399 all those recipes and be sure that they get changed to reflect the
3400 updated version of the recipe. In this scenario, it can get
3401 complicated when recipes that are used in many places and provide
3402 common functionality are upgraded to a new revision.
3403
3404 A more efficient way of dealing with this situation is to set the
3405 ``INC_PR`` variable inside the ``include`` files that the recipes
3406 share and then expand the ``INC_PR`` variable within the recipes to
3407 help define the recipe revision.
3408
3409 The following provides an example that shows how to use the
3410 ``INC_PR`` variable given a common ``include`` file that defines the
3411 variable. Once the variable is defined in the ``include`` file, you
3412 can use the variable to set the ``PR`` values in each recipe. You
3413 will notice that when you set a recipe's ``PR`` you can provide more
3414 granular revisioning by appending values to the ``INC_PR`` variable:
3415 ::
3416
3417 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3418 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3419 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3420 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3421
3422 The
3423 first line of the example establishes the baseline revision to be
3424 used for all recipes that use the ``include`` file. The remaining
3425 lines in the example are from individual recipes and show how the
3426 ``PR`` value is set.
3427
Andrew Geisslerf0343792020-11-18 10:42:21 -06003428 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003429 Specifies a space-separated list of license names (as they would
3430 appear in :term:`LICENSE`) that should be excluded
3431 from the build. Recipes that provide no alternatives to listed
3432 incompatible licenses are not built. Packages that are individually
3433 licensed with the specified incompatible licenses will be deleted.
3434
3435 .. note::
3436
3437 This functionality is only regularly tested using the following
3438 setting:
3439 ::
3440
3441 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3442
3443
3444 Although you can use other settings, you might be required to
3445 remove dependencies on or provide alternatives to components that
3446 are required to produce a functional system image.
3447
3448 .. note::
3449
3450 It is possible to define a list of licenses that are allowed to be
3451 used instead of the licenses that are excluded. To do this, define
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003452 a variable ``COMPATIBLE_LICENSES`` with the names of the licences
3453 that are allowed. Then define ``INCOMPATIBLE_LICENSE`` as:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003454 ::
3455
3456 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3457
3458
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003459 This will result in ``INCOMPATIBLE_LICENSE`` containing the names of
3460 all licences from :term:`AVAILABLE_LICENSES` except the ones specified
3461 in ``COMPATIBLE_LICENSES`` , thus only allowing the latter licences to
3462 be used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003463
Andrew Geisslerf0343792020-11-18 10:42:21 -06003464 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003465 Causes the named class or classes to be inherited globally. Anonymous
3466 functions in the class or classes are not executed for the base
3467 configuration and in each individual recipe. The OpenEmbedded build
3468 system ignores changes to ``INHERIT`` in individual recipes.
3469
3470 For more information on ``INHERIT``, see the
3471 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3472 section in the Bitbake User Manual.
3473
Andrew Geisslerf0343792020-11-18 10:42:21 -06003474 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003475 Lists classes that will be inherited at the distribution level. It is
3476 unlikely that you want to edit this variable.
3477
3478 The default value of the variable is set as follows in the
3479 ``meta/conf/distro/defaultsetup.conf`` file:
3480 ::
3481
3482 INHERIT_DISTRO ?= "debian devshell sstate license"
3483
Andrew Geisslerf0343792020-11-18 10:42:21 -06003484 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003485 Prevents the default dependencies, namely the C compiler and standard
3486 C library (libc), from being added to :term:`DEPENDS`.
3487 This variable is usually used within recipes that do not require any
3488 compilation using the C compiler.
3489
3490 Set the variable to "1" to prevent the default dependencies from
3491 being added.
3492
Andrew Geisslerf0343792020-11-18 10:42:21 -06003493 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003494 Prevents the OpenEmbedded build system from splitting out debug
3495 information during packaging. By default, the build system splits out
3496 debugging information during the
3497 :ref:`ref-tasks-package` task. For more information on
3498 how debug information is split out, see the
3499 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3500 variable.
3501
3502 To prevent the build system from splitting out debug information
3503 during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as
3504 follows:
3505 ::
3506
3507 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3508
Andrew Geisslerf0343792020-11-18 10:42:21 -06003509 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003510 If set to "1", causes the build to not strip binaries in resulting
3511 packages and prevents the ``-dbg`` package from containing the source
3512 files.
3513
3514 By default, the OpenEmbedded build system strips binaries and puts
3515 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
3516 Consequently, you should not set ``INHIBIT_PACKAGE_STRIP`` when you
3517 plan to debug in general.
3518
Andrew Geisslerf0343792020-11-18 10:42:21 -06003519 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003520 If set to "1", causes the build to not strip binaries in the
3521 resulting sysroot.
3522
3523 By default, the OpenEmbedded build system strips binaries in the
3524 resulting sysroot. When you specifically set the
3525 ``INHIBIT_SYSROOT_STRIP`` variable to "1" in your recipe, you inhibit
3526 this stripping.
3527
3528 If you want to use this variable, include the
3529 :ref:`staging <ref-classes-staging>` class. This class uses a
3530 ``sys_strip()`` function to test for the variable and acts
3531 accordingly.
3532
3533 .. note::
3534
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003535 Use of the ``INHIBIT_SYSROOT_STRIP`` variable occurs in rare and
3536 special circumstances. For example, suppose you are building
3537 bare-metal firmware by using an external GCC toolchain. Furthermore,
3538 even if the toolchain's binaries are strippable, other files exist
3539 that are needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003540
Andrew Geisslerf0343792020-11-18 10:42:21 -06003541 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003542 Defines the format for the output image of an initial RAM filesystem
3543 (initramfs), which is used during boot. Supported formats are the
3544 same as those supported by the
3545 :term:`IMAGE_FSTYPES` variable.
3546
3547 The default value of this variable, which is set in the
3548 ``meta/conf/bitbake.conf`` configuration file in the
3549 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3550 initramfs mechanism, as opposed to the initial RAM filesystem
3551 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3552 an optionally compressed cpio archive.
3553
Andrew Geisslerf0343792020-11-18 10:42:21 -06003554 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003555 Specifies the :term:`PROVIDES` name of an image
3556 recipe that is used to build an initial RAM filesystem (initramfs)
3557 image. In other words, the ``INITRAMFS_IMAGE`` variable causes an
3558 additional recipe to be built as a dependency to whatever root
3559 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3560 initramfs image recipe you provide should set
3561 :term:`IMAGE_FSTYPES` to
3562 :term:`INITRAMFS_FSTYPES`.
3563
3564 An initramfs image provides a temporary root filesystem used for
3565 early system initialization (e.g. loading of modules needed to locate
3566 and mount the "real" root filesystem).
3567
3568 .. note::
3569
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003570 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3571 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003572 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003573 the one built to provide the initramfs image, set ``INITRAMFS_IMAGE``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003574 to "core-image-minimal-initramfs".
3575
3576 You can also find more information by referencing the
3577 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3578 the Source Directory, the :ref:`image <ref-classes-image>` class,
3579 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
3580 the ``INITRAMFS_IMAGE`` variable.
3581
3582 If ``INITRAMFS_IMAGE`` is empty, which is the default, then no
3583 initramfs image is built.
3584
3585 For more information, you can also see the
3586 :term:`INITRAMFS_IMAGE_BUNDLE`
3587 variable, which allows the generated image to be bundled inside the
3588 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003589 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003590 in the Yocto Project Development Tasks Manual.
3591
Andrew Geisslerf0343792020-11-18 10:42:21 -06003592 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003593 Controls whether or not the image recipe specified by
3594 :term:`INITRAMFS_IMAGE` is run through an
3595 extra pass
3596 (:ref:`ref-tasks-bundle_initramfs`) during
3597 kernel compilation in order to build a single binary that contains
3598 both the kernel image and the initial RAM filesystem (initramfs)
3599 image. This makes use of the
3600 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3601 feature.
3602
3603 .. note::
3604
3605 Using an extra compilation pass to bundle the initramfs avoids a
3606 circular dependency between the kernel recipe and the initramfs
3607 recipe should the initramfs include kernel modules. Should that be
3608 the case, the initramfs recipe depends on the kernel for the
3609 kernel modules, and the kernel depends on the initramfs recipe
3610 since the initramfs is bundled inside the kernel image.
3611
3612 The combined binary is deposited into the ``tmp/deploy`` directory,
3613 which is part of the :term:`Build Directory`.
3614
3615 Setting the variable to "1" in a configuration file causes the
3616 OpenEmbedded build system to generate a kernel image with the
3617 initramfs specified in ``INITRAMFS_IMAGE`` bundled within:
3618 ::
3619
3620 INITRAMFS_IMAGE_BUNDLE = "1"
3621
3622 By default, the
3623 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
3624 null string as follows:
3625 ::
3626
3627 INITRAMFS_IMAGE_BUNDLE ?= ""
3628
3629 .. note::
3630
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003631 You must set the ``INITRAMFS_IMAGE_BUNDLE`` variable in a
3632 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003633
3634 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003635 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003636 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003637 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003638 in the Yocto Project Development Tasks Manual.
3639
Andrew Geisslerf0343792020-11-18 10:42:21 -06003640 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003641 The link name of the initial RAM filesystem image. This variable is
3642 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3643 follows:
3644 ::
3645
3646 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3647
3648 The value of the
3649 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3650 file, has the following value:
3651 ::
3652
3653 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3654
3655 See the :term:`MACHINE` variable for additional
3656 information.
3657
Andrew Geisslerf0343792020-11-18 10:42:21 -06003658 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003659 The base name of the initial RAM filesystem image. This variable is
3660 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3661 follows:
3662 ::
3663
3664 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3665
3666 The value of the :term:`KERNEL_ARTIFACT_NAME`
3667 variable, which is set in the same file, has the following value:
3668 ::
3669
3670 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3671
Andrew Geisslerf0343792020-11-18 10:42:21 -06003672 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003673 Indicates list of filesystem images to concatenate and use as an
3674 initial RAM disk (``initrd``).
3675
3676 The ``INITRD`` variable is an optional variable used with the
3677 :ref:`image-live <ref-classes-image-live>` class.
3678
Andrew Geisslerf0343792020-11-18 10:42:21 -06003679 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003680 When building a "live" bootable image (i.e. when
3681 :term:`IMAGE_FSTYPES` contains "live"),
3682 ``INITRD_IMAGE`` specifies the image recipe that should be built to
3683 provide the initial RAM disk image. The default value is
3684 "core-image-minimal-initramfs".
3685
3686 See the :ref:`image-live <ref-classes-image-live>` class for more
3687 information.
3688
Andrew Geisslerf0343792020-11-18 10:42:21 -06003689 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003690 The filename of the initialization script as installed to
3691 ``${sysconfdir}/init.d``.
3692
3693 This variable is used in recipes when using ``update-rc.d.bbclass``.
3694 The variable is mandatory.
3695
Andrew Geisslerf0343792020-11-18 10:42:21 -06003696 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003697 A list of the packages that contain initscripts. If multiple packages
3698 are specified, you need to append the package name to the other
3699 ``INITSCRIPT_*`` as an override.
3700
3701 This variable is used in recipes when using ``update-rc.d.bbclass``.
3702 The variable is optional and defaults to the :term:`PN`
3703 variable.
3704
Andrew Geisslerf0343792020-11-18 10:42:21 -06003705 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003706 Specifies the options to pass to ``update-rc.d``. Here is an example:
3707 ::
3708
3709 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3710
3711 In this example, the script has a runlevel of 99, starts the script
3712 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3713
3714 The variable's default value is "defaults", which is set in the
3715 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3716
3717 The value in ``INITSCRIPT_PARAMS`` is passed through to the
3718 ``update-rc.d`` command. For more information on valid parameters,
3719 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003720 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003721
Andrew Geisslerf0343792020-11-18 10:42:21 -06003722 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003723 Specifies the QA checks to skip for a specific package within a
3724 recipe. For example, to skip the check for symbolic link ``.so``
3725 files in the main package of a recipe, add the following to the
3726 recipe. The package name override must be used, which in this example
3727 is ``${PN}``:
3728 ::
3729
3730 INSANE_SKIP_${PN} += "dev-so"
3731
3732 See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a
3733 list of the valid QA checks you can specify using this variable.
3734
Andrew Geisslerf0343792020-11-18 10:42:21 -06003735 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003736 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
3737 Set the ``INSTALL_TIMEZONE_FILE`` variable to "0" at the
3738 configuration level to disable this behavior.
3739
Andrew Geisslerf0343792020-11-18 10:42:21 -06003740 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003741 When the IPK backend is in use and package management is enabled on
3742 the target, you can use this variable to set up ``opkg`` in the
3743 target image to point to package feeds on a nominated server. Once
3744 the feed is established, you can perform installations or upgrades
3745 using the package manager at runtime.
3746
Andrew Geisslerf0343792020-11-18 10:42:21 -06003747 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003748 Defines the kernel architecture used when assembling the
3749 configuration. Architectures supported for this release are:
3750
3751 - powerpc
3752 - i386
3753 - x86_64
3754 - arm
3755 - qemu
3756 - mips
3757
Andrew Geissler09209ee2020-12-13 08:44:15 -06003758 You define the ``KARCH`` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003759
Andrew Geisslerf0343792020-11-18 10:42:21 -06003760 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003761 A regular expression used by the build process to explicitly identify
3762 the kernel branch that is validated, patched, and configured during a
3763 build. You must set this variable to ensure the exact kernel branch
3764 you want is being used by the build process.
3765
3766 Values for this variable are set in the kernel's recipe file and the
3767 kernel's append file. For example, if you are using the
3768 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
3769 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH``
3770 is set as follows in that kernel recipe file:
3771 ::
3772
3773 KBRANCH ?= "standard/base"
3774
3775 This variable is also used from the kernel's append file to identify
3776 the kernel branch specific to a particular machine or target
3777 hardware. Continuing with the previous kernel example, the kernel's
3778 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3779 BSP layer for a given machine. For example, the append file for the
3780 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3781 machines (``meta-yocto-bsp``) is named
3782 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
3783 Here are the related statements from that append file:
3784 ::
3785
3786 KBRANCH_genericx86 = "standard/base"
3787 KBRANCH_genericx86-64 = "standard/base"
3788 KBRANCH_edgerouter = "standard/edgerouter"
3789 KBRANCH_beaglebone = "standard/beaglebone"
3790
3791 The ``KBRANCH`` statements
3792 identify the kernel branch to use when building for each supported
3793 BSP.
3794
Andrew Geisslerf0343792020-11-18 10:42:21 -06003795 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003796 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3797 class, specifies an "in-tree" kernel configuration file for use
3798 during a kernel build.
3799
3800 Typically, when using a ``defconfig`` to configure a kernel during a
3801 build, you place the file in your layer in the same manner as you
3802 would place patch files and configuration fragment files (i.e.
3803 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3804 is part of the kernel tree (i.e. "in-tree"), you can use the
3805 ``KBUILD_DEFCONFIG`` variable and append the
3806 :term:`KMACHINE` variable to point to the
3807 ``defconfig`` file.
3808
3809 To use the variable, set it in the append file for your kernel recipe
3810 using the following form:
3811 ::
3812
3813 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3814
3815 Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses
3816 a ``defconfig`` file named "bcm2709_defconfig":
3817 ::
3818
3819 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig"
3820
3821 As an alternative, you can use the following within your append file:
3822 ::
3823
3824 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file
3825
3826 For more
3827 information on how to use the ``KBUILD_DEFCONFIG`` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003828 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003829 section in the Yocto Project Linux Kernel Development Manual.
3830
Andrew Geisslerf0343792020-11-18 10:42:21 -06003831 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003832 Specifies an alternate kernel image type for creation in addition to
3833 the kernel image type specified using the
3834 :term:`KERNEL_IMAGETYPE` variable.
3835
Andrew Geisslerf0343792020-11-18 10:42:21 -06003836 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003837 Specifies the name of all of the build artifacts. You can change the
3838 name of the artifacts by changing the ``KERNEL_ARTIFACT_NAME``
3839 variable.
3840
3841 The value of ``KERNEL_ARTIFACT_NAME``, which is set in the
3842 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
3843 following default value:
3844 ::
3845
3846 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3847
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003848 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
3849 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003850
Andrew Geisslerf0343792020-11-18 10:42:21 -06003851 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003852 A list of classes defining kernel image types that the
3853 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3854 typically append this variable to enable extended image types. An
3855 example is the "kernel-fitimage", which enables fitImage support and
3856 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
3857 custom kernel image types with the ``kernel`` class using this
3858 variable.
3859
Andrew Geisslerf0343792020-11-18 10:42:21 -06003860 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003861 Specifies the name of the generated Linux kernel device tree (i.e.
3862 the ``.dtb``) file.
3863
3864 .. note::
3865
3866 Legacy support exists for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003867 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003868
3869 In order to use this variable, the
3870 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3871 be inherited.
3872
Andrew Geisslerf0343792020-11-18 10:42:21 -06003873 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003874 The link name of the kernel device tree binary (DTB). This variable
3875 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3876 follows:
3877 ::
3878
3879 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3880
3881 The
3882 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
3883 the same file, has the following value:
3884 ::
3885
3886 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3887
3888 See the :term:`MACHINE` variable for additional
3889 information.
3890
Andrew Geisslerf0343792020-11-18 10:42:21 -06003891 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003892 The base name of the kernel device tree binary (DTB). This variable
3893 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3894 follows:
3895 ::
3896
3897 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3898
3899 The value of the :term:`KERNEL_ARTIFACT_NAME`
3900 variable, which is set in the same file, has the following value:
3901 ::
3902
3903 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3904
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003905 :term:`KERNEL_DTC_FLAGS`
3906 Specifies the ``dtc`` flags that are passed to the Linux kernel build
3907 system when generating the device trees (via ``DTC_FLAGS`` environment
3908 variable).
3909
3910 In order to use this variable, the
3911 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3912 be inherited.
3913
Andrew Geisslerf0343792020-11-18 10:42:21 -06003914 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003915 Specifies additional ``make`` command-line arguments the OpenEmbedded
3916 build system passes on when compiling the kernel.
3917
Andrew Geisslerf0343792020-11-18 10:42:21 -06003918 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003919 Includes additional kernel metadata. In the OpenEmbedded build
3920 system, the default Board Support Packages (BSPs)
3921 :term:`Metadata` is provided through the
3922 :term:`KMACHINE` and :term:`KBRANCH`
3923 variables. You can use the ``KERNEL_FEATURES`` variable from within
3924 the kernel recipe or kernel append file to further add metadata for
3925 all BSPs or specific BSPs.
3926
3927 The metadata you add through this variable includes config fragments
3928 and features descriptions, which usually includes patches as well as
3929 config fragments. You typically override the ``KERNEL_FEATURES``
3930 variable for a specific machine. In this way, you can provide
3931 validated, but optional, sets of kernel configurations and features.
3932
3933 For example, the following example from the ``linux-yocto-rt_4.12``
3934 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3935 as well as "virtio" configurations to all QEMU machines. The last two
3936 statements add specific configurations to targeted machine types:
3937 ::
3938
3939 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
3940 KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}"
3941 KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc"
3942 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
3943 KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc"
3944
Andrew Geisslerf0343792020-11-18 10:42:21 -06003945 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003946 The link name of the kernel flattened image tree (FIT) image. This
3947 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3948 file as follows:
3949 ::
3950
3951 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3952
3953 The value of the
3954 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3955 file, has the following value:
3956 ::
3957
3958 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3959
3960 See the :term:`MACHINE` variable for additional
3961 information.
3962
Andrew Geisslerf0343792020-11-18 10:42:21 -06003963 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003964 The base name of the kernel flattened image tree (FIT) image. This
3965 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3966 file as follows:
3967 ::
3968
3969 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3970
3971 The value of the :term:`KERNEL_ARTIFACT_NAME`
3972 variable, which is set in the same file, has the following value:
3973 ::
3974
3975 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3976
Andrew Geisslerf0343792020-11-18 10:42:21 -06003977 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003978 The link name for the kernel image. This variable is set in the
3979 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3980 ::
3981
3982 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3983
3984 The value of
3985 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3986 file, has the following value:
3987 ::
3988
3989 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3990
3991 See the :term:`MACHINE` variable for additional
3992 information.
3993
Andrew Geisslerf0343792020-11-18 10:42:21 -06003994 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003995 Specifies the maximum size of the kernel image file in kilobytes. If
3996 ``KERNEL_IMAGE_MAXSIZE`` is set, the size of the kernel image file is
3997 checked against the set value during the
3998 :ref:`ref-tasks-sizecheck` task. The task fails if
3999 the kernel image file is larger than the setting.
4000
4001 ``KERNEL_IMAGE_MAXSIZE`` is useful for target devices that have a
4002 limited amount of space in which the kernel image must be stored.
4003
4004 By default, this variable is not set, which means the size of the
4005 kernel image is not checked.
4006
Andrew Geisslerf0343792020-11-18 10:42:21 -06004007 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004008 The base name of the kernel image. This variable is set in the
4009 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4010 ::
4011
4012 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4013
4014 The value of the
4015 :term:`KERNEL_ARTIFACT_NAME` variable,
4016 which is set in the same file, has the following value:
4017 ::
4018
4019 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4020
Andrew Geisslerf0343792020-11-18 10:42:21 -06004021 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004022 The type of kernel to build for a device, usually set by the machine
4023 configuration files and defaults to "zImage". This variable is used
4024 when building the kernel and is passed to ``make`` as the target to
4025 build.
4026
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004027 If you want to build an alternate kernel image type in addition to that
4028 specified by ``KERNEL_IMAGETYPE``, use the :term:`KERNEL_ALT_IMAGETYPE`
4029 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004030
Andrew Geisslerf0343792020-11-18 10:42:21 -06004031 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004032 Lists kernel modules that need to be auto-loaded during boot.
4033
4034 .. note::
4035
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004036 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004037 variable.
4038
4039 You can use the ``KERNEL_MODULE_AUTOLOAD`` variable anywhere that it
4040 can be recognized by the kernel recipe or by an out-of-tree kernel
4041 module recipe (e.g. a machine configuration file, a distribution
4042 configuration file, an append file for the recipe, or the recipe
4043 itself).
4044
4045 Specify it as follows:
4046 ::
4047
4048 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4049
4050 Including ``KERNEL_MODULE_AUTOLOAD`` causes the OpenEmbedded build
4051 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4052 the list of modules to be auto-loaded on boot. The modules appear
4053 one-per-line in the file. Here is an example of the most common use
4054 case:
4055 ::
4056
4057 KERNEL_MODULE_AUTOLOAD += "module_name"
4058
4059 For information on how to populate the ``modname.conf`` file with
4060 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4061
Andrew Geisslerf0343792020-11-18 10:42:21 -06004062 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004063 Provides a list of modules for which the OpenEmbedded build system
4064 expects to find ``module_conf_``\ modname values that specify
4065 configuration for each of the modules. For information on how to
4066 provide those module configurations, see the
4067 :term:`module_conf_* <module_conf>` variable.
4068
Andrew Geisslerf0343792020-11-18 10:42:21 -06004069 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004070 The location of the kernel sources. This variable is set to the value
4071 of the :term:`STAGING_KERNEL_DIR` within
4072 the :ref:`module <ref-classes-module>` class. For information on
4073 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004074 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004075 section in the Yocto Project Linux Kernel Development Manual.
4076
4077 To help maximize compatibility with out-of-tree drivers used to build
4078 modules, the OpenEmbedded build system also recognizes and uses the
4079 :term:`KERNEL_SRC` variable, which is identical to
4080 the ``KERNEL_PATH`` variable. Both variables are common variables
4081 used by external Makefiles to point to the kernel source directory.
4082
Andrew Geisslerf0343792020-11-18 10:42:21 -06004083 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004084 The location of the kernel sources. This variable is set to the value
4085 of the :term:`STAGING_KERNEL_DIR` within
4086 the :ref:`module <ref-classes-module>` class. For information on
4087 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004088 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004089 section in the Yocto Project Linux Kernel Development Manual.
4090
4091 To help maximize compatibility with out-of-tree drivers used to build
4092 modules, the OpenEmbedded build system also recognizes and uses the
4093 :term:`KERNEL_PATH` variable, which is identical
4094 to the ``KERNEL_SRC`` variable. Both variables are common variables
4095 used by external Makefiles to point to the kernel source directory.
4096
Andrew Geisslerf0343792020-11-18 10:42:21 -06004097 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004098 Specifies the version of the kernel as extracted from ``version.h``
4099 or ``utsrelease.h`` within the kernel sources. Effects of setting
4100 this variable do not take affect until the kernel has been
4101 configured. Consequently, attempting to refer to this variable in
4102 contexts prior to configuration will not work.
4103
Andrew Geisslerf0343792020-11-18 10:42:21 -06004104 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004105 Specifies whether the data referenced through
4106 :term:`PKGDATA_DIR` is needed or not. The
4107 ``KERNELDEPMODDEPEND`` does not control whether or not that data
4108 exists, but simply whether or not it is used. If you do not need to
4109 use the data, set the ``KERNELDEPMODDEPEND`` variable in your
4110 ``initramfs`` recipe. Setting the variable there when the data is not
4111 needed avoids a potential dependency loop.
4112
Andrew Geisslerf0343792020-11-18 10:42:21 -06004113 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004114 Provides a short description of a configuration fragment. You use
4115 this variable in the ``.scc`` file that describes a configuration
4116 fragment file. Here is the variable used in a file named ``smp.scc``
4117 to describe SMP being enabled:
4118 ::
4119
4120 define KFEATURE_DESCRIPTION "Enable SMP"
4121
Andrew Geisslerf0343792020-11-18 10:42:21 -06004122 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004123 The machine as known by the kernel. Sometimes the machine name used
4124 by the kernel does not match the machine name used by the
4125 OpenEmbedded build system. For example, the machine name that the
4126 OpenEmbedded build system understands as ``core2-32-intel-common``
4127 goes by a different name in the Linux Yocto kernel. The kernel
4128 understands that machine as ``intel-core2-32``. For cases like these,
4129 the ``KMACHINE`` variable maps the kernel machine name to the
4130 OpenEmbedded build system machine name.
4131
4132 These mappings between different names occur in the Yocto Linux
4133 Kernel's ``meta`` branch. As an example take a look in the
4134 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:
4135 ::
4136
4137 LINUX_VERSION_core2-32-intel-common = "3.19.0"
4138 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
4139 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4140 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4141 KMACHINE_core2-32-intel-common = "intel-core2-32"
4142 KBRANCH_core2-32-intel-common = "standard/base"
4143 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
4144
4145 The ``KMACHINE`` statement says
4146 that the kernel understands the machine name as "intel-core2-32".
4147 However, the OpenEmbedded build system understands the machine as
4148 "core2-32-intel-common".
4149
Andrew Geisslerf0343792020-11-18 10:42:21 -06004150 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004151 Defines the kernel type to be used in assembling the configuration.
4152 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004153 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004154 section in the
4155 Yocto Project Linux Kernel Development Manual for more information on
4156 kernel types.
4157
4158 You define the ``KTYPE`` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004159 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004160 value you use must match the value used for the
4161 :term:`LINUX_KERNEL_TYPE` value used by the
4162 kernel recipe.
4163
Andrew Geisslerf0343792020-11-18 10:42:21 -06004164 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004165 Provides a list of targets for automatic configuration.
4166
4167 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4168 information on how this variable is used.
4169
Andrew Geisslerf0343792020-11-18 10:42:21 -06004170 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171 Lists the layers, separated by spaces, on which this recipe depends.
4172 Optionally, you can specify a specific layer version for a dependency
4173 by adding it to the end of the layer name. Here is an example:
4174 ::
4175
4176 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4177
4178 In this previous example,
4179 version 3 of "anotherlayer" is compared against
4180 :term:`LAYERVERSION`\ ``_anotherlayer``.
4181
4182 An error is produced if any dependency is missing or the version
4183 numbers (if specified) do not match exactly. This variable is used in
4184 the ``conf/layer.conf`` file and must be suffixed with the name of
4185 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4186
Andrew Geisslerf0343792020-11-18 10:42:21 -06004187 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004188 When used inside the ``layer.conf`` configuration file, this variable
4189 provides the path of the current layer. This variable is not
4190 available outside of ``layer.conf`` and references are expanded
4191 immediately when parsing of the file completes.
4192
Andrew Geisslerf0343792020-11-18 10:42:21 -06004193 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004194 Lists the layers, separated by spaces, recommended for use with this
4195 layer.
4196
4197 Optionally, you can specify a specific layer version for a
4198 recommendation by adding the version to the end of the layer name.
4199 Here is an example:
4200 ::
4201
4202 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4203
4204 In this previous example, version 3 of "anotherlayer" is compared
4205 against ``LAYERVERSION_anotherlayer``.
4206
4207 This variable is used in the ``conf/layer.conf`` file and must be
4208 suffixed with the name of the specific layer (e.g.
4209 ``LAYERRECOMMENDS_mylayer``).
4210
Andrew Geisslerf0343792020-11-18 10:42:21 -06004211 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004212 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
4213 a layer is compatible. Using the ``LAYERSERIES_COMPAT`` variable
4214 allows the layer maintainer to indicate which combinations of the
4215 layer and OE-Core can be expected to work. The variable gives the
4216 system a way to detect when a layer has not been tested with new
4217 releases of OE-Core (e.g. the layer is not maintained).
4218
4219 To specify the OE-Core versions for which a layer is compatible, use
4220 this variable in your layer's ``conf/layer.conf`` configuration file.
4221 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004222 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004223 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004224 layer, use a space-separated list:
4225 ::
4226
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004227 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004228
4229 .. note::
4230
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004231 Setting ``LAYERSERIES_COMPAT`` is required by the Yocto Project
4232 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004233 The OpenEmbedded build system produces a warning if the variable
4234 is not set for any given layer.
4235
Andrew Geissler09209ee2020-12-13 08:44:15 -06004236 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004237 section in the Yocto Project Development Tasks Manual.
4238
Andrew Geisslerf0343792020-11-18 10:42:21 -06004239 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004240 Optionally specifies the version of a layer as a single number. You
4241 can use this within :term:`LAYERDEPENDS` for
4242 another layer in order to depend on a specific version of the layer.
4243 This variable is used in the ``conf/layer.conf`` file and must be
4244 suffixed with the name of the specific layer (e.g.
4245 ``LAYERVERSION_mylayer``).
4246
Andrew Geisslerf0343792020-11-18 10:42:21 -06004247 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004248 The minimal command and arguments used to run the linker.
4249
Andrew Geisslerf0343792020-11-18 10:42:21 -06004250 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004251 Specifies the flags to pass to the linker. This variable is exported
4252 to an environment variable and thus made visible to the software
4253 being built during the compilation step.
4254
4255 Default initialization for ``LDFLAGS`` varies depending on what is
4256 being built:
4257
4258 - :term:`TARGET_LDFLAGS` when building for the
4259 target
4260
4261 - :term:`BUILD_LDFLAGS` when building for the
4262 build host (i.e. ``-native``)
4263
4264 - :term:`BUILDSDK_LDFLAGS` when building for
4265 an SDK (i.e. ``nativesdk-``)
4266
Andrew Geisslerf0343792020-11-18 10:42:21 -06004267 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004268 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4269 that the :ref:`debian <ref-classes-debian>` class applies its
4270 naming policy to given a recipe that packages multiple libraries.
4271
4272 This variable works in conjunction with the ``debian`` class.
4273
Andrew Geisslerf0343792020-11-18 10:42:21 -06004274 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004275 Checksums of the license text in the recipe source code.
4276
4277 This variable tracks changes in license text of the source code
4278 files. If the license text is changed, it will trigger a build
4279 failure, which gives the developer an opportunity to review any
4280 license change.
4281
4282 This variable must be defined for all recipes (unless
4283 :term:`LICENSE` is set to "CLOSED").
4284
Andrew Geissler09209ee2020-12-13 08:44:15 -06004285 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004286 section in the Yocto Project Development Tasks Manual.
4287
Andrew Geisslerf0343792020-11-18 10:42:21 -06004288 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004289 The list of source licenses for the recipe. Follow these rules:
4290
4291 - Do not use spaces within individual license names.
4292
4293 - Separate license names using \| (pipe) when there is a choice
4294 between licenses.
4295
4296 - Separate license names using & (ampersand) when multiple licenses
4297 exist that cover different parts of the source.
4298
4299 - You can use spaces between license names.
4300
4301 - For standard licenses, use the names of the files in
4302 ``meta/files/common-licenses/`` or the
4303 :term:`SPDXLICENSEMAP` flag names defined in
4304 ``meta/conf/licenses.conf``.
4305
4306 Here are some examples:
4307 ::
4308
4309 LICENSE = "LGPLv2.1 | GPLv3"
4310 LICENSE = "MPL-1 & LGPLv2.1"
4311 LICENSE = "GPLv2+"
4312
4313 The first example is from the
4314 recipes for Qt, which the user may choose to distribute under either
4315 the LGPL version 2.1 or GPL version 3. The second example is from
4316 Cairo where two licenses cover different parts of the source code.
4317 The final example is from ``sysstat``, which presents a single
4318 license.
4319
4320 You can also specify licenses on a per-package basis to handle
4321 situations where components of the output have different licenses.
4322 For example, a piece of software whose code is licensed under GPLv2
4323 but has accompanying documentation licensed under the GNU Free
4324 Documentation License 1.2 could be specified as follows:
4325 ::
4326
4327 LICENSE = "GFDL-1.2 & GPLv2"
4328 LICENSE_${PN} = "GPLv2"
4329 LICENSE_${PN}-doc = "GFDL-1.2"
4330
Andrew Geisslerf0343792020-11-18 10:42:21 -06004331 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004332 Setting ``LICENSE_CREATE_PACKAGE`` to "1" causes the OpenEmbedded
4333 build system to create an extra package (i.e.
4334 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4335 those packages to the
4336 :term:`RRECOMMENDS`\ ``_${PN}``.
4337
4338 The ``${PN}-lic`` package installs a directory in
4339 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4340 name, and installs files in that directory that contain license and
4341 copyright information (i.e. copies of the appropriate license files
4342 from ``meta/common-licenses`` that match the licenses specified in
4343 the :term:`LICENSE` variable of the recipe metadata
4344 and copies of files marked in
4345 :term:`LIC_FILES_CHKSUM` as containing
4346 license text).
4347
4348 For related information on providing license text, see the
4349 :term:`COPY_LIC_DIRS` variable, the
4350 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004351 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004352 section in the Yocto Project Development Tasks Manual.
4353
Andrew Geisslerf0343792020-11-18 10:42:21 -06004354 :term:`LICENSE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004355 Specifies additional flags for a recipe you must whitelist through
4356 :term:`LICENSE_FLAGS_WHITELIST` in
4357 order to allow the recipe to be built. When providing multiple flags,
4358 separate them with spaces.
4359
4360 This value is independent of :term:`LICENSE` and is
4361 typically used to mark recipes that might require additional licenses
4362 in order to be used in a commercial product. For more information,
4363 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004364 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004365 section in the Yocto Project Development Tasks Manual.
4366
Andrew Geisslerf0343792020-11-18 10:42:21 -06004367 :term:`LICENSE_FLAGS_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004368 Lists license flags that when specified in
4369 :term:`LICENSE_FLAGS` within a recipe should not
4370 prevent that recipe from being built. This practice is otherwise
4371 known as "whitelisting" license flags. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004372 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004373 section in the Yocto Project Development Tasks Manual.
4374
Andrew Geisslerf0343792020-11-18 10:42:21 -06004375 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004376 Path to additional licenses used during the build. By default, the
4377 OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the
4378 directory that holds common license text used during the build. The
4379 ``LICENSE_PATH`` variable allows you to extend that location to other
4380 areas that have additional licenses:
4381 ::
4382
4383 LICENSE_PATH += "path-to-additional-common-licenses"
4384
Andrew Geisslerf0343792020-11-18 10:42:21 -06004385 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004386 Defines the kernel type to be used in assembling the configuration.
4387 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004388 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004389 section in the
4390 Yocto Project Linux Kernel Development Manual for more information on
4391 kernel types.
4392
4393 If you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to
4394 "standard". Together with :term:`KMACHINE`, the
4395 ``LINUX_KERNEL_TYPE`` variable defines the search arguments used by
4396 the kernel tools to find the appropriate description within the
4397 kernel :term:`Metadata` with which to build out the sources
4398 and configuration.
4399
Andrew Geisslerf0343792020-11-18 10:42:21 -06004400 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004401 The Linux version from ``kernel.org`` on which the Linux kernel image
4402 being built using the OpenEmbedded build system is based. You define
4403 this variable in the kernel recipe. For example, the
4404 ``linux-yocto-3.4.bb`` kernel recipe found in
4405 ``meta/recipes-kernel/linux`` defines the variables as follows:
4406 ::
4407
4408 LINUX_VERSION ?= "3.4.24"
4409
4410 The ``LINUX_VERSION`` variable is used to define :term:`PV`
4411 for the recipe:
4412 ::
4413
4414 PV = "${LINUX_VERSION}+git${SRCPV}"
4415
Andrew Geisslerf0343792020-11-18 10:42:21 -06004416 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004417 A string extension compiled into the version string of the Linux
4418 kernel built with the OpenEmbedded build system. You define this
4419 variable in the kernel recipe. For example, the linux-yocto kernel
4420 recipes all define the variable as follows:
4421 ::
4422
4423 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4424
4425 Defining this variable essentially sets the Linux kernel
4426 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4427 the ``uname`` command. Here is an example that shows the extension
4428 assuming it was set as previously shown:
4429 ::
4430
4431 $ uname -r
4432 3.7.0-rc8-custom
4433
Andrew Geisslerf0343792020-11-18 10:42:21 -06004434 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004435 Specifies the directory to which the OpenEmbedded build system writes
4436 overall log files. The default directory is ``${TMPDIR}/log``.
4437
4438 For the directory containing logs specific to each task, see the
4439 :term:`T` variable.
4440
Andrew Geisslerf0343792020-11-18 10:42:21 -06004441 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004442 Specifies the target device for which the image is built. You define
4443 ``MACHINE`` in the ``local.conf`` file found in the
4444 :term:`Build Directory`. By default, ``MACHINE`` is set to
4445 "qemux86", which is an x86-based architecture machine to be emulated
4446 using QEMU:
4447 ::
4448
4449 MACHINE ?= "qemux86"
4450
4451 The variable corresponds to a machine configuration file of the same
4452 name, through which machine-specific configurations are set. Thus,
4453 when ``MACHINE`` is set to "qemux86" there exists the corresponding
4454 ``qemux86.conf`` machine configuration file, which can be found in
4455 the :term:`Source Directory` in
4456 ``meta/conf/machine``.
4457
4458 The list of machines supported by the Yocto Project as shipped
4459 include the following:
4460 ::
4461
4462 MACHINE ?= "qemuarm"
4463 MACHINE ?= "qemuarm64"
4464 MACHINE ?= "qemumips"
4465 MACHINE ?= "qemumips64"
4466 MACHINE ?= "qemuppc"
4467 MACHINE ?= "qemux86"
4468 MACHINE ?= "qemux86-64"
4469 MACHINE ?= "genericx86"
4470 MACHINE ?= "genericx86-64"
4471 MACHINE ?= "beaglebone"
4472 MACHINE ?= "edgerouter"
4473
4474 The last five are Yocto Project reference hardware
4475 boards, which are provided in the ``meta-yocto-bsp`` layer.
4476
4477 .. note::
4478
4479 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004480 configuration adds new possible settings for ``MACHINE``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004481
Andrew Geisslerf0343792020-11-18 10:42:21 -06004482 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004483 Specifies the name of the machine-specific architecture. This
4484 variable is set automatically from :term:`MACHINE` or
4485 :term:`TUNE_PKGARCH`. You should not hand-edit
4486 the ``MACHINE_ARCH`` variable.
4487
Andrew Geisslerf0343792020-11-18 10:42:21 -06004488 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004489 A list of required machine-specific packages to install as part of
4490 the image being built. The build process depends on these packages
4491 being present. Furthermore, because this is a "machine-essential"
4492 variable, the list of packages are essential for the machine to boot.
4493 The impact of this variable affects images based on
4494 ``packagegroup-core-boot``, including the ``core-image-minimal``
4495 image.
4496
4497 This variable is similar to the
4498 ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` variable with the exception
4499 that the image being built has a build dependency on the variable's
4500 list of packages. In other words, the image will not build if a file
4501 in this list is not found.
4502
4503 As an example, suppose the machine for which you are building
4504 requires ``example-init`` to be run during boot to initialize the
4505 hardware. In this case, you would use the following in the machine's
4506 ``.conf`` configuration file:
4507 ::
4508
4509 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4510
Andrew Geisslerf0343792020-11-18 10:42:21 -06004511 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004512 A list of recommended machine-specific packages to install as part of
4513 the image being built. The build process does not depend on these
4514 packages being present. However, because this is a
4515 "machine-essential" variable, the list of packages are essential for
4516 the machine to boot. The impact of this variable affects images based
4517 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4518 image.
4519
4520 This variable is similar to the ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS``
4521 variable with the exception that the image being built does not have
4522 a build dependency on the variable's list of packages. In other
4523 words, the image will still build if a package in this list is not
4524 found. Typically, this variable is used to handle essential kernel
4525 modules, whose functionality may be selected to be built into the
4526 kernel rather than as a module, in which case a package will not be
4527 produced.
4528
4529 Consider an example where you have a custom kernel where a specific
4530 touchscreen driver is required for the machine to be usable. However,
4531 the driver can be built as a module or into the kernel depending on
4532 the kernel configuration. If the driver is built as a module, you
4533 want it to be installed. But, when the driver is built into the
4534 kernel, you still want the build to succeed. This variable sets up a
4535 "recommends" relationship so that in the latter case, the build will
4536 not fail due to the missing package. To accomplish this, assuming the
4537 package for the module was called ``kernel-module-ab123``, you would
4538 use the following in the machine's ``.conf`` configuration file:
4539 ::
4540
4541 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4542
4543 .. note::
4544
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004545 In this example, the ``kernel-module-ab123`` recipe needs to
4546 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4547 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4548 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004549
4550 Some examples of these machine essentials are flash, screen,
4551 keyboard, mouse, or touchscreen drivers (depending on the machine).
4552
Andrew Geisslerf0343792020-11-18 10:42:21 -06004553 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004554 A list of machine-specific packages to install as part of the image
4555 being built that are not essential for the machine to boot. However,
4556 the build process for more fully-featured images depends on the
4557 packages being present.
4558
4559 This variable affects all images based on ``packagegroup-base``,
4560 which does not include the ``core-image-minimal`` or
4561 ``core-image-full-cmdline`` images.
4562
4563 The variable is similar to the ``MACHINE_EXTRA_RRECOMMENDS`` variable
4564 with the exception that the image being built has a build dependency
4565 on the variable's list of packages. In other words, the image will
4566 not build if a file in this list is not found.
4567
4568 An example is a machine that has WiFi capability but is not essential
4569 for the machine to boot the image. However, if you are building a
4570 more fully-featured image, you want to enable the WiFi. The package
4571 containing the firmware for the WiFi hardware is always expected to
4572 exist, so it is acceptable for the build process to depend upon
4573 finding the package. In this case, assuming the package for the
4574 firmware was called ``wifidriver-firmware``, you would use the
4575 following in the ``.conf`` file for the machine:
4576 ::
4577
4578 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4579
Andrew Geisslerf0343792020-11-18 10:42:21 -06004580 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004581 A list of machine-specific packages to install as part of the image
4582 being built that are not essential for booting the machine. The image
4583 being built has no build dependency on this list of packages.
4584
4585 This variable affects only images based on ``packagegroup-base``,
4586 which does not include the ``core-image-minimal`` or
4587 ``core-image-full-cmdline`` images.
4588
4589 This variable is similar to the ``MACHINE_EXTRA_RDEPENDS`` variable
4590 with the exception that the image being built does not have a build
4591 dependency on the variable's list of packages. In other words, the
4592 image will build if a file in this list is not found.
4593
4594 An example is a machine that has WiFi capability but is not essential
4595 For the machine to boot the image. However, if you are building a
4596 more fully-featured image, you want to enable WiFi. In this case, the
4597 package containing the WiFi kernel module will not be produced if the
4598 WiFi driver is built into the kernel, in which case you still want
4599 the build to succeed instead of failing as a result of the package
4600 not being found. To accomplish this, assuming the package for the
4601 module was called ``kernel-module-examplewifi``, you would use the
4602 following in the ``.conf`` file for the machine:
4603 ::
4604
4605 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4606
Andrew Geisslerf0343792020-11-18 10:42:21 -06004607 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004608 Specifies the list of hardware features the
4609 :term:`MACHINE` is capable of supporting. For related
4610 information on enabling features, see the
4611 :term:`DISTRO_FEATURES`,
4612 :term:`COMBINED_FEATURES`, and
4613 :term:`IMAGE_FEATURES` variables.
4614
4615 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004616 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004617
Andrew Geisslerf0343792020-11-18 10:42:21 -06004618 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004619 Features to be added to ``MACHINE_FEATURES`` if not also present in
4620 ``MACHINE_FEATURES_BACKFILL_CONSIDERED``.
4621
4622 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4623 not intended to be user-configurable. It is best to just reference
4624 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004625 all machine configurations. See the ":ref:`ref-features-backfill`"
4626 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004627
Andrew Geisslerf0343792020-11-18 10:42:21 -06004628 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004629 Features from ``MACHINE_FEATURES_BACKFILL`` that should not be
4630 backfilled (i.e. added to ``MACHINE_FEATURES``) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004631 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004632
Andrew Geisslerf0343792020-11-18 10:42:21 -06004633 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004634 A colon-separated list of overrides that apply to the current
4635 machine. By default, this list includes the value of
4636 :term:`MACHINE`.
4637
4638 You can extend ``MACHINEOVERRIDES`` to add extra overrides that
4639 should apply to a machine. For example, all machines emulated in QEMU
4640 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4641 ``meta/conf/machine/include/qemu.inc`` that prepends the following
4642 override to ``MACHINEOVERRIDES``:
4643 ::
4644
4645 MACHINEOVERRIDES =. "qemuall:"
4646
4647 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004648 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004649 in QEMU, like in the following example from the ``connman-conf``
4650 recipe:
4651 ::
4652
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004653 SRC_URI_append_qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004654 file://wired-setup \
4655 "
4656
4657 The underlying mechanism behind
4658 ``MACHINEOVERRIDES`` is simply that it is included in the default
4659 value of :term:`OVERRIDES`.
4660
Andrew Geisslerf0343792020-11-18 10:42:21 -06004661 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004662 The email address of the distribution maintainer.
4663
Andrew Geisslerf0343792020-11-18 10:42:21 -06004664 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004665 Specifies additional paths from which the OpenEmbedded build system
4666 gets source code. When the build system searches for source code, it
4667 first tries the local download directory. If that location fails, the
4668 build system tries locations defined by
4669 :term:`PREMIRRORS`, the upstream source, and then
4670 locations specified by ``MIRRORS`` in that order.
4671
4672 Assuming your distribution (:term:`DISTRO`) is "poky",
4673 the default value for ``MIRRORS`` is defined in the
4674 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4675
Andrew Geisslerf0343792020-11-18 10:42:21 -06004676 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677 Specifies a prefix has been added to :term:`PN` to create a
4678 special version of a recipe or package (i.e. a Multilib version). The
4679 variable is used in places where the prefix needs to be added to or
4680 removed from a the name (e.g. the :term:`BPN` variable).
4681 ``MLPREFIX`` gets set when a prefix has been added to ``PN``.
4682
4683 .. note::
4684
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004685 The "ML" in ``MLPREFIX`` stands for "MultiLib". This representation is
4686 historical and comes from a time when ``nativesdk`` was a suffix
4687 rather than a prefix on the recipe name. When ``nativesdk`` was turned
4688 into a prefix, it made sense to set ``MLPREFIX`` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004689
4690 To help understand when ``MLPREFIX`` might be needed, consider when
4691 :term:`BBCLASSEXTEND` is used to provide a
4692 ``nativesdk`` version of a recipe in addition to the target version.
4693 If that recipe declares build-time dependencies on tasks in other
4694 recipes by using :term:`DEPENDS`, then a dependency on
4695 "foo" will automatically get rewritten to a dependency on
4696 "nativesdk-foo". However, dependencies like the following will not
4697 get rewritten automatically:
4698 ::
4699
4700 do_foo[depends] += "recipe:do_foo"
4701
4702 If you want such a dependency to also get transformed, you can do the
4703 following:
4704 ::
4705
4706 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4707
4708 module_autoload
4709 This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD``
4710 variable. You should replace all occurrences of ``module_autoload``
4711 with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:
4712 ::
4713
4714 module_autoload_rfcomm = "rfcomm"
4715
4716 should now be replaced with:
4717 ::
4718
4719 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4720
4721 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4722
4723 module_conf
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004724 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004725 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4726 file.
4727
4728 You can use this variable anywhere that it can be recognized by the
4729 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4730 configuration file, a distribution configuration file, an append file
4731 for the recipe, or the recipe itself). If you use this variable, you
4732 must also be sure to list the module name in the
4733 :term:`KERNEL_MODULE_AUTOLOAD`
4734 variable.
4735
4736 Here is the general syntax:
4737 ::
4738
4739 module_conf_module_name = "modprobe.d-syntax"
4740
4741 You must use the kernel module name override.
4742
4743 Run ``man modprobe.d`` in the shell to find out more information on
4744 the exact syntax you want to provide with ``module_conf``.
4745
4746 Including ``module_conf`` causes the OpenEmbedded build system to
4747 populate the ``/etc/modprobe.d/modname.conf`` file with
4748 ``modprobe.d`` syntax lines. Here is an example that adds the options
4749 ``arg1`` and ``arg2`` to a module named ``mymodule``:
4750 ::
4751
4752 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4753
4754 For information on how to specify kernel modules to auto-load on
4755 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4756
Andrew Geisslerf0343792020-11-18 10:42:21 -06004757 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004758 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4759 "0" to disable creation of this file, which contains all of the
4760 kernel modules resulting from a kernel build.
4761
Andrew Geisslerf0343792020-11-18 10:42:21 -06004762 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004763 The link name of the kernel module tarball. This variable is set in
4764 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4765 ::
4766
4767 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4768
4769 The value
4770 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
4771 same file, has the following value:
4772 ::
4773
4774 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4775
4776 See the :term:`MACHINE` variable for additional information.
4777
Andrew Geisslerf0343792020-11-18 10:42:21 -06004778 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004779 The base name of the kernel module tarball. This variable is set in
4780 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4781 ::
4782
4783 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4784
4785 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
4786 which is set in the same file, has the following value:
4787 ::
4788
4789 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4790
Andrew Geisslerf0343792020-11-18 10:42:21 -06004791 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004792 Uniquely identifies the type of the target system for which packages
4793 are being built. This variable allows output for different types of
4794 target systems to be put into different subdirectories of the same
4795 output directory.
4796
4797 The default value of this variable is:
4798 ::
4799
4800 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4801
4802 Some classes (e.g.
4803 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
4804 ``MULTIMACH_TARGET_SYS`` value.
4805
4806 See the :term:`STAMP` variable for an example. See the
4807 :term:`STAGING_DIR_TARGET` variable for more information.
4808
Andrew Geisslerf0343792020-11-18 10:42:21 -06004809 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004810 A string identifying the host distribution. Strings consist of the
4811 host distributor ID followed by the release, as reported by the
4812 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4813 example, when running a build on Ubuntu 12.10, the value is
4814 "Ubuntu-12.10". If this information is unable to be determined, the
4815 value resolves to "Unknown".
4816
4817 This variable is used by default to isolate native shared state
4818 packages for different distributions (e.g. to avoid problems with
4819 ``glibc`` version incompatibilities). Additionally, the variable is
4820 checked against
4821 :term:`SANITY_TESTED_DISTROS` if that
4822 variable is set.
4823
Andrew Geisslerf0343792020-11-18 10:42:21 -06004824 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004825 The minimal command and arguments to run ``nm``.
4826
Andrew Geisslerf0343792020-11-18 10:42:21 -06004827 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004828 Avoids QA errors when you use a non-common, non-CLOSED license in a
4829 recipe. Packages exist, such as the linux-firmware package, with many
4830 licenses that are not in any way common. Also, new licenses are added
4831 occasionally to avoid introducing a lot of common license files,
4832 which are only applicable to a specific package.
4833 ``NO_GENERIC_LICENSE`` is used to allow copying a license that does
4834 not exist in common licenses.
4835
4836 The following example shows how to add ``NO_GENERIC_LICENSE`` to a
4837 recipe:
4838 ::
4839
4840 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4841
4842 The following is an example that
4843 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
4844 source:
4845 ::
4846
4847 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4848
Andrew Geisslerf0343792020-11-18 10:42:21 -06004849 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004850 Prevents installation of all "recommended-only" packages.
4851 Recommended-only packages are packages installed only through the
4852 :term:`RRECOMMENDS` variable). Setting the
4853 ``NO_RECOMMENDATIONS`` variable to "1" turns this feature on: ::
4854
4855 NO_RECOMMENDATIONS = "1"
4856
4857 You can set this variable globally in your ``local.conf`` file or you
4858 can attach it to a specific image recipe by using the recipe name
4859 override: ::
4860
4861 NO_RECOMMENDATIONS_pn-target_image = "1"
4862
4863 It is important to realize that if you choose to not install packages
4864 using this variable and some other packages are dependent on them
4865 (i.e. listed in a recipe's :term:`RDEPENDS`
4866 variable), the OpenEmbedded build system ignores your request and
4867 will install the packages to avoid dependency errors.
4868
4869 .. note::
4870
4871 Some recommended packages might be required for certain system
4872 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004873 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004874
4875 Support for this variable exists only when using the IPK and RPM
4876 packaging backend. Support does not exist for DEB.
4877
4878 See the :term:`BAD_RECOMMENDATIONS` and
4879 the :term:`PACKAGE_EXCLUDE` variables for
4880 related information.
4881
Andrew Geisslerf0343792020-11-18 10:42:21 -06004882 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004883 Disables auto package from splitting ``.debug`` files. If a recipe
4884 requires ``FILES_${PN}-dbg`` to be set manually, the
4885 ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the
4886 content of the debug package. For example:
4887 ::
4888
4889 NOAUTOPACKAGEDEBUG = "1"
4890 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4891 FILES_${PN}-dbg = "/usr/src/debug/"
4892 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
4893
Andrew Geisslerf0343792020-11-18 10:42:21 -06004894 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004895 The minimal command and arguments to run ``objcopy``.
4896
Andrew Geisslerf0343792020-11-18 10:42:21 -06004897 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004898 The minimal command and arguments to run ``objdump``.
4899
Andrew Geisslerf0343792020-11-18 10:42:21 -06004900 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004901 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4902 this variable specifies additional arguments passed to the "sed"
4903 command. The sed command alters any paths in configuration scripts
4904 that have been set up during compilation. Inheriting this class
4905 results in all paths in these scripts being changed to point into the
4906 ``sysroots/`` directory so that all builds that use the script will
4907 use the correct directories for the cross compiling layout.
4908
4909 See the ``meta/classes/binconfig.bbclass`` in the
4910 :term:`Source Directory` for details on how this class
4911 applies these additional sed command arguments. For general
4912 information on the ``binconfig`` class, see the
4913 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
4914
Andrew Geisslerf0343792020-11-18 10:42:21 -06004915 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004916 An internal variable used to tell the OpenEmbedded build system what
4917 Python modules to import for every Python function run by the system.
4918
4919 .. note::
4920
4921 Do not set this variable. It is for internal use only.
4922
Andrew Geisslerf0343792020-11-18 10:42:21 -06004923 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004924 The name of the build environment setup script for the purposes of
4925 setting up the environment within the extensible SDK. The default
4926 value is "oe-init-build-env".
4927
4928 If you use a custom script to set up your build environment, set the
4929 ``OE_INIT_ENV_SCRIPT`` variable to its name.
4930
Andrew Geisslerf0343792020-11-18 10:42:21 -06004931 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004932 Controls how the OpenEmbedded build system spawns interactive
4933 terminals on the host development system (e.g. using the BitBake
4934 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06004935 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004936 the Yocto Project Development Tasks Manual.
4937
4938 You can use the following values for the ``OE_TERMINAL`` variable:
4939
4940 - auto
4941 - gnome
4942 - xfce
4943 - rxvt
4944 - screen
4945 - konsole
4946 - none
4947
Andrew Geisslerf0343792020-11-18 10:42:21 -06004948 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004949 The directory from which the top-level build environment setup script
4950 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004951 setup script: :ref:`structure-core-script`. When you run this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004952 script, the ``OEROOT`` variable resolves to the directory that
4953 contains the script.
4954
4955 For additional information on how this variable is used, see the
4956 initialization script.
4957
Andrew Geisslerf0343792020-11-18 10:42:21 -06004958 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004959 Declares the oldest version of the Linux kernel that the produced
4960 binaries must support. This variable is passed into the build of the
4961 Embedded GNU C Library (``glibc``).
4962
4963 The default for this variable comes from the
4964 ``meta/conf/bitbake.conf`` configuration file. You can override this
4965 default by setting the variable in a custom distribution
4966 configuration file.
4967
Andrew Geisslerf0343792020-11-18 10:42:21 -06004968 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004969 A colon-separated list of overrides that currently apply. Overrides
4970 are a BitBake mechanism that allows variables to be selectively
4971 overridden at the end of parsing. The set of overrides in
4972 ``OVERRIDES`` represents the "state" during building, which includes
4973 the current recipe being built, the machine for which it is being
4974 built, and so forth.
4975
4976 As an example, if the string "an-override" appears as an element in
4977 the colon-separated list in ``OVERRIDES``, then the following
4978 assignment will override ``FOO`` with the value "overridden" at the
4979 end of parsing:
4980 ::
4981
4982 FOO_an-override = "overridden"
4983
4984 See the
4985 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
4986 section in the BitBake User Manual for more information on the
4987 overrides mechanism.
4988
4989 The default value of ``OVERRIDES`` includes the values of the
4990 :term:`CLASSOVERRIDE`,
4991 :term:`MACHINEOVERRIDES`, and
4992 :term:`DISTROOVERRIDES` variables. Another
4993 important override included by default is ``pn-${PN}``. This override
4994 allows variables to be set for a single recipe within configuration
4995 (``.conf``) files. Here is an example:
4996 ::
4997
4998 FOO_pn-myrecipe = "myrecipe-specific value"
4999
5000 .. note::
5001
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005002 An easy way to see what overrides apply is to search for ``OVERRIDES``
5003 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005004 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005005 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005006
Andrew Geisslerf0343792020-11-18 10:42:21 -06005007 :term:`P`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005008 The recipe name and version. ``P`` is comprised of the following:
5009 ::
5010
5011 ${PN}-${PV}
5012
Andrew Geisslerf0343792020-11-18 10:42:21 -06005013 :term:`PACKAGE_ADD_METADATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005014 This variable defines additional metdata to add to packages.
5015
5016 You may find you need to inject additional metadata into packages.
5017 This variable allows you to do that by setting the injected data as
5018 the value. Multiple fields can be added by splitting the content with
5019 the literal separator "\n".
5020
5021 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5022 to do package type specific settings. It can also be made package
5023 specific by using the package name as a suffix.
5024
5025 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005026 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005027 section in the Yocto Project Development Tasks Manual.
5028
Andrew Geisslerf0343792020-11-18 10:42:21 -06005029 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005030 The architecture of the resulting package or packages.
5031
5032 By default, the value of this variable is set to
5033 :term:`TUNE_PKGARCH` when building for the
5034 target, :term:`BUILD_ARCH` when building for the
5035 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5036 SDK.
5037
5038 .. note::
5039
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005040 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005041
5042 However, if your recipe's output packages are built specific to the
5043 target machine rather than generally for the architecture of the
5044 machine, you should set ``PACKAGE_ARCH`` to the value of
5045 :term:`MACHINE_ARCH` in the recipe as follows:
5046 ::
5047
5048 PACKAGE_ARCH = "${MACHINE_ARCH}"
5049
Andrew Geisslerf0343792020-11-18 10:42:21 -06005050 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005051 Specifies a list of architectures compatible with the target machine.
5052 This variable is set automatically and should not normally be
5053 hand-edited. Entries are separated using spaces and listed in order
5054 of priority. The default value for ``PACKAGE_ARCHS`` is "all any
5055 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5056
Andrew Geisslerf0343792020-11-18 10:42:21 -06005057 :term:`PACKAGE_BEFORE_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005058 Enables easily adding packages to ``PACKAGES`` before ``${PN}`` so
5059 that those added packages can pick up files that would normally be
5060 included in the default package.
5061
Andrew Geisslerf0343792020-11-18 10:42:21 -06005062 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005063 This variable, which is set in the ``local.conf`` configuration file
5064 found in the ``conf`` folder of the
5065 :term:`Build Directory`, specifies the package manager the
5066 OpenEmbedded build system uses when packaging data.
5067
5068 You can provide one or more of the following arguments for the
5069 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5070 package_tar"
5071
5072 .. note::
5073
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005074 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005075 class has limited functionality due to no support for package
5076 dependencies by that backend. Therefore, it is recommended that
5077 you do not use it.
5078
5079 The build system uses only the first argument in the list as the
5080 package manager when creating your image or SDK. However, packages
5081 will be created using any additional packaging classes you specify.
5082 For example, if you use the following in your ``local.conf`` file:
5083 ::
5084
5085 PACKAGE_CLASSES ?= "package_ipk"
5086
5087 The OpenEmbedded build system uses
5088 the IPK package manager to create your image or SDK.
5089
5090 For information on packaging and build performance effects as a
5091 result of the package manager in use, see the
5092 ":ref:`package.bbclass <ref-classes-package>`" section.
5093
Andrew Geisslerf0343792020-11-18 10:42:21 -06005094 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005095 Determines how to split up the binary and debug information when
5096 creating ``*-dbg`` packages to be used with the GNU Project Debugger
5097 (GDB).
5098
5099 With the ``PACKAGE_DEBUG_SPLIT_STYLE`` variable, you can control
5100 where debug information, which can include or exclude source files,
5101 is stored:
5102
5103 - ".debug": Debug symbol files are placed next to the binary in a
5104 ``.debug`` directory on the target. For example, if a binary is
5105 installed into ``/bin``, the corresponding debug symbol files are
5106 installed in ``/bin/.debug``. Source files are placed in
5107 ``/usr/src/debug``.
5108
5109 - "debug-file-directory": Debug symbol files are placed under
5110 ``/usr/lib/debug`` on the target, and separated by the path from
5111 where the binary is installed. For example, if a binary is
5112 installed in ``/bin``, the corresponding debug symbols are
5113 installed in ``/usr/lib/debug/bin``. Source files are placed in
5114 ``/usr/src/debug``.
5115
5116 - "debug-without-src": The same behavior as ".debug" previously
5117 described with the exception that no source files are installed.
5118
5119 - "debug-with-srcpkg": The same behavior as ".debug" previously
5120 described with the exception that all source files are placed in a
5121 separate ``*-src`` pkg. This is the default behavior.
5122
5123 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005124 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005125 in the Yocto Project Development Tasks Manual.
5126
Andrew Geisslerf0343792020-11-18 10:42:21 -06005127 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005128 Prevents specific packages from being installed when you are
5129 installing complementary packages.
5130
5131 You might find that you want to prevent installing certain packages
5132 when you are installing complementary packages. For example, if you
5133 are using :term:`IMAGE_FEATURES` to install
5134 ``dev-pkgs``, you might not want to install all packages from a
5135 particular multilib. If you find yourself in this situation, you can
5136 use the ``PACKAGE_EXCLUDE_COMPLEMENTARY`` variable to specify regular
5137 expressions to match the packages you want to exclude.
5138
Andrew Geisslerf0343792020-11-18 10:42:21 -06005139 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005140 Lists packages that should not be installed into an image. For
5141 example:
5142 ::
5143
5144 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5145
5146 You can set this variable globally in your ``local.conf`` file or you
5147 can attach it to a specific image recipe by using the recipe name
5148 override:
5149 ::
5150
5151 PACKAGE_EXCLUDE_pn-target_image = "package_name"
5152
5153 If you choose to not install a package using this variable and some
5154 other package is dependent on it (i.e. listed in a recipe's
5155 :term:`RDEPENDS` variable), the OpenEmbedded build
5156 system generates a fatal installation error. Because the build system
5157 halts the process with a fatal error, you can use the variable with
5158 an iterative development process to remove specific components from a
5159 system.
5160
5161 Support for this variable exists only when using the IPK and RPM
5162 packaging backend. Support does not exist for DEB.
5163
5164 See the :term:`NO_RECOMMENDATIONS` and the
5165 :term:`BAD_RECOMMENDATIONS` variables for
5166 related information.
5167
Andrew Geisslerf0343792020-11-18 10:42:21 -06005168 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005169 Specifies the list of architectures compatible with the device CPU.
5170 This variable is useful when you build for several different devices
5171 that use miscellaneous processors such as XScale and ARM926-EJS.
5172
Andrew Geisslerf0343792020-11-18 10:42:21 -06005173 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005174 Optionally specifies the package architectures used as part of the
5175 package feed URIs during the build. When used, the
5176 ``PACKAGE_FEED_ARCHS`` variable is appended to the final package feed
5177 URI, which is constructed using the
5178 :term:`PACKAGE_FEED_URIS` and
5179 :term:`PACKAGE_FEED_BASE_PATHS`
5180 variables.
5181
5182 .. note::
5183
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005184 You can use the ``PACKAGE_FEED_ARCHS``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005185 variable to whitelist specific package architectures. If you do
5186 not need to whitelist specific architectures, which is a common
5187 case, you can omit this variable. Omitting the variable results in
5188 all available architectures for the current machine being included
5189 into remote package feeds.
5190
5191 Consider the following example where the ``PACKAGE_FEED_URIS``,
5192 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5193 defined in your ``local.conf`` file:
5194 ::
5195
5196 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5197 https://example.com/packagerepos/updates"
5198 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5199 PACKAGE_FEED_ARCHS = "all core2-64"
5200
5201 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005202
5203 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005204
5205 https://example.com/packagerepos/release/rpm/all
5206 https://example.com/packagerepos/release/rpm/core2-64
5207 https://example.com/packagerepos/release/rpm-dev/all
5208 https://example.com/packagerepos/release/rpm-dev/core2-64
5209 https://example.com/packagerepos/updates/rpm/all
5210 https://example.com/packagerepos/updates/rpm/core2-64
5211 https://example.com/packagerepos/updates/rpm-dev/all
5212 https://example.com/packagerepos/updates/rpm-dev/core2-64
5213
Andrew Geisslerf0343792020-11-18 10:42:21 -06005214 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005215 Specifies the base path used when constructing package feed URIs. The
5216 ``PACKAGE_FEED_BASE_PATHS`` variable makes up the middle portion of a
5217 package feed URI used by the OpenEmbedded build system. The base path
5218 lies between the :term:`PACKAGE_FEED_URIS`
5219 and :term:`PACKAGE_FEED_ARCHS` variables.
5220
5221 Consider the following example where the ``PACKAGE_FEED_URIS``,
5222 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5223 defined in your ``local.conf`` file:
5224 ::
5225
5226 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5227 https://example.com/packagerepos/updates"
5228 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5229 PACKAGE_FEED_ARCHS = "all core2-64"
5230
5231 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005232
5233 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005234
5235 https://example.com/packagerepos/release/rpm/all
5236 https://example.com/packagerepos/release/rpm/core2-64
5237 https://example.com/packagerepos/release/rpm-dev/all
5238 https://example.com/packagerepos/release/rpm-dev/core2-64
5239 https://example.com/packagerepos/updates/rpm/all
5240 https://example.com/packagerepos/updates/rpm/core2-64
5241 https://example.com/packagerepos/updates/rpm-dev/all
5242 https://example.com/packagerepos/updates/rpm-dev/core2-64
5243
Andrew Geisslerf0343792020-11-18 10:42:21 -06005244 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005245 Specifies the front portion of the package feed URI used by the
5246 OpenEmbedded build system. Each final package feed URI is comprised
5247 of ``PACKAGE_FEED_URIS``,
5248 :term:`PACKAGE_FEED_BASE_PATHS`, and
5249 :term:`PACKAGE_FEED_ARCHS` variables.
5250
5251 Consider the following example where the ``PACKAGE_FEED_URIS``,
5252 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5253 defined in your ``local.conf`` file:
5254 ::
5255
5256 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5257 https://example.com/packagerepos/updates"
5258 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5259 PACKAGE_FEED_ARCHS = "all core2-64"
5260
5261 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005262
5263 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005264
5265 https://example.com/packagerepos/release/rpm/all
5266 https://example.com/packagerepos/release/rpm/core2-64
5267 https://example.com/packagerepos/release/rpm-dev/all
5268 https://example.com/packagerepos/release/rpm-dev/core2-64
5269 https://example.com/packagerepos/updates/rpm/all
5270 https://example.com/packagerepos/updates/rpm/core2-64
5271 https://example.com/packagerepos/updates/rpm-dev/all
5272 https://example.com/packagerepos/updates/rpm-dev/core2-64
5273
Andrew Geisslerf0343792020-11-18 10:42:21 -06005274 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005275 The final list of packages passed to the package manager for
5276 installation into the image.
5277
5278 Because the package manager controls actual installation of all
5279 packages, the list of packages passed using ``PACKAGE_INSTALL`` is
5280 not the final list of packages that are actually installed. This
5281 variable is internal to the image construction code. Consequently, in
5282 general, you should use the
5283 :term:`IMAGE_INSTALL` variable to specify
5284 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005285 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005286 image. When working with an initial RAM filesystem (initramfs) image,
5287 use the ``PACKAGE_INSTALL`` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005288 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005289 in the Yocto Project Development Tasks Manual.
5290
Andrew Geisslerf0343792020-11-18 10:42:21 -06005291 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005292 Specifies a list of packages the OpenEmbedded build system attempts
5293 to install when creating an image. If a listed package fails to
5294 install, the build system does not generate an error. This variable
5295 is generally not user-defined.
5296
Andrew Geisslerf0343792020-11-18 10:42:21 -06005297 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005298 Specifies a list of functions run to pre-process the
5299 :term:`PKGD` directory prior to splitting the files out
5300 to individual packages.
5301
Andrew Geisslerf0343792020-11-18 10:42:21 -06005302 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005303 Specifies a list of dependencies for post-installation and
5304 pre-installation scripts on native/cross tools. If your
5305 post-installation or pre-installation script can execute at rootfs
5306 creation time rather than on the target but depends on a native tool
5307 in order to execute, you need to list the tools in
5308 ``PACKAGE_WRITE_DEPS``.
5309
5310 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005311 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005312 section in the Yocto Project Development Tasks Manual.
5313
Andrew Geisslerf0343792020-11-18 10:42:21 -06005314 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005315 This variable provides a means of enabling or disabling features of a
5316 recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in
5317 recipes when you specify features and then arguments that define
5318 feature behaviors. Here is the basic block structure (broken over
5319 multiple lines for readability):
5320 ::
5321
5322 PACKAGECONFIG ??= "f1 f2 f3 ..."
5323 PACKAGECONFIG[f1] = "\
5324 --with-f1, \
5325 --without-f1, \
5326 build-deps-for-f1, \
5327 runtime-deps-for-f1, \
5328 runtime-recommends-for-f1, \
5329 packageconfig-conflicts-for-f1"
5330 PACKAGECONFIG[f2] = "\
5331 ... and so on and so on ...
5332
5333 The ``PACKAGECONFIG`` variable itself specifies a space-separated
5334 list of the features to enable. Following the features, you can
5335 determine the behavior of each feature by providing up to six
5336 order-dependent arguments, which are separated by commas. You can
5337 omit any argument you like but must retain the separating commas. The
5338 order is important and specifies the following:
5339
5340 1. Extra arguments that should be added to the configure script
5341 argument list (:term:`EXTRA_OECONF` or
5342 :term:`PACKAGECONFIG_CONFARGS`) if
5343 the feature is enabled.
5344
5345 2. Extra arguments that should be added to ``EXTRA_OECONF`` or
5346 ``PACKAGECONFIG_CONFARGS`` if the feature is disabled.
5347
5348 3. Additional build dependencies (:term:`DEPENDS`)
5349 that should be added if the feature is enabled.
5350
5351 4. Additional runtime dependencies (:term:`RDEPENDS`)
5352 that should be added if the feature is enabled.
5353
5354 5. Additional runtime recommendations
5355 (:term:`RRECOMMENDS`) that should be added if
5356 the feature is enabled.
5357
5358 6. Any conflicting (that is, mutually exclusive) ``PACKAGECONFIG``
5359 settings for this feature.
5360
5361 Consider the following ``PACKAGECONFIG`` block taken from the
5362 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5363 three arguments that determine the feature's behavior.
5364 ::
5365
5366 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5367
5368 The
5369 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5370 enabled. In this case, ``--with-gtk3`` is added to the configure
5371 script argument list and ``gtk+3`` is added to ``DEPENDS``. On the
5372 other hand, if the feature is disabled say through a ``.bbappend``
5373 file in another layer, then the second argument ``--without-gtk3`` is
5374 added to the configure script instead.
5375
5376 The basic ``PACKAGECONFIG`` structure previously described holds true
5377 regardless of whether you are creating a block or changing a block.
5378 When creating a block, use the structure inside your recipe.
5379
5380 If you want to change an existing ``PACKAGECONFIG`` block, you can do
5381 so one of two ways:
5382
5383 - *Append file:* Create an append file named
5384 recipename\ ``.bbappend`` in your layer and override the value of
5385 ``PACKAGECONFIG``. You can either completely override the
5386 variable:
5387 ::
5388
5389 PACKAGECONFIG = "f4 f5"
5390
5391 Or, you can just append the variable:
5392 ::
5393
5394 PACKAGECONFIG_append = " f4"
5395
5396 - *Configuration file:* This method is identical to changing the
5397 block through an append file except you edit your ``local.conf``
5398 or ``mydistro.conf`` file. As with append files previously
5399 described, you can either completely override the variable:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005400 ::
5401
5402 PACKAGECONFIG_pn-recipename = "f4 f5"
5403
5404 Or, you can just amend the variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005405 ::
5406
5407 PACKAGECONFIG_append_pn-recipename = " f4"
5408
Andrew Geisslerf0343792020-11-18 10:42:21 -06005409 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005410 A space-separated list of configuration options generated from the
5411 :term:`PACKAGECONFIG` setting.
5412
5413 Classes such as :ref:`autotools <ref-classes-autotools>` and
5414 :ref:`cmake <ref-classes-cmake>` use ``PACKAGECONFIG_CONFARGS`` to
5415 pass ``PACKAGECONFIG`` options to ``configure`` and ``cmake``,
5416 respectively. If you are using ``PACKAGECONFIG`` but not a class that
5417 handles the ``do_configure`` task, then you need to use
5418 ``PACKAGECONFIG_CONFARGS`` appropriately.
5419
Andrew Geisslerf0343792020-11-18 10:42:21 -06005420 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005421 For recipes inheriting the
5422 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
5423 ``PACKAGEGROUP_DISABLE_COMPLEMENTARY`` to "1" specifies that the
5424 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5425 should not be automatically created by the ``packagegroup`` recipe,
5426 which is the default behavior.
5427
Andrew Geisslerf0343792020-11-18 10:42:21 -06005428 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005429 The list of packages the recipe creates. The default value is the
5430 following:
5431 ::
5432
5433 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5434
5435 During packaging, the :ref:`ref-tasks-package` task
5436 goes through ``PACKAGES`` and uses the :term:`FILES`
5437 variable corresponding to each package to assign files to the
5438 package. If a file matches the ``FILES`` variable for more than one
5439 package in ``PACKAGES``, it will be assigned to the earliest
5440 (leftmost) package.
5441
5442 Packages in the variable's list that are empty (i.e. where none of
5443 the patterns in ``FILES_``\ pkg match any files installed by the
5444 :ref:`ref-tasks-install` task) are not generated,
5445 unless generation is forced through the
5446 :term:`ALLOW_EMPTY` variable.
5447
Andrew Geisslerf0343792020-11-18 10:42:21 -06005448 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005449 A promise that your recipe satisfies runtime dependencies for
5450 optional modules that are found in other recipes.
5451 ``PACKAGES_DYNAMIC`` does not actually satisfy the dependencies, it
5452 only states that they should be satisfied. For example, if a hard,
5453 runtime dependency (:term:`RDEPENDS`) of another
5454 package is satisfied at build time through the ``PACKAGES_DYNAMIC``
5455 variable, but a package with the module name is never actually
5456 produced, then the other package will be broken. Thus, if you attempt
5457 to include that package in an image, you will get a dependency
5458 failure from the packaging system during the
5459 :ref:`ref-tasks-rootfs` task.
5460
5461 Typically, if there is a chance that such a situation can occur and
5462 the package that is not created is valid without the dependency being
5463 satisfied, then you should use :term:`RRECOMMENDS`
5464 (a soft runtime dependency) instead of ``RDEPENDS``.
5465
5466 For an example of how to use the ``PACKAGES_DYNAMIC`` variable when
5467 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005468 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005469 section in the Yocto Project Development Tasks Manual.
5470
Andrew Geisslerf0343792020-11-18 10:42:21 -06005471 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005472 Specifies a list of functions run to perform additional splitting of
5473 files into individual packages. Recipes can either prepend to this
5474 variable or prepend to the ``populate_packages`` function in order to
5475 perform additional package splitting. In either case, the function
5476 should set :term:`PACKAGES`,
5477 :term:`FILES`, :term:`RDEPENDS` and
5478 other packaging variables appropriately in order to perform the
5479 desired splitting.
5480
Andrew Geisslerf0343792020-11-18 10:42:21 -06005481 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005482 Extra options passed to the ``make`` command during the
5483 :ref:`ref-tasks-compile` task in order to specify
5484 parallel compilation on the local build host. This variable is
5485 usually in the form "-j x", where x represents the maximum number of
5486 parallel threads ``make`` can run.
5487
5488 .. note::
5489
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005490 In order for ``PARALLEL_MAKE`` to be effective, ``make`` must be
5491 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5492 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005493
5494 By default, the OpenEmbedded build system automatically sets this
5495 variable to be equal to the number of cores the build system uses.
5496
5497 .. note::
5498
5499 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005500 the ``do_compile`` task that result in race conditions, you can clear
5501 the ``PARALLEL_MAKE`` variable within the recipe as a workaround. For
5502 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005503 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005504 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005505
5506 For single socket systems (i.e. one CPU), you should not have to
5507 override this variable to gain optimal parallelism during builds.
5508 However, if you have very large systems that employ multiple physical
5509 CPUs, you might want to make sure the ``PARALLEL_MAKE`` variable is
5510 not set higher than "-j 20".
5511
5512 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005513 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005514 section in the Yocto Project Development Tasks Manual.
5515
Andrew Geisslerf0343792020-11-18 10:42:21 -06005516 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005517 Extra options passed to the ``make install`` command during the
5518 :ref:`ref-tasks-install` task in order to specify
5519 parallel installation. This variable defaults to the value of
5520 :term:`PARALLEL_MAKE`.
5521
5522 .. note::
5523
5524 In order for ``PARALLEL_MAKEINST`` to be effective, ``make`` must
5525 be called with
5526 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5527 way to ensure this is to use the ``oe_runmake`` function.
5528
5529 If the software being built experiences dependency issues during
5530 the ``do_install`` task that result in race conditions, you can
5531 clear the ``PARALLEL_MAKEINST`` variable within the recipe as a
5532 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005533 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005534 section in the Yocto Project Development Tasks Manual.
5535
Andrew Geisslerf0343792020-11-18 10:42:21 -06005536 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005537 Determines the action to take when a patch fails. You can set this
5538 variable to one of two values: "noop" and "user".
5539
5540 The default value of "noop" causes the build to simply fail when the
5541 OpenEmbedded build system cannot successfully apply a patch. Setting
5542 the value to "user" causes the build system to launch a shell and
5543 places you in the right location so that you can manually resolve the
5544 conflicts.
5545
5546 Set this variable in your ``local.conf`` file.
5547
Andrew Geisslerf0343792020-11-18 10:42:21 -06005548 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005549 Specifies the utility used to apply patches for a recipe during the
5550 :ref:`ref-tasks-patch` task. You can specify one of
5551 three utilities: "patch", "quilt", or "git". The default utility used
5552 is "quilt" except for the quilt-native recipe itself. Because the
5553 quilt tool is not available at the time quilt-native is being
5554 patched, it uses "patch".
5555
5556 If you wish to use an alternative patching tool, set the variable in
5557 the recipe using one of the following:
5558 ::
5559
5560 PATCHTOOL = "patch"
5561 PATCHTOOL = "quilt"
5562 PATCHTOOL = "git"
5563
Andrew Geisslerf0343792020-11-18 10:42:21 -06005564 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005565 The epoch of the recipe. By default, this variable is unset. The
5566 variable is used to make upgrades possible when the versioning scheme
5567 changes in some backwards incompatible way.
5568
5569 ``PE`` is the default value of the :term:`PKGE` variable.
5570
Andrew Geisslerf0343792020-11-18 10:42:21 -06005571 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005572 Specifies the recipe or package name and includes all version and
5573 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5574 ``bash-4.2-r1/``). This variable is comprised of the following:
5575 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5576
Andrew Geisslerf0343792020-11-18 10:42:21 -06005577 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005578 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5579 class, this variable identifies packages that contain the pixbuf
5580 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5581 class assumes that the loaders are in the recipe's main package (i.e.
5582 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5583 loaders you need are in a package other than that main package.
5584
Andrew Geisslerf0343792020-11-18 10:42:21 -06005585 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005586 The name of the resulting package created by the OpenEmbedded build
5587 system.
5588
5589 .. note::
5590
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005591 When using the ``PKG`` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005592
5593 For example, when the :ref:`debian <ref-classes-debian>` class
5594 renames the output package, it does so by setting
5595 ``PKG_packagename``.
5596
Andrew Geisslerf0343792020-11-18 10:42:21 -06005597 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005598 The path to ``pkg-config`` files for the current build context.
5599 ``pkg-config`` reads this variable from the environment.
5600
Andrew Geisslerf0343792020-11-18 10:42:21 -06005601 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005602 Points to the destination directory for files to be packaged before
5603 they are split into individual packages. This directory defaults to
5604 the following:
5605 ::
5606
5607 ${WORKDIR}/package
5608
5609 Do not change this default.
5610
Andrew Geisslerf0343792020-11-18 10:42:21 -06005611 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005612 Points to a shared, global-state directory that holds data generated
5613 during the packaging process. During the packaging process, the
5614 :ref:`ref-tasks-packagedata` task packages data
5615 for each recipe and installs it into this temporary, shared area.
5616 This directory defaults to the following, which you should not
5617 change:
5618 ::
5619
5620 ${STAGING_DIR_HOST}/pkgdata
5621
5622 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005623 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005624 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005625 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005626 section in the Yocto Project Development Tasks Manual. For more
5627 information on the shared, global-state directory, see
5628 :term:`STAGING_DIR_HOST`.
5629
Andrew Geisslerf0343792020-11-18 10:42:21 -06005630 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005631 Points to the parent directory for files to be packaged after they
5632 have been split into individual packages. This directory defaults to
5633 the following:
5634 ::
5635
5636 ${WORKDIR}/packages-split
5637
5638 Under this directory, the build system creates directories for each
5639 package specified in :term:`PACKAGES`. Do not change
5640 this default.
5641
Andrew Geisslerf0343792020-11-18 10:42:21 -06005642 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005643 Points to a temporary work area where the
5644 :ref:`ref-tasks-package` task saves package metadata.
5645 The ``PKGDESTWORK`` location defaults to the following:
5646 ::
5647
5648 ${WORKDIR}/pkgdata
5649
5650 Do not change this default.
5651
5652 The :ref:`ref-tasks-packagedata` task copies the
5653 package metadata from ``PKGDESTWORK`` to
5654 :term:`PKGDATA_DIR` to make it available globally.
5655
Andrew Geisslerf0343792020-11-18 10:42:21 -06005656 :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005657 The epoch of the package(s) built by the recipe. By default, ``PKGE``
5658 is set to :term:`PE`.
5659
Andrew Geisslerf0343792020-11-18 10:42:21 -06005660 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005661 The revision of the package(s) built by the recipe. By default,
5662 ``PKGR`` is set to :term:`PR`.
5663
Andrew Geisslerf0343792020-11-18 10:42:21 -06005664 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005665 The version of the package(s) built by the recipe. By default,
5666 ``PKGV`` is set to :term:`PV`.
5667
Andrew Geisslerf0343792020-11-18 10:42:21 -06005668 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005669 This variable can have two separate functions depending on the
5670 context: a recipe name or a resulting package name.
5671
5672 ``PN`` refers to a recipe name in the context of a file used by the
5673 OpenEmbedded build system as input to create a package. The name is
5674 normally extracted from the recipe file name. For example, if the
5675 recipe is named ``expat_2.0.1.bb``, then the default value of ``PN``
5676 will be "expat".
5677
5678 The variable refers to a package name in the context of a file
5679 created or produced by the OpenEmbedded build system.
5680
5681 If applicable, the ``PN`` variable also contains any special suffix
5682 or prefix. For example, using ``bash`` to build packages for the
5683 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build
5684 packages for the target and for Multilib, ``PN`` would be ``bash``
5685 and ``lib64-bash``, respectively.
5686
Andrew Geisslerf0343792020-11-18 10:42:21 -06005687 :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005688 Lists recipes you do not want the OpenEmbedded build system to build.
5689 This variable works in conjunction with the
5690 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited
5691 globally.
5692
5693 To prevent a recipe from being built, use the ``PNBLACKLIST``
5694 variable in your ``local.conf`` file. Here is an example that
5695 prevents ``myrecipe`` from being built:
5696 ::
5697
5698 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5699
Andrew Geisslerf0343792020-11-18 10:42:21 -06005700 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005701 Specifies a list of functions to call once the OpenEmbedded build
5702 system has created the host part of the SDK. You can specify
5703 functions separated by semicolons:
5704 ::
5705
5706 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5707
5708 If you need to pass the SDK path to a command within a function, you
5709 can use ``${SDK_DIR}``, which points to the parent directory used by
5710 the OpenEmbedded build system when creating SDK output. See the
5711 :term:`SDK_DIR` variable for more information.
5712
Andrew Geisslerf0343792020-11-18 10:42:21 -06005713 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005714 Specifies a list of functions to call once the OpenEmbedded build
5715 system has created the target part of the SDK. You can specify
5716 functions separated by semicolons:
5717 ::
5718
5719 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5720
5721 If you need to pass the SDK path to a command within a function, you
5722 can use ``${SDK_DIR}``, which points to the parent directory used by
5723 the OpenEmbedded build system when creating SDK output. See the
5724 :term:`SDK_DIR` variable for more information.
5725
Andrew Geisslerf0343792020-11-18 10:42:21 -06005726 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005727 The revision of the recipe. The default value for this variable is
5728 "r0". Subsequent revisions of the recipe conventionally have the
5729 values "r1", "r2", and so forth. When :term:`PV` increases,
5730 ``PR`` is conventionally reset to "r0".
5731
5732 .. note::
5733
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005734 The OpenEmbedded build system does not need the aid of ``PR``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005735 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005736 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005737 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005738 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005739 mechanisms.
5740
5741 The ``PR`` variable primarily becomes significant when a package
5742 manager dynamically installs packages on an already built image. In
5743 this case, ``PR``, which is the default value of
5744 :term:`PKGR`, helps the package manager distinguish which
5745 package is the most recent one in cases where many packages have the
5746 same ``PV`` (i.e. ``PKGV``). A component having many packages with
5747 the same ``PV`` usually means that the packages all install the same
5748 upstream version, but with later (``PR``) version packages including
5749 packaging fixes.
5750
5751 .. note::
5752
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005753 ``PR`` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005754 package contents or metadata.
5755
5756 Because manually managing ``PR`` can be cumbersome and error-prone,
5757 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005758 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005759 in the Yocto Project Development Tasks Manual for more information.
5760
Andrew Geisslerf0343792020-11-18 10:42:21 -06005761 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005762 If multiple recipes provide the same item, this variable determines
5763 which recipe is preferred and thus provides the item (i.e. the
5764 preferred provider). You should always suffix this variable with the
5765 name of the provided item. And, you should define the variable using
5766 the preferred recipe's name (:term:`PN`). Here is a common
5767 example:
5768 ::
5769
5770 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5771
5772 In the previous example, multiple recipes are providing "virtual/kernel".
5773 The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of
5774 the recipe you prefer to provide "virtual/kernel".
5775
5776 Following are more examples:
5777 ::
5778
5779 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5780 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5781
5782 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005783 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005784 section in the Yocto Project Development Tasks Manual.
5785
5786 .. note::
5787
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005788 If you use a ``virtual/\*`` item with ``PREFERRED_PROVIDER``, then any
5789 recipe that :term:`PROVIDES` that item but is not selected (defined)
5790 by ``PREFERRED_PROVIDER`` is prevented from building, which is usually
5791 desirable since this mechanism is designed to select between mutually
5792 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005793
Andrew Geisslerf0343792020-11-18 10:42:21 -06005794 :term:`PREFERRED_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005795 If multiple versions of recipes exist, this variable determines which
5796 version is given preference. You must always suffix the variable with
5797 the :term:`PN` you want to select, and you should set the
5798 :term:`PV` accordingly for precedence.
5799
5800 The ``PREFERRED_VERSION`` variable supports limited wildcard use
5801 through the "``%``" character. You can use the character to match any
5802 number of characters, which can be useful when specifying versions
5803 that contain long revision numbers that potentially change. Here are
5804 two examples:
5805 ::
5806
5807 PREFERRED_VERSION_python = "3.4.0"
5808 PREFERRED_VERSION_linux-yocto = "5.0%"
5809
5810 .. note::
5811
5812 The use of the "%" character is limited in that it only works at the end of the
5813 string. You cannot use the wildcard character in any other
5814 location of the string.
5815
5816 The specified version is matched against :term:`PV`, which
5817 does not necessarily match the version part of the recipe's filename.
5818 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
5819 where ``foo_git.bb`` contains the following assignment:
5820 ::
5821
5822 PV = "1.1+git${SRCPV}"
5823
5824 In this case, the correct way to select
5825 ``foo_git.bb`` is by using an assignment such as the following:
5826 ::
5827
5828 PREFERRED_VERSION_foo = "1.1+git%"
5829
5830 Compare that previous example
5831 against the following incorrect example, which does not work:
5832 ::
5833
5834 PREFERRED_VERSION_foo = "git"
5835
5836 Sometimes the ``PREFERRED_VERSION`` variable can be set by
5837 configuration files in a way that is hard to change. You can use
5838 :term:`OVERRIDES` to set a machine-specific
5839 override. Here is an example:
5840 ::
5841
5842 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%"
5843
5844 Although not recommended, worst case, you can also use the
5845 "forcevariable" override, which is the strongest override possible.
5846 Here is an example:
5847 ::
5848
5849 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%"
5850
5851 .. note::
5852
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005853 The ``\_forcevariable`` override is not handled specially. This override
5854 only works because the default value of ``OVERRIDES`` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005855
Andrew Geisslerf0343792020-11-18 10:42:21 -06005856 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005857 Specifies additional paths from which the OpenEmbedded build system
5858 gets source code. When the build system searches for source code, it
5859 first tries the local download directory. If that location fails, the
5860 build system tries locations defined by ``PREMIRRORS``, the upstream
5861 source, and then locations specified by
5862 :term:`MIRRORS` in that order.
5863
5864 Assuming your distribution (:term:`DISTRO`) is "poky",
5865 the default value for ``PREMIRRORS`` is defined in the
5866 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5867
5868 Typically, you could add a specific server for the build system to
5869 attempt before any others by adding something like the following to
5870 the ``local.conf`` configuration file in the
5871 :term:`Build Directory`:
5872 ::
5873
5874 PREMIRRORS_prepend = "\
5875 git://.*/.* http://www.yoctoproject.org/sources/ \n \
5876 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
5877 http://.*/.* http://www.yoctoproject.org/sources/ \n \
5878 https://.*/.* http://www.yoctoproject.org/sources/ \n"
5879
5880 These changes cause the
5881 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5882 direct them to the ``http://`` sources mirror. You can use
5883 ``file://`` URLs to point to local directories or network shares as
5884 well.
5885
Andrew Geisslerf0343792020-11-18 10:42:21 -06005886 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005887 Indicates the importance of a package.
5888
5889 ``PRIORITY`` is considered to be part of the distribution policy
5890 because the importance of any given recipe depends on the purpose for
5891 which the distribution is being produced. Thus, ``PRIORITY`` is not
5892 normally set within recipes.
5893
5894 You can set ``PRIORITY`` to "required", "standard", "extra", and
5895 "optional", which is the default.
5896
Andrew Geisslerf0343792020-11-18 10:42:21 -06005897 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005898 Specifies libraries installed within a recipe that should be ignored
5899 by the OpenEmbedded build system's shared library resolver. This
5900 variable is typically used when software being built by a recipe has
5901 its own private versions of a library normally provided by another
5902 recipe. In this case, you would not want the package containing the
5903 private libraries to be set as a dependency on other unrelated
5904 packages that should instead depend on the package providing the
5905 standard version of the library.
5906
5907 Libraries specified in this variable should be specified by their
5908 file name. For example, from the Firefox recipe in meta-browser:
5909 ::
5910
5911 PRIVATE_LIBS = "libmozjs.so \
5912 libxpcom.so \
5913 libnspr4.so \
5914 libxul.so \
5915 libmozalloc.so \
5916 libplc4.so \
5917 libplds4.so"
5918
5919 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005920 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005921 section in the Yocto Project Overview and Concepts Manual.
5922
Andrew Geisslerf0343792020-11-18 10:42:21 -06005923 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005924 A list of aliases by which a particular recipe can be known. By
5925 default, a recipe's own ``PN`` is implicitly already in its
5926 ``PROVIDES`` list and therefore does not need to mention that it
5927 provides itself. If a recipe uses ``PROVIDES``, the additional
5928 aliases are synonyms for the recipe and can be useful for satisfying
5929 dependencies of other recipes during the build as specified by
5930 ``DEPENDS``.
5931
5932 Consider the following example ``PROVIDES`` statement from the recipe
5933 file ``eudev_3.2.9.bb``:
5934 ::
5935
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005936 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005937
5938 The ``PROVIDES`` statement
5939 results in the "eudev" recipe also being available as simply "udev".
5940
5941 .. note::
5942
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005943 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
5944 to `PROVIDES`, so while using "+=" in the above example may not be
5945 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005946
5947 In addition to providing recipes under alternate names, the
5948 ``PROVIDES`` mechanism is also used to implement virtual targets. A
5949 virtual target is a name that corresponds to some particular
5950 functionality (e.g. a Linux kernel). Recipes that provide the
5951 functionality in question list the virtual target in ``PROVIDES``.
5952 Recipes that depend on the functionality in question can include the
5953 virtual target in ``DEPENDS`` to leave the choice of provider open.
5954
5955 Conventionally, virtual targets have names on the form
5956 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5957 of the name and has no syntactical significance.
5958
5959 The :term:`PREFERRED_PROVIDER` variable is
5960 used to select which particular recipe provides a virtual target.
5961
5962 .. note::
5963
5964 A corresponding mechanism for virtual runtime dependencies
5965 (packages) exists. However, the mechanism does not depend on any
5966 special functionality beyond ordinary variable assignments. For
5967 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5968 the component that manages the ``/dev`` directory.
5969
5970 Setting the "preferred provider" for runtime dependencies is as
5971 simple as using the following assignment in a configuration file:
5972 ::
5973
5974 VIRTUAL-RUNTIME_dev_manager = "udev"
5975
5976
Andrew Geisslerf0343792020-11-18 10:42:21 -06005977 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005978 The network based :term:`PR` service host and port.
5979
5980 The ``conf/local.conf.sample.extended`` configuration file in the
5981 :term:`Source Directory` shows how the
5982 ``PRSERV_HOST`` variable is set:
5983 ::
5984
5985 PRSERV_HOST = "localhost:0"
5986
5987 You must
5988 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06005989 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005990 set ``PRSERV_HOST`` to other values to use a remote PR service.
5991
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005992
5993 :term:`PSEUDO_IGNORE_PATHS`
5994 A comma-separated (without spaces) list of path prefixes that should be ignored
5995 by pseudo when monitoring and recording file operations, in order to avoid
5996 problems with files being written to outside of the pseudo context and
5997 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
5998 and can include partial directory (or file) names.
5999
6000
Andrew Geisslerf0343792020-11-18 10:42:21 -06006001 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006002 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006003 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006004 functionality is enabled when building a recipe. You should not set
6005 this variable directly. Enabling and disabling building Package Tests
6006 at build time should be done by adding "ptest" to (or removing it
6007 from) :term:`DISTRO_FEATURES`.
6008
Andrew Geisslerf0343792020-11-18 10:42:21 -06006009 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006010 The version of the recipe. The version is normally extracted from the
6011 recipe filename. For example, if the recipe is named
6012 ``expat_2.0.1.bb``, then the default value of ``PV`` will be "2.0.1".
6013 ``PV`` is generally not overridden within a recipe unless it is
6014 building an unstable (i.e. development) version from a source code
6015 repository (e.g. Git or Subversion).
6016
6017 ``PV`` is the default value of the :term:`PKGV` variable.
6018
Andrew Geisslerf0343792020-11-18 10:42:21 -06006019 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006020 When used by recipes that inherit the
6021 :ref:`distutils3 <ref-classes-distutils3>`,
6022 :ref:`setuptools3 <ref-classes-setuptools3>`,
6023 :ref:`distutils <ref-classes-distutils>`, or
6024 :ref:`setuptools <ref-classes-setuptools>` classes, denotes the
6025 Application Binary Interface (ABI) currently in use for Python. By
6026 default, the ABI is "m". You do not have to set this variable as the
6027 OpenEmbedded build system sets it for you.
6028
6029 The OpenEmbedded build system uses the ABI to construct directory
6030 names used when installing the Python headers and libraries in
6031 sysroot (e.g. ``.../python3.3m/...``).
6032
6033 Recipes that inherit the ``distutils`` class during cross-builds also
6034 use this variable to locate the headers and libraries of the
6035 appropriate Python that the extension is targeting.
6036
Andrew Geisslerf0343792020-11-18 10:42:21 -06006037 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006038 When used by recipes that inherit the
6039 `distutils3 <ref-classes-distutils3>`,
6040 :ref:`setuptools3 <ref-classes-setuptools3>`,
6041 :ref:`distutils <ref-classes-distutils>`, or
6042 :ref:`setuptools <ref-classes-setuptools>` classes, specifies the
6043 major Python version being built. For Python 3.x, ``PYTHON_PN`` would
6044 be "python3". You do not have to set this variable as the
6045 OpenEmbedded build system automatically sets it for you.
6046
6047 The variable allows recipes to use common infrastructure such as the
6048 following:
6049 ::
6050
6051 DEPENDS += "${PYTHON_PN}-native"
6052
6053 In the previous example,
6054 the version of the dependency is ``PYTHON_PN``.
6055
Andrew Geisslerf0343792020-11-18 10:42:21 -06006056 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006057 The minimal command and arguments to run ``ranlib``.
6058
Andrew Geisslerf0343792020-11-18 10:42:21 -06006059 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006060 The list of packages that conflict with packages. Note that packages
6061 will not be installed if conflicting packages are not first removed.
6062
6063 Like all package-controlling variables, you must always use them in
6064 conjunction with a package name override. Here is an example:
6065 ::
6066
6067 RCONFLICTS_${PN} = "another_conflicting_package_name"
6068
6069 BitBake, which the OpenEmbedded build system uses, supports
6070 specifying versioned dependencies. Although the syntax varies
6071 depending on the packaging format, BitBake hides these differences
6072 from you. Here is the general syntax to specify versions with the
6073 ``RCONFLICTS`` variable:
6074 ::
6075
6076 RCONFLICTS_${PN} = "package (operator version)"
6077
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006078 For ``operator``, you can specify the following:
6079
6080 - =
6081 - <
6082 - >
6083 - <=
6084 - >=
6085
6086 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006087 greater of the package ``foo``:
6088 ::
6089
6090 RCONFLICTS_${PN} = "foo (>= 1.2)"
6091
Andrew Geisslerf0343792020-11-18 10:42:21 -06006092 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006093 Lists runtime dependencies of a package. These dependencies are other
6094 packages that must be installed in order for the package to function
6095 correctly. As an example, the following assignment declares that the
6096 package ``foo`` needs the packages ``bar`` and ``baz`` to be
6097 installed:
6098 ::
6099
6100 RDEPENDS_foo = "bar baz"
6101
6102 The most common types of package
6103 runtime dependencies are automatically detected and added. Therefore,
6104 most recipes do not need to set ``RDEPENDS``. For more information,
6105 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006106 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006107 section in the Yocto Project Overview and Concepts Manual.
6108
6109 The practical effect of the above ``RDEPENDS`` assignment is that
6110 ``bar`` and ``baz`` will be declared as dependencies inside the
6111 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006112 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006113 Exactly how this is done depends on which package format is used,
6114 which is determined by
6115 :term:`PACKAGE_CLASSES`. When the
6116 corresponding package manager installs the package, it will know to
6117 also install the packages on which it depends.
6118
6119 To ensure that the packages ``bar`` and ``baz`` get built, the
6120 previous ``RDEPENDS`` assignment also causes a task dependency to be
6121 added. This dependency is from the recipe's
6122 :ref:`ref-tasks-build` (not to be confused with
6123 :ref:`ref-tasks-compile`) task to the
6124 ``do_package_write_*`` task of the recipes that build ``bar`` and
6125 ``baz``.
6126
6127 The names of the packages you list within ``RDEPENDS`` must be the
6128 names of other packages - they cannot be recipe names. Although
6129 package names and recipe names usually match, the important point
6130 here is that you are providing package names within the ``RDEPENDS``
6131 variable. For an example of the default list of packages created from
6132 a recipe, see the :term:`PACKAGES` variable.
6133
6134 Because the ``RDEPENDS`` variable applies to packages being built,
6135 you should always use the variable in a form with an attached package
6136 name (remember that a single recipe can build multiple packages). For
6137 example, suppose you are building a development package that depends
6138 on the ``perl`` package. In this case, you would use the following
6139 ``RDEPENDS`` statement:
6140 ::
6141
6142 RDEPENDS_${PN}-dev += "perl"
6143
6144 In the example,
6145 the development package depends on the ``perl`` package. Thus, the
6146 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of
6147 the variable.
6148
6149 .. note::
6150
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006151 ``RDEPENDS_${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006152 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006153 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
6154 ``${PN}`` when modifying ``RDEPENDS_${PN}-dev``. Use the "+=" operator
6155 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006156
6157 The package names you use with ``RDEPENDS`` must appear as they would
6158 in the ``PACKAGES`` variable. The :term:`PKG` variable
6159 allows a different name to be used for the final package (e.g. the
6160 :ref:`debian <ref-classes-debian>` class uses this to rename
6161 packages), but this final package name cannot be used with
6162 ``RDEPENDS``, which makes sense as ``RDEPENDS`` is meant to be
6163 independent of the package format used.
6164
6165 BitBake, which the OpenEmbedded build system uses, supports
6166 specifying versioned dependencies. Although the syntax varies
6167 depending on the packaging format, BitBake hides these differences
6168 from you. Here is the general syntax to specify versions with the
6169 ``RDEPENDS`` variable:
6170 ::
6171
6172 RDEPENDS_${PN} = "package (operator version)"
6173
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006174 For ``operator``, you can specify the following:
6175
6176 - =
6177 - <
6178 - >
6179 - <=
6180 - >=
6181
6182 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006183
6184 .. note::
6185
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006186 You can use ``EXTENDPKGV`` to provide a full package version
6187 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006188
6189 For example, the following sets up a dependency on version 1.2 or
6190 greater of the package ``foo``:
6191 ::
6192
6193 RDEPENDS_${PN} = "foo (>= 1.2)"
6194
6195 For information on build-time dependencies, see the
6196 :term:`DEPENDS` variable. You can also see the
6197 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
6198 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
6199 BitBake User Manual for additional information on tasks and
6200 dependencies.
6201
Andrew Geisslerf0343792020-11-18 10:42:21 -06006202 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006204 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006205 class, this variable identifies distribution features that must exist
6206 in the current configuration in order for the OpenEmbedded build
6207 system to build the recipe. In other words, if the
6208 ``REQUIRED_DISTRO_FEATURES`` variable lists a feature that does not
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006209 appear in ``DISTRO_FEATURES`` within the current configuration, then
6210 the recipe will be skipped, and if the build system attempts to build
6211 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006212
Andrew Geisslerf0343792020-11-18 10:42:21 -06006213 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006214 With ``rm_work`` enabled, this variable specifies a list of recipes
6215 whose work directories should not be removed. See the
6216 ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more
6217 details.
6218
Andrew Geisslerf0343792020-11-18 10:42:21 -06006219 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006220 Defines the root home directory. By default, this directory is set as
6221 follows in the BitBake configuration file:
6222 ::
6223
6224 ROOT_HOME ??= "/home/root"
6225
6226 .. note::
6227
6228 This default value is likely used because some embedded solutions
6229 prefer to have a read-only root filesystem and prefer to keep
6230 writeable data in one place.
6231
6232 You can override the default by setting the variable in any layer or
6233 in the ``local.conf`` file. Because the default is set using a "weak"
6234 assignment (i.e. "??="), you can use either of the following forms to
6235 define your override:
6236 ::
6237
6238 ROOT_HOME = "/root"
6239 ROOT_HOME ?= "/root"
6240
6241 These
6242 override examples use ``/root``, which is probably the most commonly
6243 used override.
6244
Andrew Geisslerf0343792020-11-18 10:42:21 -06006245 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006246 Indicates a filesystem image to include as the root filesystem.
6247
6248 The ``ROOTFS`` variable is an optional variable used with the
6249 :ref:`image-live <ref-classes-image-live>` class.
6250
Andrew Geisslerf0343792020-11-18 10:42:21 -06006251 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006252 Specifies a list of functions to call after the OpenEmbedded build
6253 system has installed packages. You can specify functions separated by
6254 semicolons:
6255 ::
6256
6257 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6258
6259 If you need to pass the root filesystem path to a command within a
6260 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6261 directory that becomes the root filesystem image. See the
6262 :term:`IMAGE_ROOTFS` variable for more
6263 information.
6264
Andrew Geisslerf0343792020-11-18 10:42:21 -06006265 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006266 Specifies a list of functions to call once the OpenEmbedded build
6267 system has created the root filesystem. You can specify functions
6268 separated by semicolons:
6269 ::
6270
6271 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6272
6273 If you need to pass the root filesystem path to a command within a
6274 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6275 directory that becomes the root filesystem image. See the
6276 :term:`IMAGE_ROOTFS` variable for more
6277 information.
6278
Andrew Geisslerf0343792020-11-18 10:42:21 -06006279 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006280 Specifies a list of functions to call after the OpenEmbedded build
6281 system has removed unnecessary packages. When runtime package
6282 management is disabled in the image, several packages are removed
6283 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
6284 You can specify functions separated by semicolons:
6285 ::
6286
6287 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6288
6289 If you need to pass the root filesystem path to a command within a
6290 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6291 directory that becomes the root filesystem image. See the
6292 :term:`IMAGE_ROOTFS` variable for more
6293 information.
6294
Andrew Geisslerf0343792020-11-18 10:42:21 -06006295 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006296 Specifies a list of functions to call before the OpenEmbedded build
6297 system has created the root filesystem. You can specify functions
6298 separated by semicolons:
6299 ::
6300
6301 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6302
6303 If you need to pass the root filesystem path to a command within a
6304 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6305 directory that becomes the root filesystem image. See the
6306 :term:`IMAGE_ROOTFS` variable for more
6307 information.
6308
Andrew Geisslerf0343792020-11-18 10:42:21 -06006309 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006310 A list of package name aliases that a package also provides. These
6311 aliases are useful for satisfying runtime dependencies of other
6312 packages both during the build and on the target (as specified by
6313 ``RDEPENDS``).
6314
6315 .. note::
6316
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006317 A package's own name is implicitly already in its ``RPROVIDES`` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006318
6319 As with all package-controlling variables, you must always use the
6320 variable in conjunction with a package name override. Here is an
6321 example:
6322 ::
6323
6324 RPROVIDES_${PN} = "widget-abi-2"
6325
Andrew Geisslerf0343792020-11-18 10:42:21 -06006326 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006327 A list of packages that extends the usability of a package being
6328 built. The package being built does not depend on this list of
6329 packages in order to successfully build, but rather uses them for
6330 extended usability. To specify runtime dependencies for packages, see
6331 the ``RDEPENDS`` variable.
6332
6333 The package manager will automatically install the ``RRECOMMENDS``
6334 list of packages when installing the built package. However, you can
6335 prevent listed packages from being installed by using the
6336 :term:`BAD_RECOMMENDATIONS`,
6337 :term:`NO_RECOMMENDATIONS`, and
6338 :term:`PACKAGE_EXCLUDE` variables.
6339
6340 Packages specified in ``RRECOMMENDS`` need not actually be produced.
6341 However, a recipe must exist that provides each package, either
6342 through the :term:`PACKAGES` or
6343 :term:`PACKAGES_DYNAMIC` variables or the
6344 :term:`RPROVIDES` variable, or an error will occur
6345 during the build. If such a recipe does exist and the package is not
6346 produced, the build continues without error.
6347
6348 Because the ``RRECOMMENDS`` variable applies to packages being built,
6349 you should always attach an override to the variable to specify the
6350 particular package whose usability is being extended. For example,
6351 suppose you are building a development package that is extended to
6352 support wireless functionality. In this case, you would use the
6353 following:
6354 ::
6355
6356 RRECOMMENDS_${PN}-dev += "wireless_package_name"
6357
6358 In the
6359 example, the package name (``${PN}-dev``) must appear as it would in
6360 the ``PACKAGES`` namespace before any renaming of the output package
6361 by classes such as ``debian.bbclass``.
6362
6363 BitBake, which the OpenEmbedded build system uses, supports
6364 specifying versioned recommends. Although the syntax varies depending
6365 on the packaging format, BitBake hides these differences from you.
6366 Here is the general syntax to specify versions with the
6367 ``RRECOMMENDS`` variable:
6368 ::
6369
6370 RRECOMMENDS_${PN} = "package (operator version)"
6371
6372 For ``operator``, you can specify the following:
6373
6374 - =
6375 - <
6376 - >
6377 - <=
6378 - >=
6379
6380 For example, the following sets up a recommend on version 1.2 or
6381 greater of the package ``foo``:
6382 ::
6383
6384 RRECOMMENDS_${PN} = "foo (>= 1.2)"
6385
Andrew Geisslerf0343792020-11-18 10:42:21 -06006386 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006387 A list of packages replaced by a package. The package manager uses
6388 this variable to determine which package should be installed to
6389 replace other package(s) during an upgrade. In order to also have the
6390 other package(s) removed at the same time, you must add the name of
6391 the other package to the ``RCONFLICTS`` variable.
6392
6393 As with all package-controlling variables, you must use this variable
6394 in conjunction with a package name override. Here is an example:
6395 ::
6396
6397 RREPLACES_${PN} = "other_package_being_replaced"
6398
6399 BitBake, which the OpenEmbedded build system uses, supports
6400 specifying versioned replacements. Although the syntax varies
6401 depending on the packaging format, BitBake hides these differences
6402 from you. Here is the general syntax to specify versions with the
6403 ``RREPLACES`` variable:
6404 ::
6405
6406 RREPLACES_${PN} = "package (operator version)"
6407
6408 For ``operator``, you can specify the following:
6409
6410 - =
6411 - <
6412 - >
6413 - <=
6414 - >=
6415
6416 For example, the following sets up a replacement using version 1.2
6417 or greater of the package ``foo``:
6418 ::
6419
6420 RREPLACES_${PN} = "foo (>= 1.2)"
6421
Andrew Geisslerf0343792020-11-18 10:42:21 -06006422 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006423 A list of additional packages that you can suggest for installation
6424 by the package manager at the time a package is installed. Not all
6425 package managers support this functionality.
6426
6427 As with all package-controlling variables, you must always use this
6428 variable in conjunction with a package name override. Here is an
6429 example:
6430 ::
6431
6432 RSUGGESTS_${PN} = "useful_package another_package"
6433
Andrew Geisslerf0343792020-11-18 10:42:21 -06006434 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006435 The location in the :term:`Build Directory` where
6436 unpacked recipe source code resides. By default, this directory is
6437 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6438 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6439 version. If the source tarball extracts the code to a directory named
6440 anything other than ``${BPN}-${PV}``, or if the source code is
6441 fetched from an SCM such as Git or Subversion, then you must set
6442 ``S`` in the recipe so that the OpenEmbedded build system knows where
6443 to find the unpacked source.
6444
6445 As an example, assume a :term:`Source Directory`
6446 top-level folder named ``poky`` and a default Build Directory at
6447 ``poky/build``. In this case, the work directory the build system
6448 uses to keep the unpacked recipe for ``db`` is the following:
6449 ::
6450
6451 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6452
6453 The unpacked source code resides in the ``db-5.1.19`` folder.
6454
6455 This next example assumes a Git repository. By default, Git
6456 repositories are cloned to ``${WORKDIR}/git`` during
6457 :ref:`ref-tasks-fetch`. Since this path is different
6458 from the default value of ``S``, you must set it specifically so the
6459 source can be located:
6460 ::
6461
6462 SRC_URI = "git://path/to/repo.git"
6463 S = "${WORKDIR}/git"
6464
Andrew Geisslerf0343792020-11-18 10:42:21 -06006465 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466 Specifies a list of command-line utilities that should be checked for
6467 during the initial sanity checking process when running BitBake. If
6468 any of the utilities are not installed on the build host, then
6469 BitBake immediately exits with an error.
6470
Andrew Geisslerf0343792020-11-18 10:42:21 -06006471 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006472 A list of the host distribution identifiers that the build system has
6473 been tested against. Identifiers consist of the host distributor ID
6474 followed by the release, as reported by the ``lsb_release`` tool or
6475 as read from ``/etc/lsb-release``. Separate the list items with
6476 explicit newline characters (``\n``). If ``SANITY_TESTED_DISTROS`` is
6477 not empty and the current value of
6478 :term:`NATIVELSBSTRING` does not appear in the
6479 list, then the build system reports a warning that indicates the
6480 current host distribution has not been tested as a build host.
6481
Andrew Geisslerf0343792020-11-18 10:42:21 -06006482 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006483 The target architecture for the SDK. Typically, you do not directly
6484 set this variable. Instead, use :term:`SDKMACHINE`.
6485
Andrew Geisslerf0343792020-11-18 10:42:21 -06006486 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006487 The directory set up and used by the
6488 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6489 the SDK is deployed. The ``populate_sdk_base`` class defines
6490 ``SDK_DEPLOY`` as follows:
6491 ::
6492
6493 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6494
Andrew Geisslerf0343792020-11-18 10:42:21 -06006495 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006496 The parent directory used by the OpenEmbedded build system when
6497 creating SDK output. The
6498 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
6499 the variable as follows:
6500 ::
6501
6502 SDK_DIR = "${WORKDIR}/sdk"
6503
6504 .. note::
6505
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006506 The ``SDK_DIR`` directory is a temporary directory as it is part of
6507 ``WORKDIR``. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006508
Andrew Geisslerf0343792020-11-18 10:42:21 -06006509 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006510 Controls whether or not shared state artifacts are copied into the
6511 extensible SDK. The default value of "full" copies all of the
6512 required shared state artifacts into the extensible SDK. The value
6513 "minimal" leaves these artifacts out of the SDK.
6514
6515 .. note::
6516
6517 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006518 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6519 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006520
Andrew Geisslerf0343792020-11-18 10:42:21 -06006521 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006522 The manifest file for the host part of the SDK. This file lists all
6523 the installed packages that make up the host part of the SDK. The
6524 file contains package information on a line-per-package basis as
6525 follows:
6526 ::
6527
6528 packagename packagearch version
6529
6530 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6531 defines the manifest file as follows:
6532 ::
6533
6534 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6535
6536 The location is derived using the :term:`SDK_DEPLOY` and
6537 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6538
Andrew Geisslerf0343792020-11-18 10:42:21 -06006539 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006540 When set to "1", specifies to include the packagedata for all recipes
6541 in the "world" target in the extensible SDK. Including this data
6542 allows the ``devtool search`` command to find these recipes in search
6543 results, as well as allows the ``devtool add`` command to map
6544 dependencies more effectively.
6545
6546 .. note::
6547
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006548 Enabling the ``SDK_INCLUDE_PKGDATA``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006549 variable significantly increases build time because all of world
6550 needs to be built. Enabling the variable also slightly increases
6551 the size of the extensible SDK.
6552
Andrew Geisslerf0343792020-11-18 10:42:21 -06006553 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006554 When set to "1", specifies to include the toolchain in the extensible
6555 SDK. Including the toolchain is useful particularly when
6556 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6557 the SDK reasonably small but you still want to provide a usable
6558 toolchain. For example, suppose you want to use the toolchain from an
6559 IDE or from other tools and you do not want to perform additional
6560 steps to install the toolchain.
6561
6562 The ``SDK_INCLUDE_TOOLCHAIN`` variable defaults to "0" if
6563 ``SDK_EXT_TYPE`` is set to "minimal", and defaults to "1" if
6564 ``SDK_EXT_TYPE`` is set to "full".
6565
Andrew Geisslerf0343792020-11-18 10:42:21 -06006566 :term:`SDK_INHERIT_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567 A list of classes to remove from the :term:`INHERIT`
6568 value globally within the extensible SDK configuration. The
6569 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
6570 default value:
6571 ::
6572
6573 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
6574
6575 Some classes are not generally applicable within the extensible SDK
6576 context. You can use this variable to disable those classes.
6577
6578 For additional information on how to customize the extensible SDK's
6579 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006580 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006581 section in the Yocto Project Application Development and the
6582 Extensible Software Development Kit (eSDK) manual.
6583
Andrew Geisslerf0343792020-11-18 10:42:21 -06006584 :term:`SDK_LOCAL_CONF_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006585 A list of variables not allowed through from the OpenEmbedded build
6586 system configuration into the extensible SDK configuration. Usually,
6587 these are variables that are specific to the machine on which the
6588 build system is running and thus would be potentially problematic
6589 within the extensible SDK.
6590
6591 By default, ``SDK_LOCAL_CONF_BLACKLIST`` is set in the
6592 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
6593 excludes the following variables:
6594
6595 - :term:`CONF_VERSION`
6596 - :term:`BB_NUMBER_THREADS`
6597 - :term:`bitbake:BB_NUMBER_PARSE_THREADS`
6598 - :term:`PARALLEL_MAKE`
6599 - :term:`PRSERV_HOST`
6600 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
6601 - :term:`SSTATE_DIR` :term:`TMPDIR`
6602 - :term:`BB_SERVER_TIMEOUT`
6603
6604 For additional information on how to customize the extensible SDK's
6605 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006606 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006607 section in the Yocto Project Application Development and the
6608 Extensible Software Development Kit (eSDK) manual.
6609
Andrew Geisslerf0343792020-11-18 10:42:21 -06006610 :term:`SDK_LOCAL_CONF_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006611 A list of variables allowed through from the OpenEmbedded build
6612 system configuration into the extensible SDK configuration. By
6613 default, the list of variables is empty and is set in the
6614 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
6615
6616 This list overrides the variables specified using the
6617 :term:`SDK_LOCAL_CONF_BLACKLIST`
6618 variable as well as any variables identified by automatic
6619 blacklisting due to the "/" character being found at the start of the
6620 value, which is usually indicative of being a path and thus might not
6621 be valid on the system where the SDK is installed.
6622
6623 For additional information on how to customize the extensible SDK's
6624 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006625 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006626 section in the Yocto Project Application Development and the
6627 Extensible Software Development Kit (eSDK) manual.
6628
Andrew Geisslerf0343792020-11-18 10:42:21 -06006629 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006630 The base name for SDK output files. The name is derived from the
6631 :term:`DISTRO`, :term:`TCLIBC`,
6632 :term:`SDK_ARCH`,
6633 :term:`IMAGE_BASENAME`, and
6634 :term:`TUNE_PKGARCH` variables:
6635 ::
6636
6637 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6638
Andrew Geisslerf0343792020-11-18 10:42:21 -06006639 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006640 Specifies the operating system for which the SDK will be built. The
6641 default value is the value of :term:`BUILD_OS`.
6642
Andrew Geisslerf0343792020-11-18 10:42:21 -06006643 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006644 The location used by the OpenEmbedded build system when creating SDK
6645 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
6646 class defines the variable as follows:
6647 ::
6648
6649 SDK_DIR = "${WORKDIR}/sdk"
6650 SDK_OUTPUT = "${SDK_DIR}/image"
6651 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6652
6653 .. note::
6654
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006655 The ``SDK_OUTPUT`` directory is a temporary directory as it is part of
6656 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6657 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006658
Andrew Geisslerf0343792020-11-18 10:42:21 -06006659 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006660 Specifies a list of architectures compatible with the SDK machine.
6661 This variable is set automatically and should not normally be
6662 hand-edited. Entries are separated using spaces and listed in order
6663 of priority. The default value for ``SDK_PACKAGE_ARCHS`` is "all any
6664 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6665
Andrew Geisslerf0343792020-11-18 10:42:21 -06006666 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006667 Specifies a list of functions to call once the OpenEmbedded build
6668 system creates the SDK. You can specify functions separated by
6669 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6670
6671 If you need to pass an SDK path to a command within a function, you
6672 can use ``${SDK_DIR}``, which points to the parent directory used by
6673 the OpenEmbedded build system when creating SDK output. See the
6674 :term:`SDK_DIR` variable for more information.
6675
Andrew Geisslerf0343792020-11-18 10:42:21 -06006676 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006677 The toolchain binary prefix used for ``nativesdk`` recipes. The
6678 OpenEmbedded build system uses the ``SDK_PREFIX`` value to set the
6679 :term:`TARGET_PREFIX` when building
6680 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6681
Andrew Geisslerf0343792020-11-18 10:42:21 -06006682 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006683 A list of shared state tasks added to the extensible SDK. By default,
6684 the following tasks are added:
6685
6686 - do_populate_lic
6687 - do_package_qa
6688 - do_populate_sysroot
6689 - do_deploy
6690
6691 Despite the default value of "" for the
6692 ``SDK_RECRDEP_TASKS`` variable, the above four tasks are always added
6693 to the SDK. To specify tasks beyond these four, you need to use the
6694 ``SDK_RECRDEP_TASKS`` variable (e.g. you are defining additional
6695 tasks that are needed in order to build
6696 :term:`SDK_TARGETS`).
6697
Andrew Geisslerf0343792020-11-18 10:42:21 -06006698 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006699 Specifies the system, including the architecture and the operating
6700 system, for which the SDK will be built.
6701
6702 The OpenEmbedded build system automatically sets this variable based
6703 on :term:`SDK_ARCH`,
6704 :term:`SDK_VENDOR`, and
6705 :term:`SDK_OS`. You do not need to set the ``SDK_SYS``
6706 variable yourself.
6707
Andrew Geisslerf0343792020-11-18 10:42:21 -06006708 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006709 The manifest file for the target part of the SDK. This file lists all
6710 the installed packages that make up the target part of the SDK. The
6711 file contains package information on a line-per-package basis as
6712 follows:
6713 ::
6714
6715 packagename packagearch version
6716
6717 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6718 defines the manifest file as follows:
6719 ::
6720
6721 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6722
6723 The location is derived using the :term:`SDK_DEPLOY` and
6724 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6725
Andrew Geisslerf0343792020-11-18 10:42:21 -06006726 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006727 A list of targets to install from shared state as part of the
6728 standard or extensible SDK installation. The default value is "${PN}"
6729 (i.e. the image from which the SDK is built).
6730
6731 The ``SDK_TARGETS`` variable is an internal variable and typically
6732 would not be changed.
6733
Andrew Geisslerf0343792020-11-18 10:42:21 -06006734 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006735 The title to be printed when running the SDK installer. By default,
6736 this title is based on the :term:`DISTRO_NAME` or
6737 :term:`DISTRO` variable and is set in the
6738 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6739 follows:
6740 ::
6741
6742 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6743
6744 For the default distribution "poky",
6745 ``SDK_TITLE`` is set to "Poky (Yocto Project Reference Distro)".
6746
6747 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006748 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006749 section in the Yocto Project Application Development and the
6750 Extensible Software Development Kit (eSDK) manual.
6751
Andrew Geisslerf0343792020-11-18 10:42:21 -06006752 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006753 An optional URL for an update server for the extensible SDK. If set,
6754 the value is used as the default update server when running
6755 ``devtool sdk-update`` within the extensible SDK.
6756
Andrew Geisslerf0343792020-11-18 10:42:21 -06006757 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006758 Specifies the name of the SDK vendor.
6759
Andrew Geisslerf0343792020-11-18 10:42:21 -06006760 :term:`SDK_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006761 Specifies the version of the SDK. The distribution configuration file
6762 (e.g. ``/meta-poky/conf/distro/poky.conf``) defines the
6763 ``SDK_VERSION`` as follows:
6764 ::
6765
6766 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot')}"
6767
6768 For additional information, see the
6769 :term:`DISTRO_VERSION` and
6770 :term:`DATE` variables.
6771
Andrew Geisslerf0343792020-11-18 10:42:21 -06006772 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006773 The default installation directory for the Extensible SDK. By
6774 default, this directory is based on the :term:`DISTRO`
6775 variable and is set in the
6776 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6777 follows:
6778 ::
6779
6780 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6781
6782 For the
6783 default distribution "poky", the ``SDKEXTPATH`` is set to "poky_sdk".
6784
6785 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006786 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006787 section in the Yocto Project Application Development and the
6788 Extensible Software Development Kit (eSDK) manual.
6789
Andrew Geisslerf0343792020-11-18 10:42:21 -06006790 :term:`SDKIMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006791 Equivalent to ``IMAGE_FEATURES``. However, this variable applies to
6792 the SDK generated from an image using the following command:
6793 ::
6794
6795 $ bitbake -c populate_sdk imagename
6796
Andrew Geisslerf0343792020-11-18 10:42:21 -06006797 :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006798 The machine for which the SDK is built. In other words, the SDK is
6799 built such that it runs on the target you specify with the
6800 ``SDKMACHINE`` value. The value points to a corresponding ``.conf``
6801 file under ``conf/machine-sdk/``.
6802
6803 You can use "i686" and "x86_64" as possible values for this variable.
6804 The variable defaults to "i686" and is set in the local.conf file in
6805 the Build Directory.
6806 ::
6807
6808 SDKMACHINE ?= "i686"
6809
6810 .. note::
6811
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006812 You cannot set the ``SDKMACHINE``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006813 variable in your distribution configuration file. If you do, the
6814 configuration will not take affect.
6815
Andrew Geisslerf0343792020-11-18 10:42:21 -06006816 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006817 Defines the path offered to the user for installation of the SDK that
6818 is generated by the OpenEmbedded build system. The path appears as
6819 the default location for installing the SDK when you run the SDK's
6820 installation script. You can override the offered path when you run
6821 the script.
6822
Andrew Geisslerf0343792020-11-18 10:42:21 -06006823 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006824 The full path to the sysroot used for cross-compilation within an SDK
6825 as it will be when installed into the default
6826 :term:`SDKPATH`.
6827
Andrew Geisslerf0343792020-11-18 10:42:21 -06006828 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006829 The section in which packages should be categorized. Package
6830 management utilities can make use of this variable.
6831
Andrew Geisslerf0343792020-11-18 10:42:21 -06006832 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006833 Specifies the optimization flags passed to the C compiler when
6834 building for the target. The flags are passed through the default
6835 value of the :term:`TARGET_CFLAGS` variable.
6836
6837 The ``SELECTED_OPTIMIZATION`` variable takes the value of
6838 ``FULL_OPTIMIZATION`` unless ``DEBUG_BUILD`` = "1". If that is the
6839 case, the value of ``DEBUG_OPTIMIZATION`` is used.
6840
Andrew Geisslerf0343792020-11-18 10:42:21 -06006841 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006842 Defines a serial console (TTY) to enable using
6843 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6844 value that specifies the baud rate followed by the TTY device name
6845 separated by a space. You cannot specify more than one TTY device:
6846 ::
6847
6848 SERIAL_CONSOLE = "115200 ttyS0"
6849
6850 .. note::
6851
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006852 The ``SERIAL_CONSOLE`` variable is deprecated. Please use the
6853 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006854
Andrew Geisslerf0343792020-11-18 10:42:21 -06006855 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006856 Defines a serial console (TTY) to enable using
6857 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6858 value that specifies the baud rate followed by the TTY device name
6859 separated by a semicolon. Use spaces to separate multiple devices:
6860 ::
6861
6862 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6863
Andrew Geisslerf0343792020-11-18 10:42:21 -06006864 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006865 Specifies serial consoles, which must be listed in
6866 :term:`SERIAL_CONSOLES`, to check against
6867 ``/proc/console`` before enabling them using getty. This variable
6868 allows aliasing in the format: <device>:<alias>. If a device was
6869 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
6870 ``/proc/console``, you would do the following: ::
6871
6872 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6873
6874 This variable is currently only supported with SysVinit (i.e. not
6875 with systemd).
6876
Andrew Geisslerf0343792020-11-18 10:42:21 -06006877 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006878 A list of recipe dependencies that should not be used to determine
6879 signatures of tasks from one recipe when they depend on tasks from
6880 another recipe. For example: ::
6881
6882 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6883
6884 In the previous example, ``intone`` depends on ``mplayer2``.
6885
6886 You can use the special token ``"*"`` on the left-hand side of the
6887 dependency to match all recipes except the one on the right-hand
6888 side. Here is an example: ::
6889
6890 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6891
6892 In the previous example, all recipes except ``quilt-native`` ignore
6893 task signatures from the ``quilt-native`` recipe when determining
6894 their task signatures.
6895
6896 Use of this variable is one mechanism to remove dependencies that
6897 affect task signatures and thus force rebuilds when a recipe changes.
6898
6899 .. note::
6900
6901 If you add an inappropriate dependency for a recipe relationship,
6902 the software might break during runtime if the interface of the
6903 second recipe was changed after the first recipe had been built.
6904
Andrew Geisslerf0343792020-11-18 10:42:21 -06006905 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006906 A list of recipes that are completely stable and will never change.
6907 The ABI for the recipes in the list are presented by output from the
6908 tasks run to build the recipe. Use of this variable is one way to
6909 remove dependencies from one recipe on another that affect task
6910 signatures and thus force rebuilds when the recipe changes.
6911
6912 .. note::
6913
6914 If you add an inappropriate variable to this list, the software
6915 might break at runtime if the interface of the recipe was changed
6916 after the other had been built.
6917
Andrew Geisslerf0343792020-11-18 10:42:21 -06006918 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919 Specifies the number of bits for the target system CPU. The value
6920 should be either "32" or "64".
6921
Andrew Geisslerf0343792020-11-18 10:42:21 -06006922 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006923 Specifies the endian byte order of the target system. The value
6924 should be either "le" for little-endian or "be" for big-endian.
6925
Andrew Geisslerf0343792020-11-18 10:42:21 -06006926 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006927 Enables removal of all files from the "Provides" section of an RPM
6928 package. Removal of these files is required for packages containing
6929 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6930
6931 To enable file removal, set the variable to "1" in your
6932 ``conf/local.conf`` configuration file in your:
6933 :term:`Build Directory`.
6934 ::
6935
6936 SKIP_FILEDEPS = "1"
6937
Andrew Geisslerf0343792020-11-18 10:42:21 -06006938 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006939 Groups together machines based upon the same family of SOC (System On
6940 Chip). You typically set this variable in a common ``.inc`` file that
6941 you include in the configuration files of all the machines.
6942
6943 .. note::
6944
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006945 You must include ``conf/machine/include/soc-family.inc`` for this
6946 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006947
Andrew Geisslerf0343792020-11-18 10:42:21 -06006948 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006949 Defines the suffix for shared libraries used on the target platform.
6950 By default, this suffix is ".so.*" for all Linux-based systems and is
6951 defined in the ``meta/conf/bitbake.conf`` configuration file.
6952
6953 You will see this variable referenced in the default values of
6954 ``FILES_${PN}``.
6955
Andrew Geisslerf0343792020-11-18 10:42:21 -06006956 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006957 Defines the suffix for the development symbolic link (symlink) for
6958 shared libraries on the target platform. By default, this suffix is
6959 ".so" for Linux-based systems and is defined in the
6960 ``meta/conf/bitbake.conf`` configuration file.
6961
6962 You will see this variable referenced in the default values of
6963 ``FILES_${PN}-dev``.
6964
Andrew Geisslerf0343792020-11-18 10:42:21 -06006965 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006966 When you are fetching files to create a mirror of sources (i.e.
6967 creating a source mirror), setting ``SOURCE_MIRROR_FETCH`` to "1" in
6968 your ``local.conf`` configuration file ensures the source for all
6969 recipes are fetched regardless of whether or not a recipe is
6970 compatible with the configuration. A recipe is considered
6971 incompatible with the currently configured machine when either or
6972 both the :term:`COMPATIBLE_MACHINE`
6973 variable and :term:`COMPATIBLE_HOST` variables
6974 specify compatibility with a machine other than that of the current
6975 machine or host.
6976
6977 .. note::
6978
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006979 Do not set the ``SOURCE_MIRROR_FETCH``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006980 variable unless you are creating a source mirror. In other words,
6981 do not set the variable during a normal build.
6982
Andrew Geisslerf0343792020-11-18 10:42:21 -06006983 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006984 Defines your own :term:`PREMIRRORS` from which to
6985 first fetch source before attempting to fetch from the upstream
6986 specified in :term:`SRC_URI`.
6987
6988 To use this variable, you must globally inherit the
6989 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
6990 the URL to your mirrors. Here is the general syntax:
6991 ::
6992
6993 INHERIT += "own-mirrors"
6994 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
6995
6996 .. note::
6997
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006998 You can specify only a single URL in ``SOURCE_MIRROR_URL``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006999
Andrew Geisslerf0343792020-11-18 10:42:21 -06007000 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007001 Maps commonly used license names to their SPDX counterparts found in
7002 ``meta/files/common-licenses/``. For the default ``SPDXLICENSEMAP``
7003 mappings, see the ``meta/conf/licenses.conf`` file.
7004
7005 For additional information, see the :term:`LICENSE`
7006 variable.
7007
Andrew Geisslerf0343792020-11-18 10:42:21 -06007008 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007009 A list of prefixes for :term:`PN` used by the OpenEmbedded
7010 build system to create variants of recipes or packages. The list
7011 specifies the prefixes to strip off during certain circumstances such
7012 as the generation of the :term:`BPN` variable.
7013
Andrew Geisslerf0343792020-11-18 10:42:21 -06007014 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007015 The file type for the Secondary Program Loader (SPL). Some devices
7016 use an SPL from which to boot (e.g. the BeagleBone development
7017 board). For such cases, you can declare the file type of the SPL
7018 binary in the ``u-boot.inc`` include file, which is used in the
7019 U-Boot recipe.
7020
7021 The SPL file type is set to "null" by default in the ``u-boot.inc``
7022 file as follows:
7023 ::
7024
7025 # Some versions of u-boot build an SPL (Second Program Loader) image that
7026 # should be packaged along with the u-boot binary as well as placed in the
7027 # deploy directory. For those versions they can set the following variables
7028 # to allow packaging the SPL.
7029 SPL_BINARY ?= ""
7030 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7031 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7032 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7033
7034 The ``SPL_BINARY`` variable helps form
7035 various ``SPL_*`` variables used by the OpenEmbedded build system.
7036
7037 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007038 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007039 section in the Yocto Project Board Support Package Developer's Guide
7040 for additional information.
7041
Andrew Geisslerf0343792020-11-18 10:42:21 -06007042 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007043 The list of source files - local or remote. This variable tells the
7044 OpenEmbedded build system which bits to pull in for the build and how
7045 to pull them in. For example, if the recipe or append file only needs
7046 to fetch a tarball from the Internet, the recipe or append file uses
7047 a single ``SRC_URI`` entry. On the other hand, if the recipe or
7048 append file needs to fetch a tarball, apply two patches, and include
7049 a custom file, the recipe or append file would include four instances
7050 of the variable.
7051
7052 The following list explains the available URI protocols. URI
7053 protocols are highly dependent on particular BitBake Fetcher
7054 submodules. Depending on the fetcher BitBake uses, various URL
7055 parameters are employed. For specifics on the supported Fetchers, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06007056 the ":ref:`Fetchers <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`" section in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007057 BitBake User Manual.
7058
7059 - ``file://`` - Fetches files, which are usually files shipped
7060 with the :term:`Metadata`, from the local machine (e.g.
Andrew Geissler09209ee2020-12-13 08:44:15 -06007061 :ref:`patch <overview-manual/concepts:patching>` files).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007062 The path is relative to the :term:`FILESPATH`
7063 variable. Thus, the build system searches, in order, from the
7064 following directories, which are assumed to be a subdirectories of
7065 the directory in which the recipe file (``.bb``) or append file
7066 (``.bbappend``) resides:
7067
7068 - ``${BPN}`` - The base recipe name without any special suffix
7069 or version numbers.
7070
7071 - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and
7072 version but without any special package name suffix.
7073
7074 - *files -* Files within a directory, which is named ``files``
7075 and is also alongside the recipe or append file.
7076
7077 .. note::
7078
7079 If you want the build system to pick up files specified through
7080 a
7081 SRC_URI
7082 statement from your append file, you need to be sure to extend
7083 the
7084 FILESPATH
7085 variable by also using the
7086 FILESEXTRAPATHS
7087 variable from within your append file.
7088
7089 - ``bzr://`` - Fetches files from a Bazaar revision control
7090 repository.
7091
7092 - ``git://`` - Fetches files from a Git revision control
7093 repository.
7094
7095 - ``osc://`` - Fetches files from an OSC (OpenSUSE Build service)
7096 revision control repository.
7097
7098 - ``repo://`` - Fetches files from a repo (Git) repository.
7099
7100 - ``ccrc://`` - Fetches files from a ClearCase repository.
7101
7102 - ``http://`` - Fetches files from the Internet using ``http``.
7103
7104 - ``https://`` - Fetches files from the Internet using ``https``.
7105
7106 - ``ftp://`` - Fetches files from the Internet using ``ftp``.
7107
7108 - ``cvs://`` - Fetches files from a CVS revision control
7109 repository.
7110
7111 - ``hg://`` - Fetches files from a Mercurial (``hg``) revision
7112 control repository.
7113
7114 - ``p4://`` - Fetches files from a Perforce (``p4``) revision
7115 control repository.
7116
7117 - ``ssh://`` - Fetches files from a secure shell.
7118
7119 - ``svn://`` - Fetches files from a Subversion (``svn``) revision
7120 control repository.
7121
7122 - ``npm://`` - Fetches JavaScript modules from a registry.
7123
Andrew Geissler95ac1b82021-03-31 14:34:31 -05007124 - ``az://`` - Fetches files from an Azure Storage account.
7125
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007126 Standard and recipe-specific options for ``SRC_URI`` exist. Here are
7127 standard options:
7128
7129 - ``apply`` - Whether to apply the patch or not. The default
7130 action is to apply the patch.
7131
7132 - ``striplevel`` - Which striplevel to use when applying the
7133 patch. The default level is 1.
7134
7135 - ``patchdir`` - Specifies the directory in which the patch should
7136 be applied. The default is ``${``\ :term:`S`\ ``}``.
7137
7138 Here are options specific to recipes building code from a revision
7139 control system:
7140
7141 - ``mindate`` - Apply the patch only if
7142 :term:`SRCDATE` is equal to or greater than
7143 ``mindate``.
7144
7145 - ``maxdate`` - Apply the patch only if ``SRCDATE`` is not later
7146 than ``maxdate``.
7147
7148 - ``minrev`` - Apply the patch only if ``SRCREV`` is equal to or
7149 greater than ``minrev``.
7150
7151 - ``maxrev`` - Apply the patch only if ``SRCREV`` is not later
7152 than ``maxrev``.
7153
7154 - ``rev`` - Apply the patch only if ``SRCREV`` is equal to
7155 ``rev``.
7156
7157 - ``notrev`` - Apply the patch only if ``SRCREV`` is not equal to
7158 ``rev``.
7159
7160 Here are some additional options worth mentioning:
7161
7162 - ``unpack`` - Controls whether or not to unpack the file if it is
7163 an archive. The default action is to unpack the file.
7164
7165 - ``destsuffix`` - Places the file (or extracts its contents) into
7166 the specified subdirectory of :term:`WORKDIR` when
7167 the Git fetcher is used.
7168
7169 - ``subdir`` - Places the file (or extracts its contents) into the
7170 specified subdirectory of ``WORKDIR`` when the local (``file://``)
7171 fetcher is used.
7172
7173 - ``localdir`` - Places the file (or extracts its contents) into
7174 the specified subdirectory of ``WORKDIR`` when the CVS fetcher is
7175 used.
7176
7177 - ``subpath`` - Limits the checkout to a specific subpath of the
7178 tree when using the Git fetcher is used.
7179
7180 - ``name`` - Specifies a name to be used for association with
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007181 ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one
7182 file or git repository specified in ``SRC_URI``. For example:
7183 ::
7184
7185 SRC_URI = "git://example.com/foo.git;name=first \
7186 git://example.com/bar.git;name=second \
7187 http://example.com/file.tar.gz;name=third"
7188
7189 SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
7190 SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
7191 SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
7192
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007193
7194 - ``downloadfilename`` - Specifies the filename used when storing
7195 the downloaded file.
7196
Andrew Geisslerf0343792020-11-18 10:42:21 -06007197 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007198 By default, the OpenEmbedded build system automatically detects
7199 whether ``SRC_URI`` contains files that are machine-specific. If so,
7200 the build system automatically changes ``PACKAGE_ARCH``. Setting this
7201 variable to "0" disables this behavior.
7202
Andrew Geisslerf0343792020-11-18 10:42:21 -06007203 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007204 The date of the source code used to build the package. This variable
7205 applies only if the source was fetched from a Source Code Manager
7206 (SCM).
7207
Andrew Geisslerf0343792020-11-18 10:42:21 -06007208 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007209 Returns the version string of the current package. This string is
7210 used to help define the value of :term:`PV`.
7211
7212 The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf``
7213 configuration file in the :term:`Source Directory` as
7214 follows:
7215 ::
7216
7217 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7218
7219 Recipes that need to define ``PV`` do so with the help of the
7220 ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``)
7221 located in ``meta/recipes-connectivity`` in the Source Directory
7222 defines ``PV`` as follows:
7223 ::
7224
7225 PV = "0.12-git${SRCPV}"
7226
Andrew Geisslerf0343792020-11-18 10:42:21 -06007227 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007228 The revision of the source code used to build the package. This
7229 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7230 that if you want to build a fixed revision and you want to avoid
7231 performing a query on the remote repository every time BitBake parses
7232 your recipe, you should specify a ``SRCREV`` that is a full revision
7233 identifier and not just a tag.
7234
7235 .. note::
7236
7237 For information on limitations when inheriting the latest revision
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007238 of software using ``SRCREV``, see the :term:`AUTOREV` variable
7239 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007240 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007241 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007242
Andrew Geisslerf0343792020-11-18 10:42:21 -06007243 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007244 The directory for the shared state cache.
7245
Andrew Geisslerf0343792020-11-18 10:42:21 -06007246 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007247 If set to "1", allows fetches from mirrors that are specified in
7248 :term:`SSTATE_MIRRORS` to work even when
7249 fetching from the network is disabled by setting ``BB_NO_NETWORK`` to
7250 "1". Using the ``SSTATE_MIRROR_ALLOW_NETWORK`` variable is useful if
7251 you have set ``SSTATE_MIRRORS`` to point to an internal server for
7252 your shared state cache, but you want to disable any other fetching
7253 from the network.
7254
Andrew Geisslerf0343792020-11-18 10:42:21 -06007255 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007256 Configures the OpenEmbedded build system to search other mirror
7257 locations for prebuilt cache data objects before building out the
7258 data. This variable works like fetcher :term:`MIRRORS`
7259 and :term:`PREMIRRORS` and points to the cache
7260 locations to check for the shared state (sstate) objects.
7261
7262 You can specify a filesystem directory or a remote URL such as HTTP
7263 or FTP. The locations you specify need to contain the shared state
7264 cache (sstate-cache) results from previous builds. The sstate-cache
7265 you point to can also be from builds on other machines.
7266
7267 When pointing to sstate build artifacts on another machine that uses
7268 a different GCC version for native builds, you must configure
7269 ``SSTATE_MIRRORS`` with a regular expression that maps local search
7270 paths to server paths. The paths need to take into account
7271 :term:`NATIVELSBSTRING` set by the
7272 :ref:`uninative <ref-classes-uninative>` class. For example, the
7273 following maps the local search path ``universal-4.9`` to the
7274 server-provided path server_url_sstate_path:
7275 ::
7276
7277 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n"
7278
7279 If a mirror uses the same structure as
7280 :term:`SSTATE_DIR`, you need to add "PATH" at the
7281 end as shown in the examples below. The build system substitutes the
7282 correct path within the directory structure.
7283 ::
7284
7285 SSTATE_MIRRORS ?= "\
7286 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
7287 file://.* file:///some-local-dir/sstate/PATH"
7288
Andrew Geisslerf0343792020-11-18 10:42:21 -06007289 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007290 Controls the list of files the OpenEmbedded build system scans for
7291 hardcoded installation paths. The variable uses a space-separated
7292 list of filenames (not paths) with standard wildcard characters
7293 allowed.
7294
7295 During a build, the OpenEmbedded build system creates a shared state
7296 (sstate) object during the first stage of preparing the sysroots.
7297 That object is scanned for hardcoded paths for original installation
7298 locations. The list of files that are scanned for paths is controlled
7299 by the ``SSTATE_SCAN_FILES`` variable. Typically, recipes add files
7300 they want to be scanned to the value of ``SSTATE_SCAN_FILES`` rather
7301 than the variable being comprehensively set. The
7302 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7303 of files.
7304
7305 For details on the process, see the
7306 :ref:`staging <ref-classes-staging>` class.
7307
Andrew Geisslerf0343792020-11-18 10:42:21 -06007308 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007309 Specifies the path to the ``/lib`` subdirectory of the sysroot
7310 directory for the build host.
7311
Andrew Geisslerf0343792020-11-18 10:42:21 -06007312 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007313 Specifies the path to the ``/lib`` subdirectory of the sysroot
7314 directory for the target for which the current recipe is being built
7315 (:term:`STAGING_DIR_HOST`).
7316
Andrew Geisslerf0343792020-11-18 10:42:21 -06007317 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007318 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7319 directory for the target for which the current recipe is being built
7320 (:term:`STAGING_DIR_HOST`).
7321
Andrew Geisslerf0343792020-11-18 10:42:21 -06007322 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007323 Specifies the path to the directory containing binary configuration
7324 scripts. These scripts provide configuration information for other
7325 software that wants to make use of libraries or include files
7326 provided by the software associated with the script.
7327
7328 .. note::
7329
7330 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007331 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7332 library to which you are linking, it is recommended you use
7333 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007334
Andrew Geisslerf0343792020-11-18 10:42:21 -06007335 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007336 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7337 directory for the build host.
7338
Andrew Geisslerf0343792020-11-18 10:42:21 -06007339 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007340 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7341 directory for the target for which the current recipe is being built
7342 (:term:`STAGING_DIR_HOST`).
7343
Andrew Geisslerf0343792020-11-18 10:42:21 -06007344 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007345 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7346 directory for the build host.
7347
Andrew Geisslerf0343792020-11-18 10:42:21 -06007348 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007349 Helps construct the ``recipe-sysroots`` directory, which is used
7350 during packaging.
7351
7352 For information on how staging for recipe-specific sysroots occurs,
7353 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007354 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007355 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007356 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007357 section in the Yocto Project Overview and Concepts Manual, and the
7358 :term:`SYSROOT_DIRS` variable.
7359
7360 .. note::
7361
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007362 Recipes should never write files directly under the ``STAGING_DIR``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007363 directory because the OpenEmbedded build system manages the
7364 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007365 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007366 task and then the OpenEmbedded build system will stage a subset of
7367 those files into the sysroot.
7368
Andrew Geisslerf0343792020-11-18 10:42:21 -06007369 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007370 Specifies the path to the sysroot directory for the system on which
7371 the component is built to run (the system that hosts the component).
7372 For most recipes, this sysroot is the one in which that recipe's
7373 :ref:`ref-tasks-populate_sysroot` task copies
7374 files. Exceptions include ``-native`` recipes, where the
7375 ``do_populate_sysroot`` task instead uses
7376 :term:`STAGING_DIR_NATIVE`. Depending on
7377 the type of recipe and the build target, ``STAGING_DIR_HOST`` can
7378 have the following values:
7379
7380 - For recipes building for the target machine, the value is
7381 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7382
7383 - For native recipes building for the build host, the value is empty
7384 given the assumption that when building for the build host, the
7385 build host's own directories should be used.
7386
7387 .. note::
7388
7389 ``-native`` recipes are not installed into host paths like such
7390 as ``/usr``. Rather, these recipes are installed into
7391 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes,
7392 standard build environment variables such as
7393 :term:`CPPFLAGS` and
7394 :term:`CFLAGS` are set up so that both host paths
7395 and ``STAGING_DIR_NATIVE`` are searched for libraries and
7396 headers using, for example, GCC's ``-isystem`` option.
7397
7398 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7399 should be viewed as input variables by tasks such as
7400 :ref:`ref-tasks-configure`,
7401 :ref:`ref-tasks-compile`, and
7402 :ref:`ref-tasks-install`. Having the real system
7403 root correspond to ``STAGING_DIR_HOST`` makes conceptual sense
7404 for ``-native`` recipes, as they make use of host headers and
7405 libraries.
7406
Andrew Geisslerf0343792020-11-18 10:42:21 -06007407 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007408 Specifies the path to the sysroot directory used when building
7409 components that run on the build host itself.
7410
Andrew Geisslerf0343792020-11-18 10:42:21 -06007411 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007412 Specifies the path to the sysroot used for the system for which the
7413 component generates code. For components that do not generate code,
7414 which is the majority, ``STAGING_DIR_TARGET`` is set to match
7415 :term:`STAGING_DIR_HOST`.
7416
7417 Some recipes build binaries that can run on the target system but
7418 those binaries in turn generate code for another different system
7419 (e.g. cross-canadian recipes). Using terminology from GNU, the
7420 primary system is referred to as the "HOST" and the secondary, or
7421 different, system is referred to as the "TARGET". Thus, the binaries
7422 run on the "HOST" system and generate binaries for the "TARGET"
7423 system. The ``STAGING_DIR_HOST`` variable points to the sysroot used
7424 for the "HOST" system, while ``STAGING_DIR_TARGET`` points to the
7425 sysroot used for the "TARGET" system.
7426
Andrew Geisslerf0343792020-11-18 10:42:21 -06007427 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007428 Specifies the path to the ``/etc`` subdirectory of the sysroot
7429 directory for the build host.
7430
Andrew Geisslerf0343792020-11-18 10:42:21 -06007431 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007432 Specifies the path to the ``/usr`` subdirectory of the sysroot
7433 directory for the target for which the current recipe is being built
7434 (:term:`STAGING_DIR_HOST`).
7435
Andrew Geisslerf0343792020-11-18 10:42:21 -06007436 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007437 Specifies the path to the ``/usr/include`` subdirectory of the
7438 sysroot directory for the target for which the current recipe being
7439 built (:term:`STAGING_DIR_HOST`).
7440
Andrew Geisslerf0343792020-11-18 10:42:21 -06007441 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007442 Specifies the path to the ``/usr/include`` subdirectory of the
7443 sysroot directory for the build host.
7444
Andrew Geisslerf0343792020-11-18 10:42:21 -06007445 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007446 Points to the directory containing the kernel build artifacts.
7447 Recipes building software that needs to access kernel build artifacts
7448 (e.g. ``systemtap-uprobes``) can look in the directory specified with
7449 the ``STAGING_KERNEL_BUILDDIR`` variable to find these artifacts
7450 after the kernel has been built.
7451
Andrew Geisslerf0343792020-11-18 10:42:21 -06007452 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007453 The directory with kernel headers that are required to build
7454 out-of-tree modules.
7455
Andrew Geisslerf0343792020-11-18 10:42:21 -06007456 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007457 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7458 directory for the target for which the current recipe is being built
7459 (:term:`STAGING_DIR_HOST`).
7460
Andrew Geisslerf0343792020-11-18 10:42:21 -06007461 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007462 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7463 directory for the build host.
7464
Andrew Geisslerf0343792020-11-18 10:42:21 -06007465 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007466 Specifies the base path used to create recipe stamp files. The path
7467 to an actual stamp file is constructed by evaluating this string and
7468 then appending additional information. Currently, the default
7469 assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf``
7470 file is:
7471 ::
7472
7473 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7474
7475 For information on how BitBake uses stamp files to determine if a
7476 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007477 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007478 section in the Yocto Project Overview and Concepts Manual.
7479
7480 See :term:`STAMPS_DIR`,
7481 :term:`MULTIMACH_TARGET_SYS`,
7482 :term:`PN`, :term:`EXTENDPE`,
7483 :term:`PV`, and :term:`PR` for related variable
7484 information.
7485
Andrew Geisslerf0343792020-11-18 10:42:21 -06007486 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007487 Specifies the base directory in which the OpenEmbedded build system
7488 places stamps. The default directory is ``${TMPDIR}/stamps``.
7489
Andrew Geisslerf0343792020-11-18 10:42:21 -06007490 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007491 The minimal command and arguments to run ``strip``, which is used to
7492 strip symbols.
7493
Andrew Geisslerf0343792020-11-18 10:42:21 -06007494 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007495 The short (72 characters or less) summary of the binary package for
7496 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
7497 ``SUMMARY`` is used to define the
7498 :term:`DESCRIPTION` variable if ``DESCRIPTION`` is
7499 not set in the recipe.
7500
Andrew Geisslerf0343792020-11-18 10:42:21 -06007501 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007502 The directory in which files checked out of a Subversion system are
7503 stored.
7504
Andrew Geisslerf0343792020-11-18 10:42:21 -06007505 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007506 Specifies the kernel boot default console. If you want to use a
7507 console other than the default, set this variable in your recipe as
7508 follows where "X" is the console number you want to use:
7509 ::
7510
7511 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7512
7513 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7514 this variable to null but then checks for a value later.
7515
Andrew Geisslerf0343792020-11-18 10:42:21 -06007516 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007517 Lists additional options to add to the syslinux file. You need to set
7518 this variable in your recipe. If you want to list multiple options,
7519 separate the options with a semicolon character (``;``).
7520
7521 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7522 to create a set of options.
7523
Andrew Geisslerf0343792020-11-18 10:42:21 -06007524 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007525 Specifies the alternate serial port or turns it off. To turn off
7526 serial, set this variable to an empty string in your recipe. The
7527 variable's default value is set in the
7528 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7529 ::
7530
7531 SYSLINUX_SERIAL ?= "0 115200"
7532
7533 The class checks for and uses the variable as needed.
7534
Andrew Geisslerf0343792020-11-18 10:42:21 -06007535 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007536 Specifies the alternate console=tty... kernel boot argument. The
7537 variable's default value is set in the
7538 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7539 ::
7540
7541 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7542
7543 The class checks for and uses the variable as needed.
7544
Andrew Geisslerf0343792020-11-18 10:42:21 -06007545 :term:`SYSLINUX_SPLASH`
7546 An ``.LSS`` file used as the background for the VGA boot menu when
7547 you use the boot menu. You need to set this variable in your recipe.
7548
7549 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7550 variable and if found, the OpenEmbedded build system installs the
7551 splash screen.
7552
7553 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007554 Points to the temporary directory under the work directory (default
7555 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7556 where the files populated into the sysroot are assembled during the
7557 :ref:`ref-tasks-populate_sysroot` task.
7558
Andrew Geisslerf0343792020-11-18 10:42:21 -06007559 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560 Directories that are staged into the sysroot by the
7561 :ref:`ref-tasks-populate_sysroot` task. By
7562 default, the following directories are staged:
7563 ::
7564
7565 SYSROOT_DIRS = " \
7566 ${includedir} \
7567 ${libdir} \
7568 ${base_libdir} \
7569 ${nonarch_base_libdir} \
7570 ${datadir} \
7571 "
7572
Andrew Geisslerf0343792020-11-18 10:42:21 -06007573 :term:`SYSROOT_DIRS_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007574 Directories that are not staged into the sysroot by the
7575 :ref:`ref-tasks-populate_sysroot` task. You
7576 can use this variable to exclude certain subdirectories of
7577 directories listed in :term:`SYSROOT_DIRS` from
7578 staging. By default, the following directories are not staged:
7579 ::
7580
7581 SYSROOT_DIRS_BLACKLIST = " \
7582 ${mandir} \
7583 ${docdir} \
7584 ${infodir} \
7585 ${datadir}/locale \
7586 ${datadir}/applications \
7587 ${datadir}/fonts \
7588 ${datadir}/pixmaps \
7589 "
7590
Andrew Geisslerf0343792020-11-18 10:42:21 -06007591 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007592 Extra directories staged into the sysroot by the
7593 :ref:`ref-tasks-populate_sysroot` task for
7594 ``-native`` recipes, in addition to those specified in
7595 :term:`SYSROOT_DIRS`. By default, the following
7596 extra directories are staged:
7597 ::
7598
7599 SYSROOT_DIRS_NATIVE = " \
7600 ${bindir} \
7601 ${sbindir} \
7602 ${base_bindir} \
7603 ${base_sbindir} \
7604 ${libexecdir} \
7605 ${sysconfdir} \
7606 ${localstatedir} \
7607 "
7608
7609 .. note::
7610
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007611 Programs built by ``-native`` recipes run directly from the sysroot
7612 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7613 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007614
Andrew Geisslerf0343792020-11-18 10:42:21 -06007615 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007616 A list of functions to execute after files are staged into the
7617 sysroot. These functions are usually used to apply additional
7618 processing on the staged files, or to stage additional files.
7619
Andrew Geisslerf0343792020-11-18 10:42:21 -06007620 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007621 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7622 this variable specifies whether the specified service in
7623 :term:`SYSTEMD_SERVICE` should start
7624 automatically or not. By default, the service is enabled to
7625 automatically start at boot time. The default setting is in the
7626 :ref:`systemd <ref-classes-systemd>` class as follows:
7627 ::
7628
7629 SYSTEMD_AUTO_ENABLE ??= "enable"
7630
7631 You can disable the service by setting the variable to "disable".
7632
Andrew Geisslerf0343792020-11-18 10:42:21 -06007633 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634 When :term:`EFI_PROVIDER` is set to
7635 "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the
7636 configuration file that should be used. By default, the
7637 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7638 ``SYSTEMD_BOOT_CFG`` as follows:
7639 ::
7640
7641 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7642
7643 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007644 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007645
Andrew Geisslerf0343792020-11-18 10:42:21 -06007646 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007647 When :term:`EFI_PROVIDER` is set to
7648 "systemd-boot", the ``SYSTEMD_BOOT_ENTRIES`` variable specifies a
7649 list of entry files (``*.conf``) to install that contain one boot
7650 entry per file. By default, the
7651 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7652 ``SYSTEMD_BOOT_ENTRIES`` as follows:
7653 ::
7654
7655 SYSTEMD_BOOT_ENTRIES ?= ""
7656
7657 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007658 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007659
Andrew Geisslerf0343792020-11-18 10:42:21 -06007660 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007661 When :term:`EFI_PROVIDER` is set to
7662 "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the
7663 boot menu timeout in seconds. By default, the
7664 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7665 ``SYSTEMD_BOOT_TIMEOUT`` as follows:
7666 ::
7667
7668 SYSTEMD_BOOT_TIMEOUT ?= "10"
7669
7670 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007671 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007672
Andrew Geisslerf0343792020-11-18 10:42:21 -06007673 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007674 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7675 this variable locates the systemd unit files when they are not found
7676 in the main recipe's package. By default, the ``SYSTEMD_PACKAGES``
7677 variable is set such that the systemd unit files are assumed to
7678 reside in the recipes main package:
7679 ::
7680
7681 SYSTEMD_PACKAGES ?= "${PN}"
7682
7683 If these unit files are not in this recipe's main package, you need
7684 to use ``SYSTEMD_PACKAGES`` to list the package or packages in which
7685 the build system can find the systemd unit files.
7686
Andrew Geisslerf0343792020-11-18 10:42:21 -06007687 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007688 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7689 this variable specifies the systemd service name for a package.
7690
7691 When you specify this file in your recipe, use a package name
7692 override to indicate the package to which the value applies. Here is
7693 an example from the connman recipe:
7694 ::
7695
7696 SYSTEMD_SERVICE_${PN} = "connman.service"
7697
Andrew Geisslerf0343792020-11-18 10:42:21 -06007698 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007699 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007700 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007701 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007702 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007703 (allowing login), assuming :term:`USE_VT` is not set to
7704 "0".
7705
7706 The default value for ``SYSVINIT_ENABLED_GETTYS`` is "1" (i.e. only
7707 run a getty on the first virtual terminal).
7708
Andrew Geisslerf0343792020-11-18 10:42:21 -06007709 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007710 This variable points to a directory were BitBake places temporary
7711 files, which consist mostly of task logs and scripts, when building a
7712 particular recipe. The variable is typically set as follows:
7713 ::
7714
7715 T = "${WORKDIR}/temp"
7716
7717 The :term:`WORKDIR` is the directory into which
7718 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7719 file sets this variable.
7720
7721 The ``T`` variable is not to be confused with the
7722 :term:`TMPDIR` variable, which points to the root of
7723 the directory tree where BitBake places the output of an entire
7724 build.
7725
Andrew Geisslerf0343792020-11-18 10:42:21 -06007726 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007727 The target machine's architecture. The OpenEmbedded build system
7728 supports many architectures. Here is an example list of architectures
7729 supported. This list is by no means complete as the architecture is
7730 configurable:
7731
7732 - arm
7733 - i586
7734 - x86_64
7735 - powerpc
7736 - powerpc64
7737 - mips
7738 - mipsel
7739
7740 For additional information on machine architectures, see the
7741 :term:`TUNE_ARCH` variable.
7742
Andrew Geisslerf0343792020-11-18 10:42:21 -06007743 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007744 Specifies architecture-specific assembler flags for the target
7745 system. ``TARGET_AS_ARCH`` is initialized from
7746 :term:`TUNE_ASARGS` by default in the BitBake
7747 configuration file (``meta/conf/bitbake.conf``):
7748 ::
7749
7750 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7751
Andrew Geisslerf0343792020-11-18 10:42:21 -06007752 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007753 Specifies architecture-specific C compiler flags for the target
7754 system. ``TARGET_CC_ARCH`` is initialized from
7755 :term:`TUNE_CCARGS` by default.
7756
7757 .. note::
7758
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007759 It is a common workaround to append :term:`LDFLAGS` to
7760 ``TARGET_CC_ARCH`` in recipes that build software for the target that
7761 would not otherwise respect the exported ``LDFLAGS`` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007762
Andrew Geisslerf0343792020-11-18 10:42:21 -06007763 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007764 This is a specific kernel compiler flag for a CPU or Application
7765 Binary Interface (ABI) tune. The flag is used rarely and only for
7766 cases where a userspace :term:`TUNE_CCARGS` is not
7767 compatible with the kernel compilation. The ``TARGET_CC_KERNEL_ARCH``
7768 variable allows the kernel (and associated modules) to use a
7769 different configuration. See the
7770 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7771 :term:`Source Directory` for an example.
7772
Andrew Geisslerf0343792020-11-18 10:42:21 -06007773 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007774 Specifies the flags to pass to the C compiler when building for the
7775 target. When building in the target context,
7776 :term:`CFLAGS` is set to the value of this variable by
7777 default.
7778
7779 Additionally, the SDK's environment setup script sets the ``CFLAGS``
7780 variable in the environment to the ``TARGET_CFLAGS`` value so that
7781 executables built using the SDK also have the flags applied.
7782
Andrew Geisslerf0343792020-11-18 10:42:21 -06007783 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007784 Specifies the flags to pass to the C pre-processor (i.e. to both the
7785 C and the C++ compilers) when building for the target. When building
7786 in the target context, :term:`CPPFLAGS` is set to the
7787 value of this variable by default.
7788
7789 Additionally, the SDK's environment setup script sets the
7790 ``CPPFLAGS`` variable in the environment to the ``TARGET_CPPFLAGS``
7791 value so that executables built using the SDK also have the flags
7792 applied.
7793
Andrew Geisslerf0343792020-11-18 10:42:21 -06007794 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007795 Specifies the flags to pass to the C++ compiler when building for the
7796 target. When building in the target context,
7797 :term:`CXXFLAGS` is set to the value of this variable
7798 by default.
7799
7800 Additionally, the SDK's environment setup script sets the
7801 ``CXXFLAGS`` variable in the environment to the ``TARGET_CXXFLAGS``
7802 value so that executables built using the SDK also have the flags
7803 applied.
7804
Andrew Geisslerf0343792020-11-18 10:42:21 -06007805 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007806 Specifies the method for handling FPU code. For FPU-less targets,
7807 which include most ARM CPUs, the variable must be set to "soft". If
7808 not, the kernel emulation gets used, which results in a performance
7809 penalty.
7810
Andrew Geisslerf0343792020-11-18 10:42:21 -06007811 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007812 Specifies architecture-specific linker flags for the target system.
7813 ``TARGET_LD_ARCH`` is initialized from
7814 :term:`TUNE_LDARGS` by default in the BitBake
7815 configuration file (``meta/conf/bitbake.conf``):
7816 ::
7817
7818 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7819
Andrew Geisslerf0343792020-11-18 10:42:21 -06007820 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007821 Specifies the flags to pass to the linker when building for the
7822 target. When building in the target context,
7823 :term:`LDFLAGS` is set to the value of this variable
7824 by default.
7825
7826 Additionally, the SDK's environment setup script sets the
7827 :term:`LDFLAGS` variable in the environment to the
7828 ``TARGET_LDFLAGS`` value so that executables built using the SDK also
7829 have the flags applied.
7830
Andrew Geisslerf0343792020-11-18 10:42:21 -06007831 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007832 Specifies the target's operating system. The variable can be set to
7833 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
7834 for musl libc. For ARM/EABI targets, "linux-gnueabi" and
7835 "linux-musleabi" possible values exist.
7836
Andrew Geisslerf0343792020-11-18 10:42:21 -06007837 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007838 Specifies the prefix used for the toolchain binary target tools.
7839
7840 Depending on the type of recipe and the build target,
7841 ``TARGET_PREFIX`` is set as follows:
7842
7843 - For recipes building for the target machine, the value is
7844 "${:term:`TARGET_SYS`}-".
7845
7846 - For native recipes, the build system sets the variable to the
7847 value of ``BUILD_PREFIX``.
7848
7849 - For native SDK recipes (``nativesdk``), the build system sets the
7850 variable to the value of ``SDK_PREFIX``.
7851
Andrew Geisslerf0343792020-11-18 10:42:21 -06007852 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007853 Specifies the system, including the architecture and the operating
7854 system, for which the build is occurring in the context of the
7855 current recipe.
7856
7857 The OpenEmbedded build system automatically sets this variable based
7858 on :term:`TARGET_ARCH`,
7859 :term:`TARGET_VENDOR`, and
7860 :term:`TARGET_OS` variables.
7861
7862 .. note::
7863
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007864 You do not need to set the ``TARGET_SYS`` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007865
7866 Consider these two examples:
7867
7868 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7869 value is "i686-linux".
7870
7871 - Given a recipe being built for a little-endian, MIPS target
7872 running Linux, the value might be "mipsel-linux".
7873
Andrew Geisslerf0343792020-11-18 10:42:21 -06007874 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007875 Specifies the name of the target vendor.
7876
Andrew Geisslerf0343792020-11-18 10:42:21 -06007877 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007878 Specifies the GNU standard C library (``libc``) variant to use during
7879 the build process. This variable replaces ``POKYLIBC``, which is no
7880 longer supported.
7881
7882 You can select "glibc", "musl", "newlib", or "baremetal"
7883
Andrew Geisslerf0343792020-11-18 10:42:21 -06007884 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007885 Specifies a suffix to be appended onto the
7886 :term:`TMPDIR` value. The suffix identifies the
7887 ``libc`` variant for building. When you are building for multiple
7888 variants with the same :term:`Build Directory`, this
7889 mechanism ensures that output for different ``libc`` variants is kept
7890 separate to avoid potential conflicts.
7891
7892 In the ``defaultsetup.conf`` file, the default value of
7893 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky,
7894 which normally only support one ``libc`` variant, set
7895 ``TCLIBCAPPEND`` to "" in their distro configuration file resulting
7896 in no suffix being applied.
7897
Andrew Geisslerf0343792020-11-18 10:42:21 -06007898 :term:`TCMODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007899 Specifies the toolchain selector. ``TCMODE`` controls the
7900 characteristics of the generated packages and images by telling the
7901 OpenEmbedded build system which toolchain profile to use. By default,
7902 the OpenEmbedded build system builds its own internal toolchain. The
7903 variable's default value is "default", which uses that internal
7904 toolchain.
7905
7906 .. note::
7907
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007908 If ``TCMODE`` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007909 responsibility to ensure that the toolchain is compatible with the
7910 default toolchain. Using older or newer versions of these
7911 components might cause build problems. See the Release Notes for
7912 the Yocto Project release for the specific components with which
7913 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007914 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007915 page on the Yocto Project website and click on the "RELEASE
7916 INFORMATION" link for the appropriate release.
7917
7918 The ``TCMODE`` variable is similar to :term:`TCLIBC`,
7919 which controls the variant of the GNU standard C library (``libc``)
7920 used during the build process: ``glibc`` or ``musl``.
7921
7922 With additional layers, it is possible to use a pre-compiled external
7923 toolchain. One example is the Sourcery G++ Toolchain. The support for
7924 this toolchain resides in the separate Mentor Graphics
7925 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007926 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007927
7928 The layer's ``README`` file contains information on how to use the
7929 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7930 be sure to add the layer to your ``bblayers.conf`` file in front of
7931 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7932 in your ``local.conf`` file to the location in which you installed
7933 the toolchain.
7934
7935 The fundamentals used for this example apply to any external
7936 toolchain. You can use ``meta-sourcery`` as a template for adding
7937 support for other external toolchains.
7938
Andrew Geisslerf0343792020-11-18 10:42:21 -06007939 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007940 The location the OpenEmbedded build system uses to export tests when
7941 the :term:`TEST_EXPORT_ONLY` variable is set
7942 to "1".
7943
7944 The ``TEST_EXPORT_DIR`` variable defaults to
7945 ``"${TMPDIR}/testimage/${PN}"``.
7946
Andrew Geisslerf0343792020-11-18 10:42:21 -06007947 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007948 Specifies to export the tests only. Set this variable to "1" if you
7949 do not want to run the tests but you want them to be exported in a
7950 manner that you to run them outside of the build system.
7951
Andrew Geisslerf0343792020-11-18 10:42:21 -06007952 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007953 Holds the SSH log and the boot log for QEMU machines. The
7954 ``TEST_LOG_DIR`` variable defaults to ``"${WORKDIR}/testimage"``.
7955
7956 .. note::
7957
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007958 Actual test results reside in the task log (``log.do_testimage``),
7959 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007960
Andrew Geisslerf0343792020-11-18 10:42:21 -06007961 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007962 For automated hardware testing, specifies the command to use to
7963 control the power of the target machine under test. Typically, this
7964 command would point to a script that performs the appropriate action
7965 (e.g. interacting with a web-enabled power strip). The specified
7966 command should expect to receive as the last argument "off", "on" or
7967 "cycle" specifying to power off, on, or cycle (power off and then
7968 power on) the device, respectively.
7969
Andrew Geisslerf0343792020-11-18 10:42:21 -06007970 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007971 For automated hardware testing, specifies additional arguments to
7972 pass through to the command specified in
7973 :term:`TEST_POWERCONTROL_CMD`. Setting
7974 ``TEST_POWERCONTROL_EXTRA_ARGS`` is optional. You can use it if you
7975 wish, for example, to separate the machine-specific and
7976 non-machine-specific parts of the arguments.
7977
Andrew Geisslerf0343792020-11-18 10:42:21 -06007978 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007979 The time in seconds allowed for an image to boot before automated
7980 runtime tests begin to run against an image. The default timeout
7981 period to allow the boot process to reach the login prompt is 500
7982 seconds. You can specify a different value in the ``local.conf``
7983 file.
7984
7985 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007986 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007987 section in the Yocto Project Development Tasks Manual.
7988
Andrew Geisslerf0343792020-11-18 10:42:21 -06007989 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007990 For automated hardware testing, specifies the command to use to
7991 connect to the serial console of the target machine under test. This
7992 command simply needs to connect to the serial console and forward
7993 that connection to standard input and output as any normal terminal
7994 program does.
7995
7996 For example, to use the Picocom terminal program on serial device
7997 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:
7998 ::
7999
8000 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8001
Andrew Geisslerf0343792020-11-18 10:42:21 -06008002 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008003 For automated hardware testing, specifies additional arguments to
8004 pass through to the command specified in
8005 :term:`TEST_SERIALCONTROL_CMD`. Setting
8006 ``TEST_SERIALCONTROL_EXTRA_ARGS`` is optional. You can use it if you
8007 wish, for example, to separate the machine-specific and
8008 non-machine-specific parts of the command.
8009
Andrew Geisslerf0343792020-11-18 10:42:21 -06008010 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008011 The IP address of the build machine (host machine). This IP address
8012 is usually automatically detected. However, if detection fails, this
8013 variable needs to be set to the IP address of the build machine (i.e.
8014 where the build is taking place).
8015
8016 .. note::
8017
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008018 The ``TEST_SERVER_IP`` variable is only used for a small number of
8019 tests such as the "dnf" test suite, which needs to download packages
8020 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008021
Andrew Geisslerf0343792020-11-18 10:42:21 -06008022 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008023 An ordered list of tests (modules) to run against an image when
8024 performing automated runtime testing.
8025
8026 The OpenEmbedded build system provides a core set of tests that can
8027 be used against images.
8028
8029 .. note::
8030
8031 Currently, there is only support for running these tests under
8032 QEMU.
8033
8034 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
8035 your own tests to the list of tests by appending ``TEST_SUITES`` as
8036 follows:
8037 ::
8038
8039 TEST_SUITES_append = " mytest"
8040
8041 Alternatively, you can
8042 provide the "auto" option to have all applicable tests run against
8043 the image.
8044 ::
8045
8046 TEST_SUITES_append = " auto"
8047
8048 Using this option causes the
8049 build system to automatically run tests that are applicable to the
8050 image. Tests that are not applicable are skipped.
8051
8052 The order in which tests are run is important. Tests that depend on
8053 another test must appear later in the list than the test on which
8054 they depend. For example, if you append the list of tests with two
8055 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
8056 ``test_A``, then you must order the tests as follows:
8057 ::
8058
8059 TEST_SUITES = "test_A test_B"
8060
8061 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008062 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008063 section in the Yocto Project Development Tasks Manual.
8064
Andrew Geisslerf0343792020-11-18 10:42:21 -06008065 :term:`TEST_TARGET`
8066 Specifies the target controller to use when running tests against a
8067 test image. The default controller to use is "qemu":
8068 ::
8069
8070 TEST_TARGET = "qemu"
8071
8072 A target controller is a class that defines how an image gets
8073 deployed on a target and how a target is started. A layer can extend
8074 the controllers by adding a module in the layer's
8075 ``/lib/oeqa/controllers`` directory and by inheriting the
8076 ``BaseTarget`` class, which is an abstract class that cannot be used
8077 as a value of ``TEST_TARGET``.
8078
8079 You can provide the following arguments with ``TEST_TARGET``:
8080
8081 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008082 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008083 in the Yocto Project Development Tasks Manual for more
8084 information.
8085
8086 - *"simpleremote":* Runs the tests on target hardware that is
8087 already up and running. The hardware can be on the network or it
8088 can be a device running an image on QEMU. You must also set
8089 :term:`TEST_TARGET_IP` when you use
8090 "simpleremote".
8091
8092 .. note::
8093
8094 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008095 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008096
8097 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008098 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008099 section in the Yocto Project Development Tasks Manual.
8100
8101 :term:`TEST_TARGET_IP`
8102 The IP address of your hardware under test. The ``TEST_TARGET_IP``
8103 variable has no effect when :term:`TEST_TARGET` is
8104 set to "qemu".
8105
8106 When you specify the IP address, you can also include a port. Here is
8107 an example:
8108 ::
8109
8110 TEST_TARGET_IP = "192.168.1.4:2201"
8111
8112 Specifying a port is
8113 useful when SSH is started on a non-standard port or in cases when
8114 your hardware under test is behind a firewall or network that is not
8115 directly accessible from your host and you need to do port address
8116 translation.
8117
8118 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008119 Automatically runs the series of automated tests for images when an
8120 image is successfully built. Setting ``TESTIMAGE_AUTO`` to "1" causes
8121 any image that successfully builds to automatically boot under QEMU.
8122 Using the variable also adds in dependencies so that any SDK for
8123 which testing is requested is automatically built first.
8124
8125 These tests are written in Python making use of the ``unittest``
8126 module, and the majority of them run commands on the target system
8127 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8128 file in the :term:`Build Directory` to have the
8129 OpenEmbedded build system automatically run these tests after an
8130 image successfully builds:
8131
8132 TESTIMAGE_AUTO = "1"
8133
8134 For more information
8135 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008136 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008137 section in the Yocto Project Development Tasks Manual and the
8138 ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section.
8139
Andrew Geisslerf0343792020-11-18 10:42:21 -06008140 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008141 The directory in which the file BitBake is currently parsing is
8142 located. Do not manually set this variable.
8143
Andrew Geisslerf0343792020-11-18 10:42:21 -06008144 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008145 The time the build was started. Times appear using the hour, minute,
8146 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8147 seconds past 1400 hours).
8148
Andrew Geisslerf0343792020-11-18 10:42:21 -06008149 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008150 This variable is the base directory the OpenEmbedded build system
8151 uses for all build output and intermediate files (other than the
8152 shared state cache). By default, the ``TMPDIR`` variable points to
8153 ``tmp`` within the :term:`Build Directory`.
8154
8155 If you want to establish this directory in a location other than the
8156 default, you can uncomment and edit the following statement in the
8157 ``conf/local.conf`` file in the :term:`Source Directory`:
8158 ::
8159
8160 #TMPDIR = "${TOPDIR}/tmp"
8161
8162 An example use for this scenario is to set ``TMPDIR`` to a local disk,
8163 which does not use NFS, while having the Build Directory use NFS.
8164
8165 The filesystem used by ``TMPDIR`` must have standard filesystem
8166 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8167 persistent inodes). Due to various issues with NFS and bugs in some
8168 implementations, NFS does not meet this minimum requirement.
8169 Consequently, ``TMPDIR`` cannot be on NFS.
8170
Andrew Geisslerf0343792020-11-18 10:42:21 -06008171 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008172 This variable lists packages the OpenEmbedded build system uses when
8173 building an SDK, which contains a cross-development environment. The
8174 packages specified by this variable are part of the toolchain set
8175 that runs on the :term:`SDKMACHINE`, and each
8176 package should usually have the prefix ``nativesdk-``. For example,
8177 consider the following command when building an SDK:
8178 ::
8179
8180 $ bitbake -c populate_sdk imagename
8181
8182 In this case, a default list of packages is
8183 set in this variable, but you can add additional packages to the
8184 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008185 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008186 in the Yocto Project Application Development and the Extensible
8187 Software Development Kit (eSDK) manual for more information.
8188
8189 For background information on cross-development toolchains in the
8190 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008191 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008192 section in the Yocto Project Overview and Concepts Manual. For
8193 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008194 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008195
Andrew Geisslerf0343792020-11-18 10:42:21 -06008196 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008197 This variable defines the name used for the toolchain output. The
8198 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
8199 the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:
8200 ::
8201
8202 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8203
8204 See
8205 the :term:`SDK_NAME` and
8206 :term:`SDK_VERSION` variables for additional
8207 information.
8208
Andrew Geisslerf0343792020-11-18 10:42:21 -06008209 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008210 This variable lists packages the OpenEmbedded build system uses when
8211 it creates the target part of an SDK (i.e. the part built for the
8212 target hardware), which includes libraries and headers. Use this
8213 variable to add individual packages to the part of the SDK that runs
8214 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008215 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008216 in the Yocto Project Application Development and the Extensible
8217 Software Development Kit (eSDK) manual for more information.
8218
8219 For background information on cross-development toolchains in the
8220 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008221 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008222 section in the Yocto Project Overview and Concepts Manual. For
8223 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008224 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008225
Andrew Geisslerf0343792020-11-18 10:42:21 -06008226 :term:`TOPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008227 The top-level :term:`Build Directory`. BitBake
8228 automatically sets this variable when you initialize your build
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008229 environment using :ref:`structure-core-script`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008230
Andrew Geisslerf0343792020-11-18 10:42:21 -06008231 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008232 A sanitized version of :term:`TARGET_ARCH`. This
8233 variable is used where the architecture is needed in a value where
8234 underscores are not allowed, for example within package filenames. In
8235 this case, dash characters replace any underscore characters used in
8236 ``TARGET_ARCH``.
8237
8238 Do not edit this variable.
8239
Andrew Geisslerf0343792020-11-18 10:42:21 -06008240 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008241 The GNU canonical architecture for a specific architecture (i.e.
8242 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8243 this value to setup configuration.
8244
8245 ``TUNE_ARCH`` definitions are specific to a given architecture. The
8246 definitions can be a single static definition, or can be dynamically
8247 adjusted. You can see details for a given CPU family by looking at
8248 the architecture's ``README`` file. For example, the
8249 ``meta/conf/machine/include/mips/README`` file in the
8250 :term:`Source Directory` provides information for
8251 ``TUNE_ARCH`` specific to the ``mips`` architecture.
8252
8253 ``TUNE_ARCH`` is tied closely to
8254 :term:`TARGET_ARCH`, which defines the target
8255 machine's architecture. The BitBake configuration file
8256 (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:
8257 ::
8258
8259 TARGET_ARCH = "${TUNE_ARCH}"
8260
8261 The following list, which is by no means complete since architectures
8262 are configurable, shows supported machine architectures:
8263
8264 - arm
8265 - i586
8266 - x86_64
8267 - powerpc
8268 - powerpc64
8269 - mips
8270 - mipsel
8271
Andrew Geisslerf0343792020-11-18 10:42:21 -06008272 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008273 Specifies architecture-specific assembler flags for the target
8274 system. The set of flags is based on the selected tune features.
8275 ``TUNE_ASARGS`` is set using the tune include files, which are
8276 typically under ``meta/conf/machine/include/`` and are influenced
8277 through :term:`TUNE_FEATURES`. For example, the
8278 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8279 for the x86 architecture as follows:
8280 ::
8281
8282 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8283
8284 .. note::
8285
8286 Board Support Packages (BSPs) select the tune. The selected tune,
8287 in turn, affects the tune variables themselves (i.e. the tune can
8288 supply its own set of flags).
8289
Andrew Geisslerf0343792020-11-18 10:42:21 -06008290 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008291 Specifies architecture-specific C compiler flags for the target
8292 system. The set of flags is based on the selected tune features.
8293 ``TUNE_CCARGS`` is set using the tune include files, which are
8294 typically under ``meta/conf/machine/include/`` and are influenced
8295 through :term:`TUNE_FEATURES`.
8296
8297 .. note::
8298
8299 Board Support Packages (BSPs) select the tune. The selected tune,
8300 in turn, affects the tune variables themselves (i.e. the tune can
8301 supply its own set of flags).
8302
Andrew Geisslerf0343792020-11-18 10:42:21 -06008303 :term:`TUNE_FEATURES`
8304 Features used to "tune" a compiler for optimal use given a specific
8305 processor. The features are defined within the tune files and allow
8306 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8307 the features.
8308
8309 The OpenEmbedded build system verifies the features to be sure they
8310 are not conflicting and that they are supported.
8311
8312 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
8313 ``TUNE_FEATURES`` as follows:
8314 ::
8315
8316 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
8317
8318 See the :term:`DEFAULTTUNE` variable for more information.
8319
8320 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008321 Specifies architecture-specific linker flags for the target system.
8322 The set of flags is based on the selected tune features.
8323 ``TUNE_LDARGS`` is set using the tune include files, which are
8324 typically under ``meta/conf/machine/include/`` and are influenced
8325 through :term:`TUNE_FEATURES`. For example, the
8326 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8327 for the x86 architecture as follows:
8328 ::
8329
8330 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8331
8332 .. note::
8333
8334 Board Support Packages (BSPs) select the tune. The selected tune,
8335 in turn, affects the tune variables themselves (i.e. the tune can
8336 supply its own set of flags).
8337
Andrew Geisslerf0343792020-11-18 10:42:21 -06008338 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008339 The package architecture understood by the packaging system to define
8340 the architecture, ABI, and tuning of output packages. The specific
8341 tune is defined using the "_tune" override as follows:
8342 ::
8343
8344 TUNE_PKGARCH_tune-tune = "tune"
8345
8346 These tune-specific package architectures are defined in the machine
8347 include files. Here is an example of the "core2-32" tuning as used in
8348 the ``meta/conf/machine/include/tune-core2.inc`` file:
8349 ::
8350
8351 TUNE_PKGARCH_tune-core2-32 = "core2-32"
8352
Andrew Geisslerf0343792020-11-18 10:42:21 -06008353 :term:`TUNEABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008354 An underlying Application Binary Interface (ABI) used by a particular
8355 tuning in a given toolchain layer. Providers that use prebuilt
8356 libraries can use the ``TUNEABI``,
8357 :term:`TUNEABI_OVERRIDE`, and
8358 :term:`TUNEABI_WHITELIST` variables to check
8359 compatibility of tunings against their selection of libraries.
8360
8361 If ``TUNEABI`` is undefined, then every tuning is allowed. See the
8362 :ref:`sanity <ref-classes-sanity>` class to see how the variable is
8363 used.
8364
Andrew Geisslerf0343792020-11-18 10:42:21 -06008365 :term:`TUNEABI_OVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008366 If set, the OpenEmbedded system ignores the
8367 :term:`TUNEABI_WHITELIST` variable.
8368 Providers that use prebuilt libraries can use the
8369 ``TUNEABI_OVERRIDE``, ``TUNEABI_WHITELIST``, and
8370 :term:`TUNEABI` variables to check compatibility of a
8371 tuning against their selection of libraries.
8372
8373 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8374 variable is used.
8375
Andrew Geisslerf0343792020-11-18 10:42:21 -06008376 :term:`TUNEABI_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008377 A whitelist of permissible :term:`TUNEABI` values. If
8378 ``TUNEABI_WHITELIST`` is not set, all tunes are allowed. Providers
8379 that use prebuilt libraries can use the ``TUNEABI_WHITELIST``,
8380 :term:`TUNEABI_OVERRIDE`, and ``TUNEABI``
8381 variables to check compatibility of a tuning against their selection
8382 of libraries.
8383
8384 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8385 variable is used.
8386
Andrew Geisslerf0343792020-11-18 10:42:21 -06008387 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008388 Specifies CPU or Application Binary Interface (ABI) tuning features
8389 that conflict with feature.
8390
8391 Known tuning conflicts are specified in the machine include files in
8392 the :term:`Source Directory`. Here is an example from
8393 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8394 that lists the "o32" and "n64" features as conflicting with the "n32"
8395 feature:
8396 ::
8397
8398 TUNECONFLICTS[n32] = "o32 n64"
8399
Andrew Geisslerf0343792020-11-18 10:42:21 -06008400 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008401 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8402 feature. The specified feature is stored as a flag. Valid features
8403 are specified in the machine include files (e.g.
8404 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
8405 from that file:
8406 ::
8407
8408 TUNEVALID[bigendian] = "Enable big-endian mode."
8409
8410 See the machine include files in the :term:`Source Directory`
8411 for these features.
8412
Andrew Geisslerf0343792020-11-18 10:42:21 -06008413 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008414 Configures the :term:`UBOOT_MACHINE` and can
8415 also define :term:`IMAGE_FSTYPES` for individual
8416 cases.
8417
8418 Following is an example from the ``meta-fsl-arm`` layer. ::
8419
8420 UBOOT_CONFIG ??= "sd"
8421 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8422 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8423 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8424 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8425
8426 In this example, "sd" is selected as the configuration of the possible four for the
8427 ``UBOOT_MACHINE``. The "sd" configuration defines
8428 "mx6qsabreauto_config" as the value for ``UBOOT_MACHINE``, while the
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008429 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008430
8431 For more information on how the ``UBOOT_CONFIG`` is handled, see the
8432 :ref:`uboot-config <ref-classes-uboot-config>`
8433 class.
8434
Andrew Geisslerf0343792020-11-18 10:42:21 -06008435 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008436 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008437 image creation, the ``UBOOT_DTB_LOADADDRESS`` variable is used in
8438 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8439 the load address to be used in
8440 creating the dtb sections of Image Tree Source for the FIT image.
8441
Andrew Geisslerf0343792020-11-18 10:42:21 -06008442 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008443 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008444 image creation, the ``UBOOT_DTBO_LOADADDRESS`` variable is used in
8445 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8446 creating the dtbo sections of Image Tree Source for the FIT image.
8447
Andrew Geisslerf0343792020-11-18 10:42:21 -06008448 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008449 Specifies the entry point for the U-Boot image. During U-Boot image
8450 creation, the ``UBOOT_ENTRYPOINT`` variable is passed as a
8451 command-line parameter to the ``uboot-mkimage`` utility.
8452
Andrew Geisslerf0343792020-11-18 10:42:21 -06008453 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008454 Specifies the load address for the U-Boot image. During U-Boot image
8455 creation, the ``UBOOT_LOADADDRESS`` variable is passed as a
8456 command-line parameter to the ``uboot-mkimage`` utility.
8457
Andrew Geisslerf0343792020-11-18 10:42:21 -06008458 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008459 Appends a string to the name of the local version of the U-Boot
8460 image. For example, assuming the version of the U-Boot image built
8461 was "2013.10", the full version string reported by U-Boot would be
8462 "2013.10-yocto" given the following statement:
8463 ::
8464
8465 UBOOT_LOCALVERSION = "-yocto"
8466
Andrew Geisslerf0343792020-11-18 10:42:21 -06008467 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008468 Specifies the value passed on the ``make`` command line when building
8469 a U-Boot image. The value indicates the target platform
8470 configuration. You typically set this variable from the machine
8471 configuration file (i.e. ``conf/machine/machine_name.conf``).
8472
8473 Please see the "Selection of Processor Architecture and Board Type"
8474 section in the U-Boot README for valid values for this variable.
8475
Andrew Geisslerf0343792020-11-18 10:42:21 -06008476 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008477 Specifies the target called in the ``Makefile``. The default target
8478 is "all".
8479
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008480 :term:`UBOOT_MKIMAGE`
8481 Specifies the name of the mkimage command as used by the
8482 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8483 the FIT image. This can be used to substitute an alternative command, wrapper
8484 script or function if desired. The default is "uboot-mkimage".
8485
Andrew Geisslerf0343792020-11-18 10:42:21 -06008486 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008487 Options for the device tree compiler passed to mkimage '-D'
8488 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008489 If ``UBOOT_MKIMAGE_DTCOPTS`` is not set then kernel-fitimage will not
8490 pass the ``-D`` option to mkimage.
8491
8492 :term:`UBOOT_MKIMAGE_SIGN`
8493 Specifies the name of the mkimage command as used by the
8494 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8495 the FIT image after it has been assembled (if enabled). This can be used
8496 to substitute an alternative command, wrapper script or function if
8497 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8498
8499 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8500 Optionally specifies additional arguments for the
8501 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8502 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008503
Andrew Geisslerf0343792020-11-18 10:42:21 -06008504 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008505 Specifies the entrypoint for the RAM disk image.
8506 During FIT image creation, the
8507 ``UBOOT_RD_ENTRYPOINT`` variable is used
8508 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8509 entrypoint to be used in creating the Image Tree Source for
8510 the FIT image.
8511
Andrew Geisslerf0343792020-11-18 10:42:21 -06008512 :term:`UBOOT_RD_LOADADDRESS`
8513 Specifies the load address for the RAM disk image.
8514 During FIT image creation, the
8515 ``UBOOT_RD_LOADADDRESS`` variable is used
8516 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8517 load address to be used in creating the Image Tree Source for
8518 the FIT image.
8519
8520 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521 Enable signing of FIT image. The default value is "0".
8522
Andrew Geisslerf0343792020-11-18 10:42:21 -06008523 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008524 Location of the directory containing the RSA key and
8525 certificate used for signing FIT image.
8526
Andrew Geisslerf0343792020-11-18 10:42:21 -06008527 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008528 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008529 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8530 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8531 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8532
Andrew Geisslerf0343792020-11-18 10:42:21 -06008533 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008534 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8535 has a ``.sb`` extension.
8536
8537 The default U-Boot extension is ``.bin``
8538
Andrew Geisslerf0343792020-11-18 10:42:21 -06008539 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008540 Specifies the target used for building U-Boot. The target is passed
8541 directly as part of the "make" command (e.g. SPL and AIS). If you do
8542 not specifically set this variable, the OpenEmbedded build process
8543 passes and uses "all" for the target during the U-Boot building
8544 process.
8545
Andrew Geisslerf0343792020-11-18 10:42:21 -06008546 :term:`UNKNOWN_CONFIGURE_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008547 Specifies a list of options that, if reported by the configure script
8548 as being invalid, should not generate a warning during the
8549 :ref:`ref-tasks-configure` task. Normally, invalid
8550 configure options are simply not passed to the configure script (e.g.
8551 should be removed from :term:`EXTRA_OECONF` or
8552 :term:`PACKAGECONFIG_CONFARGS`).
8553 However, common options, for example, exist that are passed to all
8554 configure scripts at a class level that might not be valid for some
8555 configure scripts. It follows that no benefit exists in seeing a
8556 warning about these options. For these cases, the options are added
8557 to ``UNKNOWN_CONFIGURE_WHITELIST``.
8558
8559 The configure arguments check that uses
8560 ``UNKNOWN_CONFIGURE_WHITELIST`` is part of the
8561 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8562 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8563
Andrew Geisslerf0343792020-11-18 10:42:21 -06008564 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008565 For recipes inheriting the
8566 :ref:`update-rc.d <ref-classes-update-rc.d>` class, ``UPDATERCPN``
8567 specifies the package that contains the initscript that is enabled.
8568
8569 The default value is "${PN}". Given that almost all recipes that
8570 install initscripts package them in the main package for the recipe,
8571 you rarely need to set this variable in individual recipes.
8572
Andrew Geisslerf0343792020-11-18 10:42:21 -06008573 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008574 You can perform a per-recipe check for what the latest upstream
8575 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8576 the recipe source code is provided from Git repositories, the
8577 OpenEmbedded build system determines the latest upstream version by
8578 picking the latest tag from the list of all repository tags.
8579
8580 You can use the ``UPSTREAM_CHECK_GITTAGREGEX`` variable to provide a
8581 regular expression to filter only the relevant tags should the
8582 default filter not work correctly.
8583 ::
8584
8585 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8586
Andrew Geisslerf0343792020-11-18 10:42:21 -06008587 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008588 Use the ``UPSTREAM_CHECK_REGEX`` variable to specify a different
8589 regular expression instead of the default one when the package
8590 checking system is parsing the page found using
8591 :term:`UPSTREAM_CHECK_URI`.
8592 ::
8593
8594 UPSTREAM_CHECK_REGEX = "package_regex"
8595
Andrew Geisslerf0343792020-11-18 10:42:21 -06008596 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008597 You can perform a per-recipe check for what the latest upstream
8598 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8599 the source code is provided from tarballs, the latest version is
8600 determined by fetching the directory listing where the tarball is and
8601 attempting to find a later tarball. When this approach does not work,
8602 you can use ``UPSTREAM_CHECK_URI`` to provide a different URI that
8603 contains the link to the latest tarball.
8604 ::
8605
8606 UPSTREAM_CHECK_URI = "recipe_url"
8607
Andrew Geisslerf0343792020-11-18 10:42:21 -06008608 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008609 Determines if ``devtmpfs`` is used for ``/dev`` population. The
8610 default value used for ``USE_DEVFS`` is "1" when no value is
8611 specifically set. Typically, you would set ``USE_DEVFS`` to "0" for a
8612 statically populated ``/dev`` directory.
8613
Andrew Geissler09209ee2020-12-13 08:44:15 -06008614 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008615 the Yocto Project Development Tasks Manual for information on how to
8616 use this variable.
8617
Andrew Geisslerf0343792020-11-18 10:42:21 -06008618 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008619 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008620 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008621 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008622 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008623 virtual terminals in order to enable logging in through those
8624 terminals.
8625
8626 The default value used for ``USE_VT`` is "1" when no default value is
8627 specifically set. Typically, you would set ``USE_VT`` to "0" in the
8628 machine configuration file for machines that do not have a graphical
8629 display attached and therefore do not need virtual terminal
8630 functionality.
8631
Andrew Geisslerf0343792020-11-18 10:42:21 -06008632 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008633 A list of classes to globally inherit. These classes are used by the
8634 OpenEmbedded build system to enable extra features (e.g.
8635 ``buildstats``, ``image-mklibs``, and so forth).
8636
8637 The default list is set in your ``local.conf`` file:
8638 ::
8639
8640 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
8641
8642 For more information, see
8643 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8644
Andrew Geisslerf0343792020-11-18 10:42:21 -06008645 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008646 If set to ``error``, forces the OpenEmbedded build system to produce
8647 an error if the user identification (``uid``) and group
8648 identification (``gid``) values are not defined in any of the files
8649 listed in :term:`USERADD_UID_TABLES` and
8650 :term:`USERADD_GID_TABLES`. If set to
8651 ``warn``, a warning will be issued instead.
8652
8653 The default behavior for the build system is to dynamically apply
8654 ``uid`` and ``gid`` values. Consequently, the
8655 ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan
8656 on using statically assigned ``gid`` and ``uid`` values, you should
8657 set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf``
8658 file as follows:
8659 ::
8660
8661 USERADD_ERROR_DYNAMIC = "error"
8662
8663 Overriding the
8664 default behavior implies you are going to also take steps to set
8665 static ``uid`` and ``gid`` values through use of the
8666 :term:`USERADDEXTENSION`,
8667 :term:`USERADD_UID_TABLES`, and
8668 :term:`USERADD_GID_TABLES` variables.
8669
8670 .. note::
8671
8672 There is a difference in behavior between setting
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008673 ``USERADD_ERROR_DYNAMIC`` to ``error`` and setting it to ``warn``.
8674 When it is set to ``warn``, the build system will report a warning for
8675 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8676 to ``error``, it will only report errors for recipes that are actually
8677 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008678 This saves you from having to add static IDs for recipes that you
8679 know will never be built.
8680
Andrew Geisslerf0343792020-11-18 10:42:21 -06008681 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008682 Specifies a password file to use for obtaining static group
8683 identification (``gid``) values when the OpenEmbedded build system
8684 adds a group to the system during package installation.
8685
8686 When applying static group identification (``gid``) values, the
8687 OpenEmbedded build system looks in :term:`BBPATH` for a
8688 ``files/group`` file and then applies those ``uid`` values. Set the
8689 variable as follows in your ``local.conf`` file:
8690 ::
8691
8692
8693 USERADD_GID_TABLES = "files/group"
8694
8695 .. note::
8696
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008697 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8698 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008699
Andrew Geisslerf0343792020-11-18 10:42:21 -06008700 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008701 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8702 this variable specifies the individual packages within the recipe
8703 that require users and/or groups to be added.
8704
8705 You must set this variable if the recipe inherits the class. For
8706 example, the following enables adding a user for the main package in
8707 a recipe:
8708 ::
8709
8710 USERADD_PACKAGES = "${PN}"
8711
8712 .. note::
8713
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008714 It follows that if you are going to use the ``USERADD_PACKAGES``
8715 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8716 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008717
Andrew Geisslerf0343792020-11-18 10:42:21 -06008718 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008719 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8720 this variable specifies for a package what parameters should pass to
8721 the ``useradd`` command if you add a user to the system when the
8722 package is installed.
8723
8724 Here is an example from the ``dbus`` recipe:
8725 ::
8726
8727 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
8728 --no-create-home --shell /bin/false \
8729 --user-group messagebus"
8730
8731 For information on the
8732 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008733 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008734
Andrew Geisslerf0343792020-11-18 10:42:21 -06008735 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008736 Specifies a password file to use for obtaining static user
8737 identification (``uid``) values when the OpenEmbedded build system
8738 adds a user to the system during package installation.
8739
8740 When applying static user identification (``uid``) values, the
8741 OpenEmbedded build system looks in :term:`BBPATH` for a
8742 ``files/passwd`` file and then applies those ``uid`` values. Set the
8743 variable as follows in your ``local.conf`` file:
8744 ::
8745
8746 USERADD_UID_TABLES = "files/passwd"
8747
8748 .. note::
8749
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008750 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8751 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008752
Andrew Geisslerf0343792020-11-18 10:42:21 -06008753 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008754 When set to "useradd-staticids", causes the OpenEmbedded build system
8755 to base all user and group additions on a static ``passwd`` and
8756 ``group`` files found in :term:`BBPATH`.
8757
8758 To use static user identification (``uid``) and group identification
8759 (``gid``) values, set the variable as follows in your ``local.conf``
8760 file: USERADDEXTENSION = "useradd-staticids"
8761
8762 .. note::
8763
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008764 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008765 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008766 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008767
8768 If you use static ``uid`` and ``gid`` information, you must also
8769 specify the ``files/passwd`` and ``files/group`` files by setting the
8770 :term:`USERADD_UID_TABLES` and
8771 :term:`USERADD_GID_TABLES` variables.
8772 Additionally, you should also set the
8773 :term:`USERADD_ERROR_DYNAMIC` variable.
8774
Andrew Geisslerf0343792020-11-18 10:42:21 -06008775 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008776 Specifies the persistence of the target's ``/var/log`` directory,
8777 which is used to house postinstall target log files.
8778
8779 By default, ``VOLATILE_LOG_DIR`` is set to "yes", which means the
8780 file is not persistent. You can override this setting by setting the
8781 variable to "no" to make the log directory persistent.
8782
Andrew Geisslerf0343792020-11-18 10:42:21 -06008783 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008784 Specifies the quality assurance checks whose failures are reported as
8785 warnings by the OpenEmbedded build system. You set this variable in
8786 your distribution configuration file. For a list of the checks you
8787 can control with this variable, see the
8788 ":ref:`insane.bbclass <ref-classes-insane>`" section.
8789
Andrew Geisslerf0343792020-11-18 10:42:21 -06008790 :term:`WKS_FILE`
8791 Specifies the location of the Wic kickstart file that is used by the
8792 OpenEmbedded build system to create a partitioned image
8793 (image\ ``.wic``). For information on how to create a partitioned
8794 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008795 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008796 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008797 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008798
8799 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008800 When placed in the recipe that builds your image, this variable lists
8801 build-time dependencies. The ``WKS_FILE_DEPENDS`` variable is only
8802 applicable when Wic images are active (i.e. when
8803 :term:`IMAGE_FSTYPES` contains entries related
8804 to Wic). If your recipe does not create Wic images, the variable has
8805 no effect.
8806
8807 The ``WKS_FILE_DEPENDS`` variable is similar to the
8808 :term:`DEPENDS` variable. When you use the variable in
8809 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler95ac1b82021-03-31 14:34:31 -05008810 ``WKS_FILE_DEPENDS`` variable are added to the ``DEPENDS`` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008811
8812 With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to
8813 specify a list of additional dependencies (e.g. native tools,
8814 bootloaders, and so forth), that are required to build Wic images.
8815 Following is an example:
8816 ::
8817
8818 WKS_FILE_DEPENDS = "some-native-tool"
8819
8820 In the
8821 previous example, some-native-tool would be replaced with an actual
8822 native tool on which the build would depend.
8823
Andrew Geisslerf0343792020-11-18 10:42:21 -06008824 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008825 The pathname of the work directory in which the OpenEmbedded build
8826 system builds a recipe. This directory is located within the
8827 :term:`TMPDIR` directory structure and is specific to
8828 the recipe being built and the system for which it is being built.
8829
8830 The ``WORKDIR`` directory is defined as follows:
8831 ::
8832
8833 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8834
8835 The actual directory depends on several things:
8836
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008837 - :term:`TMPDIR`: The top-level build output directory
8838 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8839 - :term:`PN`: The recipe name
8840 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8841 is usually the case for most recipes, then `EXTENDPE` is blank)
8842 - :term:`PV`: The recipe version
8843 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008844
8845 As an example, assume a Source Directory top-level folder name
8846 ``poky``, a default Build Directory at ``poky/build``, and a
8847 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8848 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8849 directory the build system uses to build the package would be as
8850 follows:
8851 ::
8852
8853 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8854
Andrew Geisslerf0343792020-11-18 10:42:21 -06008855 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008856 Specifies the packages that should be installed to provide an X
8857 server and drivers for the current machine, assuming your image
8858 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8859 indirectly, includes "x11-base" in
8860 :term:`IMAGE_FEATURES`.
8861
8862 The default value of ``XSERVER``, if not specified in the machine
8863 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8864