blob: 316e8aabf34ff4bc1c98f1b0f80da3bc35d605f1 [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
81 If ALTERNATIVE_LINK_NAME is not defined, it defaults to ${bindir}/ name.
82
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 Geisslerf0343792020-11-18 10:42:21 -0600135 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500136 An override list of append strings for each target specified with
137 :term:`LABELS`.
138
139 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
140 information on how this variable is used.
141
Andrew Geisslerf0343792020-11-18 10:42:21 -0600142 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500143 The minimal command and arguments used to run ``ar``.
144
Andrew Geisslerf0343792020-11-18 10:42:21 -0600145 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500146 When used with the :ref:`archiver <ref-classes-archiver>` class,
147 determines the type of information used to create a released archive.
148 You can use this variable to create archives of patched source,
149 original source, configured source, and so forth by employing the
150 following variable flags (varflags):
151 ::
152
153 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
154 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
155 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
156 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
157 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
158 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
159 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
160 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
161
162 For information on how the variable works, see the
163 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
164
Andrew Geisslerf0343792020-11-18 10:42:21 -0600165 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500166 Minimal command and arguments needed to run the assembler.
167
Andrew Geisslerf0343792020-11-18 10:42:21 -0600168 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500169 Lists recipe names (:term:`PN` values) BitBake does not
170 attempt to build. Instead, BitBake assumes these recipes have already
171 been built.
172
173 In OpenEmbedded-Core, ``ASSUME_PROVIDED`` mostly specifies native
174 tools that should not be built. An example is ``git-native``, which
175 when specified, allows for the Git binary from the host to be used
176 rather than building ``git-native``.
177
Andrew Geisslerf0343792020-11-18 10:42:21 -0600178 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500179 Provides additional ``shlibs`` provider mapping information, which
180 adds to or overwrites the information provided automatically by the
181 system. Separate multiple entries using spaces.
182
183 As an example, use the following form to add an ``shlib`` provider of
184 shlibname in packagename with the optional version:
185 ::
186
187 shlibname:packagename[_version]
188
189 Here is an example that adds a shared library named ``libEGL.so.1``
190 as being provided by the ``libegl-implementation`` package:
191 ::
192
193 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
194
Andrew Geisslerf0343792020-11-18 10:42:21 -0600195 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500196 The email address used to contact the original author or authors in
197 order to send patches and forward bugs.
198
Andrew Geisslerf0343792020-11-18 10:42:21 -0600199 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500200 When the :ref:`debian <ref-classes-debian>` class is inherited,
201 which is the default behavior, ``AUTO_LIBNAME_PKGS`` specifies which
202 packages should be checked for libraries and renamed according to
203 Debian library package naming.
204
205 The default value is "${PACKAGES}", which causes the debian class to
206 act on all packages that are explicitly generated by the recipe.
207
Andrew Geisslerf0343792020-11-18 10:42:21 -0600208 :term:`AUTO_SYSLINUXMENU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500209 Enables creating an automatic menu for the syslinux bootloader. You
210 must set this variable in your recipe. The
211 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
212
Andrew Geisslerf0343792020-11-18 10:42:21 -0600213 :term:`AUTOREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500214 When ``SRCREV`` is set to the value of this variable, it specifies to
215 use the latest source revision in the repository. Here is an example:
216 ::
217
218 SRCREV = "${AUTOREV}"
219
220 If you use the previous statement to retrieve the latest version of
221 software, you need to be sure :term:`PV` contains
222 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
223 have a kernel recipe that inherits the
224 :ref:`kernel <ref-classes-kernel>` class and you use the previous
225 statement. In this example, ``${SRCPV}`` does not automatically get
226 into ``PV``. Consequently, you need to change ``PV`` in your recipe
227 so that it does contain ``${SRCPV}``.
228
229 For more information see the
230 ":ref:`dev-manual/dev-manual-common-tasks:automatically incrementing a package version number`"
231 section in the Yocto Project Development Tasks Manual.
232
Andrew Geisslerf0343792020-11-18 10:42:21 -0600233 :term:`AVAILABLE_LICENSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234 List of licenses found in the directories specified by
235 :term:`COMMON_LICENSE_DIR` and
236 :term:`LICENSE_PATH`.
237
238 .. note::
239
240 It is assumed that all changes to
241 COMMON_LICENSE_DIR
242 and
243 LICENSE_PATH
244 have been done before
245 AVAILABLE_LICENSES
246 is defined (in
247 license.bbclass
248 ).
249
Andrew Geisslerf0343792020-11-18 10:42:21 -0600250 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500251 The list of defined CPU and Application Binary Interface (ABI)
252 tunings (i.e. "tunes") available for use by the OpenEmbedded build
253 system.
254
255 The list simply presents the tunes that are available. Not all tunes
256 may be compatible with a particular machine configuration, or with
257 each other in a
258 :ref:`Multilib <dev-manual/dev-manual-common-tasks:combining multiple versions of library files into one image>`
259 configuration.
260
261 To add a tune to the list, be sure to append it with spaces using the
262 "+=" BitBake operator. Do not simply replace the list by using the
263 "=" operator. See the
264 ":ref:`Basic Syntax <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax>`" section in the BitBake
265 User Manual for more information.
266
Andrew Geisslerf0343792020-11-18 10:42:21 -0600267 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500268 The directory within the :term:`Build Directory` in
269 which the OpenEmbedded build system places generated objects during a
270 recipe's build process. By default, this directory is the same as the
271 :term:`S` directory, which is defined as:
272 ::
273
274 S = "${WORKDIR}/${BP}"
275
276 You can separate the (``S``) directory and the directory pointed to
277 by the ``B`` variable. Most Autotools-based recipes support
278 separating these directories. The build system defaults to using
279 separate directories for ``gcc`` and some kernel recipes.
280
Andrew Geisslerf0343792020-11-18 10:42:21 -0600281 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500282 Lists "recommended-only" packages to not install. Recommended-only
283 packages are packages installed only through the
284 :term:`RRECOMMENDS` variable. You can prevent any
285 of these "recommended" packages from being installed by listing them
286 with the ``BAD_RECOMMENDATIONS`` variable:
287 ::
288
289 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
290
291 You can set this variable globally in your ``local.conf`` file or you
292 can attach it to a specific image recipe by using the recipe name
293 override:
294 ::
295
296 BAD_RECOMMENDATIONS_pn-target_image = "package_name"
297
298 It is important to realize that if you choose to not install packages
299 using this variable and some other packages are dependent on them
300 (i.e. listed in a recipe's :term:`RDEPENDS`
301 variable), the OpenEmbedded build system ignores your request and
302 will install the packages to avoid dependency errors.
303
304 Support for this variable exists only when using the IPK and RPM
305 packaging backend. Support does not exist for DEB.
306
307 See the :term:`NO_RECOMMENDATIONS` and the
308 :term:`PACKAGE_EXCLUDE` variables for related
309 information.
310
Andrew Geisslerf0343792020-11-18 10:42:21 -0600311 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500312 The library directory name for the CPU or Application Binary
313 Interface (ABI) tune. The ``BASE_LIB`` applies only in the Multilib
314 context. See the ":ref:`dev-manual/dev-manual-common-tasks:combining multiple versions of library files into one image`"
315 section in the Yocto Project Development Tasks Manual for information
316 on Multilib.
317
318 The ``BASE_LIB`` variable is defined in the machine include files in
319 the :term:`Source Directory`. If Multilib is not
320 being used, the value defaults to "lib".
321
Andrew Geisslerf0343792020-11-18 10:42:21 -0600322 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500323 Points to the base of the work directory for all recipes. The default
324 value is "${TMPDIR}/work".
325
Andrew Geisslerf0343792020-11-18 10:42:21 -0600326 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500327 Specifies a space-delimited list of hosts that the fetcher is allowed
328 to use to obtain the required source code. Following are
329 considerations surrounding this variable:
330
331 - This host list is only used if ``BB_NO_NETWORK`` is either not set
332 or set to "0".
333
334 - Limited support for wildcard matching against the beginning of
335 host names exists. For example, the following setting matches
336 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
337 ::
338
339 BB_ALLOWED_NETWORKS = "*.gnu.org"
340
341 .. note::
342
343 The use of the "``*``" character only works at the beginning of
344 a host name and it must be isolated from the remainder of the
345 host name. You cannot use the wildcard character in any other
346 location of the name or combined with the front part of the
347 name.
348
349 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
350 is not.
351
352 - Mirrors not in the host list are skipped and logged in debug.
353
354 - Attempts to access networks not in the host list cause a failure.
355
356 Using ``BB_ALLOWED_NETWORKS`` in conjunction with
357 :term:`PREMIRRORS` is very useful. Adding the host
358 you want to use to ``PREMIRRORS`` results in the source code being
359 fetched from an allowed location and avoids raising an error when a
360 host that is not allowed is in a :term:`SRC_URI`
361 statement. This is because the fetcher does not attempt to use the
362 host listed in ``SRC_URI`` after a successful fetch from the
363 ``PREMIRRORS`` occurs.
364
Andrew Geisslerf0343792020-11-18 10:42:21 -0600365 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500366 Defines how BitBake handles situations where an append file
367 (``.bbappend``) has no corresponding recipe file (``.bb``). This
368 condition often occurs when layers get out of sync (e.g. ``oe-core``
369 bumps a recipe version and the old recipe no longer exists and the
370 other layer has not been updated to the new version of the recipe
371 yet).
372
373 The default fatal behavior is safest because it is the sane reaction
374 given something is out of sync. It is important to realize when your
375 changes are no longer being applied.
376
377 You can change the default behavior by setting this variable to "1",
378 "yes", or "true" in your ``local.conf`` file, which is located in the
379 :term:`Build Directory`: Here is an example:
380 ::
381
382 BB_DANGLINGAPPENDS_WARNONLY = "1"
383
Andrew Geisslerf0343792020-11-18 10:42:21 -0600384 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500385 Monitors disk space and available inodes during the build and allows
386 you to control the build based on these parameters.
387
388 Disk space monitoring is disabled by default. To enable monitoring,
389 add the ``BB_DISKMON_DIRS`` variable to your ``conf/local.conf`` file
390 found in the :term:`Build Directory`. Use the
391 following form:
392 ::
393
394 BB_DISKMON_DIRS = "action,dir,threshold [...]"
395
396 where:
397
398 action is:
399 ABORT: Immediately abort the build when
400 a threshold is broken.
401 STOPTASKS: Stop the build after the currently
402 executing tasks have finished when
403 a threshold is broken.
404 WARN: Issue a warning but continue the
405 build when a threshold is broken.
406 Subsequent warnings are issued as
407 defined by the BB_DISKMON_WARNINTERVAL
408 variable, which must be defined in
409 the conf/local.conf file.
410
411 dir is:
412 Any directory you choose. You can specify one or
413 more directories to monitor by separating the
414 groupings with a space. If two directories are
415 on the same device, only the first directory
416 is monitored.
417
418 threshold is:
419 Either the minimum available disk space,
420 the minimum number of free inodes, or
421 both. You must specify at least one. To
422 omit one or the other, simply omit the value.
423 Specify the threshold using G, M, K for Gbytes,
424 Mbytes, and Kbytes, respectively. If you do
425 not specify G, M, or K, Kbytes is assumed by
426 default. Do not use GB, MB, or KB.
427
428 Here are some examples:
429 ::
430
431 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
432 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
433 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
434
435 The first example works only if you also provide the
436 :term:`BB_DISKMON_WARNINTERVAL`
437 variable in the ``conf/local.conf``. This example causes the build
438 system to immediately abort when either the disk space in
439 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
440 below 100 Kbytes. Because two directories are provided with the
441 variable, the build system also issue a warning when the disk space
442 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
443 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
444 during intervals as defined by the ``BB_DISKMON_WARNINTERVAL``
445 variable.
446
447 The second example stops the build after all currently executing
448 tasks complete when the minimum disk space in the ``${TMPDIR}``
449 directory drops below 1 Gbyte. No disk monitoring occurs for the free
450 inodes in this case.
451
452 The final example immediately aborts the build when the number of
453 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
454 disk space monitoring for the directory itself occurs in this case.
455
Andrew Geisslerf0343792020-11-18 10:42:21 -0600456 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500457 Defines the disk space and free inode warning intervals. To set these
458 intervals, define the variable in your ``conf/local.conf`` file in
459 the :term:`Build Directory`.
460
461 If you are going to use the ``BB_DISKMON_WARNINTERVAL`` variable, you
462 must also use the :term:`BB_DISKMON_DIRS`
463 variable and define its action as "WARN". During the build,
464 subsequent warnings are issued each time disk space or number of free
465 inodes further reduces by the respective interval.
466
467 If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you
468 do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk
469 monitoring interval defaults to the following:
470 ::
471
472 BB_DISKMON_WARNINTERVAL = "50M,5K"
473
474 When specifying the variable in your configuration file, use the
475 following form:
476 ::
477
478 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
479
480 where:
481
482 disk_space_interval is:
483 An interval of memory expressed in either
484 G, M, or K for Gbytes, Mbytes, or Kbytes,
485 respectively. You cannot use GB, MB, or KB.
486
487 disk_inode_interval is:
488 An interval of free inodes expressed in either
489 G, M, or K for Gbytes, Mbytes, or Kbytes,
490 respectively. You cannot use GB, MB, or KB.
491
492 Here is an example:
493 ::
494
495 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
496 BB_DISKMON_WARNINTERVAL = "50M,5K"
497
498 These variables cause the
499 OpenEmbedded build system to issue subsequent warnings each time the
500 available disk space further reduces by 50 Mbytes or the number of
501 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
502 directory. Subsequent warnings based on the interval occur each time
503 a respective interval is reached beyond the initial warning (i.e. 1
504 Gbytes and 100 Kbytes).
505
Andrew Geisslerf0343792020-11-18 10:42:21 -0600506 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500507 Causes tarballs of the source control repositories (e.g. Git
508 repositories), including metadata, to be placed in the
509 :term:`DL_DIR` directory.
510
511 For performance reasons, creating and placing tarballs of these
512 repositories is not the default action by the OpenEmbedded build
513 system.
514 ::
515
516 BB_GENERATE_MIRROR_TARBALLS = "1"
517
518 Set this variable in your
519 ``local.conf`` file in the :term:`Build Directory`.
520
521 Once you have the tarballs containing your source files, you can
522 clean up your ``DL_DIR`` directory by deleting any Git or other
523 source control work directories.
524
Andrew Geisslerf0343792020-11-18 10:42:21 -0600525 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500526 The maximum number of tasks BitBake should run in parallel at any one
527 time. The OpenEmbedded build system automatically configures this
528 variable to be equal to the number of cores on the build system. For
529 example, a system with a dual core processor that also uses
530 hyper-threading causes the ``BB_NUMBER_THREADS`` variable to default
531 to "4".
532
533 For single socket systems (i.e. one CPU), you should not have to
534 override this variable to gain optimal parallelism during builds.
535 However, if you have very large systems that employ multiple physical
536 CPUs, you might want to make sure the ``BB_NUMBER_THREADS`` variable
537 is not set higher than "20".
538
539 For more information on speeding up builds, see the
540 ":ref:`dev-manual/dev-manual-common-tasks:speeding up a build`"
541 section in the Yocto Project Development Tasks Manual.
542
Andrew Geisslerf0343792020-11-18 10:42:21 -0600543 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500544 Specifies the time (in seconds) after which to unload the BitBake
545 server due to inactivity. Set ``BB_SERVER_TIMEOUT`` to determine how
546 long the BitBake server stays resident between invocations.
547
548 For example, the following statement in your ``local.conf`` file
549 instructs the server to be unloaded after 20 seconds of inactivity:
550 ::
551
552 BB_SERVER_TIMEOUT = "20"
553
554 If you want the server to never be unloaded,
555 set ``BB_SERVER_TIMEOUT`` to "-1".
556
Andrew Geisslerf0343792020-11-18 10:42:21 -0600557 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500558 Allows you to extend a recipe so that it builds variants of the
559 software. Common variants for recipes exist such as "natives" like
560 ``quilt-native``, which is a copy of Quilt built to run on the build
561 system; "crosses" such as ``gcc-cross``, which is a compiler built to
562 run on the build machine but produces binaries that run on the target
563 :term:`MACHINE`; "nativesdk", which targets the SDK
564 machine instead of ``MACHINE``; and "mulitlibs" in the form
565 "``multilib:``\ multilib_name".
566
567 To build a different variant of the recipe with a minimal amount of
568 code, it usually is as simple as adding the following to your recipe:
569 ::
570
571 BBCLASSEXTEND =+ "native nativesdk"
572 BBCLASSEXTEND =+ "multilib:multilib_name"
573
574 .. note::
575
576 Internally, the ``BBCLASSEXTEND`` mechanism generates recipe
577 variants by rewriting variable values and applying overrides such
578 as ``_class-native``. For example, to generate a native version of
579 a recipe, a :term:`DEPENDS` on "foo" is rewritten
580 to a ``DEPENDS`` on "foo-native".
581
582 Even when using ``BBCLASSEXTEND``, the recipe is only parsed once.
583 Parsing once adds some limitations. For example, it is not
584 possible to include a different file depending on the variant,
585 since ``include`` statements are processed when the recipe is
586 parsed.
587
Andrew Geisslerf0343792020-11-18 10:42:21 -0600588 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 Lists the names of configured layers. These names are used to find
590 the other ``BBFILE_*`` variables. Typically, each layer will append
591 its name to this variable in its ``conf/layer.conf`` file.
592
Andrew Geisslerf0343792020-11-18 10:42:21 -0600593 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 Variable that expands to match files from
595 :term:`BBFILES` in a particular layer. This variable
596 is used in the ``conf/layer.conf`` file and must be suffixed with the
597 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
598
Andrew Geisslerf0343792020-11-18 10:42:21 -0600599 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500600 Assigns the priority for recipe files in each layer.
601
602 This variable is useful in situations where the same recipe appears
603 in more than one layer. Setting this variable allows you to
604 prioritize a layer against other layers that contain the same recipe
605 - effectively letting you control the precedence for the multiple
606 layers. The precedence established through this variable stands
607 regardless of a recipe's version (:term:`PV` variable). For
608 example, a layer that has a recipe with a higher ``PV`` value but for
609 which the ``BBFILE_PRIORITY`` is set to have a lower precedence still
610 has a lower precedence.
611
612 A larger value for the ``BBFILE_PRIORITY`` variable results in a
613 higher precedence. For example, the value 6 has a higher precedence
614 than the value 5. If not specified, the ``BBFILE_PRIORITY`` variable
615 is set based on layer dependencies (see the ``LAYERDEPENDS`` variable
616 for more information. The default priority, if unspecified for a
617 layer with no dependencies, is the lowest defined priority + 1 (or 1
618 if no priorities are defined).
619
620 .. tip::
621
622 You can use the command
623 bitbake-layers show-layers
624 to list all configured layers along with their priorities.
625
Andrew Geisslerf0343792020-11-18 10:42:21 -0600626 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500627 A space-separated list of recipe files BitBake uses to build
628 software.
629
630 When specifying recipe files, you can pattern match using Python's
631 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
632 For details on the syntax, see the documentation by following the
633 previous link.
634
Andrew Geisslerf0343792020-11-18 10:42:21 -0600635 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500636 Activates content when identified layers are present. You identify
637 the layers by the collections that the layers define.
638
639 Use the ``BBFILES_DYNAMIC`` variable to avoid ``.bbappend`` files
640 whose corresponding ``.bb`` file is in a layer that attempts to
641 modify other layers through ``.bbappend`` but does not want to
642 introduce a hard dependency on those other layers.
643
644 Use the following form for ``BBFILES_DYNAMIC``:
645 collection_name:filename_pattern The following example identifies two
646 collection names and two filename patterns:
647 ::
648
649 BBFILES_DYNAMIC += " \
650 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
651 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
652 "
653
654 This next example shows an error message that occurs because invalid
655 entries are found, which cause parsing to abort:
656 ::
657
658 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
659 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
660 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
661
Andrew Geisslerf0343792020-11-18 10:42:21 -0600662 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500663 Variable that controls how BitBake displays logs on build failure.
664
Andrew Geisslerf0343792020-11-18 10:42:21 -0600665 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500666 If :term:`BBINCLUDELOGS` is set, specifies the
667 maximum number of lines from the task log file to print when
668 reporting a failed task. If you do not set ``BBINCLUDELOGS_LINES``,
669 the entire log is printed.
670
Andrew Geisslerf0343792020-11-18 10:42:21 -0600671 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500672 Lists the layers to enable during the build. This variable is defined
673 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
674 Here is an example:
675 ::
676
677 BBLAYERS = " \
678 /home/scottrif/poky/meta \ /home/scottrif/poky/meta-poky \
679 /home/scottrif/poky/meta-yocto-bsp \
680 /home/scottrif/poky/meta-mykernel \
681 "
682
683 This example enables four layers, one of which is a custom,
684 user-defined layer named ``meta-mykernel``.
685
Andrew Geisslerf0343792020-11-18 10:42:21 -0600686 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500687 Prevents BitBake from processing recipes and recipe append files.
688
689 You can use the ``BBMASK`` variable to "hide" these ``.bb`` and
690 ``.bbappend`` files. BitBake ignores any recipe or recipe append
691 files that match any of the expressions. It is as if BitBake does not
692 see them at all. Consequently, matching files are not parsed or
693 otherwise used by BitBake.
694
695 The values you provide are passed to Python's regular expression
696 compiler. Consequently, the syntax follows Python's Regular
697 Expression (re) syntax. The expressions are compared against the full
698 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500699 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700
701 The following example uses a complete regular expression to tell
702 BitBake to ignore all recipe and recipe append files in the
703 ``meta-ti/recipes-misc/`` directory:
704 ::
705
706 BBMASK = "meta-ti/recipes-misc/"
707
708 If you want to mask out multiple directories or recipes, you can
709 specify multiple regular expression fragments. This next example
710 masks out multiple directories and individual recipes: ::
711
712 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
713 BBMASK += "/meta-oe/recipes-support/"
714 BBMASK += "/meta-foo/.*/openldap"
715 BBMASK += "opencv.*\.bbappend"
716 BBMASK += "lzma"
717
718 .. note::
719
720 When specifying a directory name, use the trailing slash character
721 to ensure you match just that directory name.
722
Andrew Geisslerf0343792020-11-18 10:42:21 -0600723 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500724 Specifies each additional separate configuration when you are
725 building targets with multiple configurations. Use this variable in
726 your ``conf/local.conf`` configuration file. Specify a
727 multiconfigname for each configuration file you are using. For
728 example, the following line specifies three configuration files:
729 ::
730
731 BBMULTICONFIG = "configA configB configC"
732
733 Each configuration file you
734 use must reside in the :term:`Build Directory`
735 ``conf/multiconfig`` directory (e.g.
736 build_directory\ ``/conf/multiconfig/configA.conf``).
737
738 For information on how to use ``BBMULTICONFIG`` in an environment
739 that supports building targets with multiple configurations, see the
740 ":ref:`dev-building-images-for-multiple-targets-using-multiple-configurations`"
741 section in the Yocto Project Development Tasks Manual.
742
Andrew Geisslerf0343792020-11-18 10:42:21 -0600743 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500744 Used by BitBake to locate ``.bbclass`` and configuration files. This
745 variable is analogous to the ``PATH`` variable.
746
747 .. note::
748
749 If you run BitBake from a directory outside of the
750 Build Directory
751 , you must be sure to set
752 BBPATH
753 to point to the Build Directory. Set the variable as you would any
754 environment variable and then run BitBake:
755 ::
756
757 $ BBPATH = "build_directory"
758 $ export BBPATH
759 $ bitbake target
760
761
Andrew Geisslerf0343792020-11-18 10:42:21 -0600762 :term:`BBSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500763 If defined in the BitBake environment, ``BBSERVER`` points to the
764 BitBake remote server.
765
766 Use the following format to export the variable to the BitBake
767 environment:
768 ::
769
770 export BBSERVER=localhost:$port
771
772 By default, ``BBSERVER`` also appears in
773 :term:`bitbake:BB_HASHBASE_WHITELIST`.
774 Consequently, ``BBSERVER`` is excluded from checksum and dependency
775 data.
776
Andrew Geisslerf0343792020-11-18 10:42:21 -0600777 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500778 When inheriting the
779 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
780 this variable specifies binary configuration scripts to disable in
781 favor of using ``pkg-config`` to query the information. The
782 ``binconfig-disabled`` class will modify the specified scripts to
783 return an error so that calls to them can be easily found and
784 replaced.
785
786 To add multiple scripts, separate them by spaces. Here is an example
787 from the ``libpng`` recipe:
788 ::
789
790 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
791
Andrew Geisslerf0343792020-11-18 10:42:21 -0600792 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500793 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
794 this variable specifies a wildcard for configuration scripts that
795 need editing. The scripts are edited to correct any paths that have
796 been set up during compilation so that they are correct for use when
797 installed into the sysroot and called by the build processes of other
798 recipes.
799
800 .. note::
801
802 The
803 BINCONFIG_GLOB
804 variable uses
805 shell globbing
806 , which is recognition and expansion of wildcards during pattern
807 matching. Shell globbing is very similar to
808 fnmatch
809 and
810 glob
811 .
812
813 For more information on how this variable works, see
814 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
815 You can also find general
816 information on the class in the
817 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
818
Andrew Geisslerf0343792020-11-18 10:42:21 -0600819 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500820 The base recipe name and version but without any special recipe name
821 suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is
822 comprised of the following:
823 ::
824
825 ${BPN}-${PV}
826
Andrew Geisslerf0343792020-11-18 10:42:21 -0600827 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500828 This variable is a version of the :term:`PN` variable with
829 common prefixes and suffixes removed, such as ``nativesdk-``,
830 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
831 The exact lists of prefixes and suffixes removed are specified by the
832 :term:`MLPREFIX` and
833 :term:`SPECIAL_PKGSUFFIX` variables,
834 respectively.
835
Andrew Geisslerf0343792020-11-18 10:42:21 -0600836 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500837 Specifies a URL for an upstream bug tracking website for a recipe.
838 The OpenEmbedded build system does not use this variable. Rather, the
839 variable is a useful pointer in case a bug in the software being
840 built needs to be manually reported.
841
Andrew Geisslerf0343792020-11-18 10:42:21 -0600842 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500843 Specifies the architecture of the build host (e.g. ``i686``). The
844 OpenEmbedded build system sets the value of ``BUILD_ARCH`` from the
845 machine name reported by the ``uname`` command.
846
Andrew Geisslerf0343792020-11-18 10:42:21 -0600847 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500848 Specifies the architecture-specific assembler flags for the build
849 host. By default, the value of ``BUILD_AS_ARCH`` is empty.
850
Andrew Geisslerf0343792020-11-18 10:42:21 -0600851 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500852 Specifies the architecture-specific C compiler flags for the build
853 host. By default, the value of ``BUILD_CC_ARCH`` is empty.
854
Andrew Geisslerf0343792020-11-18 10:42:21 -0600855 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500856 Specifies the linker command to be used for the build host when the C
857 compiler is being used as the linker. By default, ``BUILD_CCLD``
858 points to GCC and passes as arguments the value of
859 :term:`BUILD_CC_ARCH`, assuming
860 ``BUILD_CC_ARCH`` is set.
861
Andrew Geisslerf0343792020-11-18 10:42:21 -0600862 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500863 Specifies the flags to pass to the C compiler when building for the
864 build host. When building in the ``-native`` context,
865 :term:`CFLAGS` is set to the value of this variable by
866 default.
867
Andrew Geisslerf0343792020-11-18 10:42:21 -0600868 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500869 Specifies the flags to pass to the C preprocessor (i.e. to both the C
870 and the C++ compilers) when building for the build host. When
871 building in the ``-native`` context, :term:`CPPFLAGS`
872 is set to the value of this variable by default.
873
Andrew Geisslerf0343792020-11-18 10:42:21 -0600874 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500875 Specifies the flags to pass to the C++ compiler when building for the
876 build host. When building in the ``-native`` context,
877 :term:`CXXFLAGS` is set to the value of this variable
878 by default.
879
Andrew Geisslerf0343792020-11-18 10:42:21 -0600880 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881 Specifies the Fortran compiler command for the build host. By
882 default, ``BUILD_FC`` points to Gfortran and passes as arguments the
883 value of :term:`BUILD_CC_ARCH`, assuming
884 ``BUILD_CC_ARCH`` is set.
885
Andrew Geisslerf0343792020-11-18 10:42:21 -0600886 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500887 Specifies the linker command for the build host. By default,
888 ``BUILD_LD`` points to the GNU linker (ld) and passes as arguments
889 the value of :term:`BUILD_LD_ARCH`, assuming
890 ``BUILD_LD_ARCH`` is set.
891
Andrew Geisslerf0343792020-11-18 10:42:21 -0600892 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500893 Specifies architecture-specific linker flags for the build host. By
894 default, the value of ``BUILD_LD_ARCH`` is empty.
895
Andrew Geisslerf0343792020-11-18 10:42:21 -0600896 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500897 Specifies the flags to pass to the linker when building for the build
898 host. When building in the ``-native`` context,
899 :term:`LDFLAGS` is set to the value of this variable
900 by default.
901
Andrew Geisslerf0343792020-11-18 10:42:21 -0600902 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500903 Specifies the optimization flags passed to the C compiler when
904 building for the build host or the SDK. The flags are passed through
905 the :term:`BUILD_CFLAGS` and
906 :term:`BUILDSDK_CFLAGS` default values.
907
908 The default value of the ``BUILD_OPTIMIZATION`` variable is "-O2
909 -pipe".
910
Andrew Geisslerf0343792020-11-18 10:42:21 -0600911 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500912 Specifies the operating system in use on the build host (e.g.
913 "linux"). The OpenEmbedded build system sets the value of
914 ``BUILD_OS`` from the OS reported by the ``uname`` command - the
915 first word, converted to lower-case characters.
916
Andrew Geisslerf0343792020-11-18 10:42:21 -0600917 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918 The toolchain binary prefix used for native recipes. The OpenEmbedded
919 build system uses the ``BUILD_PREFIX`` value to set the
920 :term:`TARGET_PREFIX` when building for
921 ``native`` recipes.
922
Andrew Geisslerf0343792020-11-18 10:42:21 -0600923 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500924 Specifies the command to be used to strip debugging symbols from
925 binaries produced for the build host. By default, ``BUILD_STRIP``
926 points to
927 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
928
Andrew Geisslerf0343792020-11-18 10:42:21 -0600929 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500930 Specifies the system, including the architecture and the operating
931 system, to use when building for the build host (i.e. when building
932 ``native`` recipes).
933
934 The OpenEmbedded build system automatically sets this variable based
935 on :term:`BUILD_ARCH`,
936 :term:`BUILD_VENDOR`, and
937 :term:`BUILD_OS`. You do not need to set the
938 ``BUILD_SYS`` variable yourself.
939
Andrew Geisslerf0343792020-11-18 10:42:21 -0600940 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941 Specifies the vendor name to use when building for the build host.
942 The default value is an empty string ("").
943
Andrew Geisslerf0343792020-11-18 10:42:21 -0600944 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945 Points to the location of the :term:`Build Directory`.
946 You can define this directory indirectly through the
947 ````` <#structure-core-script>`__ script by passing in a Build
948 Directory path when you run the script. If you run the script and do
949 not provide a Build Directory path, the ``BUILDDIR`` defaults to
950 ``build`` in the current directory.
951
Andrew Geisslerf0343792020-11-18 10:42:21 -0600952 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500953 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
954 class, this variable specifies whether or not to commit the build
955 history output in a local Git repository. If set to "1", this local
956 repository will be maintained automatically by the ``buildhistory``
957 class and a commit will be created on every build for changes to each
958 top-level subdirectory of the build history output (images, packages,
959 and sdk). If you want to track changes to build history over time,
960 you should set this value to "1".
961
962 By default, the ``buildhistory`` class does not commit the build
963 history output in a local Git repository:
964 ::
965
966 BUILDHISTORY_COMMIT ?= "0"
967
Andrew Geisslerf0343792020-11-18 10:42:21 -0600968 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500969 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
970 class, this variable specifies the author to use for each Git commit.
971 In order for the ``BUILDHISTORY_COMMIT_AUTHOR`` variable to work, the
972 :term:`BUILDHISTORY_COMMIT` variable must
973 be set to "1".
974
975 Git requires that the value you provide for the
976 ``BUILDHISTORY_COMMIT_AUTHOR`` variable takes the form of "name
977 email@host". Providing an email address or host that is not valid
978 does not produce an error.
979
980 By default, the ``buildhistory`` class sets the variable as follows:
981 ::
982
983 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
984
Andrew Geisslerf0343792020-11-18 10:42:21 -0600985 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500986 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
987 class, this variable specifies the directory in which build history
988 information is kept. For more information on how the variable works,
989 see the ``buildhistory.class``.
990
991 By default, the ``buildhistory`` class sets the directory as follows:
992 ::
993
994 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
995
Andrew Geisslerf0343792020-11-18 10:42:21 -0600996 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500997 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
998 class, this variable specifies the build history features to be
999 enabled. For more information on how build history works, see the
1000 ":ref:`dev-manual/dev-manual-common-tasks:maintaining build output quality`"
1001 section in the Yocto Project Development Tasks Manual.
1002
1003 You can specify these features in the form of a space-separated list:
1004
1005 - *image:* Analysis of the contents of images, which includes the
1006 list of installed packages among other things.
1007
1008 - *package:* Analysis of the contents of individual packages.
1009
1010 - *sdk:* Analysis of the contents of the software development kit
1011 (SDK).
1012
1013 - *task:* Save output file signatures for
1014 :ref:`shared state <overview-manual/overview-manual-concepts:shared state cache>`
1015 (sstate) tasks.
1016 This saves one file per task and lists the SHA-256 checksums for
1017 each file staged (i.e. the output of the task).
1018
1019 By default, the ``buildhistory`` class enables the following
1020 features:
1021 ::
1022
1023 BUILDHISTORY_FEATURES ?= "image package sdk"
1024
Andrew Geisslerf0343792020-11-18 10:42:21 -06001025 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001026 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1027 class, this variable specifies a list of paths to files copied from
1028 the image contents into the build history directory under an
1029 "image-files" directory in the directory for the image, so that you
1030 can track the contents of each file. The default is to copy
1031 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1032 changes in user and group entries. You can modify the list to include
1033 any file. Specifying an invalid path does not produce an error.
1034 Consequently, you can include files that might not always be present.
1035
1036 By default, the ``buildhistory`` class provides paths to the
1037 following files:
1038 ::
1039
1040 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1041
Andrew Geisslerf0343792020-11-18 10:42:21 -06001042 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001043 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1044 class, this variable optionally specifies a remote repository to
1045 which build history pushes Git changes. In order for
1046 ``BUILDHISTORY_PUSH_REPO`` to work,
1047 :term:`BUILDHISTORY_COMMIT` must be set to
1048 "1".
1049
1050 The repository should correspond to a remote address that specifies a
1051 repository as understood by Git, or alternatively to a remote name
1052 that you have set up manually using ``git remote`` within the local
1053 repository.
1054
1055 By default, the ``buildhistory`` class sets the variable as follows:
1056 ::
1057
1058 BUILDHISTORY_PUSH_REPO ?= ""
1059
Andrew Geisslerf0343792020-11-18 10:42:21 -06001060 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001061 Specifies the flags to pass to the C compiler when building for the
1062 SDK. When building in the ``nativesdk-`` context,
1063 :term:`CFLAGS` is set to the value of this variable by
1064 default.
1065
Andrew Geisslerf0343792020-11-18 10:42:21 -06001066 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001067 Specifies the flags to pass to the C pre-processor (i.e. to both the
1068 C and the C++ compilers) when building for the SDK. When building in
1069 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1070 to the value of this variable by default.
1071
Andrew Geisslerf0343792020-11-18 10:42:21 -06001072 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001073 Specifies the flags to pass to the C++ compiler when building for the
1074 SDK. When building in the ``nativesdk-`` context,
1075 :term:`CXXFLAGS` is set to the value of this variable
1076 by default.
1077
Andrew Geisslerf0343792020-11-18 10:42:21 -06001078 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001079 Specifies the flags to pass to the linker when building for the SDK.
1080 When building in the ``nativesdk-`` context,
1081 :term:`LDFLAGS` is set to the value of this variable
1082 by default.
1083
Andrew Geisslerf0343792020-11-18 10:42:21 -06001084 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001085 Points to the location of the directory that holds build statistics
1086 when you use and enable the
1087 :ref:`buildstats <ref-classes-buildstats>` class. The
1088 ``BUILDSTATS_BASE`` directory defaults to
1089 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1090
Andrew Geisslerf0343792020-11-18 10:42:21 -06001091 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001092 For the BusyBox recipe, specifies whether to split the output
1093 executable file into two parts: one for features that require
1094 ``setuid root``, and one for the remaining features (i.e. those that
1095 do not require ``setuid root``).
1096
1097 The ``BUSYBOX_SPLIT_SUID`` variable defaults to "1", which results in
1098 splitting the output executable file. Set the variable to "0" to get
1099 a single output executable file.
1100
Andrew Geisslerf0343792020-11-18 10:42:21 -06001101 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001102 Specifies the directory BitBake uses to store a cache of the
1103 :term:`Metadata` so it does not need to be parsed every time
1104 BitBake is started.
1105
Andrew Geisslerf0343792020-11-18 10:42:21 -06001106 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001107 The minimal command and arguments used to run the C compiler.
1108
Andrew Geisslerf0343792020-11-18 10:42:21 -06001109 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001110 Specifies the flags to pass to the C compiler. This variable is
1111 exported to an environment variable and thus made visible to the
1112 software being built during the compilation step.
1113
1114 Default initialization for ``CFLAGS`` varies depending on what is
1115 being built:
1116
1117 - :term:`TARGET_CFLAGS` when building for the
1118 target
1119
1120 - :term:`BUILD_CFLAGS` when building for the
1121 build host (i.e. ``-native``)
1122
1123 - :term:`BUILDSDK_CFLAGS` when building for
1124 an SDK (i.e. ``nativesdk-``)
1125
Andrew Geisslerf0343792020-11-18 10:42:21 -06001126 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001127 An internal variable specifying the special class override that
1128 should currently apply (e.g. "class-target", "class-native", and so
1129 forth). The classes that use this variable (e.g.
1130 :ref:`native <ref-classes-native>`,
1131 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1132 variable to appropriate values.
1133
1134 .. note::
1135
1136 CLASSOVERRIDE
1137 gets its default "class-target" value from the
1138 bitbake.conf
1139 file.
1140
1141 As an example, the following override allows you to install extra
1142 files, but only when building for the target:
1143 ::
1144
1145 do_install_append_class-target() {
1146 install my-extra-file ${D}${sysconfdir}
1147 }
1148
1149 Here is an example where ``FOO`` is set to
1150 "native" when building for the build host, and to "other" when not
1151 building for the build host:
1152 ::
1153
1154 FOO_class-native = "native"
1155 FOO = "other"
1156
1157 The underlying mechanism behind ``CLASSOVERRIDE`` is simply
1158 that it is included in the default value of
1159 :term:`OVERRIDES`.
1160
Andrew Geisslerf0343792020-11-18 10:42:21 -06001161 :term:`CLEANBROKEN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001162 If set to "1" within a recipe, ``CLEANBROKEN`` specifies that the
1163 ``make clean`` command does not work for the software being built.
1164 Consequently, the OpenEmbedded build system will not try to run
1165 ``make clean`` during the :ref:`ref-tasks-configure`
1166 task, which is the default behavior.
1167
Andrew Geisslerf0343792020-11-18 10:42:21 -06001168 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001169 Provides a list of hardware features that are enabled in both
1170 :term:`MACHINE_FEATURES` and
1171 :term:`DISTRO_FEATURES`. This select list of
1172 features contains features that make sense to be controlled both at
1173 the machine and distribution configuration level. For example, the
1174 "bluetooth" feature requires hardware support but should also be
1175 optional at the distribution level, in case the hardware supports
1176 Bluetooth but you do not ever intend to use it.
1177
Andrew Geisslerf0343792020-11-18 10:42:21 -06001178 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001179 Points to ``meta/files/common-licenses`` in the
1180 :term:`Source Directory`, which is where generic license
1181 files reside.
1182
Andrew Geisslerf0343792020-11-18 10:42:21 -06001183 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001184 A regular expression that resolves to one or more hosts (when the
1185 recipe is native) or one or more targets (when the recipe is
1186 non-native) with which a recipe is compatible. The regular expression
1187 is matched against :term:`HOST_SYS`. You can use the
1188 variable to stop recipes from being built for classes of systems with
1189 which the recipes are not compatible. Stopping these builds is
1190 particularly useful with kernels. The variable also helps to increase
1191 parsing speed since the build system skips parsing recipes not
1192 compatible with the current system.
1193
Andrew Geisslerf0343792020-11-18 10:42:21 -06001194 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001195 A regular expression that resolves to one or more target machines
1196 with which a recipe is compatible. The regular expression is matched
1197 against :term:`MACHINEOVERRIDES`. You can use
1198 the variable to stop recipes from being built for machines with which
1199 the recipes are not compatible. Stopping these builds is particularly
1200 useful with kernels. The variable also helps to increase parsing
1201 speed since the build system skips parsing recipes not compatible
1202 with the current machine.
1203
Andrew Geisslerf0343792020-11-18 10:42:21 -06001204 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001205 Defines wildcards to match when installing a list of complementary
1206 packages for all the packages explicitly (or implicitly) installed in
1207 an image.
1208
1209 .. note::
1210
1211 The
1212 COMPLEMENTARY_GLOB
1213 variable uses Unix filename pattern matching (
1214 fnmatch
1215 ), which is similar to the Unix style pathname pattern expansion (
1216 glob
1217 ).
1218
1219 The resulting list of complementary packages is associated with an
1220 item that can be added to
1221 :term:`IMAGE_FEATURES`. An example usage of
1222 this is the "dev-pkgs" item that when added to ``IMAGE_FEATURES``
1223 will install -dev packages (containing headers and other development
1224 files) for every package in the image.
1225
1226 To add a new feature item pointing to a wildcard, use a variable flag
1227 to specify the feature item name and use the value to specify the
1228 wildcard. Here is an example:
1229 ::
1230
1231 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1232
Andrew Geisslerf0343792020-11-18 10:42:21 -06001233 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001234 Stores sysroot components for each recipe. The OpenEmbedded build
1235 system uses ``COMPONENTS_DIR`` when constructing recipe-specific
1236 sysroots for other recipes.
1237
1238 The default is
1239 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1240 (i.e.
1241 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1242
Andrew Geisslerf0343792020-11-18 10:42:21 -06001243 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001244 Tracks the version of the local configuration file (i.e.
1245 ``local.conf``). The value for ``CONF_VERSION`` increments each time
1246 ``build/conf/`` compatibility changes.
1247
Andrew Geisslerf0343792020-11-18 10:42:21 -06001248 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001249 Identifies editable or configurable files that are part of a package.
1250 If the Package Management System (PMS) is being used to update
1251 packages on the target system, it is possible that configuration
1252 files you have changed after the original installation and that you
1253 now want to remain unchanged are overwritten. In other words,
1254 editable files might exist in the package that you do not want reset
1255 as part of the package update process. You can use the ``CONFFILES``
1256 variable to list the files in the package that you wish to prevent
1257 the PMS from overwriting during this update process.
1258
1259 To use the ``CONFFILES`` variable, provide a package name override
1260 that identifies the resulting package. Then, provide a
1261 space-separated list of files. Here is an example:
1262 ::
1263
1264 CONFFILES_${PN} += "${sysconfdir}/file1 \
1265 ${sysconfdir}/file2 ${sysconfdir}/file3"
1266
1267 A relationship exists between the ``CONFFILES`` and ``FILES``
1268 variables. The files listed within ``CONFFILES`` must be a subset of
1269 the files listed within ``FILES``. Because the configuration files
1270 you provide with ``CONFFILES`` are simply being identified so that
1271 the PMS will not overwrite them, it makes sense that the files must
1272 already be included as part of the package through the ``FILES``
1273 variable.
1274
1275 .. note::
1276
1277 When specifying paths as part of the
1278 CONFFILES
1279 variable, it is good practice to use appropriate path variables.
1280 For example,
1281 ${sysconfdir}
1282 rather than
1283 /etc
1284 or
1285 ${bindir}
1286 rather than
1287 /usr/bin
1288 . You can find a list of these variables at the top of the
1289 meta/conf/bitbake.conf
1290 file in the
1291 Source Directory
1292 .
1293
Andrew Geisslerf0343792020-11-18 10:42:21 -06001294 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001295 Identifies the initial RAM filesystem (initramfs) source files. The
1296 OpenEmbedded build system receives and uses this kernel Kconfig
1297 variable as an environment variable. By default, the variable is set
1298 to null ("").
1299
1300 The ``CONFIG_INITRAMFS_SOURCE`` can be either a single cpio archive
1301 with a ``.cpio`` suffix or a space-separated list of directories and
1302 files for building the initramfs image. A cpio archive should contain
1303 a filesystem archive to be used as an initramfs image. Directories
1304 should contain a filesystem layout to be included in the initramfs
1305 image. Files should contain entries according to the format described
1306 by the ``usr/gen_init_cpio`` program in the kernel tree.
1307
1308 If you specify multiple directories and files, the initramfs image
1309 will be the aggregate of all of them.
1310
1311 For information on creating an initramfs, see the
1312 ":ref:`building-an-initramfs-image`" section
1313 in the Yocto Project Development Tasks Manual.
1314
Andrew Geisslerf0343792020-11-18 10:42:21 -06001315 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001316 A list of files that contains ``autoconf`` test results relevant to
1317 the current build. This variable is used by the Autotools utilities
1318 when running ``configure``.
1319
Andrew Geisslerf0343792020-11-18 10:42:21 -06001320 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001321 The minimal arguments for GNU configure.
1322
Andrew Geisslerf0343792020-11-18 10:42:21 -06001323 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001324 When inheriting the
1325 :ref:`distro_features_check <ref-classes-distro_features_check>`
1326 class, this variable identifies distribution features that would be
1327 in conflict should the recipe be built. In other words, if the
1328 ``CONFLICT_DISTRO_FEATURES`` variable lists a feature that also
1329 appears in ``DISTRO_FEATURES`` within the current configuration, an
1330 error occurs and the build stops.
1331
Andrew Geisslerf0343792020-11-18 10:42:21 -06001332 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001333 A space-separated list of licenses to exclude from the source
1334 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1335 other words, if a license in a recipe's
1336 :term:`LICENSE` value is in the value of
1337 ``COPYLEFT_LICENSE_EXCLUDE``, then its source is not archived by the
1338 class.
1339
1340 .. note::
1341
1342 The
1343 COPYLEFT_LICENSE_EXCLUDE
1344 variable takes precedence over the
1345 COPYLEFT_LICENSE_INCLUDE
1346 variable.
1347
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
1413 The
1414 COPY_LIC_DIRS
1415 does not offer a path for adding licenses for newly installed
1416 packages to an image, which might be most suitable for read-only
1417 filesystems that cannot be upgraded. See the
1418 LICENSE_CREATE_PACKAGE
1419 variable for additional information. You can also reference the "
1420 Providing License Text
1421 " section in the Yocto Project Development Tasks Manual for
1422 information on providing license text.
1423
Andrew Geisslerf0343792020-11-18 10:42:21 -06001424 :term:`COPY_LIC_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001425 If set to "1", the OpenEmbedded build system copies the license
1426 manifest for the image to
1427 ``/usr/share/common-licenses/license.manifest`` within the image
1428 itself during build time.
1429
1430 .. note::
1431
1432 The
1433 COPY_LIC_MANIFEST
1434 does not offer a path for adding licenses for newly installed
1435 packages to an image, which might be most suitable for read-only
1436 filesystems that cannot be upgraded. See the
1437 LICENSE_CREATE_PACKAGE
1438 variable for additional information. You can also reference the "
1439 Providing License Text
1440 " section in the Yocto Project Development Tasks Manual for
1441 information on providing license text.
1442
Andrew Geisslerf0343792020-11-18 10:42:21 -06001443 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001444 Specifies the list of packages to be added to the image. You should
1445 only set this variable in the ``local.conf`` configuration file found
1446 in the :term:`Build Directory`.
1447
1448 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1449 supported.
1450
Andrew Geisslerf0343792020-11-18 10:42:21 -06001451 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001452 Specifies the parent directory of the OpenEmbedded-Core Metadata
1453 layer (i.e. ``meta``).
1454
1455 It is an important distinction that ``COREBASE`` points to the parent
1456 of this layer and not the layer itself. Consider an example where you
1457 have cloned the Poky Git repository and retained the ``poky`` name
1458 for your local copy of the repository. In this case, ``COREBASE``
1459 points to the ``poky`` folder because it is the parent directory of
1460 the ``poky/meta`` layer.
1461
Andrew Geisslerf0343792020-11-18 10:42:21 -06001462 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001463 Lists files from the :term:`COREBASE` directory that
1464 should be copied other than the layers listed in the
1465 ``bblayers.conf`` file. The ``COREBASE_FILES`` variable exists for
1466 the purpose of copying metadata from the OpenEmbedded build system
1467 into the extensible SDK.
1468
1469 Explicitly listing files in ``COREBASE`` is needed because it
1470 typically contains build directories and other files that should not
1471 normally be copied into the extensible SDK. Consequently, the value
1472 of ``COREBASE_FILES`` is used in order to only copy the files that
1473 are actually needed.
1474
Andrew Geisslerf0343792020-11-18 10:42:21 -06001475 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001476 The minimal command and arguments used to run the C preprocessor.
1477
Andrew Geisslerf0343792020-11-18 10:42:21 -06001478 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001479 Specifies the flags to pass to the C pre-processor (i.e. to both the
1480 C and the C++ compilers). This variable is exported to an environment
1481 variable and thus made visible to the software being built during the
1482 compilation step.
1483
1484 Default initialization for ``CPPFLAGS`` varies depending on what is
1485 being built:
1486
1487 - :term:`TARGET_CPPFLAGS` when building for
1488 the target
1489
1490 - :term:`BUILD_CPPFLAGS` when building for the
1491 build host (i.e. ``-native``)
1492
1493 - :term:`BUILDSDK_CPPFLAGS` when building
1494 for an SDK (i.e. ``nativesdk-``)
1495
Andrew Geisslerf0343792020-11-18 10:42:21 -06001496 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001497 The toolchain binary prefix for the target tools. The
1498 ``CROSS_COMPILE`` variable is the same as the
1499 :term:`TARGET_PREFIX` variable.
1500
1501 .. note::
1502
1503 The OpenEmbedded build system sets the
1504 CROSS_COMPILE
1505 variable only in certain contexts (e.g. when building for kernel
1506 and kernel module recipes).
1507
Andrew Geisslerf0343792020-11-18 10:42:21 -06001508 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001509 The directory in which files checked out under the CVS system are
1510 stored.
1511
Andrew Geisslerf0343792020-11-18 10:42:21 -06001512 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001513 The minimal command and arguments used to run the C++ compiler.
1514
Andrew Geisslerf0343792020-11-18 10:42:21 -06001515 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001516 Specifies the flags to pass to the C++ compiler. This variable is
1517 exported to an environment variable and thus made visible to the
1518 software being built during the compilation step.
1519
1520 Default initialization for ``CXXFLAGS`` varies depending on what is
1521 being built:
1522
1523 - :term:`TARGET_CXXFLAGS` when building for
1524 the target
1525
1526 - :term:`BUILD_CXXFLAGS` when building for the
1527 build host (i.e. ``-native``)
1528
1529 - :term:`BUILDSDK_CXXFLAGS` when building
1530 for an SDK (i.e. ``nativesdk-``)
1531
Andrew Geisslerf0343792020-11-18 10:42:21 -06001532 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001533 The destination directory. The location in the :term:`Build Directory`
1534 where components are installed by the
1535 :ref:`ref-tasks-install` task. This location defaults
1536 to:
1537 ::
1538
1539 ${WORKDIR}/image
1540
1541 .. note::
1542
1543 Tasks that read from or write to this directory should run under
1544 fakeroot
1545 .
1546
Andrew Geisslerf0343792020-11-18 10:42:21 -06001547 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001548 The date the build was started. Dates appear using the year, month,
1549 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1550
Andrew Geisslerf0343792020-11-18 10:42:21 -06001551 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001552 The date and time on which the current build started. The format is
1553 suitable for timestamps.
1554
Andrew Geisslerf0343792020-11-18 10:42:21 -06001555 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001556 When the :ref:`debian <ref-classes-debian>` class is inherited,
1557 which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a
1558 particular package should not be renamed according to Debian library
1559 package naming. You must use the package name as an override when you
1560 set this variable. Here is an example from the ``fontconfig`` recipe:
1561 ::
1562
1563 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
1564
Andrew Geisslerf0343792020-11-18 10:42:21 -06001565 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001566 When the :ref:`debian <ref-classes-debian>` class is inherited,
1567 which is the default behavior, ``DEBIANNAME`` allows you to override
1568 the library name for an individual package. Overriding the library
1569 name in these cases is rare. You must use the package name as an
1570 override when you set this variable. Here is an example from the
1571 ``dbus`` recipe:
1572 ::
1573
1574 DEBIANNAME_${PN} = "dbus-1"
1575
Andrew Geisslerf0343792020-11-18 10:42:21 -06001576 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001577 Specifies to build packages with debugging information. This
1578 influences the value of the ``SELECTED_OPTIMIZATION`` variable.
1579
Andrew Geisslerf0343792020-11-18 10:42:21 -06001580 :term:`DEBUG_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001581 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
1582 compiling a system for debugging. This variable defaults to "-O
1583 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1584
Andrew Geisslerf0343792020-11-18 10:42:21 -06001585 :term:`DEFAULT_PREFERENCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001586 Specifies a weak bias for recipe selection priority.
1587
1588 The most common usage of this is variable is to set it to "-1" within
1589 a recipe for a development version of a piece of software. Using the
1590 variable in this way causes the stable version of the recipe to build
1591 by default in the absence of ``PREFERRED_VERSION`` being used to
1592 build the development version.
1593
1594 .. note::
1595
1596 The bias provided by
1597 DEFAULT_PREFERENCE
1598 is weak and is overridden by
1599 BBFILE_PRIORITY
1600 if that variable is different between two layers that contain
1601 different versions of the same recipe.
1602
Andrew Geisslerf0343792020-11-18 10:42:21 -06001603 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001604 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1605 the "tune") used by the OpenEmbedded build system. The
1606 ``DEFAULTTUNE`` helps define
1607 :term:`TUNE_FEATURES`.
1608
1609 The default tune is either implicitly or explicitly set by the
1610 machine (:term:`MACHINE`). However, you can override
1611 the setting using available tunes as defined with
1612 :term:`AVAILTUNES`.
1613
Andrew Geisslerf0343792020-11-18 10:42:21 -06001614 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615 Lists a recipe's build-time dependencies. These are dependencies on
1616 other recipes whose contents (e.g. headers and shared libraries) are
1617 needed by the recipe at build time.
1618
1619 As an example, consider a recipe ``foo`` that contains the following
1620 assignment:
1621 ::
1622
1623 DEPENDS = "bar"
1624
1625 The practical effect of the previous
1626 assignment is that all files installed by bar will be available in
1627 the appropriate staging sysroot, given by the
1628 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1629 :ref:`ref-tasks-configure` task for ``foo`` runs.
1630 This mechanism is implemented by having ``do_configure`` depend on
1631 the :ref:`ref-tasks-populate_sysroot` task of
1632 each recipe listed in ``DEPENDS``, through a
1633 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1634 declaration in the :ref:`base <ref-classes-base>` class.
1635
1636 .. note::
1637
1638 It seldom is necessary to reference, for example,
1639 STAGING_DIR_HOST
1640 explicitly. The standard classes and build-related variables are
1641 configured to automatically use the appropriate staging sysroots.
1642
1643 As another example, ``DEPENDS`` can also be used to add utilities
1644 that run on the build machine during the build. For example, a recipe
1645 that makes use of a code generator built by the recipe ``codegen``
1646 might have the following:
1647 ::
1648
1649 DEPENDS = "codegen-native"
1650
1651 For more
1652 information, see the :ref:`native <ref-classes-native>` class and
1653 the :term:`EXTRANATIVEPATH` variable.
1654
1655 .. note::
1656
1657 - ``DEPENDS`` is a list of recipe names. Or, to be more precise,
1658 it is a list of :term:`PROVIDES` names, which
1659 usually match recipe names. Putting a package name such as
1660 "foo-dev" in ``DEPENDS`` does not make sense. Use "foo"
1661 instead, as this will put files from all the packages that make
1662 up ``foo``, which includes those from ``foo-dev``, into the
1663 sysroot.
1664
1665 - One recipe having another recipe in ``DEPENDS`` does not by
1666 itself add any runtime dependencies between the packages
1667 produced by the two recipes. However, as explained in the
1668 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
1669 section in the Yocto Project Overview and Concepts Manual,
1670 runtime dependencies will often be added automatically, meaning
1671 ``DEPENDS`` alone is sufficient for most recipes.
1672
1673 - Counterintuitively, ``DEPENDS`` is often necessary even for
1674 recipes that install precompiled components. For example, if
1675 ``libfoo`` is a precompiled library that links against
1676 ``libbar``, then linking against ``libfoo`` requires both
1677 ``libfoo`` and ``libbar`` to be available in the sysroot.
1678 Without a ``DEPENDS`` from the recipe that installs ``libfoo``
1679 to the recipe that installs ``libbar``, other recipes might
1680 fail to link against ``libfoo``.
1681
1682 For information on runtime dependencies, see the
1683 :term:`RDEPENDS` variable. You can also see the
1684 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
1685 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
1686 BitBake User Manual for additional information on tasks and
1687 dependencies.
1688
Andrew Geisslerf0343792020-11-18 10:42:21 -06001689 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001690 Points to the general area that the OpenEmbedded build system uses to
1691 place images, packages, SDKs, and other output files that are ready
1692 to be used outside of the build system. By default, this directory
1693 resides within the :term:`Build Directory` as
1694 ``${TMPDIR}/deploy``.
1695
1696 For more information on the structure of the Build Directory, see
1697 ":ref:`ref-manual/ref-structure:the build directory - \`\`build/\`\``" section.
1698 For more detail on the contents of the ``deploy`` directory, see the
1699 ":ref:`Images <images-dev-environment>`", ":ref:`Package
1700 Feeds <package-feeds-dev-environment>`", and
1701 ":ref:`sdk-dev-environment`" sections all in the
1702 Yocto Project Overview and Concepts Manual.
1703
Andrew Geisslerf0343792020-11-18 10:42:21 -06001704 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001705 Points to the area that the OpenEmbedded build system uses to place
1706 Debian packages that are ready to be used outside of the build
1707 system. This variable applies only when
1708 :term:`PACKAGE_CLASSES` contains
1709 "package_deb".
1710
1711 The BitBake configuration file initially defines the
1712 ``DEPLOY_DIR_DEB`` variable as a sub-folder of
1713 :term:`DEPLOY_DIR`:
1714 ::
1715
1716 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1717
1718 The :ref:`package_deb <ref-classes-package_deb>` class uses the
1719 ``DEPLOY_DIR_DEB`` variable to make sure the
1720 :ref:`ref-tasks-package_write_deb` task
1721 writes Debian packages into the appropriate folder. For more
1722 information on how packaging works, see the ":ref:`Package
1723 Feeds <package-feeds-dev-environment>`" section
1724 in the Yocto Project Overview and Concepts Manual.
1725
Andrew Geisslerf0343792020-11-18 10:42:21 -06001726 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001727 Points to the area that the OpenEmbedded build system uses to place
1728 images and other associated output files that are ready to be
1729 deployed onto the target machine. The directory is machine-specific
1730 as it contains the ``${MACHINE}`` name. By default, this directory
1731 resides within the :term:`Build Directory` as
1732 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1733
1734 For more information on the structure of the Build Directory, see
1735 ":ref:`ref-manual/ref-structure:the build directory - \`\`build/\`\``" section.
1736 For more detail on the contents of the ``deploy`` directory, see the
1737 ":ref:`Images <images-dev-environment>`" and
1738 ":ref:`sdk-dev-environment`" sections both in
1739 the Yocto Project Overview and Concepts Manual.
1740
Andrew Geisslerf0343792020-11-18 10:42:21 -06001741 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001742 Points to the area that the OpenEmbedded build system uses to place
1743 IPK packages that are ready to be used outside of the build system.
1744 This variable applies only when
1745 :term:`PACKAGE_CLASSES` contains
1746 "package_ipk".
1747
1748 The BitBake configuration file initially defines this variable as a
1749 sub-folder of :term:`DEPLOY_DIR`:
1750 ::
1751
1752 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1753
1754 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
1755 ``DEPLOY_DIR_IPK`` variable to make sure the
1756 :ref:`ref-tasks-package_write_ipk` task
1757 writes IPK packages into the appropriate folder. For more information
1758 on how packaging works, see the ":ref:`Package
1759 Feeds <package-feeds-dev-environment>`" section
1760 in the Yocto Project Overview and Concepts Manual.
1761
Andrew Geisslerf0343792020-11-18 10:42:21 -06001762 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001763 Points to the area that the OpenEmbedded build system uses to place
1764 RPM packages that are ready to be used outside of the build system.
1765 This variable applies only when
1766 :term:`PACKAGE_CLASSES` contains
1767 "package_rpm".
1768
1769 The BitBake configuration file initially defines this variable as a
1770 sub-folder of :term:`DEPLOY_DIR`:
1771 ::
1772
1773 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1774
1775 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
1776 ``DEPLOY_DIR_RPM`` variable to make sure the
1777 :ref:`ref-tasks-package_write_rpm` task
1778 writes RPM packages into the appropriate folder. For more information
1779 on how packaging works, see the ":ref:`Package
1780 Feeds <package-feeds-dev-environment>`" section
1781 in the Yocto Project Overview and Concepts Manual.
1782
Andrew Geisslerf0343792020-11-18 10:42:21 -06001783 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001784 Points to the area that the OpenEmbedded build system uses to place
1785 tarballs that are ready to be used outside of the build system. This
1786 variable applies only when
1787 :term:`PACKAGE_CLASSES` contains
1788 "package_tar".
1789
1790 The BitBake configuration file initially defines this variable as a
1791 sub-folder of :term:`DEPLOY_DIR`:
1792 ::
1793
1794 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1795
1796 The :ref:`package_tar <ref-classes-package_tar>` class uses the
1797 ``DEPLOY_DIR_TAR`` variable to make sure the
1798 :ref:`ref-tasks-package_write_tar` task
1799 writes TAR packages into the appropriate folder. For more information
1800 on how packaging works, see the ":ref:`Package
1801 Feeds <package-feeds-dev-environment>`" section
1802 in the Yocto Project Overview and Concepts Manual.
1803
Andrew Geisslerf0343792020-11-18 10:42:21 -06001804 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001805 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
1806 ``DEPLOYDIR`` points to a temporary work area for deployed files that
1807 is set in the ``deploy`` class as follows:
1808 ::
1809
1810 DEPLOYDIR = "${WORKDIR}/deploy-${:term:`PN`}"
1811
1812 Recipes inheriting the ``deploy`` class should copy files to be
1813 deployed into ``DEPLOYDIR``, and the class will take care of copying
1814 them into :term:`DEPLOY_DIR_IMAGE`
1815 afterwards.
1816
Andrew Geisslerf0343792020-11-18 10:42:21 -06001817 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001818 The package description used by package managers. If not set,
1819 ``DESCRIPTION`` takes the value of the :term:`SUMMARY`
1820 variable.
1821
Andrew Geisslerf0343792020-11-18 10:42:21 -06001822 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001823 The short name of the distribution. For information on the long name
1824 of the distribution, see the :term:`DISTRO_NAME`
1825 variable.
1826
1827 The ``DISTRO`` variable corresponds to a distribution configuration
1828 file whose root name is the same as the variable's argument and whose
1829 filename extension is ``.conf``. For example, the distribution
1830 configuration file for the Poky distribution is named ``poky.conf``
1831 and resides in the ``meta-poky/conf/distro`` directory of the
1832 :term:`Source Directory`.
1833
1834 Within that ``poky.conf`` file, the ``DISTRO`` variable is set as
1835 follows:
1836 ::
1837
1838 DISTRO = "poky"
1839
1840 Distribution configuration files are located in a ``conf/distro``
1841 directory within the :term:`Metadata` that contains the
1842 distribution configuration. The value for ``DISTRO`` must not contain
1843 spaces, and is typically all lower-case.
1844
1845 .. note::
1846
1847 If the
1848 DISTRO
1849 variable is blank, a set of default configurations are used, which
1850 are specified within
1851 meta/conf/distro/defaultsetup.conf
1852 also in the Source Directory.
1853
Andrew Geisslerf0343792020-11-18 10:42:21 -06001854 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001855 Specifies a codename for the distribution being built.
1856
Andrew Geisslerf0343792020-11-18 10:42:21 -06001857 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001858 Specifies a list of distro-specific packages to add to all images.
1859 This variable takes affect through ``packagegroup-base`` so the
1860 variable only really applies to the more full-featured images that
1861 include ``packagegroup-base``. You can use this variable to keep
1862 distro policy out of generic images. As with all other distro
1863 variables, you set this variable in the distro ``.conf`` file.
1864
Andrew Geisslerf0343792020-11-18 10:42:21 -06001865 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001866 Specifies a list of distro-specific packages to add to all images if
1867 the packages exist. The packages might not exist or be empty (e.g.
1868 kernel modules). The list of packages are automatically installed but
1869 you can remove them.
1870
Andrew Geisslerf0343792020-11-18 10:42:21 -06001871 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001872 The software support you want in your distribution for various
1873 features. You define your distribution features in the distribution
1874 configuration file.
1875
1876 In most cases, the presence or absence of a feature in
1877 ``DISTRO_FEATURES`` is translated to the appropriate option supplied
1878 to the configure script during the
1879 :ref:`ref-tasks-configure` task for recipes that
1880 optionally support the feature. For example, specifying "x11" in
1881 ``DISTRO_FEATURES``, causes every piece of software built for the
1882 target that can optionally support X11 to have its X11 support
1883 enabled.
1884
1885 Two more examples are Bluetooth and NFS support. For a more complete
1886 list of features that ships with the Yocto Project and that you can
1887 provide with this variable, see the "`Distro
1888 Features <#ref-features-distro>`__" section.
1889
Andrew Geisslerf0343792020-11-18 10:42:21 -06001890 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001891 Features to be added to ``DISTRO_FEATURES`` if not also present in
1892 ``DISTRO_FEATURES_BACKFILL_CONSIDERED``.
1893
1894 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1895 not intended to be user-configurable. It is best to just reference
1896 the variable to see which distro features are being backfilled for
1897 all distro configurations. See the "`Feature
1898 Backfilling <#ref-features-backfill>`__" section for more
1899 information.
1900
Andrew Geisslerf0343792020-11-18 10:42:21 -06001901 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001902 Features from ``DISTRO_FEATURES_BACKFILL`` that should not be
1903 backfilled (i.e. added to ``DISTRO_FEATURES``) during the build. See
1904 the "`Feature Backfilling <#ref-features-backfill>`__" section for
1905 more information.
1906
Andrew Geisslerf0343792020-11-18 10:42:21 -06001907 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001908 A convenience variable that gives you the default list of distro
1909 features with the exception of any features specific to the C library
1910 (``libc``).
1911
1912 When creating a custom distribution, you might find it useful to be
1913 able to reuse the default
1914 :term:`DISTRO_FEATURES` options without the
1915 need to write out the full set. Here is an example that uses
1916 ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file:
1917 ::
1918
1919 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1920
Andrew Geisslerf0343792020-11-18 10:42:21 -06001921 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001922 Specifies a list of features that if present in the target
1923 :term:`DISTRO_FEATURES` value should be
1924 included in ``DISTRO_FEATURES`` when building native recipes. This
1925 variable is used in addition to the features filtered using the
1926 :term:`DISTRO_FEATURES_NATIVE`
1927 variable.
1928
Andrew Geisslerf0343792020-11-18 10:42:21 -06001929 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930 Specifies a list of features that if present in the target
1931 :term:`DISTRO_FEATURES` value should be
1932 included in ``DISTRO_FEATURES`` when building nativesdk recipes. This
1933 variable is used in addition to the features filtered using the
1934 :term:`DISTRO_FEATURES_NATIVESDK`
1935 variable.
1936
Andrew Geisslerf0343792020-11-18 10:42:21 -06001937 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001938 Specifies a list of features that should be included in
1939 :term:`DISTRO_FEATURES` when building native
1940 recipes. This variable is used in addition to the features filtered
1941 using the
1942 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1943 variable.
1944
Andrew Geisslerf0343792020-11-18 10:42:21 -06001945 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001946 Specifies a list of features that should be included in
1947 :term:`DISTRO_FEATURES` when building
1948 nativesdk recipes. This variable is used in addition to the features
1949 filtered using the
1950 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1951 variable.
1952
Andrew Geisslerf0343792020-11-18 10:42:21 -06001953 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001954 The long name of the distribution. For information on the short name
1955 of the distribution, see the :term:`DISTRO` variable.
1956
1957 The ``DISTRO_NAME`` variable corresponds to a distribution
1958 configuration file whose root name is the same as the variable's
1959 argument and whose filename extension is ``.conf``. For example, the
1960 distribution configuration file for the Poky distribution is named
1961 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1962 of the :term:`Source Directory`.
1963
1964 Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set
1965 as follows:
1966 ::
1967
1968 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1969
1970 Distribution configuration files are located in a ``conf/distro``
1971 directory within the :term:`Metadata` that contains the
1972 distribution configuration.
1973
1974 .. note::
1975
1976 If the
1977 DISTRO_NAME
1978 variable is blank, a set of default configurations are used, which
1979 are specified within
1980 meta/conf/distro/defaultsetup.conf
1981 also in the Source Directory.
1982
Andrew Geisslerf0343792020-11-18 10:42:21 -06001983 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001984 The version of the distribution.
1985
Andrew Geisslerf0343792020-11-18 10:42:21 -06001986 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001987 A colon-separated list of overrides specific to the current
1988 distribution. By default, this list includes the value of
1989 :term:`DISTRO`.
1990
1991 You can extend ``DISTROOVERRIDES`` to add extra overrides that should
1992 apply to the distribution.
1993
1994 The underlying mechanism behind ``DISTROOVERRIDES`` is simply that it
1995 is included in the default value of
1996 :term:`OVERRIDES`.
1997
Andrew Geisslerf0343792020-11-18 10:42:21 -06001998 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001999 The central download directory used by the build process to store
2000 downloads. By default, ``DL_DIR`` gets files suitable for mirroring
2001 for everything except Git repositories. If you want tarballs of Git
2002 repositories, use the
2003 :term:`BB_GENERATE_MIRROR_TARBALLS`
2004 variable.
2005
2006 You can set this directory by defining the ``DL_DIR`` variable in the
2007 ``conf/local.conf`` file. This directory is self-maintaining and you
2008 should not have to touch it. By default, the directory is
2009 ``downloads`` in the :term:`Build Directory`.
2010 ::
2011
2012 #DL_DIR ?= "${TOPDIR}/downloads"
2013
2014 To specify a different download directory,
2015 simply remove the comment from the line and provide your directory.
2016
2017 During a first build, the system downloads many different source code
2018 tarballs from various upstream projects. Downloading can take a
2019 while, particularly if your network connection is slow. Tarballs are
2020 all stored in the directory defined by ``DL_DIR`` and the build
2021 system looks there first to find source tarballs.
2022
2023 .. note::
2024
2025 When wiping and rebuilding, you can preserve this directory to
2026 speed up this part of subsequent builds.
2027
2028 You can safely share this directory between multiple builds on the
2029 same development machine. For additional information on how the build
2030 process gets source files when working behind a firewall or proxy
2031 server, see this specific question in the
2032 "`FAQ <#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server>`__"
2033 chapter. You can also refer to the
2034 ":yocto_wiki:`Working Behind a Network Proxy </wiki/Working_Behind_a_Network_Proxy>`"
2035 Wiki page.
2036
Andrew Geisslerf0343792020-11-18 10:42:21 -06002037 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002038 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2039 class, this variable sets the compression policy used when the
2040 OpenEmbedded build system compresses man pages and info pages. By
2041 default, the compression method used is gz (gzip). Other policies
2042 available are xz and bz2.
2043
2044 For information on policies and on how to use this variable, see the
2045 comments in the ``meta/classes/compress_doc.bbclass`` file.
2046
Andrew Geisslerf0343792020-11-18 10:42:21 -06002047 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002048 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2049 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
2050 ``EFI_PROVIDER`` variable specifies the EFI bootloader to use. The
2051 default is "grub-efi", but "systemd-boot" can be used instead.
2052
2053 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2054 :ref:`image-live <ref-classes-image-live>` classes for more
2055 information.
2056
Andrew Geisslerf0343792020-11-18 10:42:21 -06002057 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002058 Variable that controls which locales for ``glibc`` are generated
2059 during the build (useful if the target device has 64Mbytes of RAM or
2060 less).
2061
Andrew Geisslerf0343792020-11-18 10:42:21 -06002062 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002063 When used with the :ref:`report-error <ref-classes-report-error>`
2064 class, specifies the path used for storing the debug files created by
2065 the :ref:`error reporting
2066 tool <dev-manual/dev-manual-common-tasks:using the error reporting tool>`, which
2067 allows you to submit build errors you encounter to a central
2068 database. By default, the value of this variable is
2069 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2070
2071 You can set ``ERR_REPORT_DIR`` to the path you want the error
2072 reporting tool to store the debug files as follows in your
2073 ``local.conf`` file:
2074 ::
2075
2076 ERR_REPORT_DIR = "path"
2077
Andrew Geisslerf0343792020-11-18 10:42:21 -06002078 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002079 Specifies the quality assurance checks whose failures are reported as
2080 errors by the OpenEmbedded build system. You set this variable in
2081 your distribution configuration file. For a list of the checks you
2082 can control with this variable, see the
2083 ":ref:`insane.bbclass <ref-classes-insane>`" section.
2084
Andrew Geisslerf0343792020-11-18 10:42:21 -06002085 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002086 Triggers the OpenEmbedded build system's shared libraries resolver to
2087 exclude an entire package when scanning for shared libraries.
2088
2089 .. note::
2090
2091 The shared libraries resolver's functionality results in part from
2092 the internal function
2093 package_do_shlibs
2094 , which is part of the
2095 do_package
2096 task. You should be aware that the shared libraries resolver might
2097 implicitly define some dependencies between packages.
2098
2099 The ``EXCLUDE_FROM_SHLIBS`` variable is similar to the
2100 :term:`PRIVATE_LIBS` variable, which excludes a
2101 package's particular libraries only and not the whole package.
2102
2103 Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a
2104 particular package:
2105 ::
2106
2107 EXCLUDE_FROM_SHLIBS = "1"
2108
Andrew Geisslerf0343792020-11-18 10:42:21 -06002109 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002110 Directs BitBake to exclude a recipe from world builds (i.e.
2111 ``bitbake world``). During world builds, BitBake locates, parses and
2112 builds all recipes found in every layer exposed in the
2113 ``bblayers.conf`` configuration file.
2114
2115 To exclude a recipe from a world build using this variable, set the
2116 variable to "1" in the recipe.
2117
2118 .. note::
2119
2120 Recipes added to
2121 EXCLUDE_FROM_WORLD
2122 may still be built during a world build in order to satisfy
2123 dependencies of other recipes. Adding a recipe to
2124 EXCLUDE_FROM_WORLD
2125 only ensures that the recipe is not explicitly added to the list
2126 of build targets in a world build.
2127
Andrew Geisslerf0343792020-11-18 10:42:21 -06002128 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002129 Used with file and pathnames to create a prefix for a recipe's
2130 version based on the recipe's :term:`PE` value. If ``PE``
2131 is set and greater than zero for a recipe, ``EXTENDPE`` becomes that
2132 value (e.g if ``PE`` is equal to "1" then ``EXTENDPE`` becomes "1").
2133 If a recipe's ``PE`` is not set (the default) or is equal to zero,
2134 ``EXTENDPE`` becomes "".
2135
2136 See the :term:`STAMP` variable for an example.
2137
Andrew Geisslerf0343792020-11-18 10:42:21 -06002138 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002139 The full package version specification as it appears on the final
2140 packages produced by a recipe. The variable's value is normally used
2141 to fix a runtime dependency to the exact same version of another
2142 package in the same recipe:
2143 ::
2144
2145 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2146
2147 The dependency relationships are intended to force the package
2148 manager to upgrade these types of packages in lock-step.
2149
Andrew Geisslerf0343792020-11-18 10:42:21 -06002150 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151 When set, the ``EXTERNAL_KERNEL_TOOLS`` variable indicates that these
2152 tools are not in the source tree.
2153
2154 When kernel tools are available in the tree, they are preferred over
2155 any externally installed tools. Setting the ``EXTERNAL_KERNEL_TOOLS``
2156 variable tells the OpenEmbedded build system to prefer the installed
2157 external tools. See the
2158 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2159 ``meta/classes`` to see how the variable is used.
2160
Andrew Geisslerf0343792020-11-18 10:42:21 -06002161 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002162 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2163 class, this variable points to the source tree, which is outside of
2164 the OpenEmbedded build system. When set, this variable sets the
2165 :term:`S` variable, which is what the OpenEmbedded build
2166 system uses to locate unpacked recipe source code.
2167
2168 For more information on ``externalsrc.bbclass``, see the
2169 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2170 can also find information on how to use this variable in the
2171 ":ref:`dev-manual/dev-manual-common-tasks:building software from an external source`"
2172 section in the Yocto Project Development Tasks Manual.
2173
Andrew Geisslerf0343792020-11-18 10:42:21 -06002174 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002175 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2176 class, this variable points to the directory in which the recipe's
2177 source code is built, which is outside of the OpenEmbedded build
2178 system. When set, this variable sets the :term:`B` variable,
2179 which is what the OpenEmbedded build system uses to locate the Build
2180 Directory.
2181
2182 For more information on ``externalsrc.bbclass``, see the
2183 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2184 can also find information on how to use this variable in the
2185 ":ref:`dev-manual/dev-manual-common-tasks:building software from an external source`"
2186 section in the Yocto Project Development Tasks Manual.
2187
Andrew Geisslerf0343792020-11-18 10:42:21 -06002188 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002189 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
2190 class, you can use ``EXTRA_AUTORECONF`` to specify extra options to
2191 pass to the ``autoreconf`` command that is executed during the
2192 :ref:`ref-tasks-configure` task.
2193
2194 The default value is "--exclude=autopoint".
2195
Andrew Geisslerf0343792020-11-18 10:42:21 -06002196 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002197 A list of additional features to include in an image. When listing
2198 more than one feature, separate them with a space.
2199
2200 Typically, you configure this variable in your ``local.conf`` file,
2201 which is found in the :term:`Build Directory`.
2202 Although you can use this variable from within a recipe, best
2203 practices dictate that you do not.
2204
2205 .. note::
2206
2207 To enable primary features from within the image recipe, use the
2208 IMAGE_FEATURES
2209 variable.
2210
2211 Here are some examples of features you can add:
2212
2213 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2214 symbol information for debugging and profiling.
2215
2216 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2217 enables post-installation logging. See the 'allow-empty-password' and
2218 'post-install-logging' features in the "`Image
2219 Features <#ref-features-image>`__" section for more information.
2220 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2221 useful if you want to develop against the libraries in the image.
2222 - "read-only-rootfs" - Creates an image whose root filesystem is
2223 read-only. See the
2224 ":ref:`dev-manual/dev-manual-common-tasks:creating a read-only root filesystem`"
2225 section in the Yocto Project Development Tasks Manual for more
2226 information
2227 - "tools-debug" - Adds debugging tools such as gdb and strace.
2228 - "tools-sdk" - Adds development tools such as gcc, make,
2229 pkgconfig and so forth.
2230 - "tools-testapps" - Adds useful testing tools
2231 such as ts_print, aplay, arecord and so forth.
2232
2233 For a complete list of image features that ships with the Yocto
2234 Project, see the "`Image Features <#ref-features-image>`__" section.
2235
2236 For an example that shows how to customize your image by using this
2237 variable, see the ":ref:`usingpoky-extend-customimage-imagefeatures`"
2238 section in the Yocto Project Development Tasks Manual.
2239
Andrew Geisslerf0343792020-11-18 10:42:21 -06002240 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002241 Specifies additional options for the image creation command that has
2242 been specified in :term:`IMAGE_CMD`. When setting
2243 this variable, use an override for the associated image type. Here is
2244 an example:
2245 ::
2246
2247 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
2248
Andrew Geisslerf0343792020-11-18 10:42:21 -06002249 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002250 A list of recipes to build that do not provide packages for
2251 installing into the root filesystem.
2252
2253 Sometimes a recipe is required to build the final image but is not
2254 needed in the root filesystem. You can use the ``EXTRA_IMAGEDEPENDS``
2255 variable to list these recipes and thus specify the dependencies. A
2256 typical example is a required bootloader in a machine configuration.
2257
2258 .. note::
2259
2260 To add packages to the root filesystem, see the various
2261 \*RDEPENDS and \*RRECOMMENDS
2262 variables.
2263
Andrew Geisslerf0343792020-11-18 10:42:21 -06002264 :term:`EXTRANATIVEPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002265 A list of subdirectories of
2266 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2267 added to the beginning of the environment variable ``PATH``. As an
2268 example, the following prepends
2269 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2270 ``PATH``:
2271 ::
2272
2273 EXTRANATIVEPATH = "foo bar"
2274
Andrew Geisslerf0343792020-11-18 10:42:21 -06002275 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002276 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2277 :ref:`cmake <ref-classes-cmake>` class for additional information.
2278
Andrew Geisslerf0343792020-11-18 10:42:21 -06002279 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002280 Additional ``configure`` script options. See
2281 :term:`PACKAGECONFIG_CONFARGS` for
2282 additional information on passing configure script options.
2283
Andrew Geisslerf0343792020-11-18 10:42:21 -06002284 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002285 Additional GNU ``make`` options.
2286
2287 Because the ``EXTRA_OEMAKE`` defaults to "", you need to set the
2288 variable to specify any required GNU options.
2289
2290 :term:`PARALLEL_MAKE` and
2291 :term:`PARALLEL_MAKEINST` also make use of
2292 ``EXTRA_OEMAKE`` to pass the required flags.
2293
Andrew Geisslerf0343792020-11-18 10:42:21 -06002294 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002295 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2296 variable specifies additional configuration options you want to pass
2297 to the ``scons`` command line.
2298
Andrew Geisslerf0343792020-11-18 10:42:21 -06002299 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002300 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2301 class, this variable provides image level user and group operations.
2302 This is a more global method of providing user and group
2303 configuration as compared to using the
2304 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2305 group configurations to a specific recipe.
2306
2307 The set list of commands you can configure using the
2308 ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These
2309 commands map to the normal Unix commands of the same names:
2310 ::
2311
2312 # EXTRA_USERS_PARAMS = "\
2313 # useradd -p '' tester; \
2314 # groupadd developers; \
2315 # userdel nobody; \
2316 # groupdel -g video; \
2317 # groupmod -g 1020 developers; \
2318 # usermod -s /bin/sh tester; \
2319 # "
2320
Andrew Geisslerf0343792020-11-18 10:42:21 -06002321 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002322 Defines one or more packages to include in an image when a specific
2323 item is included in :term:`IMAGE_FEATURES`.
2324 When setting the value, ``FEATURE_PACKAGES`` should have the name of
2325 the feature item as an override. Here is an example:
2326 ::
2327
2328 FEATURE_PACKAGES_widget = "package1 package2"
2329
2330 In this example, if "widget" were added to ``IMAGE_FEATURES``,
2331 package1 and package2 would be included in the image.
2332
2333 .. note::
2334
2335 Packages installed by features defined through
2336 FEATURE_PACKAGES
2337 are often package groups. While similarly named, you should not
2338 confuse the
2339 FEATURE_PACKAGES
2340 variable with package groups, which are discussed elsewhere in the
2341 documentation.
2342
Andrew Geisslerf0343792020-11-18 10:42:21 -06002343 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002344 Points to the base URL of the server and location within the
2345 document-root that provides the metadata and packages required by
2346 OPKG to support runtime package management of IPK packages. You set
2347 this variable in your ``local.conf`` file.
2348
2349 Consider the following example:
2350 ::
2351
2352 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2353
2354 This example assumes you are serving
2355 your packages over HTTP and your databases are located in a directory
2356 named ``BOARD-dir``, which is underneath your HTTP server's
2357 document-root. In this case, the OpenEmbedded build system generates
2358 a set of configuration files for you in your target that work with
2359 the feed.
2360
Andrew Geisslerf0343792020-11-18 10:42:21 -06002361 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002362 The list of files and directories that are placed in a package. The
2363 :term:`PACKAGES` variable lists the packages
2364 generated by a recipe.
2365
2366 To use the ``FILES`` variable, provide a package name override that
2367 identifies the resulting package. Then, provide a space-separated
2368 list of files or paths that identify the files you want included as
2369 part of the resulting package. Here is an example:
2370 ::
2371
2372 FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
2373
2374 .. note::
2375
2376 - When specifying files or paths, you can pattern match using
2377 Python's
2378 `glob <https://docs.python.org/3/library/glob.html>`_
2379 syntax. For details on the syntax, see the documentation by
2380 following the previous link.
2381
2382 - When specifying paths as part of the ``FILES`` variable, it is
2383 good practice to use appropriate path variables. For example,
2384 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2385 rather than ``/usr/bin``. You can find a list of these
2386 variables at the top of the ``meta/conf/bitbake.conf`` file in
2387 the :term:`Source Directory`. You will also
2388 find the default values of the various ``FILES_*`` variables in
2389 this file.
2390
2391 If some of the files you provide with the ``FILES`` variable are
2392 editable and you know they should not be overwritten during the
2393 package update process by the Package Management System (PMS), you
2394 can identify these files so that the PMS will not overwrite them. See
2395 the :term:`CONFFILES` variable for information on
2396 how to identify these files to the PMS.
2397
Andrew Geisslerf0343792020-11-18 10:42:21 -06002398 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002399 Defines the file specification to match
2400 :term:`SOLIBSDEV`. In other words,
2401 ``FILES_SOLIBSDEV`` defines the full path name of the development
2402 symbolic link (symlink) for shared libraries on the target platform.
2403
2404 The following statement from the ``bitbake.conf`` shows how it is
2405 set:
2406 ::
2407
2408 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2409
Andrew Geisslerf0343792020-11-18 10:42:21 -06002410 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002411 Extends the search path the OpenEmbedded build system uses when
2412 looking for files and patches as it processes recipes and append
2413 files. The default directories BitBake uses when it processes recipes
2414 are initially defined by the :term:`FILESPATH`
2415 variable. You can extend ``FILESPATH`` variable by using
2416 ``FILESEXTRAPATHS``.
2417
2418 Best practices dictate that you accomplish this by using
2419 ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you
2420 prepend paths as follows:
2421 ::
2422
2423 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2424
2425 In the above example, the build system first
2426 looks for files in a directory that has the same name as the
2427 corresponding append file.
2428
2429 .. note::
2430
2431 When extending ``FILESEXTRAPATHS``, be sure to use the immediate
2432 expansion (``:=``) operator. Immediate expansion makes sure that
2433 BitBake evaluates :term:`THISDIR` at the time the
2434 directive is encountered rather than at some later time when
2435 expansion might result in a directory that does not contain the
2436 files you need.
2437
2438 Also, include the trailing separating colon character if you are
2439 prepending. The trailing colon character is necessary because you
2440 are directing BitBake to extend the path by prepending directories
2441 to the search path.
2442
2443 Here is another common use:
2444 ::
2445
2446 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2447
2448 In this example, the build system extends the
2449 ``FILESPATH`` variable to include a directory named ``files`` that is
2450 in the same directory as the corresponding append file.
2451
2452 This next example specifically adds three paths:
2453 ::
2454
2455 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2456
2457 A final example shows how you can extend the search path and include
2458 a :term:`MACHINE`-specific override, which is useful
2459 in a BSP layer:
2460 ::
2461
2462 FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2463
2464 The previous statement appears in the
2465 ``linux-yocto-dev.bbappend`` file, which is found in the
2466 :ref:`overview-manual/overview-manual-development-environment:yocto project source repositories` in
2467 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2468 override is a special :term:`PACKAGE_ARCH`
2469 definition for multiple ``meta-intel`` machines.
2470
2471 .. note::
2472
2473 For a layer that supports a single BSP, the override could just be
2474 the value of
2475 MACHINE
2476 .
2477
2478 By prepending paths in ``.bbappend`` files, you allow multiple append
2479 files that reside in different layers but are used for the same
2480 recipe to correctly extend the path.
2481
Andrew Geisslerf0343792020-11-18 10:42:21 -06002482 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002483 A subset of :term:`OVERRIDES` used by the
2484 OpenEmbedded build system for creating
2485 :term:`FILESPATH`. The ``FILESOVERRIDES`` variable
2486 uses overrides to automatically extend the
2487 :term:`FILESPATH` variable. For an example of how
2488 that works, see the :term:`FILESPATH` variable
2489 description. Additionally, you find more information on how overrides
2490 are handled in the
2491 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2492 section of the BitBake User Manual.
2493
2494 By default, the ``FILESOVERRIDES`` variable is defined as:
2495 ::
2496
2497 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2498
2499 .. note::
2500
2501 Do not hand-edit the
2502 FILESOVERRIDES
2503 variable. The values match up with expected overrides and are used
2504 in an expected manner by the build system.
2505
Andrew Geisslerf0343792020-11-18 10:42:21 -06002506 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002507 The default set of directories the OpenEmbedded build system uses
2508 when searching for patches and files.
2509
2510 During the build process, BitBake searches each directory in
2511 ``FILESPATH`` in the specified order when looking for files and
2512 patches specified by each ``file://`` URI in a recipe's
2513 :term:`SRC_URI` statements.
2514
2515 The default value for the ``FILESPATH`` variable is defined in the
2516 ``base.bbclass`` class found in ``meta/classes`` in the
2517 :term:`Source Directory`:
2518 ::
2519
2520 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2521 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2522
2523 The
2524 ``FILESPATH`` variable is automatically extended using the overrides
2525 from the :term:`FILESOVERRIDES` variable.
2526
2527 .. note::
2528
2529 - Do not hand-edit the ``FILESPATH`` variable. If you want the
2530 build system to look in directories other than the defaults,
2531 extend the ``FILESPATH`` variable by using the
2532 :term:`FILESEXTRAPATHS` variable.
2533
2534 - Be aware that the default ``FILESPATH`` directories do not map
2535 to directories in custom layers where append files
2536 (``.bbappend``) are used. If you want the build system to find
2537 patches or files that reside with your append files, you need
2538 to extend the ``FILESPATH`` variable by using the
2539 ``FILESEXTRAPATHS`` variable.
2540
2541 You can take advantage of this searching behavior in useful ways. For
2542 example, consider a case where the following directory structure
2543 exists for general and machine-specific configurations:
2544 ::
2545
2546 files/defconfig
2547 files/MACHINEA/defconfig
2548 files/MACHINEB/defconfig
2549
2550 Also in the example, the ``SRC_URI`` statement contains
2551 "file://defconfig". Given this scenario, you can set
2552 :term:`MACHINE` to "MACHINEA" and cause the build
2553 system to use files from ``files/MACHINEA``. Set ``MACHINE`` to
2554 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2555 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2556 build system uses files from ``files/defconfig``.
2557
2558 You can find out more about the patching process in the
2559 ":ref:`patching-dev-environment`" section
2560 in the Yocto Project Overview and Concepts Manual and the
2561 ":ref:`new-recipe-patching-code`" section in
2562 the Yocto Project Development Tasks Manual. See the
2563 :ref:`ref-tasks-patch` task as well.
2564
Andrew Geisslerf0343792020-11-18 10:42:21 -06002565 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002566 Allows you to define your own file permissions settings table as part
2567 of your configuration for the packaging process. For example, suppose
2568 you need a consistent set of custom permissions for a set of groups
2569 and users across an entire work project. It is best to do this in the
2570 packages themselves but this is not always possible.
2571
2572 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2573 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2574 If you create your own file
2575 permissions setting table, you should place it in your layer or the
2576 distro's layer.
2577
2578 You define the ``FILESYSTEM_PERMS_TABLES`` variable in the
2579 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2580 to point to your custom
2581 ``fs-perms.txt``. You can specify more than a single file permissions
2582 setting table. The paths you specify to these files must be defined
2583 within the :term:`BBPATH` variable.
2584
2585 For guidance on how to create your own file permissions settings
2586 table file, examine the existing ``fs-perms.txt``.
2587
Andrew Geisslerf0343792020-11-18 10:42:21 -06002588 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002589 Decides whether to generate the keys for signing fitImage if they
2590 don't already exist. The keys are created in ``UBOOT_SIGN_KEYDIR``.
2591 The default value is 0.
2592
Andrew Geisslerf0343792020-11-18 10:42:21 -06002593 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002594 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2595
Andrew Geisslerf0343792020-11-18 10:42:21 -06002596 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002597 Arguments to openssl genrsa for generating RSA private key for signing
2598 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2599 use.
2600
Andrew Geisslerf0343792020-11-18 10:42:21 -06002601 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002602 Arguments to openssl req for generating certificate for signing fitImage.
2603 The default value is "-batch -new". batch for non interactive mode
2604 and new for generating new keys.
2605
Andrew Geisslerf0343792020-11-18 10:42:21 -06002606 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002607 Format for public key ceritifcate used in signing fitImage.
2608 The default value is "x509".
2609
Andrew Geisslerf0343792020-11-18 10:42:21 -06002610 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002611 Specifies the signature algorithm used in creating the FIT Image.
2612 For e.g. rsa2048.
2613
Andrew Geisslerf0343792020-11-18 10:42:21 -06002614 :term:`FIT_SIGN_NUMBITS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002615 Size of private key in number of bits used in fitImage. The default
2616 value is "2048".
2617
Andrew Geisslerf0343792020-11-18 10:42:21 -06002618 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002619 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2620 this variable specifies the runtime dependencies for font packages.
2621 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils".
2622
Andrew Geisslerf0343792020-11-18 10:42:21 -06002623 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002624 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2625 this variable identifies packages containing font files that need to
2626 be cached by Fontconfig. By default, the ``fontcache`` class assumes
2627 that fonts are in the recipe's main package (i.e.
2628 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2629 need are in a package other than that main package.
2630
Andrew Geisslerf0343792020-11-18 10:42:21 -06002631 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002632 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2633 during the generation of the root filesystem.
2634
2635 Set the variable to "1" to force the removal of these packages.
2636
Andrew Geisslerf0343792020-11-18 10:42:21 -06002637 :term:`FULL_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002638 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
2639 compiling an optimized system. This variable defaults to "-O2 -pipe
2640 ${DEBUG_FLAGS}".
2641
Andrew Geisslerf0343792020-11-18 10:42:21 -06002642 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002643 Enables Position Independent Executables (PIE) within the GNU C
2644 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2645 Programming (ROP) attacks much more difficult to execute.
2646
2647 By default the ``security_flags.inc`` file enables PIE by setting the
2648 variable as follows:
2649 ::
2650
2651 GCCPIE ?= "--enable-default-pie"
2652
Andrew Geisslerf0343792020-11-18 10:42:21 -06002653 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002654 Specifies the default version of the GNU C Compiler (GCC) used for
2655 compilation. By default, ``GCCVERSION`` is set to "8.x" in the
2656 ``meta/conf/distro/include/tcmode-default.inc`` include file:
2657 ::
2658
2659 GCCVERSION ?= "8.%"
2660
2661 You can override this value by setting it in a
2662 configuration file such as the ``local.conf``.
2663
Andrew Geisslerf0343792020-11-18 10:42:21 -06002664 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002665 The minimal command and arguments to run the GNU Debugger.
2666
Andrew Geisslerf0343792020-11-18 10:42:21 -06002667 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002668 The directory in which a local copy of a Git repository is stored
2669 when it is cloned.
2670
Andrew Geisslerf0343792020-11-18 10:42:21 -06002671 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002672 Specifies the list of GLIBC locales to generate should you not wish
2673 to generate all LIBC locals, which can be time consuming.
2674
2675 .. note::
2676
2677 If you specifically remove the locale
2678 en_US.UTF-8
2679 , you must set
2680 IMAGE_LINGUAS
2681 appropriately.
2682
2683 You can set ``GLIBC_GENERATE_LOCALES`` in your ``local.conf`` file.
2684 By default, all locales are generated.
2685 ::
2686
2687 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2688
Andrew Geisslerf0343792020-11-18 10:42:21 -06002689 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002690 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2691 this variable specifies for a package what parameters should be
2692 passed to the ``groupadd`` command if you wish to add a group to the
2693 system when the package is installed.
2694
2695 Here is an example from the ``dbus`` recipe:
2696 ::
2697
2698 GROUPADD_PARAM_${PN} = "-r netdev"
2699
2700 For information on the standard Linux shell command
2701 ``groupadd``, see http://linux.die.net/man/8/groupadd.
2702
Andrew Geisslerf0343792020-11-18 10:42:21 -06002703 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002704 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2705 this variable specifies for a package what parameters should be
2706 passed to the ``groupmems`` command if you wish to modify the members
2707 of a group when the package is installed.
2708
2709 For information on the standard Linux shell command ``groupmems``,
2710 see http://linux.die.net/man/8/groupmems.
2711
Andrew Geisslerf0343792020-11-18 10:42:21 -06002712 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002713 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2714 and serial in the boot menu. Set this variable to "1" in your
2715 ``local.conf`` or distribution configuration file to enable graphics
2716 and serial in the menu.
2717
2718 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2719 information on how this variable is used.
2720
Andrew Geisslerf0343792020-11-18 10:42:21 -06002721 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002722 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2723 configuration. Use a semi-colon character (``;``) to separate
2724 multiple options.
2725
2726 The ``GRUB_OPTS`` variable is optional. See the
2727 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2728 on how this variable is used.
2729
Andrew Geisslerf0343792020-11-18 10:42:21 -06002730 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002731 Specifies the timeout before executing the default ``LABEL`` in the
2732 GNU GRand Unified Bootloader (GRUB).
2733
2734 The ``GRUB_TIMEOUT`` variable is optional. See the
2735 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2736 on how this variable is used.
2737
Andrew Geisslerf0343792020-11-18 10:42:21 -06002738 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002739 When inheriting the
2740 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2741 this variable specifies the packages that contain the GTK+ input
2742 method modules being installed when the modules are in packages other
2743 than the main package.
2744
Andrew Geisslerf0343792020-11-18 10:42:21 -06002745 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002746 Website where more information about the software the recipe is
2747 building can be found.
2748
Andrew Geisslerf0343792020-11-18 10:42:21 -06002749 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002750 The name of the target architecture, which is normally the same as
2751 :term:`TARGET_ARCH`. The OpenEmbedded build system
2752 supports many architectures. Here is an example list of architectures
2753 supported. This list is by no means complete as the architecture is
2754 configurable:
2755
2756 - arm
2757 - i586
2758 - x86_64
2759 - powerpc
2760 - powerpc64
2761 - mips
2762 - mipsel
2763
Andrew Geisslerf0343792020-11-18 10:42:21 -06002764 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002765 Specifies architecture-specific compiler flags that are passed to the
2766 C compiler.
2767
2768 Default initialization for ``HOST_CC_ARCH`` varies depending on what
2769 is being built:
2770
2771 - :term:`TARGET_CC_ARCH` when building for the
2772 target
2773
2774 - ``BUILD_CC_ARCH`` when building for the build host (i.e.
2775 ``-native``)
2776
2777 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2778 ``nativesdk-``)
2779
Andrew Geisslerf0343792020-11-18 10:42:21 -06002780 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002781 Specifies the name of the target operating system, which is normally
2782 the same as the :term:`TARGET_OS`. The variable can
2783 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2784 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2785 "linux-musleabi" values possible.
2786
Andrew Geisslerf0343792020-11-18 10:42:21 -06002787 :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002788 Specifies the prefix for the cross-compile toolchain. ``HOST_PREFIX``
2789 is normally the same as :term:`TARGET_PREFIX`.
2790
Andrew Geisslerf0343792020-11-18 10:42:21 -06002791 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002792 Specifies the system, including the architecture and the operating
2793 system, for which the build is occurring in the context of the
2794 current recipe.
2795
2796 The OpenEmbedded build system automatically sets this variable based
2797 on :term:`HOST_ARCH`,
2798 :term:`HOST_VENDOR`, and
2799 :term:`HOST_OS` variables.
2800
2801 .. note::
2802
2803 You do not need to set the variable yourself.
2804
2805 Consider these two examples:
2806
2807 - Given a native recipe on a 32-bit x86 machine running Linux, the
2808 value is "i686-linux".
2809
2810 - Given a recipe being built for a little-endian MIPS target running
2811 Linux, the value might be "mipsel-linux".
2812
Andrew Geisslerf0343792020-11-18 10:42:21 -06002813 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002814 A space-separated list (filter) of tools on the build host that
2815 should be allowed to be called from within build tasks. Using this
2816 filter helps reduce the possibility of host contamination. If a tool
2817 specified in the value of ``HOSTTOOLS`` is not found on the build
2818 host, the OpenEmbedded build system produces an error and the build
2819 is not started.
2820
2821 For additional information, see
2822 :term:`HOSTTOOLS_NONFATAL`.
2823
Andrew Geisslerf0343792020-11-18 10:42:21 -06002824 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002825 A space-separated list (filter) of tools on the build host that
2826 should be allowed to be called from within build tasks. Using this
2827 filter helps reduce the possibility of host contamination. Unlike
2828 :term:`HOSTTOOLS`, the OpenEmbedded build system
2829 does not produce an error if a tool specified in the value of
2830 ``HOSTTOOLS_NONFATAL`` is not found on the build host. Thus, you can
2831 use ``HOSTTOOLS_NONFATAL`` to filter optional host tools.
2832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`HOST_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 Specifies the name of the vendor. ``HOST_VENDOR`` is normally the
2835 same as :term:`TARGET_VENDOR`.
2836
Andrew Geisslerf0343792020-11-18 10:42:21 -06002837 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002838 Disables or enables the ``icecc`` (Icecream) function. For more
2839 information on this function and best practices for using this
2840 variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`"
2841 section.
2842
2843 Setting this variable to "1" in your ``local.conf`` disables the
2844 function:
2845 ::
2846
2847 ICECC_DISABLED ??= "1"
2848
2849 To enable the function, set the variable as follows:
2850 ::
2851
2852 ICECC_DISABLED = ""
2853
Andrew Geisslerf0343792020-11-18 10:42:21 -06002854 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002855 Points to the ``icecc-create-env`` script that you provide. This
2856 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2857 set this variable in your ``local.conf`` file.
2858
2859 If you do not point to a script that you provide, the OpenEmbedded
2860 build system uses the default script provided by the
2861 ``icecc-create-env.bb`` recipe, which is a modified version and not
2862 the one that comes with ``icecc``.
2863
Andrew Geisslerf0343792020-11-18 10:42:21 -06002864 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002865 Extra options passed to the ``make`` command during the
2866 :ref:`ref-tasks-compile` task that specify parallel
2867 compilation. This variable usually takes the form of "-j x", where x
2868 represents the maximum number of parallel threads ``make`` can run.
2869
2870 .. note::
2871
2872 The options passed affect builds on all enabled machines on the
2873 network, which are machines running the
2874 iceccd
2875 daemon.
2876
2877 If your enabled machines support multiple cores, coming up with the
2878 maximum number of parallel threads that gives you the best
2879 performance could take some experimentation since machine speed,
2880 network lag, available memory, and existing machine loads can all
2881 affect build time. Consequently, unlike the
2882 :term:`PARALLEL_MAKE` variable, there is no
2883 rule-of-thumb for setting ``ICECC_PARALLEL_MAKE`` to achieve optimal
2884 performance.
2885
2886 If you do not set ``ICECC_PARALLEL_MAKE``, the build system does not
2887 use it (i.e. the system does not detect and assign the number of
2888 cores as is done with ``PARALLEL_MAKE``).
2889
Andrew Geisslerf0343792020-11-18 10:42:21 -06002890 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002891 The location of the ``icecc`` binary. You can set this variable in
2892 your ``local.conf`` file. If your ``local.conf`` file does not define
2893 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2894 to define it by locating ``icecc`` using ``which``.
2895
Andrew Geisslerf0343792020-11-18 10:42:21 -06002896 :term:`ICECC_USER_CLASS_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002897 Identifies user classes that you do not want the Icecream distributed
2898 compile support to consider. This variable is used by the
2899 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2900 your ``local.conf`` file.
2901
2902 When you list classes using this variable, you are "blacklisting"
2903 them from distributed compilation across remote hosts. Any classes
2904 you list will be distributed and compiled locally.
2905
Andrew Geisslerf0343792020-11-18 10:42:21 -06002906 :term:`ICECC_USER_PACKAGE_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002907 Identifies user recipes that you do not want the Icecream distributed
2908 compile support to consider. This variable is used by the
2909 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2910 your ``local.conf`` file.
2911
2912 When you list packages using this variable, you are "blacklisting"
2913 them from distributed compilation across remote hosts. Any packages
2914 you list will be distributed and compiled locally.
2915
Andrew Geisslerf0343792020-11-18 10:42:21 -06002916 :term:`ICECC_USER_PACKAGE_WL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002917 Identifies user recipes that use an empty
2918 :term:`PARALLEL_MAKE` variable that you want to
2919 force remote distributed compilation on using the Icecream
2920 distributed compile support. This variable is used by the
2921 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2922 your ``local.conf`` file.
2923
Andrew Geisslerf0343792020-11-18 10:42:21 -06002924 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002925 The base name of image output files. This variable defaults to the
2926 recipe name (``${``\ :term:`PN`\ ``}``).
2927
Andrew Geisslerf0343792020-11-18 10:42:21 -06002928 :term:`IMAGE_EFI_BOOT_FILES`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002929 A space-separated list of files installed into the boot partition
2930 when preparing an image using the Wic tool with the
2931 ``bootimg-efi`` source plugin. By default,
2932 the files are
2933 installed under the same name as the source files. To change the
2934 installed name, separate it from the original name with a semi-colon
2935 (;). Source files need to be located in
2936 :term:`DEPLOY_DIR_IMAGE`. Here are two
2937 examples:
2938 ::
2939
2940 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
2941 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
2942
2943 Alternatively, source files can be picked up using a glob pattern. In
2944 this case, the destination file must have the same name as the base
2945 name of the source file path. To install files into a directory
2946 within the target location, pass its name after a semi-colon (;).
2947 Here are two examples:
2948 ::
2949
2950 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
2951 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
2952
2953 The first example
2954 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
2955 into the root of the target partition. The second example installs
2956 the same files into a ``boot`` directory within the target partition.
2957
2958 You can find information on how to use the Wic tool in the
2959 ":ref:`dev-manual/dev-manual-common-tasks:creating partitioned images using wic`"
2960 section of the Yocto Project Development Tasks Manual. Reference
2961 material for Wic is located in the
2962 ":doc:`../ref-manual/ref-kickstart`" chapter.
2963
Andrew Geisslerf0343792020-11-18 10:42:21 -06002964 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002965 A space-separated list of files installed into the boot partition
2966 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002967 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002968 the files are
2969 installed under the same name as the source files. To change the
2970 installed name, separate it from the original name with a semi-colon
2971 (;). Source files need to be located in
2972 :term:`DEPLOY_DIR_IMAGE`. Here are two
2973 examples:
2974 ::
2975
2976 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2977 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2978
2979 Alternatively, source files can be picked up using a glob pattern. In
2980 this case, the destination file must have the same name as the base
2981 name of the source file path. To install files into a directory
2982 within the target location, pass its name after a semi-colon (;).
2983 Here are two examples:
2984 ::
2985
2986 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2987 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2988
2989 The first example
2990 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2991 into the root of the target partition. The second example installs
2992 the same files into a ``boot`` directory within the target partition.
2993
2994 You can find information on how to use the Wic tool in the
2995 ":ref:`dev-manual/dev-manual-common-tasks:creating partitioned images using wic`"
2996 section of the Yocto Project Development Tasks Manual. Reference
2997 material for Wic is located in the
2998 ":doc:`../ref-manual/ref-kickstart`" chapter.
2999
Andrew Geisslerf0343792020-11-18 10:42:21 -06003000 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003001 A list of classes that all images should inherit. You typically use
3002 this variable to specify the list of classes that register the
3003 different types of images the OpenEmbedded build system creates.
3004
3005 The default value for ``IMAGE_CLASSES`` is ``image_types``. You can
3006 set this variable in your ``local.conf`` or in a distribution
3007 configuration file.
3008
3009 For more information, see ``meta/classes/image_types.bbclass`` in the
3010 :term:`Source Directory`.
3011
Andrew Geisslerf0343792020-11-18 10:42:21 -06003012 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003013 Specifies the command to create the image file for a specific image
3014 type, which corresponds to the value set set in
3015 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3016 ``btrfs``, and so forth). When setting this variable, you should use
3017 an override for the associated type. Here is an example:
3018 ::
3019
3020 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \
3021 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
3022 ${EXTRA_IMAGECMD}"
3023
3024 You typically do not need to set this variable unless you are adding
3025 support for a new image type. For more examples on how to set this
3026 variable, see the :ref:`image_types <ref-classes-image_types>`
3027 class file, which is ``meta/classes/image_types.bbclass``.
3028
Andrew Geisslerf0343792020-11-18 10:42:21 -06003029 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003030 Specifies one or more files that contain custom device tables that
3031 are passed to the ``makedevs`` command as part of creating an image.
3032 These files list basic device nodes that should be created under
3033 ``/dev`` within the image. If ``IMAGE_DEVICE_TABLES`` is not set,
3034 ``files/device_table-minimal.txt`` is used, which is located by
3035 :term:`BBPATH`. For details on how you should write
3036 device table files, see ``meta/files/device_table-minimal.txt`` as an
3037 example.
3038
Andrew Geisslerf0343792020-11-18 10:42:21 -06003039 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003040 The primary list of features to include in an image. Typically, you
3041 configure this variable in an image recipe. Although you can use this
3042 variable from your ``local.conf`` file, which is found in the
3043 :term:`Build Directory`, best practices dictate that you do
3044 not.
3045
3046 .. note::
3047
3048 To enable extra features from outside the image recipe, use the
3049 EXTRA_IMAGE_FEATURES
3050 variable.
3051
3052 For a list of image features that ships with the Yocto Project, see
3053 the "`Image Features <#ref-features-image>`__" section.
3054
3055 For an example that shows how to customize your image by using this
3056 variable, see the ":ref:`usingpoky-extend-customimage-imagefeatures`"
3057 section in the Yocto Project Development Tasks Manual.
3058
Andrew Geisslerf0343792020-11-18 10:42:21 -06003059 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003060 Specifies the formats the OpenEmbedded build system uses during the
3061 build when creating the root filesystem. For example, setting
3062 ``IMAGE_FSTYPES`` as follows causes the build system to create root
3063 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:
3064 ::
3065
3066 IMAGE_FSTYPES = "ext3 tar.bz2"
3067
3068 For the complete list of supported image formats from which you can
3069 choose, see :term:`IMAGE_TYPES`.
3070
3071 .. note::
3072
3073 - If an image recipe uses the "inherit image" line and you are
3074 setting ``IMAGE_FSTYPES`` inside the recipe, you must set
3075 ``IMAGE_FSTYPES`` prior to using the "inherit image" line.
3076
3077 - Due to the way the OpenEmbedded build system processes this
3078 variable, you cannot update its contents by using ``_append``
3079 or ``_prepend``. You must use the ``+=`` operator to add one or
3080 more options to the ``IMAGE_FSTYPES`` variable.
3081
Andrew Geisslerf0343792020-11-18 10:42:21 -06003082 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003083 Used by recipes to specify the packages to install into an image
3084 through the :ref:`image <ref-classes-image>` class. Use the
3085 ``IMAGE_INSTALL`` variable with care to avoid ordering issues.
3086
3087 Image recipes set ``IMAGE_INSTALL`` to specify the packages to
3088 install into an image through ``image.bbclass``. Additionally,
3089 "helper" classes such as the
3090 :ref:`core-image <ref-classes-core-image>` class exist that can
3091 take lists used with ``IMAGE_FEATURES`` and turn them into
3092 auto-generated entries in ``IMAGE_INSTALL`` in addition to its
3093 default contents.
3094
3095 When you use this variable, it is best to use it as follows:
3096 ::
3097
3098 IMAGE_INSTALL_append = " package-name"
3099
3100 Be sure to include the space
3101 between the quotation character and the start of the package name or
3102 names.
3103
3104 .. note::
3105
3106 - When working with a
3107 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
3108 image, do not use the ``IMAGE_INSTALL`` variable to specify
3109 packages for installation. Instead, use the
3110 :term:`PACKAGE_INSTALL` variable, which
3111 allows the initial RAM filesystem (initramfs) recipe to use a
3112 fixed set of packages and not be affected by ``IMAGE_INSTALL``.
3113 For information on creating an initramfs, see the
3114 ":ref:`building-an-initramfs-image`"
3115 section in the Yocto Project Development Tasks Manual.
3116
3117 - Using ``IMAGE_INSTALL`` with the
3118 :ref:`+= <bitbake:appending-and-prepending>`
3119 BitBake operator within the ``/conf/local.conf`` file or from
3120 within an image recipe is not recommended. Use of this operator
3121 in these ways can cause ordering issues. Since
3122 ``core-image.bbclass`` sets ``IMAGE_INSTALL`` to a default
3123 value using the
3124 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
3125 operator, using a ``+=`` operation against ``IMAGE_INSTALL``
3126 results in unexpected behavior when used within
3127 ``conf/local.conf``. Furthermore, the same operation from
3128 within an image recipe may or may not succeed depending on the
3129 specific situation. In both these cases, the behavior is
3130 contrary to how most users expect the ``+=`` operator to work.
3131
Andrew Geisslerf0343792020-11-18 10:42:21 -06003132 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003133 Specifies the list of locales to install into the image during the
3134 root filesystem construction process. The OpenEmbedded build system
3135 automatically splits locale files, which are used for localization,
3136 into separate packages. Setting the ``IMAGE_LINGUAS`` variable
3137 ensures that any locale packages that correspond to packages already
3138 selected for installation into the image are also installed. Here is
3139 an example:
3140 ::
3141
3142 IMAGE_LINGUAS = "pt-br de-de"
3143
3144 In this example, the build system ensures any Brazilian Portuguese
3145 and German locale files that correspond to packages in the image are
3146 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3147 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3148 only provide locale files by language and not by country-specific
3149 language).
3150
3151 See the :term:`GLIBC_GENERATE_LOCALES`
3152 variable for information on generating GLIBC locales.
3153
Andrew Geisslerf0343792020-11-18 10:42:21 -06003154 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003155 The manifest file for the image. This file lists all the installed
3156 packages that make up the image. The file contains package
3157 information on a line-per-package basis as follows:
3158 ::
3159
3160 packagename packagearch version
3161
3162 The :ref:`image <ref-classes-image>` class defines the manifest
3163 file as follows:
3164 ::
3165
3166 IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
3167
3168 The location is
3169 derived using the :term:`DEPLOY_DIR_IMAGE`
3170 and :term:`IMAGE_NAME` variables. You can find
3171 information on how the image is created in the ":ref:`image-generation-dev-environment`"
3172 section in the Yocto Project Overview and Concepts Manual.
3173
Andrew Geisslerf0343792020-11-18 10:42:21 -06003174 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003175 The name of the output image files minus the extension. This variable
3176 is derived using the :term:`IMAGE_BASENAME`,
3177 :term:`MACHINE`, and :term:`DATETIME`
3178 variables:
3179 ::
3180
3181 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
3182
Andrew Geisslerf0343792020-11-18 10:42:21 -06003183 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003184 Defines a multiplier that the build system applies to the initial
3185 image size for cases when the multiplier times the returned disk
3186 usage value for the image is greater than the sum of
3187 ``IMAGE_ROOTFS_SIZE`` and ``IMAGE_ROOTFS_EXTRA_SPACE``. The result of
3188 the multiplier applied to the initial image size creates free disk
3189 space in the image as overhead. By default, the build process uses a
3190 multiplier of 1.3 for this variable. This default value results in
3191 30% free disk space added to the image when this method is used to
3192 determine the final generated image size. You should be aware that
3193 post install scripts and the package management system uses disk
3194 space inside this overhead area. Consequently, the multiplier does
3195 not produce an image with all the theoretical free disk space. See
3196 ``IMAGE_ROOTFS_SIZE`` for information on how the build system
3197 determines the overall image size.
3198
3199 The default 30% free disk space typically gives the image enough room
3200 to boot and allows for basic post installs while still leaving a
3201 small amount of free disk space. If 30% free space is inadequate, you
3202 can increase the default value. For example, the following setting
3203 gives you 50% free space added to the image:
3204 ::
3205
3206 IMAGE_OVERHEAD_FACTOR = "1.5"
3207
3208 Alternatively, you can ensure a specific amount of free disk space is
3209 added to the image by using the ``IMAGE_ROOTFS_EXTRA_SPACE``
3210 variable.
3211
Andrew Geisslerf0343792020-11-18 10:42:21 -06003212 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003213 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3214 OpenEmbedded build system. The variable is defined appropriately by
3215 the :ref:`package_deb <ref-classes-package_deb>`,
3216 :ref:`package_rpm <ref-classes-package_rpm>`,
3217 :ref:`package_ipk <ref-classes-package_ipk>`, or
3218 :ref:`package_tar <ref-classes-package_tar>` class.
3219
3220 .. note::
3221
3222 The
3223 package_tar
3224 class is broken and is not supported. It is recommended that you
3225 do not use it.
3226
3227 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
3228 :ref:`image <ref-classes-image>` classes use the ``IMAGE_PKGTYPE``
3229 for packaging up images and SDKs.
3230
3231 You should not set the ``IMAGE_PKGTYPE`` manually. Rather, the
3232 variable is set indirectly through the appropriate
3233 :ref:`package_* <ref-classes-package>` class using the
3234 :term:`PACKAGE_CLASSES` variable. The
3235 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3236 or IPK) that appears with the variable
3237
3238 .. note::
3239
3240 Files using the
3241 .tar
3242 format are never used as a substitute packaging format for DEB,
3243 RPM, and IPK formatted files for your image or SDK.
3244
Andrew Geisslerf0343792020-11-18 10:42:21 -06003245 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003246 Specifies a list of functions to call once the OpenEmbedded build
3247 system creates the final image output files. You can specify
3248 functions separated by semicolons:
3249 ::
3250
3251 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3252
3253 If you need to pass the root filesystem path to a command within the
3254 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3255 directory that becomes the root filesystem image. See the
3256 :term:`IMAGE_ROOTFS` variable for more
3257 information.
3258
Andrew Geisslerf0343792020-11-18 10:42:21 -06003259 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003260 Specifies a list of functions to call before the OpenEmbedded build
3261 system creates the final image output files. You can specify
3262 functions separated by semicolons:
3263 ::
3264
3265 IMAGE_PREPROCESS_COMMAND += "function; ... "
3266
3267 If you need to pass the root filesystem path to a command within the
3268 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3269 directory that becomes the root filesystem image. See the
3270 :term:`IMAGE_ROOTFS` variable for more
3271 information.
3272
Andrew Geisslerf0343792020-11-18 10:42:21 -06003273 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003274 The location of the root filesystem while it is under construction
3275 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3276 variable is not configurable. Do not change it.
3277
Andrew Geisslerf0343792020-11-18 10:42:21 -06003278 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003279 Specifies the alignment for the output image file in Kbytes. If the
3280 size of the image is not a multiple of this value, then the size is
3281 rounded up to the nearest multiple of the value. The default value is
3282 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3283 additional information.
3284
Andrew Geisslerf0343792020-11-18 10:42:21 -06003285 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003286 Defines additional free disk space created in the image in Kbytes. By
3287 default, this variable is set to "0". This free disk space is added
3288 to the image after the build system determines the image size as
3289 described in ``IMAGE_ROOTFS_SIZE``.
3290
3291 This variable is particularly useful when you want to ensure that a
3292 specific amount of free disk space is available on a device after an
3293 image is installed and running. For example, to be sure 5 Gbytes of
3294 free disk space is available, set the variable as follows:
3295 ::
3296
3297 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3298
3299 For example, the Yocto Project Build Appliance specifically requests
3300 40 Gbytes of extra space with the line:
3301 ::
3302
3303 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3304
Andrew Geisslerf0343792020-11-18 10:42:21 -06003305 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003306 Defines the size in Kbytes for the generated image. The OpenEmbedded
3307 build system determines the final size for the generated image using
3308 an algorithm that takes into account the initial disk space used for
3309 the generated image, a requested size for the image, and requested
3310 additional free disk space to be added to the image. Programatically,
3311 the build system determines the final size of the generated image as
3312 follows:
3313 ::
3314
3315 if (image-du * overhead) < rootfs-size:
3316 internal-rootfs-size = rootfs-size + xspace
3317 else:
3318 internal-rootfs-size = (image-du * overhead) + xspace
3319 where:
3320 image-du = Returned value of the du command on the image.
3321 overhead = IMAGE_OVERHEAD_FACTOR
3322 rootfs-size = IMAGE_ROOTFS_SIZE
3323 internal-rootfs-size = Initial root filesystem size before any modifications.
3324 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3325
3326 See the :term:`IMAGE_OVERHEAD_FACTOR`
3327 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3328 variables for related information.
3329
Andrew Geisslerf0343792020-11-18 10:42:21 -06003330 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003331 Specifies a dependency from one image type on another. Here is an
3332 example from the :ref:`image-live <ref-classes-image-live>` class:
3333 ::
3334
3335 IMAGE_TYPEDEP_live = "ext3"
3336
3337 In the previous example, the variable ensures that when "live" is
3338 listed with the :term:`IMAGE_FSTYPES` variable,
3339 the OpenEmbedded build system produces an ``ext3`` image first since
3340 one of the components of the live image is an ``ext3`` formatted
3341 partition containing the root filesystem.
3342
Andrew Geisslerf0343792020-11-18 10:42:21 -06003343 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003344 Specifies the complete list of supported image types by default:
3345
3346 - btrfs
3347 - container
3348 - cpio
3349 - cpio.gz
3350 - cpio.lz4
3351 - cpio.lzma
3352 - cpio.xz
3353 - cramfs
3354 - ext2
3355 - ext2.bz2
3356 - ext2.gz
3357 - ext2.lzma
3358 - ext3
3359 - ext3.gz
3360 - ext4
3361 - ext4.gz
3362 - f2fs
3363 - hddimg
3364 - iso
3365 - jffs2
3366 - jffs2.sum
3367 - multiubi
3368 - squashfs
3369 - squashfs-lz4
3370 - squashfs-lzo
3371 - squashfs-xz
3372 - tar
3373 - tar.bz2
3374 - tar.gz
3375 - tar.lz4
3376 - tar.xz
3377 - tar.zst
3378 - ubi
3379 - ubifs
3380 - wic
3381 - wic.bz2
3382 - wic.gz
3383 - wic.lzma
3384
3385 For more information about these types of images, see
3386 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3387
Andrew Geisslerf0343792020-11-18 10:42:21 -06003388 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003389 Helps define the recipe revision for recipes that share a common
3390 ``include`` file. You can think of this variable as part of the
3391 recipe revision as set from within an include file.
3392
3393 Suppose, for example, you have a set of recipes that are used across
3394 several projects. And, within each of those recipes the revision (its
3395 :term:`PR` value) is set accordingly. In this case, when
3396 the revision of those recipes changes, the burden is on you to find
3397 all those recipes and be sure that they get changed to reflect the
3398 updated version of the recipe. In this scenario, it can get
3399 complicated when recipes that are used in many places and provide
3400 common functionality are upgraded to a new revision.
3401
3402 A more efficient way of dealing with this situation is to set the
3403 ``INC_PR`` variable inside the ``include`` files that the recipes
3404 share and then expand the ``INC_PR`` variable within the recipes to
3405 help define the recipe revision.
3406
3407 The following provides an example that shows how to use the
3408 ``INC_PR`` variable given a common ``include`` file that defines the
3409 variable. Once the variable is defined in the ``include`` file, you
3410 can use the variable to set the ``PR`` values in each recipe. You
3411 will notice that when you set a recipe's ``PR`` you can provide more
3412 granular revisioning by appending values to the ``INC_PR`` variable:
3413 ::
3414
3415 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3416 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3417 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3418 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3419
3420 The
3421 first line of the example establishes the baseline revision to be
3422 used for all recipes that use the ``include`` file. The remaining
3423 lines in the example are from individual recipes and show how the
3424 ``PR`` value is set.
3425
Andrew Geisslerf0343792020-11-18 10:42:21 -06003426 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003427 Specifies a space-separated list of license names (as they would
3428 appear in :term:`LICENSE`) that should be excluded
3429 from the build. Recipes that provide no alternatives to listed
3430 incompatible licenses are not built. Packages that are individually
3431 licensed with the specified incompatible licenses will be deleted.
3432
3433 .. note::
3434
3435 This functionality is only regularly tested using the following
3436 setting:
3437 ::
3438
3439 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3440
3441
3442 Although you can use other settings, you might be required to
3443 remove dependencies on or provide alternatives to components that
3444 are required to produce a functional system image.
3445
3446 .. note::
3447
3448 It is possible to define a list of licenses that are allowed to be
3449 used instead of the licenses that are excluded. To do this, define
3450 a variable
3451 COMPATIBLE_LICENSES
3452 with the names of the licences that are allowed. Then define
3453 INCOMPATIBLE_LICENSE
3454 as:
3455 ::
3456
3457 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3458
3459
3460 This will result in
3461 INCOMPATIBLE_LICENSE
3462 containing the names of all licences from
3463 AVAILABLE_LICENSES
3464 except the ones specified in
3465 COMPATIBLE_LICENSES
3466 , thus only allowing the latter licences to be used.
3467
Andrew Geisslerf0343792020-11-18 10:42:21 -06003468 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003469 Causes the named class or classes to be inherited globally. Anonymous
3470 functions in the class or classes are not executed for the base
3471 configuration and in each individual recipe. The OpenEmbedded build
3472 system ignores changes to ``INHERIT`` in individual recipes.
3473
3474 For more information on ``INHERIT``, see the
3475 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3476 section in the Bitbake User Manual.
3477
Andrew Geisslerf0343792020-11-18 10:42:21 -06003478 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003479 Lists classes that will be inherited at the distribution level. It is
3480 unlikely that you want to edit this variable.
3481
3482 The default value of the variable is set as follows in the
3483 ``meta/conf/distro/defaultsetup.conf`` file:
3484 ::
3485
3486 INHERIT_DISTRO ?= "debian devshell sstate license"
3487
Andrew Geisslerf0343792020-11-18 10:42:21 -06003488 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003489 Prevents the default dependencies, namely the C compiler and standard
3490 C library (libc), from being added to :term:`DEPENDS`.
3491 This variable is usually used within recipes that do not require any
3492 compilation using the C compiler.
3493
3494 Set the variable to "1" to prevent the default dependencies from
3495 being added.
3496
Andrew Geisslerf0343792020-11-18 10:42:21 -06003497 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003498 Prevents the OpenEmbedded build system from splitting out debug
3499 information during packaging. By default, the build system splits out
3500 debugging information during the
3501 :ref:`ref-tasks-package` task. For more information on
3502 how debug information is split out, see the
3503 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3504 variable.
3505
3506 To prevent the build system from splitting out debug information
3507 during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as
3508 follows:
3509 ::
3510
3511 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3512
Andrew Geisslerf0343792020-11-18 10:42:21 -06003513 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003514 If set to "1", causes the build to not strip binaries in resulting
3515 packages and prevents the ``-dbg`` package from containing the source
3516 files.
3517
3518 By default, the OpenEmbedded build system strips binaries and puts
3519 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
3520 Consequently, you should not set ``INHIBIT_PACKAGE_STRIP`` when you
3521 plan to debug in general.
3522
Andrew Geisslerf0343792020-11-18 10:42:21 -06003523 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003524 If set to "1", causes the build to not strip binaries in the
3525 resulting sysroot.
3526
3527 By default, the OpenEmbedded build system strips binaries in the
3528 resulting sysroot. When you specifically set the
3529 ``INHIBIT_SYSROOT_STRIP`` variable to "1" in your recipe, you inhibit
3530 this stripping.
3531
3532 If you want to use this variable, include the
3533 :ref:`staging <ref-classes-staging>` class. This class uses a
3534 ``sys_strip()`` function to test for the variable and acts
3535 accordingly.
3536
3537 .. note::
3538
3539 Use of the
3540 INHIBIT_SYSROOT_STRIP
3541 variable occurs in rare and special circumstances. For example,
3542 suppose you are building bare-metal firmware by using an external
3543 GCC toolchain. Furthermore, even if the toolchain's binaries are
3544 strippable, other files exist that are needed for the build that
3545 are not strippable.
3546
Andrew Geisslerf0343792020-11-18 10:42:21 -06003547 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003548 Defines the format for the output image of an initial RAM filesystem
3549 (initramfs), which is used during boot. Supported formats are the
3550 same as those supported by the
3551 :term:`IMAGE_FSTYPES` variable.
3552
3553 The default value of this variable, which is set in the
3554 ``meta/conf/bitbake.conf`` configuration file in the
3555 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3556 initramfs mechanism, as opposed to the initial RAM filesystem
3557 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3558 an optionally compressed cpio archive.
3559
Andrew Geisslerf0343792020-11-18 10:42:21 -06003560 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003561 Specifies the :term:`PROVIDES` name of an image
3562 recipe that is used to build an initial RAM filesystem (initramfs)
3563 image. In other words, the ``INITRAMFS_IMAGE`` variable causes an
3564 additional recipe to be built as a dependency to whatever root
3565 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3566 initramfs image recipe you provide should set
3567 :term:`IMAGE_FSTYPES` to
3568 :term:`INITRAMFS_FSTYPES`.
3569
3570 An initramfs image provides a temporary root filesystem used for
3571 early system initialization (e.g. loading of modules needed to locate
3572 and mount the "real" root filesystem).
3573
3574 .. note::
3575
3576 See the
3577 meta/recipes-core/images/core-image-minimal-initramfs.bb
3578 recipe in the
3579 Source Directory
3580 for an example initramfs recipe. To select this sample recipe as
3581 the one built to provide the initramfs image, set
3582 INITRAMFS_IMAGE
3583 to "core-image-minimal-initramfs".
3584
3585 You can also find more information by referencing the
3586 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3587 the Source Directory, the :ref:`image <ref-classes-image>` class,
3588 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
3589 the ``INITRAMFS_IMAGE`` variable.
3590
3591 If ``INITRAMFS_IMAGE`` is empty, which is the default, then no
3592 initramfs image is built.
3593
3594 For more information, you can also see the
3595 :term:`INITRAMFS_IMAGE_BUNDLE`
3596 variable, which allows the generated image to be bundled inside the
3597 kernel image. Additionally, for information on creating an initramfs
3598 image, see the ":ref:`building-an-initramfs-image`" section
3599 in the Yocto Project Development Tasks Manual.
3600
Andrew Geisslerf0343792020-11-18 10:42:21 -06003601 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003602 Controls whether or not the image recipe specified by
3603 :term:`INITRAMFS_IMAGE` is run through an
3604 extra pass
3605 (:ref:`ref-tasks-bundle_initramfs`) during
3606 kernel compilation in order to build a single binary that contains
3607 both the kernel image and the initial RAM filesystem (initramfs)
3608 image. This makes use of the
3609 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3610 feature.
3611
3612 .. note::
3613
3614 Using an extra compilation pass to bundle the initramfs avoids a
3615 circular dependency between the kernel recipe and the initramfs
3616 recipe should the initramfs include kernel modules. Should that be
3617 the case, the initramfs recipe depends on the kernel for the
3618 kernel modules, and the kernel depends on the initramfs recipe
3619 since the initramfs is bundled inside the kernel image.
3620
3621 The combined binary is deposited into the ``tmp/deploy`` directory,
3622 which is part of the :term:`Build Directory`.
3623
3624 Setting the variable to "1" in a configuration file causes the
3625 OpenEmbedded build system to generate a kernel image with the
3626 initramfs specified in ``INITRAMFS_IMAGE`` bundled within:
3627 ::
3628
3629 INITRAMFS_IMAGE_BUNDLE = "1"
3630
3631 By default, the
3632 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
3633 null string as follows:
3634 ::
3635
3636 INITRAMFS_IMAGE_BUNDLE ?= ""
3637
3638 .. note::
3639
3640 You must set the
3641 INITRAMFS_IMAGE_BUNDLE
3642 variable in a configuration file. You cannot set the variable in a
3643 recipe file.
3644
3645 See the
3646 :yocto_git:`local.conf.sample.extended </cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended>`
3647 file for additional information. Also, for information on creating an
3648 initramfs, see the ":ref:`building-an-initramfs-image`" section
3649 in the Yocto Project Development Tasks Manual.
3650
Andrew Geisslerf0343792020-11-18 10:42:21 -06003651 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003652 The link name of the initial RAM filesystem image. This variable is
3653 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3654 follows:
3655 ::
3656
3657 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3658
3659 The value of the
3660 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3661 file, has the following value:
3662 ::
3663
3664 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3665
3666 See the :term:`MACHINE` variable for additional
3667 information.
3668
Andrew Geisslerf0343792020-11-18 10:42:21 -06003669 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003670 The base name of the initial RAM filesystem image. This variable is
3671 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3672 follows:
3673 ::
3674
3675 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3676
3677 The value of the :term:`KERNEL_ARTIFACT_NAME`
3678 variable, which is set in the same file, has the following value:
3679 ::
3680
3681 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3682
Andrew Geisslerf0343792020-11-18 10:42:21 -06003683 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003684 Indicates list of filesystem images to concatenate and use as an
3685 initial RAM disk (``initrd``).
3686
3687 The ``INITRD`` variable is an optional variable used with the
3688 :ref:`image-live <ref-classes-image-live>` class.
3689
Andrew Geisslerf0343792020-11-18 10:42:21 -06003690 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003691 When building a "live" bootable image (i.e. when
3692 :term:`IMAGE_FSTYPES` contains "live"),
3693 ``INITRD_IMAGE`` specifies the image recipe that should be built to
3694 provide the initial RAM disk image. The default value is
3695 "core-image-minimal-initramfs".
3696
3697 See the :ref:`image-live <ref-classes-image-live>` class for more
3698 information.
3699
Andrew Geisslerf0343792020-11-18 10:42:21 -06003700 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003701 The filename of the initialization script as installed to
3702 ``${sysconfdir}/init.d``.
3703
3704 This variable is used in recipes when using ``update-rc.d.bbclass``.
3705 The variable is mandatory.
3706
Andrew Geisslerf0343792020-11-18 10:42:21 -06003707 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003708 A list of the packages that contain initscripts. If multiple packages
3709 are specified, you need to append the package name to the other
3710 ``INITSCRIPT_*`` as an override.
3711
3712 This variable is used in recipes when using ``update-rc.d.bbclass``.
3713 The variable is optional and defaults to the :term:`PN`
3714 variable.
3715
Andrew Geisslerf0343792020-11-18 10:42:21 -06003716 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003717 Specifies the options to pass to ``update-rc.d``. Here is an example:
3718 ::
3719
3720 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3721
3722 In this example, the script has a runlevel of 99, starts the script
3723 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3724
3725 The variable's default value is "defaults", which is set in the
3726 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3727
3728 The value in ``INITSCRIPT_PARAMS`` is passed through to the
3729 ``update-rc.d`` command. For more information on valid parameters,
3730 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003731 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003732
Andrew Geisslerf0343792020-11-18 10:42:21 -06003733 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003734 Specifies the QA checks to skip for a specific package within a
3735 recipe. For example, to skip the check for symbolic link ``.so``
3736 files in the main package of a recipe, add the following to the
3737 recipe. The package name override must be used, which in this example
3738 is ``${PN}``:
3739 ::
3740
3741 INSANE_SKIP_${PN} += "dev-so"
3742
3743 See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a
3744 list of the valid QA checks you can specify using this variable.
3745
Andrew Geisslerf0343792020-11-18 10:42:21 -06003746 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003747 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
3748 Set the ``INSTALL_TIMEZONE_FILE`` variable to "0" at the
3749 configuration level to disable this behavior.
3750
Andrew Geisslerf0343792020-11-18 10:42:21 -06003751 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003752 When the IPK backend is in use and package management is enabled on
3753 the target, you can use this variable to set up ``opkg`` in the
3754 target image to point to package feeds on a nominated server. Once
3755 the feed is established, you can perform installations or upgrades
3756 using the package manager at runtime.
3757
Andrew Geisslerf0343792020-11-18 10:42:21 -06003758 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003759 Defines the kernel architecture used when assembling the
3760 configuration. Architectures supported for this release are:
3761
3762 - powerpc
3763 - i386
3764 - x86_64
3765 - arm
3766 - qemu
3767 - mips
3768
3769 You define the ``KARCH`` variable in the :ref:`kernel-dev/kernel-dev-advanced:bsp descriptions`.
3770
Andrew Geisslerf0343792020-11-18 10:42:21 -06003771 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003772 A regular expression used by the build process to explicitly identify
3773 the kernel branch that is validated, patched, and configured during a
3774 build. You must set this variable to ensure the exact kernel branch
3775 you want is being used by the build process.
3776
3777 Values for this variable are set in the kernel's recipe file and the
3778 kernel's append file. For example, if you are using the
3779 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
3780 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH``
3781 is set as follows in that kernel recipe file:
3782 ::
3783
3784 KBRANCH ?= "standard/base"
3785
3786 This variable is also used from the kernel's append file to identify
3787 the kernel branch specific to a particular machine or target
3788 hardware. Continuing with the previous kernel example, the kernel's
3789 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3790 BSP layer for a given machine. For example, the append file for the
3791 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3792 machines (``meta-yocto-bsp``) is named
3793 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
3794 Here are the related statements from that append file:
3795 ::
3796
3797 KBRANCH_genericx86 = "standard/base"
3798 KBRANCH_genericx86-64 = "standard/base"
3799 KBRANCH_edgerouter = "standard/edgerouter"
3800 KBRANCH_beaglebone = "standard/beaglebone"
3801
3802 The ``KBRANCH`` statements
3803 identify the kernel branch to use when building for each supported
3804 BSP.
3805
Andrew Geisslerf0343792020-11-18 10:42:21 -06003806 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003807 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3808 class, specifies an "in-tree" kernel configuration file for use
3809 during a kernel build.
3810
3811 Typically, when using a ``defconfig`` to configure a kernel during a
3812 build, you place the file in your layer in the same manner as you
3813 would place patch files and configuration fragment files (i.e.
3814 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3815 is part of the kernel tree (i.e. "in-tree"), you can use the
3816 ``KBUILD_DEFCONFIG`` variable and append the
3817 :term:`KMACHINE` variable to point to the
3818 ``defconfig`` file.
3819
3820 To use the variable, set it in the append file for your kernel recipe
3821 using the following form:
3822 ::
3823
3824 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3825
3826 Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses
3827 a ``defconfig`` file named "bcm2709_defconfig":
3828 ::
3829
3830 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig"
3831
3832 As an alternative, you can use the following within your append file:
3833 ::
3834
3835 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file
3836
3837 For more
3838 information on how to use the ``KBUILD_DEFCONFIG`` variable, see the
3839 ":ref:`kernel-dev/kernel-dev-common:using an "in-tree" \`\`defconfig\`\` file`"
3840 section in the Yocto Project Linux Kernel Development Manual.
3841
Andrew Geisslerf0343792020-11-18 10:42:21 -06003842 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843 Specifies an alternate kernel image type for creation in addition to
3844 the kernel image type specified using the
3845 :term:`KERNEL_IMAGETYPE` variable.
3846
Andrew Geisslerf0343792020-11-18 10:42:21 -06003847 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003848 Specifies the name of all of the build artifacts. You can change the
3849 name of the artifacts by changing the ``KERNEL_ARTIFACT_NAME``
3850 variable.
3851
3852 The value of ``KERNEL_ARTIFACT_NAME``, which is set in the
3853 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
3854 following default value:
3855 ::
3856
3857 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3858
3859 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, and :term:`MACHINE`
3860 variables for additional information.
3861
3862 .. note::
3863
3864 The IMAGE_VERSION_SUFFIX variable is set to DATETIME.
3865
Andrew Geisslerf0343792020-11-18 10:42:21 -06003866 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003867 A list of classes defining kernel image types that the
3868 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3869 typically append this variable to enable extended image types. An
3870 example is the "kernel-fitimage", which enables fitImage support and
3871 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
3872 custom kernel image types with the ``kernel`` class using this
3873 variable.
3874
Andrew Geisslerf0343792020-11-18 10:42:21 -06003875 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003876 Specifies the name of the generated Linux kernel device tree (i.e.
3877 the ``.dtb``) file.
3878
3879 .. note::
3880
3881 Legacy support exists for specifying the full path to the device
3882 tree. However, providing just the .dtb file is preferred.
3883
3884 In order to use this variable, the
3885 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3886 be inherited.
3887
Andrew Geisslerf0343792020-11-18 10:42:21 -06003888 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003889 The link name of the kernel device tree binary (DTB). This variable
3890 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3891 follows:
3892 ::
3893
3894 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3895
3896 The
3897 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
3898 the same file, has the following value:
3899 ::
3900
3901 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3902
3903 See the :term:`MACHINE` variable for additional
3904 information.
3905
Andrew Geisslerf0343792020-11-18 10:42:21 -06003906 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003907 The base name of the kernel device tree binary (DTB). This variable
3908 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3909 follows:
3910 ::
3911
3912 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3913
3914 The value of the :term:`KERNEL_ARTIFACT_NAME`
3915 variable, which is set in the same file, has the following value:
3916 ::
3917
3918 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3919
Andrew Geisslerf0343792020-11-18 10:42:21 -06003920 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003921 Specifies additional ``make`` command-line arguments the OpenEmbedded
3922 build system passes on when compiling the kernel.
3923
Andrew Geisslerf0343792020-11-18 10:42:21 -06003924 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003925 Includes additional kernel metadata. In the OpenEmbedded build
3926 system, the default Board Support Packages (BSPs)
3927 :term:`Metadata` is provided through the
3928 :term:`KMACHINE` and :term:`KBRANCH`
3929 variables. You can use the ``KERNEL_FEATURES`` variable from within
3930 the kernel recipe or kernel append file to further add metadata for
3931 all BSPs or specific BSPs.
3932
3933 The metadata you add through this variable includes config fragments
3934 and features descriptions, which usually includes patches as well as
3935 config fragments. You typically override the ``KERNEL_FEATURES``
3936 variable for a specific machine. In this way, you can provide
3937 validated, but optional, sets of kernel configurations and features.
3938
3939 For example, the following example from the ``linux-yocto-rt_4.12``
3940 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3941 as well as "virtio" configurations to all QEMU machines. The last two
3942 statements add specific configurations to targeted machine types:
3943 ::
3944
3945 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
3946 KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}"
3947 KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc"
3948 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
3949 KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc"
3950
Andrew Geisslerf0343792020-11-18 10:42:21 -06003951 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003952 The link name of the kernel flattened image tree (FIT) image. This
3953 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3954 file as follows:
3955 ::
3956
3957 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3958
3959 The value of the
3960 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3961 file, has the following value:
3962 ::
3963
3964 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3965
3966 See the :term:`MACHINE` variable for additional
3967 information.
3968
Andrew Geisslerf0343792020-11-18 10:42:21 -06003969 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003970 The base name of the kernel flattened image tree (FIT) image. This
3971 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3972 file as follows:
3973 ::
3974
3975 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3976
3977 The value of the :term:`KERNEL_ARTIFACT_NAME`
3978 variable, which is set in the same file, has the following value:
3979 ::
3980
3981 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3982
Andrew Geisslerf0343792020-11-18 10:42:21 -06003983 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003984 The link name for the kernel image. This variable is set in the
3985 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3986 ::
3987
3988 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3989
3990 The value of
3991 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3992 file, has the following value:
3993 ::
3994
3995 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3996
3997 See the :term:`MACHINE` variable for additional
3998 information.
3999
Andrew Geisslerf0343792020-11-18 10:42:21 -06004000 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004001 Specifies the maximum size of the kernel image file in kilobytes. If
4002 ``KERNEL_IMAGE_MAXSIZE`` is set, the size of the kernel image file is
4003 checked against the set value during the
4004 :ref:`ref-tasks-sizecheck` task. The task fails if
4005 the kernel image file is larger than the setting.
4006
4007 ``KERNEL_IMAGE_MAXSIZE`` is useful for target devices that have a
4008 limited amount of space in which the kernel image must be stored.
4009
4010 By default, this variable is not set, which means the size of the
4011 kernel image is not checked.
4012
Andrew Geisslerf0343792020-11-18 10:42:21 -06004013 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004014 The base name of the kernel image. This variable is set in the
4015 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4016 ::
4017
4018 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4019
4020 The value of the
4021 :term:`KERNEL_ARTIFACT_NAME` variable,
4022 which is set in the same file, has the following value:
4023 ::
4024
4025 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4026
Andrew Geisslerf0343792020-11-18 10:42:21 -06004027 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004028 The type of kernel to build for a device, usually set by the machine
4029 configuration files and defaults to "zImage". This variable is used
4030 when building the kernel and is passed to ``make`` as the target to
4031 build.
4032
4033 If you want to build an alternate kernel image type, use the
4034 :term:`KERNEL_ALT_IMAGETYPE` variable.
4035
Andrew Geisslerf0343792020-11-18 10:42:21 -06004036 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004037 Lists kernel modules that need to be auto-loaded during boot.
4038
4039 .. note::
4040
4041 This variable replaces the deprecated
4042 module_autoload
4043 variable.
4044
4045 You can use the ``KERNEL_MODULE_AUTOLOAD`` variable anywhere that it
4046 can be recognized by the kernel recipe or by an out-of-tree kernel
4047 module recipe (e.g. a machine configuration file, a distribution
4048 configuration file, an append file for the recipe, or the recipe
4049 itself).
4050
4051 Specify it as follows:
4052 ::
4053
4054 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4055
4056 Including ``KERNEL_MODULE_AUTOLOAD`` causes the OpenEmbedded build
4057 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4058 the list of modules to be auto-loaded on boot. The modules appear
4059 one-per-line in the file. Here is an example of the most common use
4060 case:
4061 ::
4062
4063 KERNEL_MODULE_AUTOLOAD += "module_name"
4064
4065 For information on how to populate the ``modname.conf`` file with
4066 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4067
Andrew Geisslerf0343792020-11-18 10:42:21 -06004068 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004069 Provides a list of modules for which the OpenEmbedded build system
4070 expects to find ``module_conf_``\ modname values that specify
4071 configuration for each of the modules. For information on how to
4072 provide those module configurations, see the
4073 :term:`module_conf_* <module_conf>` variable.
4074
Andrew Geisslerf0343792020-11-18 10:42:21 -06004075 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004076 The location of the kernel sources. This variable is set to the value
4077 of the :term:`STAGING_KERNEL_DIR` within
4078 the :ref:`module <ref-classes-module>` class. For information on
4079 how this variable is used, see the
4080 ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`"
4081 section in the Yocto Project Linux Kernel Development Manual.
4082
4083 To help maximize compatibility with out-of-tree drivers used to build
4084 modules, the OpenEmbedded build system also recognizes and uses the
4085 :term:`KERNEL_SRC` variable, which is identical to
4086 the ``KERNEL_PATH`` variable. Both variables are common variables
4087 used by external Makefiles to point to the kernel source directory.
4088
Andrew Geisslerf0343792020-11-18 10:42:21 -06004089 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004090 The location of the kernel sources. This variable is set to the value
4091 of the :term:`STAGING_KERNEL_DIR` within
4092 the :ref:`module <ref-classes-module>` class. For information on
4093 how this variable is used, see the
4094 ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`"
4095 section in the Yocto Project Linux Kernel Development Manual.
4096
4097 To help maximize compatibility with out-of-tree drivers used to build
4098 modules, the OpenEmbedded build system also recognizes and uses the
4099 :term:`KERNEL_PATH` variable, which is identical
4100 to the ``KERNEL_SRC`` variable. Both variables are common variables
4101 used by external Makefiles to point to the kernel source directory.
4102
Andrew Geisslerf0343792020-11-18 10:42:21 -06004103 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004104 Specifies the version of the kernel as extracted from ``version.h``
4105 or ``utsrelease.h`` within the kernel sources. Effects of setting
4106 this variable do not take affect until the kernel has been
4107 configured. Consequently, attempting to refer to this variable in
4108 contexts prior to configuration will not work.
4109
Andrew Geisslerf0343792020-11-18 10:42:21 -06004110 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004111 Specifies whether the data referenced through
4112 :term:`PKGDATA_DIR` is needed or not. The
4113 ``KERNELDEPMODDEPEND`` does not control whether or not that data
4114 exists, but simply whether or not it is used. If you do not need to
4115 use the data, set the ``KERNELDEPMODDEPEND`` variable in your
4116 ``initramfs`` recipe. Setting the variable there when the data is not
4117 needed avoids a potential dependency loop.
4118
Andrew Geisslerf0343792020-11-18 10:42:21 -06004119 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004120 Provides a short description of a configuration fragment. You use
4121 this variable in the ``.scc`` file that describes a configuration
4122 fragment file. Here is the variable used in a file named ``smp.scc``
4123 to describe SMP being enabled:
4124 ::
4125
4126 define KFEATURE_DESCRIPTION "Enable SMP"
4127
Andrew Geisslerf0343792020-11-18 10:42:21 -06004128 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004129 The machine as known by the kernel. Sometimes the machine name used
4130 by the kernel does not match the machine name used by the
4131 OpenEmbedded build system. For example, the machine name that the
4132 OpenEmbedded build system understands as ``core2-32-intel-common``
4133 goes by a different name in the Linux Yocto kernel. The kernel
4134 understands that machine as ``intel-core2-32``. For cases like these,
4135 the ``KMACHINE`` variable maps the kernel machine name to the
4136 OpenEmbedded build system machine name.
4137
4138 These mappings between different names occur in the Yocto Linux
4139 Kernel's ``meta`` branch. As an example take a look in the
4140 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:
4141 ::
4142
4143 LINUX_VERSION_core2-32-intel-common = "3.19.0"
4144 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
4145 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4146 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4147 KMACHINE_core2-32-intel-common = "intel-core2-32"
4148 KBRANCH_core2-32-intel-common = "standard/base"
4149 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
4150
4151 The ``KMACHINE`` statement says
4152 that the kernel understands the machine name as "intel-core2-32".
4153 However, the OpenEmbedded build system understands the machine as
4154 "core2-32-intel-common".
4155
Andrew Geisslerf0343792020-11-18 10:42:21 -06004156 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004157 Defines the kernel type to be used in assembling the configuration.
4158 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4159 kernel types. See the ":ref:`kernel-dev/kernel-dev-advanced:kernel types`"
4160 section in the
4161 Yocto Project Linux Kernel Development Manual for more information on
4162 kernel types.
4163
4164 You define the ``KTYPE`` variable in the
4165 :ref:`kernel-dev/kernel-dev-advanced:bsp descriptions`. The
4166 value you use must match the value used for the
4167 :term:`LINUX_KERNEL_TYPE` value used by the
4168 kernel recipe.
4169
Andrew Geisslerf0343792020-11-18 10:42:21 -06004170 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171 Provides a list of targets for automatic configuration.
4172
4173 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4174 information on how this variable is used.
4175
Andrew Geisslerf0343792020-11-18 10:42:21 -06004176 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004177 Lists the layers, separated by spaces, on which this recipe depends.
4178 Optionally, you can specify a specific layer version for a dependency
4179 by adding it to the end of the layer name. Here is an example:
4180 ::
4181
4182 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4183
4184 In this previous example,
4185 version 3 of "anotherlayer" is compared against
4186 :term:`LAYERVERSION`\ ``_anotherlayer``.
4187
4188 An error is produced if any dependency is missing or the version
4189 numbers (if specified) do not match exactly. This variable is used in
4190 the ``conf/layer.conf`` file and must be suffixed with the name of
4191 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4192
Andrew Geisslerf0343792020-11-18 10:42:21 -06004193 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004194 When used inside the ``layer.conf`` configuration file, this variable
4195 provides the path of the current layer. This variable is not
4196 available outside of ``layer.conf`` and references are expanded
4197 immediately when parsing of the file completes.
4198
Andrew Geisslerf0343792020-11-18 10:42:21 -06004199 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004200 Lists the layers, separated by spaces, recommended for use with this
4201 layer.
4202
4203 Optionally, you can specify a specific layer version for a
4204 recommendation by adding the version to the end of the layer name.
4205 Here is an example:
4206 ::
4207
4208 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4209
4210 In this previous example, version 3 of "anotherlayer" is compared
4211 against ``LAYERVERSION_anotherlayer``.
4212
4213 This variable is used in the ``conf/layer.conf`` file and must be
4214 suffixed with the name of the specific layer (e.g.
4215 ``LAYERRECOMMENDS_mylayer``).
4216
Andrew Geisslerf0343792020-11-18 10:42:21 -06004217 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004218 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
4219 a layer is compatible. Using the ``LAYERSERIES_COMPAT`` variable
4220 allows the layer maintainer to indicate which combinations of the
4221 layer and OE-Core can be expected to work. The variable gives the
4222 system a way to detect when a layer has not been tested with new
4223 releases of OE-Core (e.g. the layer is not maintained).
4224
4225 To specify the OE-Core versions for which a layer is compatible, use
4226 this variable in your layer's ``conf/layer.conf`` configuration file.
4227 For the list, use the Yocto Project
4228 :yocto_wiki:`Release Name </wiki/Releases>` (e.g.
4229 DISTRO_NAME_NO_CAP). To specify multiple OE-Core versions for the
4230 layer, use a space-separated list:
4231 ::
4232
4233 LAYERSERIES_COMPAT_layer_root_name = "DISTRO_NAME_NO_CAP DISTRO_NAME_NO_CAP_MINUS_ONE"
4234
4235 .. note::
4236
4237 Setting
4238 LAYERSERIES_COMPAT
4239 is required by the Yocto Project Compatible version 2 standard.
4240 The OpenEmbedded build system produces a warning if the variable
4241 is not set for any given layer.
4242
4243 See the ":ref:`dev-manual/dev-manual-common-tasks:creating your own layer`"
4244 section in the Yocto Project Development Tasks Manual.
4245
Andrew Geisslerf0343792020-11-18 10:42:21 -06004246 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004247 Optionally specifies the version of a layer as a single number. You
4248 can use this within :term:`LAYERDEPENDS` for
4249 another layer in order to depend on a specific version of the layer.
4250 This variable is used in the ``conf/layer.conf`` file and must be
4251 suffixed with the name of the specific layer (e.g.
4252 ``LAYERVERSION_mylayer``).
4253
Andrew Geisslerf0343792020-11-18 10:42:21 -06004254 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004255 The minimal command and arguments used to run the linker.
4256
Andrew Geisslerf0343792020-11-18 10:42:21 -06004257 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004258 Specifies the flags to pass to the linker. This variable is exported
4259 to an environment variable and thus made visible to the software
4260 being built during the compilation step.
4261
4262 Default initialization for ``LDFLAGS`` varies depending on what is
4263 being built:
4264
4265 - :term:`TARGET_LDFLAGS` when building for the
4266 target
4267
4268 - :term:`BUILD_LDFLAGS` when building for the
4269 build host (i.e. ``-native``)
4270
4271 - :term:`BUILDSDK_LDFLAGS` when building for
4272 an SDK (i.e. ``nativesdk-``)
4273
Andrew Geisslerf0343792020-11-18 10:42:21 -06004274 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004275 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4276 that the :ref:`debian <ref-classes-debian>` class applies its
4277 naming policy to given a recipe that packages multiple libraries.
4278
4279 This variable works in conjunction with the ``debian`` class.
4280
Andrew Geisslerf0343792020-11-18 10:42:21 -06004281 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004282 Checksums of the license text in the recipe source code.
4283
4284 This variable tracks changes in license text of the source code
4285 files. If the license text is changed, it will trigger a build
4286 failure, which gives the developer an opportunity to review any
4287 license change.
4288
4289 This variable must be defined for all recipes (unless
4290 :term:`LICENSE` is set to "CLOSED").
4291
4292 For more information, see the ":ref:`usingpoky-configuring-lic_files_chksum`"
4293 section in the Yocto Project Development Tasks Manual.
4294
Andrew Geisslerf0343792020-11-18 10:42:21 -06004295 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004296 The list of source licenses for the recipe. Follow these rules:
4297
4298 - Do not use spaces within individual license names.
4299
4300 - Separate license names using \| (pipe) when there is a choice
4301 between licenses.
4302
4303 - Separate license names using & (ampersand) when multiple licenses
4304 exist that cover different parts of the source.
4305
4306 - You can use spaces between license names.
4307
4308 - For standard licenses, use the names of the files in
4309 ``meta/files/common-licenses/`` or the
4310 :term:`SPDXLICENSEMAP` flag names defined in
4311 ``meta/conf/licenses.conf``.
4312
4313 Here are some examples:
4314 ::
4315
4316 LICENSE = "LGPLv2.1 | GPLv3"
4317 LICENSE = "MPL-1 & LGPLv2.1"
4318 LICENSE = "GPLv2+"
4319
4320 The first example is from the
4321 recipes for Qt, which the user may choose to distribute under either
4322 the LGPL version 2.1 or GPL version 3. The second example is from
4323 Cairo where two licenses cover different parts of the source code.
4324 The final example is from ``sysstat``, which presents a single
4325 license.
4326
4327 You can also specify licenses on a per-package basis to handle
4328 situations where components of the output have different licenses.
4329 For example, a piece of software whose code is licensed under GPLv2
4330 but has accompanying documentation licensed under the GNU Free
4331 Documentation License 1.2 could be specified as follows:
4332 ::
4333
4334 LICENSE = "GFDL-1.2 & GPLv2"
4335 LICENSE_${PN} = "GPLv2"
4336 LICENSE_${PN}-doc = "GFDL-1.2"
4337
Andrew Geisslerf0343792020-11-18 10:42:21 -06004338 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004339 Setting ``LICENSE_CREATE_PACKAGE`` to "1" causes the OpenEmbedded
4340 build system to create an extra package (i.e.
4341 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4342 those packages to the
4343 :term:`RRECOMMENDS`\ ``_${PN}``.
4344
4345 The ``${PN}-lic`` package installs a directory in
4346 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4347 name, and installs files in that directory that contain license and
4348 copyright information (i.e. copies of the appropriate license files
4349 from ``meta/common-licenses`` that match the licenses specified in
4350 the :term:`LICENSE` variable of the recipe metadata
4351 and copies of files marked in
4352 :term:`LIC_FILES_CHKSUM` as containing
4353 license text).
4354
4355 For related information on providing license text, see the
4356 :term:`COPY_LIC_DIRS` variable, the
4357 :term:`COPY_LIC_MANIFEST` variable, and the
4358 ":ref:`dev-manual/dev-manual-common-tasks:providing license text`"
4359 section in the Yocto Project Development Tasks Manual.
4360
Andrew Geisslerf0343792020-11-18 10:42:21 -06004361 :term:`LICENSE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004362 Specifies additional flags for a recipe you must whitelist through
4363 :term:`LICENSE_FLAGS_WHITELIST` in
4364 order to allow the recipe to be built. When providing multiple flags,
4365 separate them with spaces.
4366
4367 This value is independent of :term:`LICENSE` and is
4368 typically used to mark recipes that might require additional licenses
4369 in order to be used in a commercial product. For more information,
4370 see the
4371 ":ref:`dev-manual/dev-manual-common-tasks:enabling commercially licensed recipes`"
4372 section in the Yocto Project Development Tasks Manual.
4373
Andrew Geisslerf0343792020-11-18 10:42:21 -06004374 :term:`LICENSE_FLAGS_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004375 Lists license flags that when specified in
4376 :term:`LICENSE_FLAGS` within a recipe should not
4377 prevent that recipe from being built. This practice is otherwise
4378 known as "whitelisting" license flags. For more information, see the
4379 ":ref:`dev-manual/dev-manual-common-tasks:enabling commercially licensed recipes`"
4380 section in the Yocto Project Development Tasks Manual.
4381
Andrew Geisslerf0343792020-11-18 10:42:21 -06004382 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004383 Path to additional licenses used during the build. By default, the
4384 OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the
4385 directory that holds common license text used during the build. The
4386 ``LICENSE_PATH`` variable allows you to extend that location to other
4387 areas that have additional licenses:
4388 ::
4389
4390 LICENSE_PATH += "path-to-additional-common-licenses"
4391
Andrew Geisslerf0343792020-11-18 10:42:21 -06004392 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004393 Defines the kernel type to be used in assembling the configuration.
4394 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4395 kernel types. See the ":ref:`kernel-dev/kernel-dev-advanced:kernel types`"
4396 section in the
4397 Yocto Project Linux Kernel Development Manual for more information on
4398 kernel types.
4399
4400 If you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to
4401 "standard". Together with :term:`KMACHINE`, the
4402 ``LINUX_KERNEL_TYPE`` variable defines the search arguments used by
4403 the kernel tools to find the appropriate description within the
4404 kernel :term:`Metadata` with which to build out the sources
4405 and configuration.
4406
Andrew Geisslerf0343792020-11-18 10:42:21 -06004407 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004408 The Linux version from ``kernel.org`` on which the Linux kernel image
4409 being built using the OpenEmbedded build system is based. You define
4410 this variable in the kernel recipe. For example, the
4411 ``linux-yocto-3.4.bb`` kernel recipe found in
4412 ``meta/recipes-kernel/linux`` defines the variables as follows:
4413 ::
4414
4415 LINUX_VERSION ?= "3.4.24"
4416
4417 The ``LINUX_VERSION`` variable is used to define :term:`PV`
4418 for the recipe:
4419 ::
4420
4421 PV = "${LINUX_VERSION}+git${SRCPV}"
4422
Andrew Geisslerf0343792020-11-18 10:42:21 -06004423 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004424 A string extension compiled into the version string of the Linux
4425 kernel built with the OpenEmbedded build system. You define this
4426 variable in the kernel recipe. For example, the linux-yocto kernel
4427 recipes all define the variable as follows:
4428 ::
4429
4430 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4431
4432 Defining this variable essentially sets the Linux kernel
4433 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4434 the ``uname`` command. Here is an example that shows the extension
4435 assuming it was set as previously shown:
4436 ::
4437
4438 $ uname -r
4439 3.7.0-rc8-custom
4440
Andrew Geisslerf0343792020-11-18 10:42:21 -06004441 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004442 Specifies the directory to which the OpenEmbedded build system writes
4443 overall log files. The default directory is ``${TMPDIR}/log``.
4444
4445 For the directory containing logs specific to each task, see the
4446 :term:`T` variable.
4447
Andrew Geisslerf0343792020-11-18 10:42:21 -06004448 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004449 Specifies the target device for which the image is built. You define
4450 ``MACHINE`` in the ``local.conf`` file found in the
4451 :term:`Build Directory`. By default, ``MACHINE`` is set to
4452 "qemux86", which is an x86-based architecture machine to be emulated
4453 using QEMU:
4454 ::
4455
4456 MACHINE ?= "qemux86"
4457
4458 The variable corresponds to a machine configuration file of the same
4459 name, through which machine-specific configurations are set. Thus,
4460 when ``MACHINE`` is set to "qemux86" there exists the corresponding
4461 ``qemux86.conf`` machine configuration file, which can be found in
4462 the :term:`Source Directory` in
4463 ``meta/conf/machine``.
4464
4465 The list of machines supported by the Yocto Project as shipped
4466 include the following:
4467 ::
4468
4469 MACHINE ?= "qemuarm"
4470 MACHINE ?= "qemuarm64"
4471 MACHINE ?= "qemumips"
4472 MACHINE ?= "qemumips64"
4473 MACHINE ?= "qemuppc"
4474 MACHINE ?= "qemux86"
4475 MACHINE ?= "qemux86-64"
4476 MACHINE ?= "genericx86"
4477 MACHINE ?= "genericx86-64"
4478 MACHINE ?= "beaglebone"
4479 MACHINE ?= "edgerouter"
4480
4481 The last five are Yocto Project reference hardware
4482 boards, which are provided in the ``meta-yocto-bsp`` layer.
4483
4484 .. note::
4485
4486 Adding additional Board Support Package (BSP) layers to your
4487 configuration adds new possible settings for
4488 MACHINE
4489 .
4490
Andrew Geisslerf0343792020-11-18 10:42:21 -06004491 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004492 Specifies the name of the machine-specific architecture. This
4493 variable is set automatically from :term:`MACHINE` or
4494 :term:`TUNE_PKGARCH`. You should not hand-edit
4495 the ``MACHINE_ARCH`` variable.
4496
Andrew Geisslerf0343792020-11-18 10:42:21 -06004497 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004498 A list of required machine-specific packages to install as part of
4499 the image being built. The build process depends on these packages
4500 being present. Furthermore, because this is a "machine-essential"
4501 variable, the list of packages are essential for the machine to boot.
4502 The impact of this variable affects images based on
4503 ``packagegroup-core-boot``, including the ``core-image-minimal``
4504 image.
4505
4506 This variable is similar to the
4507 ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` variable with the exception
4508 that the image being built has a build dependency on the variable's
4509 list of packages. In other words, the image will not build if a file
4510 in this list is not found.
4511
4512 As an example, suppose the machine for which you are building
4513 requires ``example-init`` to be run during boot to initialize the
4514 hardware. In this case, you would use the following in the machine's
4515 ``.conf`` configuration file:
4516 ::
4517
4518 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4519
Andrew Geisslerf0343792020-11-18 10:42:21 -06004520 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004521 A list of recommended machine-specific packages to install as part of
4522 the image being built. The build process does not depend on these
4523 packages being present. However, because this is a
4524 "machine-essential" variable, the list of packages are essential for
4525 the machine to boot. The impact of this variable affects images based
4526 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4527 image.
4528
4529 This variable is similar to the ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS``
4530 variable with the exception that the image being built does not have
4531 a build dependency on the variable's list of packages. In other
4532 words, the image will still build if a package in this list is not
4533 found. Typically, this variable is used to handle essential kernel
4534 modules, whose functionality may be selected to be built into the
4535 kernel rather than as a module, in which case a package will not be
4536 produced.
4537
4538 Consider an example where you have a custom kernel where a specific
4539 touchscreen driver is required for the machine to be usable. However,
4540 the driver can be built as a module or into the kernel depending on
4541 the kernel configuration. If the driver is built as a module, you
4542 want it to be installed. But, when the driver is built into the
4543 kernel, you still want the build to succeed. This variable sets up a
4544 "recommends" relationship so that in the latter case, the build will
4545 not fail due to the missing package. To accomplish this, assuming the
4546 package for the module was called ``kernel-module-ab123``, you would
4547 use the following in the machine's ``.conf`` configuration file:
4548 ::
4549
4550 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4551
4552 .. note::
4553
4554 In this example, the
4555 kernel-module-ab123
4556 recipe needs to explicitly set its
4557 PACKAGES
4558 variable to ensure that BitBake does not use the kernel recipe's
4559 PACKAGES_DYNAMIC
4560 variable to satisfy the dependency.
4561
4562 Some examples of these machine essentials are flash, screen,
4563 keyboard, mouse, or touchscreen drivers (depending on the machine).
4564
Andrew Geisslerf0343792020-11-18 10:42:21 -06004565 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004566 A list of machine-specific packages to install as part of the image
4567 being built that are not essential for the machine to boot. However,
4568 the build process for more fully-featured images depends on the
4569 packages being present.
4570
4571 This variable affects all images based on ``packagegroup-base``,
4572 which does not include the ``core-image-minimal`` or
4573 ``core-image-full-cmdline`` images.
4574
4575 The variable is similar to the ``MACHINE_EXTRA_RRECOMMENDS`` variable
4576 with the exception that the image being built has a build dependency
4577 on the variable's list of packages. In other words, the image will
4578 not build if a file in this list is not found.
4579
4580 An example is a machine that has WiFi capability but is not essential
4581 for the machine to boot the image. However, if you are building a
4582 more fully-featured image, you want to enable the WiFi. The package
4583 containing the firmware for the WiFi hardware is always expected to
4584 exist, so it is acceptable for the build process to depend upon
4585 finding the package. In this case, assuming the package for the
4586 firmware was called ``wifidriver-firmware``, you would use the
4587 following in the ``.conf`` file for the machine:
4588 ::
4589
4590 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4591
Andrew Geisslerf0343792020-11-18 10:42:21 -06004592 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004593 A list of machine-specific packages to install as part of the image
4594 being built that are not essential for booting the machine. The image
4595 being built has no build dependency on this list of packages.
4596
4597 This variable affects only images based on ``packagegroup-base``,
4598 which does not include the ``core-image-minimal`` or
4599 ``core-image-full-cmdline`` images.
4600
4601 This variable is similar to the ``MACHINE_EXTRA_RDEPENDS`` variable
4602 with the exception that the image being built does not have a build
4603 dependency on the variable's list of packages. In other words, the
4604 image will build if a file in this list is not found.
4605
4606 An example is a machine that has WiFi capability but is not essential
4607 For the machine to boot the image. However, if you are building a
4608 more fully-featured image, you want to enable WiFi. In this case, the
4609 package containing the WiFi kernel module will not be produced if the
4610 WiFi driver is built into the kernel, in which case you still want
4611 the build to succeed instead of failing as a result of the package
4612 not being found. To accomplish this, assuming the package for the
4613 module was called ``kernel-module-examplewifi``, you would use the
4614 following in the ``.conf`` file for the machine:
4615 ::
4616
4617 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4618
Andrew Geisslerf0343792020-11-18 10:42:21 -06004619 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004620 Specifies the list of hardware features the
4621 :term:`MACHINE` is capable of supporting. For related
4622 information on enabling features, see the
4623 :term:`DISTRO_FEATURES`,
4624 :term:`COMBINED_FEATURES`, and
4625 :term:`IMAGE_FEATURES` variables.
4626
4627 For a list of hardware features supported by the Yocto Project as
4628 shipped, see the "`Machine Features <#ref-features-machine>`__"
4629 section.
4630
Andrew Geisslerf0343792020-11-18 10:42:21 -06004631 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004632 Features to be added to ``MACHINE_FEATURES`` if not also present in
4633 ``MACHINE_FEATURES_BACKFILL_CONSIDERED``.
4634
4635 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4636 not intended to be user-configurable. It is best to just reference
4637 the variable to see which machine features are being backfilled for
4638 all machine configurations. See the "`Feature
4639 Backfilling <#ref-features-backfill>`__" section for more
4640 information.
4641
Andrew Geisslerf0343792020-11-18 10:42:21 -06004642 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004643 Features from ``MACHINE_FEATURES_BACKFILL`` that should not be
4644 backfilled (i.e. added to ``MACHINE_FEATURES``) during the build. See
4645 the "`Feature Backfilling <#ref-features-backfill>`__" section for
4646 more information.
4647
Andrew Geisslerf0343792020-11-18 10:42:21 -06004648 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004649 A colon-separated list of overrides that apply to the current
4650 machine. By default, this list includes the value of
4651 :term:`MACHINE`.
4652
4653 You can extend ``MACHINEOVERRIDES`` to add extra overrides that
4654 should apply to a machine. For example, all machines emulated in QEMU
4655 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4656 ``meta/conf/machine/include/qemu.inc`` that prepends the following
4657 override to ``MACHINEOVERRIDES``:
4658 ::
4659
4660 MACHINEOVERRIDES =. "qemuall:"
4661
4662 This
4663 override allows variables to be overriden for all machines emulated
4664 in QEMU, like in the following example from the ``connman-conf``
4665 recipe:
4666 ::
4667
4668 SRC_URI_append_qemuall = "file://wired.config \
4669 file://wired-setup \
4670 "
4671
4672 The underlying mechanism behind
4673 ``MACHINEOVERRIDES`` is simply that it is included in the default
4674 value of :term:`OVERRIDES`.
4675
Andrew Geisslerf0343792020-11-18 10:42:21 -06004676 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677 The email address of the distribution maintainer.
4678
Andrew Geisslerf0343792020-11-18 10:42:21 -06004679 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004680 Specifies additional paths from which the OpenEmbedded build system
4681 gets source code. When the build system searches for source code, it
4682 first tries the local download directory. If that location fails, the
4683 build system tries locations defined by
4684 :term:`PREMIRRORS`, the upstream source, and then
4685 locations specified by ``MIRRORS`` in that order.
4686
4687 Assuming your distribution (:term:`DISTRO`) is "poky",
4688 the default value for ``MIRRORS`` is defined in the
4689 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4690
Andrew Geisslerf0343792020-11-18 10:42:21 -06004691 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004692 Specifies a prefix has been added to :term:`PN` to create a
4693 special version of a recipe or package (i.e. a Multilib version). The
4694 variable is used in places where the prefix needs to be added to or
4695 removed from a the name (e.g. the :term:`BPN` variable).
4696 ``MLPREFIX`` gets set when a prefix has been added to ``PN``.
4697
4698 .. note::
4699
4700 The "ML" in
4701 MLPREFIX
4702 stands for "MultiLib". This representation is historical and comes
4703 from a time when
4704 nativesdk
4705 was a suffix rather than a prefix on the recipe name. When
4706 nativesdk
4707 was turned into a prefix, it made sense to set
4708 MLPREFIX
4709 for it as well.
4710
4711 To help understand when ``MLPREFIX`` might be needed, consider when
4712 :term:`BBCLASSEXTEND` is used to provide a
4713 ``nativesdk`` version of a recipe in addition to the target version.
4714 If that recipe declares build-time dependencies on tasks in other
4715 recipes by using :term:`DEPENDS`, then a dependency on
4716 "foo" will automatically get rewritten to a dependency on
4717 "nativesdk-foo". However, dependencies like the following will not
4718 get rewritten automatically:
4719 ::
4720
4721 do_foo[depends] += "recipe:do_foo"
4722
4723 If you want such a dependency to also get transformed, you can do the
4724 following:
4725 ::
4726
4727 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4728
4729 module_autoload
4730 This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD``
4731 variable. You should replace all occurrences of ``module_autoload``
4732 with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:
4733 ::
4734
4735 module_autoload_rfcomm = "rfcomm"
4736
4737 should now be replaced with:
4738 ::
4739
4740 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4741
4742 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4743
4744 module_conf
4745 Specifies `modprobe.d <http://linux.die.net/man/5/modprobe.d>`_
4746 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4747 file.
4748
4749 You can use this variable anywhere that it can be recognized by the
4750 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4751 configuration file, a distribution configuration file, an append file
4752 for the recipe, or the recipe itself). If you use this variable, you
4753 must also be sure to list the module name in the
4754 :term:`KERNEL_MODULE_AUTOLOAD`
4755 variable.
4756
4757 Here is the general syntax:
4758 ::
4759
4760 module_conf_module_name = "modprobe.d-syntax"
4761
4762 You must use the kernel module name override.
4763
4764 Run ``man modprobe.d`` in the shell to find out more information on
4765 the exact syntax you want to provide with ``module_conf``.
4766
4767 Including ``module_conf`` causes the OpenEmbedded build system to
4768 populate the ``/etc/modprobe.d/modname.conf`` file with
4769 ``modprobe.d`` syntax lines. Here is an example that adds the options
4770 ``arg1`` and ``arg2`` to a module named ``mymodule``:
4771 ::
4772
4773 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4774
4775 For information on how to specify kernel modules to auto-load on
4776 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4777
Andrew Geisslerf0343792020-11-18 10:42:21 -06004778 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004779 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4780 "0" to disable creation of this file, which contains all of the
4781 kernel modules resulting from a kernel build.
4782
Andrew Geisslerf0343792020-11-18 10:42:21 -06004783 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004784 The link name of the kernel module tarball. This variable is set in
4785 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4786 ::
4787
4788 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4789
4790 The value
4791 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
4792 same file, has the following value:
4793 ::
4794
4795 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4796
4797 See the :term:`MACHINE` variable for additional information.
4798
Andrew Geisslerf0343792020-11-18 10:42:21 -06004799 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004800 The base name of the kernel module tarball. This variable is set in
4801 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4802 ::
4803
4804 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4805
4806 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
4807 which is set in the same file, has the following value:
4808 ::
4809
4810 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4811
Andrew Geisslerf0343792020-11-18 10:42:21 -06004812 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004813 Uniquely identifies the type of the target system for which packages
4814 are being built. This variable allows output for different types of
4815 target systems to be put into different subdirectories of the same
4816 output directory.
4817
4818 The default value of this variable is:
4819 ::
4820
4821 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4822
4823 Some classes (e.g.
4824 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
4825 ``MULTIMACH_TARGET_SYS`` value.
4826
4827 See the :term:`STAMP` variable for an example. See the
4828 :term:`STAGING_DIR_TARGET` variable for more information.
4829
Andrew Geisslerf0343792020-11-18 10:42:21 -06004830 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004831 A string identifying the host distribution. Strings consist of the
4832 host distributor ID followed by the release, as reported by the
4833 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4834 example, when running a build on Ubuntu 12.10, the value is
4835 "Ubuntu-12.10". If this information is unable to be determined, the
4836 value resolves to "Unknown".
4837
4838 This variable is used by default to isolate native shared state
4839 packages for different distributions (e.g. to avoid problems with
4840 ``glibc`` version incompatibilities). Additionally, the variable is
4841 checked against
4842 :term:`SANITY_TESTED_DISTROS` if that
4843 variable is set.
4844
Andrew Geisslerf0343792020-11-18 10:42:21 -06004845 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004846 The minimal command and arguments to run ``nm``.
4847
Andrew Geisslerf0343792020-11-18 10:42:21 -06004848 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004849 Avoids QA errors when you use a non-common, non-CLOSED license in a
4850 recipe. Packages exist, such as the linux-firmware package, with many
4851 licenses that are not in any way common. Also, new licenses are added
4852 occasionally to avoid introducing a lot of common license files,
4853 which are only applicable to a specific package.
4854 ``NO_GENERIC_LICENSE`` is used to allow copying a license that does
4855 not exist in common licenses.
4856
4857 The following example shows how to add ``NO_GENERIC_LICENSE`` to a
4858 recipe:
4859 ::
4860
4861 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4862
4863 The following is an example that
4864 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
4865 source:
4866 ::
4867
4868 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4869
Andrew Geisslerf0343792020-11-18 10:42:21 -06004870 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004871 Prevents installation of all "recommended-only" packages.
4872 Recommended-only packages are packages installed only through the
4873 :term:`RRECOMMENDS` variable). Setting the
4874 ``NO_RECOMMENDATIONS`` variable to "1" turns this feature on: ::
4875
4876 NO_RECOMMENDATIONS = "1"
4877
4878 You can set this variable globally in your ``local.conf`` file or you
4879 can attach it to a specific image recipe by using the recipe name
4880 override: ::
4881
4882 NO_RECOMMENDATIONS_pn-target_image = "1"
4883
4884 It is important to realize that if you choose to not install packages
4885 using this variable and some other packages are dependent on them
4886 (i.e. listed in a recipe's :term:`RDEPENDS`
4887 variable), the OpenEmbedded build system ignores your request and
4888 will install the packages to avoid dependency errors.
4889
4890 .. note::
4891
4892 Some recommended packages might be required for certain system
4893 functionality, such as kernel modules. It is up to you to add
4894 packages with the IMAGE_INSTALL variable.
4895
4896 Support for this variable exists only when using the IPK and RPM
4897 packaging backend. Support does not exist for DEB.
4898
4899 See the :term:`BAD_RECOMMENDATIONS` and
4900 the :term:`PACKAGE_EXCLUDE` variables for
4901 related information.
4902
Andrew Geisslerf0343792020-11-18 10:42:21 -06004903 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004904 Disables auto package from splitting ``.debug`` files. If a recipe
4905 requires ``FILES_${PN}-dbg`` to be set manually, the
4906 ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the
4907 content of the debug package. For example:
4908 ::
4909
4910 NOAUTOPACKAGEDEBUG = "1"
4911 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4912 FILES_${PN}-dbg = "/usr/src/debug/"
4913 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
4914
Andrew Geisslerf0343792020-11-18 10:42:21 -06004915 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004916 The minimal command and arguments to run ``objcopy``.
4917
Andrew Geisslerf0343792020-11-18 10:42:21 -06004918 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004919 The minimal command and arguments to run ``objdump``.
4920
Andrew Geisslerf0343792020-11-18 10:42:21 -06004921 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004922 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4923 this variable specifies additional arguments passed to the "sed"
4924 command. The sed command alters any paths in configuration scripts
4925 that have been set up during compilation. Inheriting this class
4926 results in all paths in these scripts being changed to point into the
4927 ``sysroots/`` directory so that all builds that use the script will
4928 use the correct directories for the cross compiling layout.
4929
4930 See the ``meta/classes/binconfig.bbclass`` in the
4931 :term:`Source Directory` for details on how this class
4932 applies these additional sed command arguments. For general
4933 information on the ``binconfig`` class, see the
4934 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
4935
Andrew Geisslerf0343792020-11-18 10:42:21 -06004936 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004937 An internal variable used to tell the OpenEmbedded build system what
4938 Python modules to import for every Python function run by the system.
4939
4940 .. note::
4941
4942 Do not set this variable. It is for internal use only.
4943
Andrew Geisslerf0343792020-11-18 10:42:21 -06004944 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004945 The name of the build environment setup script for the purposes of
4946 setting up the environment within the extensible SDK. The default
4947 value is "oe-init-build-env".
4948
4949 If you use a custom script to set up your build environment, set the
4950 ``OE_INIT_ENV_SCRIPT`` variable to its name.
4951
Andrew Geisslerf0343792020-11-18 10:42:21 -06004952 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004953 Controls how the OpenEmbedded build system spawns interactive
4954 terminals on the host development system (e.g. using the BitBake
4955 command with the ``-c devshell`` command-line option). For more
4956 information, see the ":ref:`platdev-appdev-devshell`" section in
4957 the Yocto Project Development Tasks Manual.
4958
4959 You can use the following values for the ``OE_TERMINAL`` variable:
4960
4961 - auto
4962 - gnome
4963 - xfce
4964 - rxvt
4965 - screen
4966 - konsole
4967 - none
4968
Andrew Geisslerf0343792020-11-18 10:42:21 -06004969 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004970 The directory from which the top-level build environment setup script
4971 is sourced. The Yocto Project provides a top-level build environment
4972 setup script: ````` <#structure-core-script>`__. When you run this
4973 script, the ``OEROOT`` variable resolves to the directory that
4974 contains the script.
4975
4976 For additional information on how this variable is used, see the
4977 initialization script.
4978
Andrew Geisslerf0343792020-11-18 10:42:21 -06004979 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004980 Declares the oldest version of the Linux kernel that the produced
4981 binaries must support. This variable is passed into the build of the
4982 Embedded GNU C Library (``glibc``).
4983
4984 The default for this variable comes from the
4985 ``meta/conf/bitbake.conf`` configuration file. You can override this
4986 default by setting the variable in a custom distribution
4987 configuration file.
4988
Andrew Geisslerf0343792020-11-18 10:42:21 -06004989 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004990 A colon-separated list of overrides that currently apply. Overrides
4991 are a BitBake mechanism that allows variables to be selectively
4992 overridden at the end of parsing. The set of overrides in
4993 ``OVERRIDES`` represents the "state" during building, which includes
4994 the current recipe being built, the machine for which it is being
4995 built, and so forth.
4996
4997 As an example, if the string "an-override" appears as an element in
4998 the colon-separated list in ``OVERRIDES``, then the following
4999 assignment will override ``FOO`` with the value "overridden" at the
5000 end of parsing:
5001 ::
5002
5003 FOO_an-override = "overridden"
5004
5005 See the
5006 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5007 section in the BitBake User Manual for more information on the
5008 overrides mechanism.
5009
5010 The default value of ``OVERRIDES`` includes the values of the
5011 :term:`CLASSOVERRIDE`,
5012 :term:`MACHINEOVERRIDES`, and
5013 :term:`DISTROOVERRIDES` variables. Another
5014 important override included by default is ``pn-${PN}``. This override
5015 allows variables to be set for a single recipe within configuration
5016 (``.conf``) files. Here is an example:
5017 ::
5018
5019 FOO_pn-myrecipe = "myrecipe-specific value"
5020
5021 .. note::
5022
5023 An easy way to see what overrides apply is to search for
5024 OVERRIDES
5025 in the output of the
5026 bitbake -e
5027 command. See the "
5028 Viewing Variable Values
5029 " section in the Yocto Project Development Tasks Manual for more
5030 information.
5031
Andrew Geisslerf0343792020-11-18 10:42:21 -06005032 :term:`P`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005033 The recipe name and version. ``P`` is comprised of the following:
5034 ::
5035
5036 ${PN}-${PV}
5037
Andrew Geisslerf0343792020-11-18 10:42:21 -06005038 :term:`PACKAGE_ADD_METADATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005039 This variable defines additional metdata to add to packages.
5040
5041 You may find you need to inject additional metadata into packages.
5042 This variable allows you to do that by setting the injected data as
5043 the value. Multiple fields can be added by splitting the content with
5044 the literal separator "\n".
5045
5046 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5047 to do package type specific settings. It can also be made package
5048 specific by using the package name as a suffix.
5049
5050 You can find out more about applying this variable in the
5051 ":ref:`dev-manual/dev-manual-common-tasks:adding custom metadata to packages`"
5052 section in the Yocto Project Development Tasks Manual.
5053
Andrew Geisslerf0343792020-11-18 10:42:21 -06005054 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005055 The architecture of the resulting package or packages.
5056
5057 By default, the value of this variable is set to
5058 :term:`TUNE_PKGARCH` when building for the
5059 target, :term:`BUILD_ARCH` when building for the
5060 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5061 SDK.
5062
5063 .. note::
5064
5065 See
5066 SDK_ARCH
5067 for more information.
5068
5069 However, if your recipe's output packages are built specific to the
5070 target machine rather than generally for the architecture of the
5071 machine, you should set ``PACKAGE_ARCH`` to the value of
5072 :term:`MACHINE_ARCH` in the recipe as follows:
5073 ::
5074
5075 PACKAGE_ARCH = "${MACHINE_ARCH}"
5076
Andrew Geisslerf0343792020-11-18 10:42:21 -06005077 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005078 Specifies a list of architectures compatible with the target machine.
5079 This variable is set automatically and should not normally be
5080 hand-edited. Entries are separated using spaces and listed in order
5081 of priority. The default value for ``PACKAGE_ARCHS`` is "all any
5082 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5083
Andrew Geisslerf0343792020-11-18 10:42:21 -06005084 :term:`PACKAGE_BEFORE_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005085 Enables easily adding packages to ``PACKAGES`` before ``${PN}`` so
5086 that those added packages can pick up files that would normally be
5087 included in the default package.
5088
Andrew Geisslerf0343792020-11-18 10:42:21 -06005089 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005090 This variable, which is set in the ``local.conf`` configuration file
5091 found in the ``conf`` folder of the
5092 :term:`Build Directory`, specifies the package manager the
5093 OpenEmbedded build system uses when packaging data.
5094
5095 You can provide one or more of the following arguments for the
5096 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5097 package_tar"
5098
5099 .. note::
5100
5101 While it is a legal option, the
5102 package_tar
5103 class has limited functionality due to no support for package
5104 dependencies by that backend. Therefore, it is recommended that
5105 you do not use it.
5106
5107 The build system uses only the first argument in the list as the
5108 package manager when creating your image or SDK. However, packages
5109 will be created using any additional packaging classes you specify.
5110 For example, if you use the following in your ``local.conf`` file:
5111 ::
5112
5113 PACKAGE_CLASSES ?= "package_ipk"
5114
5115 The OpenEmbedded build system uses
5116 the IPK package manager to create your image or SDK.
5117
5118 For information on packaging and build performance effects as a
5119 result of the package manager in use, see the
5120 ":ref:`package.bbclass <ref-classes-package>`" section.
5121
Andrew Geisslerf0343792020-11-18 10:42:21 -06005122 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005123 Determines how to split up the binary and debug information when
5124 creating ``*-dbg`` packages to be used with the GNU Project Debugger
5125 (GDB).
5126
5127 With the ``PACKAGE_DEBUG_SPLIT_STYLE`` variable, you can control
5128 where debug information, which can include or exclude source files,
5129 is stored:
5130
5131 - ".debug": Debug symbol files are placed next to the binary in a
5132 ``.debug`` directory on the target. For example, if a binary is
5133 installed into ``/bin``, the corresponding debug symbol files are
5134 installed in ``/bin/.debug``. Source files are placed in
5135 ``/usr/src/debug``.
5136
5137 - "debug-file-directory": Debug symbol files are placed under
5138 ``/usr/lib/debug`` on the target, and separated by the path from
5139 where the binary is installed. For example, if a binary is
5140 installed in ``/bin``, the corresponding debug symbols are
5141 installed in ``/usr/lib/debug/bin``. Source files are placed in
5142 ``/usr/src/debug``.
5143
5144 - "debug-without-src": The same behavior as ".debug" previously
5145 described with the exception that no source files are installed.
5146
5147 - "debug-with-srcpkg": The same behavior as ".debug" previously
5148 described with the exception that all source files are placed in a
5149 separate ``*-src`` pkg. This is the default behavior.
5150
5151 You can find out more about debugging using GDB by reading the
5152 ":ref:`platdev-gdb-remotedebug`" section
5153 in the Yocto Project Development Tasks Manual.
5154
Andrew Geisslerf0343792020-11-18 10:42:21 -06005155 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005156 Prevents specific packages from being installed when you are
5157 installing complementary packages.
5158
5159 You might find that you want to prevent installing certain packages
5160 when you are installing complementary packages. For example, if you
5161 are using :term:`IMAGE_FEATURES` to install
5162 ``dev-pkgs``, you might not want to install all packages from a
5163 particular multilib. If you find yourself in this situation, you can
5164 use the ``PACKAGE_EXCLUDE_COMPLEMENTARY`` variable to specify regular
5165 expressions to match the packages you want to exclude.
5166
Andrew Geisslerf0343792020-11-18 10:42:21 -06005167 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005168 Lists packages that should not be installed into an image. For
5169 example:
5170 ::
5171
5172 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5173
5174 You can set this variable globally in your ``local.conf`` file or you
5175 can attach it to a specific image recipe by using the recipe name
5176 override:
5177 ::
5178
5179 PACKAGE_EXCLUDE_pn-target_image = "package_name"
5180
5181 If you choose to not install a package using this variable and some
5182 other package is dependent on it (i.e. listed in a recipe's
5183 :term:`RDEPENDS` variable), the OpenEmbedded build
5184 system generates a fatal installation error. Because the build system
5185 halts the process with a fatal error, you can use the variable with
5186 an iterative development process to remove specific components from a
5187 system.
5188
5189 Support for this variable exists only when using the IPK and RPM
5190 packaging backend. Support does not exist for DEB.
5191
5192 See the :term:`NO_RECOMMENDATIONS` and the
5193 :term:`BAD_RECOMMENDATIONS` variables for
5194 related information.
5195
Andrew Geisslerf0343792020-11-18 10:42:21 -06005196 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005197 Specifies the list of architectures compatible with the device CPU.
5198 This variable is useful when you build for several different devices
5199 that use miscellaneous processors such as XScale and ARM926-EJS.
5200
Andrew Geisslerf0343792020-11-18 10:42:21 -06005201 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005202 Optionally specifies the package architectures used as part of the
5203 package feed URIs during the build. When used, the
5204 ``PACKAGE_FEED_ARCHS`` variable is appended to the final package feed
5205 URI, which is constructed using the
5206 :term:`PACKAGE_FEED_URIS` and
5207 :term:`PACKAGE_FEED_BASE_PATHS`
5208 variables.
5209
5210 .. note::
5211
5212 You can use the
5213 PACKAGE_FEEDS_ARCHS
5214 variable to whitelist specific package architectures. If you do
5215 not need to whitelist specific architectures, which is a common
5216 case, you can omit this variable. Omitting the variable results in
5217 all available architectures for the current machine being included
5218 into remote package feeds.
5219
5220 Consider the following example where the ``PACKAGE_FEED_URIS``,
5221 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5222 defined in your ``local.conf`` file:
5223 ::
5224
5225 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5226 https://example.com/packagerepos/updates"
5227 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5228 PACKAGE_FEED_ARCHS = "all core2-64"
5229
5230 Given these settings, the resulting package feeds are as follows:
5231 ::
5232
5233 https://example.com/packagerepos/release/rpm/all
5234 https://example.com/packagerepos/release/rpm/core2-64
5235 https://example.com/packagerepos/release/rpm-dev/all
5236 https://example.com/packagerepos/release/rpm-dev/core2-64
5237 https://example.com/packagerepos/updates/rpm/all
5238 https://example.com/packagerepos/updates/rpm/core2-64
5239 https://example.com/packagerepos/updates/rpm-dev/all
5240 https://example.com/packagerepos/updates/rpm-dev/core2-64
5241
Andrew Geisslerf0343792020-11-18 10:42:21 -06005242 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005243 Specifies the base path used when constructing package feed URIs. The
5244 ``PACKAGE_FEED_BASE_PATHS`` variable makes up the middle portion of a
5245 package feed URI used by the OpenEmbedded build system. The base path
5246 lies between the :term:`PACKAGE_FEED_URIS`
5247 and :term:`PACKAGE_FEED_ARCHS` variables.
5248
5249 Consider the following example where the ``PACKAGE_FEED_URIS``,
5250 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5251 defined in your ``local.conf`` file:
5252 ::
5253
5254 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5255 https://example.com/packagerepos/updates"
5256 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5257 PACKAGE_FEED_ARCHS = "all core2-64"
5258
5259 Given these settings, the resulting package feeds are as follows:
5260 ::
5261
5262 https://example.com/packagerepos/release/rpm/all
5263 https://example.com/packagerepos/release/rpm/core2-64
5264 https://example.com/packagerepos/release/rpm-dev/all
5265 https://example.com/packagerepos/release/rpm-dev/core2-64
5266 https://example.com/packagerepos/updates/rpm/all
5267 https://example.com/packagerepos/updates/rpm/core2-64
5268 https://example.com/packagerepos/updates/rpm-dev/all
5269 https://example.com/packagerepos/updates/rpm-dev/core2-64
5270
Andrew Geisslerf0343792020-11-18 10:42:21 -06005271 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005272 Specifies the front portion of the package feed URI used by the
5273 OpenEmbedded build system. Each final package feed URI is comprised
5274 of ``PACKAGE_FEED_URIS``,
5275 :term:`PACKAGE_FEED_BASE_PATHS`, and
5276 :term:`PACKAGE_FEED_ARCHS` variables.
5277
5278 Consider the following example where the ``PACKAGE_FEED_URIS``,
5279 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5280 defined in your ``local.conf`` file:
5281 ::
5282
5283 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5284 https://example.com/packagerepos/updates"
5285 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5286 PACKAGE_FEED_ARCHS = "all core2-64"
5287
5288 Given these settings, the resulting package feeds are as follows:
5289 ::
5290
5291 https://example.com/packagerepos/release/rpm/all
5292 https://example.com/packagerepos/release/rpm/core2-64
5293 https://example.com/packagerepos/release/rpm-dev/all
5294 https://example.com/packagerepos/release/rpm-dev/core2-64
5295 https://example.com/packagerepos/updates/rpm/all
5296 https://example.com/packagerepos/updates/rpm/core2-64
5297 https://example.com/packagerepos/updates/rpm-dev/all
5298 https://example.com/packagerepos/updates/rpm-dev/core2-64
5299
Andrew Geisslerf0343792020-11-18 10:42:21 -06005300 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005301 The final list of packages passed to the package manager for
5302 installation into the image.
5303
5304 Because the package manager controls actual installation of all
5305 packages, the list of packages passed using ``PACKAGE_INSTALL`` is
5306 not the final list of packages that are actually installed. This
5307 variable is internal to the image construction code. Consequently, in
5308 general, you should use the
5309 :term:`IMAGE_INSTALL` variable to specify
5310 packages for installation. The exception to this is when working with
5311 the
5312 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
5313 image. When working with an initial RAM filesystem (initramfs) image,
5314 use the ``PACKAGE_INSTALL`` variable. For information on creating an
5315 initramfs, see the ":ref:`building-an-initramfs-image`" section
5316 in the Yocto Project Development Tasks Manual.
5317
Andrew Geisslerf0343792020-11-18 10:42:21 -06005318 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005319 Specifies a list of packages the OpenEmbedded build system attempts
5320 to install when creating an image. If a listed package fails to
5321 install, the build system does not generate an error. This variable
5322 is generally not user-defined.
5323
Andrew Geisslerf0343792020-11-18 10:42:21 -06005324 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005325 Specifies a list of functions run to pre-process the
5326 :term:`PKGD` directory prior to splitting the files out
5327 to individual packages.
5328
Andrew Geisslerf0343792020-11-18 10:42:21 -06005329 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005330 Specifies a list of dependencies for post-installation and
5331 pre-installation scripts on native/cross tools. If your
5332 post-installation or pre-installation script can execute at rootfs
5333 creation time rather than on the target but depends on a native tool
5334 in order to execute, you need to list the tools in
5335 ``PACKAGE_WRITE_DEPS``.
5336
5337 For information on running post-installation scripts, see the
5338 ":ref:`dev-manual/dev-manual-common-tasks:post-installation scripts`"
5339 section in the Yocto Project Development Tasks Manual.
5340
Andrew Geisslerf0343792020-11-18 10:42:21 -06005341 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005342 This variable provides a means of enabling or disabling features of a
5343 recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in
5344 recipes when you specify features and then arguments that define
5345 feature behaviors. Here is the basic block structure (broken over
5346 multiple lines for readability):
5347 ::
5348
5349 PACKAGECONFIG ??= "f1 f2 f3 ..."
5350 PACKAGECONFIG[f1] = "\
5351 --with-f1, \
5352 --without-f1, \
5353 build-deps-for-f1, \
5354 runtime-deps-for-f1, \
5355 runtime-recommends-for-f1, \
5356 packageconfig-conflicts-for-f1"
5357 PACKAGECONFIG[f2] = "\
5358 ... and so on and so on ...
5359
5360 The ``PACKAGECONFIG`` variable itself specifies a space-separated
5361 list of the features to enable. Following the features, you can
5362 determine the behavior of each feature by providing up to six
5363 order-dependent arguments, which are separated by commas. You can
5364 omit any argument you like but must retain the separating commas. The
5365 order is important and specifies the following:
5366
5367 1. Extra arguments that should be added to the configure script
5368 argument list (:term:`EXTRA_OECONF` or
5369 :term:`PACKAGECONFIG_CONFARGS`) if
5370 the feature is enabled.
5371
5372 2. Extra arguments that should be added to ``EXTRA_OECONF`` or
5373 ``PACKAGECONFIG_CONFARGS`` if the feature is disabled.
5374
5375 3. Additional build dependencies (:term:`DEPENDS`)
5376 that should be added if the feature is enabled.
5377
5378 4. Additional runtime dependencies (:term:`RDEPENDS`)
5379 that should be added if the feature is enabled.
5380
5381 5. Additional runtime recommendations
5382 (:term:`RRECOMMENDS`) that should be added if
5383 the feature is enabled.
5384
5385 6. Any conflicting (that is, mutually exclusive) ``PACKAGECONFIG``
5386 settings for this feature.
5387
5388 Consider the following ``PACKAGECONFIG`` block taken from the
5389 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5390 three arguments that determine the feature's behavior.
5391 ::
5392
5393 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5394
5395 The
5396 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5397 enabled. In this case, ``--with-gtk3`` is added to the configure
5398 script argument list and ``gtk+3`` is added to ``DEPENDS``. On the
5399 other hand, if the feature is disabled say through a ``.bbappend``
5400 file in another layer, then the second argument ``--without-gtk3`` is
5401 added to the configure script instead.
5402
5403 The basic ``PACKAGECONFIG`` structure previously described holds true
5404 regardless of whether you are creating a block or changing a block.
5405 When creating a block, use the structure inside your recipe.
5406
5407 If you want to change an existing ``PACKAGECONFIG`` block, you can do
5408 so one of two ways:
5409
5410 - *Append file:* Create an append file named
5411 recipename\ ``.bbappend`` in your layer and override the value of
5412 ``PACKAGECONFIG``. You can either completely override the
5413 variable:
5414 ::
5415
5416 PACKAGECONFIG = "f4 f5"
5417
5418 Or, you can just append the variable:
5419 ::
5420
5421 PACKAGECONFIG_append = " f4"
5422
5423 - *Configuration file:* This method is identical to changing the
5424 block through an append file except you edit your ``local.conf``
5425 or ``mydistro.conf`` file. As with append files previously
5426 described, you can either completely override the variable:
5427 PACKAGECONFIG_pn-recipename = "f4 f5" Or, you can just amend the
5428 variable:
5429 ::
5430
5431 PACKAGECONFIG_append_pn-recipename = " f4"
5432
Andrew Geisslerf0343792020-11-18 10:42:21 -06005433 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005434 A space-separated list of configuration options generated from the
5435 :term:`PACKAGECONFIG` setting.
5436
5437 Classes such as :ref:`autotools <ref-classes-autotools>` and
5438 :ref:`cmake <ref-classes-cmake>` use ``PACKAGECONFIG_CONFARGS`` to
5439 pass ``PACKAGECONFIG`` options to ``configure`` and ``cmake``,
5440 respectively. If you are using ``PACKAGECONFIG`` but not a class that
5441 handles the ``do_configure`` task, then you need to use
5442 ``PACKAGECONFIG_CONFARGS`` appropriately.
5443
Andrew Geisslerf0343792020-11-18 10:42:21 -06005444 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005445 For recipes inheriting the
5446 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
5447 ``PACKAGEGROUP_DISABLE_COMPLEMENTARY`` to "1" specifies that the
5448 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5449 should not be automatically created by the ``packagegroup`` recipe,
5450 which is the default behavior.
5451
Andrew Geisslerf0343792020-11-18 10:42:21 -06005452 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005453 The list of packages the recipe creates. The default value is the
5454 following:
5455 ::
5456
5457 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5458
5459 During packaging, the :ref:`ref-tasks-package` task
5460 goes through ``PACKAGES`` and uses the :term:`FILES`
5461 variable corresponding to each package to assign files to the
5462 package. If a file matches the ``FILES`` variable for more than one
5463 package in ``PACKAGES``, it will be assigned to the earliest
5464 (leftmost) package.
5465
5466 Packages in the variable's list that are empty (i.e. where none of
5467 the patterns in ``FILES_``\ pkg match any files installed by the
5468 :ref:`ref-tasks-install` task) are not generated,
5469 unless generation is forced through the
5470 :term:`ALLOW_EMPTY` variable.
5471
Andrew Geisslerf0343792020-11-18 10:42:21 -06005472 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005473 A promise that your recipe satisfies runtime dependencies for
5474 optional modules that are found in other recipes.
5475 ``PACKAGES_DYNAMIC`` does not actually satisfy the dependencies, it
5476 only states that they should be satisfied. For example, if a hard,
5477 runtime dependency (:term:`RDEPENDS`) of another
5478 package is satisfied at build time through the ``PACKAGES_DYNAMIC``
5479 variable, but a package with the module name is never actually
5480 produced, then the other package will be broken. Thus, if you attempt
5481 to include that package in an image, you will get a dependency
5482 failure from the packaging system during the
5483 :ref:`ref-tasks-rootfs` task.
5484
5485 Typically, if there is a chance that such a situation can occur and
5486 the package that is not created is valid without the dependency being
5487 satisfied, then you should use :term:`RRECOMMENDS`
5488 (a soft runtime dependency) instead of ``RDEPENDS``.
5489
5490 For an example of how to use the ``PACKAGES_DYNAMIC`` variable when
5491 you are splitting packages, see the
5492 ":ref:`dev-manual/dev-manual-common-tasks:handling optional module packaging`"
5493 section in the Yocto Project Development Tasks Manual.
5494
Andrew Geisslerf0343792020-11-18 10:42:21 -06005495 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005496 Specifies a list of functions run to perform additional splitting of
5497 files into individual packages. Recipes can either prepend to this
5498 variable or prepend to the ``populate_packages`` function in order to
5499 perform additional package splitting. In either case, the function
5500 should set :term:`PACKAGES`,
5501 :term:`FILES`, :term:`RDEPENDS` and
5502 other packaging variables appropriately in order to perform the
5503 desired splitting.
5504
Andrew Geisslerf0343792020-11-18 10:42:21 -06005505 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005506 Extra options passed to the ``make`` command during the
5507 :ref:`ref-tasks-compile` task in order to specify
5508 parallel compilation on the local build host. This variable is
5509 usually in the form "-j x", where x represents the maximum number of
5510 parallel threads ``make`` can run.
5511
5512 .. note::
5513
5514 In order for
5515 PARALLEL_MAKE
5516 to be effective,
5517 make
5518 must be called with
5519 ${
5520 EXTRA_OEMAKE
5521 }
5522 . An easy way to ensure this is to use the
5523 oe_runmake
5524 function.
5525
5526 By default, the OpenEmbedded build system automatically sets this
5527 variable to be equal to the number of cores the build system uses.
5528
5529 .. note::
5530
5531 If the software being built experiences dependency issues during
5532 the
5533 do_compile
5534 task that result in race conditions, you can clear the
5535 PARALLEL_MAKE
5536 variable within the recipe as a workaround. For information on
5537 addressing race conditions, see the "
5538 Debugging Parallel Make Races
5539 " section in the Yocto Project Development Tasks Manual.
5540
5541 For single socket systems (i.e. one CPU), you should not have to
5542 override this variable to gain optimal parallelism during builds.
5543 However, if you have very large systems that employ multiple physical
5544 CPUs, you might want to make sure the ``PARALLEL_MAKE`` variable is
5545 not set higher than "-j 20".
5546
5547 For more information on speeding up builds, see the
5548 ":ref:`dev-manual/dev-manual-common-tasks:speeding up a build`"
5549 section in the Yocto Project Development Tasks Manual.
5550
Andrew Geisslerf0343792020-11-18 10:42:21 -06005551 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005552 Extra options passed to the ``make install`` command during the
5553 :ref:`ref-tasks-install` task in order to specify
5554 parallel installation. This variable defaults to the value of
5555 :term:`PARALLEL_MAKE`.
5556
5557 .. note::
5558
5559 In order for ``PARALLEL_MAKEINST`` to be effective, ``make`` must
5560 be called with
5561 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5562 way to ensure this is to use the ``oe_runmake`` function.
5563
5564 If the software being built experiences dependency issues during
5565 the ``do_install`` task that result in race conditions, you can
5566 clear the ``PARALLEL_MAKEINST`` variable within the recipe as a
5567 workaround. For information on addressing race conditions, see the
5568 ":ref:`dev-manual/dev-manual-common-tasks:debugging parallel make races`"
5569 section in the Yocto Project Development Tasks Manual.
5570
Andrew Geisslerf0343792020-11-18 10:42:21 -06005571 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005572 Determines the action to take when a patch fails. You can set this
5573 variable to one of two values: "noop" and "user".
5574
5575 The default value of "noop" causes the build to simply fail when the
5576 OpenEmbedded build system cannot successfully apply a patch. Setting
5577 the value to "user" causes the build system to launch a shell and
5578 places you in the right location so that you can manually resolve the
5579 conflicts.
5580
5581 Set this variable in your ``local.conf`` file.
5582
Andrew Geisslerf0343792020-11-18 10:42:21 -06005583 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005584 Specifies the utility used to apply patches for a recipe during the
5585 :ref:`ref-tasks-patch` task. You can specify one of
5586 three utilities: "patch", "quilt", or "git". The default utility used
5587 is "quilt" except for the quilt-native recipe itself. Because the
5588 quilt tool is not available at the time quilt-native is being
5589 patched, it uses "patch".
5590
5591 If you wish to use an alternative patching tool, set the variable in
5592 the recipe using one of the following:
5593 ::
5594
5595 PATCHTOOL = "patch"
5596 PATCHTOOL = "quilt"
5597 PATCHTOOL = "git"
5598
Andrew Geisslerf0343792020-11-18 10:42:21 -06005599 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005600 The epoch of the recipe. By default, this variable is unset. The
5601 variable is used to make upgrades possible when the versioning scheme
5602 changes in some backwards incompatible way.
5603
5604 ``PE`` is the default value of the :term:`PKGE` variable.
5605
Andrew Geisslerf0343792020-11-18 10:42:21 -06005606 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005607 Specifies the recipe or package name and includes all version and
5608 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5609 ``bash-4.2-r1/``). This variable is comprised of the following:
5610 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5611
Andrew Geisslerf0343792020-11-18 10:42:21 -06005612 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005613 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5614 class, this variable identifies packages that contain the pixbuf
5615 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5616 class assumes that the loaders are in the recipe's main package (i.e.
5617 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5618 loaders you need are in a package other than that main package.
5619
Andrew Geisslerf0343792020-11-18 10:42:21 -06005620 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005621 The name of the resulting package created by the OpenEmbedded build
5622 system.
5623
5624 .. note::
5625
5626 When using the
5627 PKG
5628 variable, you must use a package name override.
5629
5630 For example, when the :ref:`debian <ref-classes-debian>` class
5631 renames the output package, it does so by setting
5632 ``PKG_packagename``.
5633
Andrew Geisslerf0343792020-11-18 10:42:21 -06005634 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005635 The path to ``pkg-config`` files for the current build context.
5636 ``pkg-config`` reads this variable from the environment.
5637
Andrew Geisslerf0343792020-11-18 10:42:21 -06005638 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005639 Points to the destination directory for files to be packaged before
5640 they are split into individual packages. This directory defaults to
5641 the following:
5642 ::
5643
5644 ${WORKDIR}/package
5645
5646 Do not change this default.
5647
Andrew Geisslerf0343792020-11-18 10:42:21 -06005648 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005649 Points to a shared, global-state directory that holds data generated
5650 during the packaging process. During the packaging process, the
5651 :ref:`ref-tasks-packagedata` task packages data
5652 for each recipe and installs it into this temporary, shared area.
5653 This directory defaults to the following, which you should not
5654 change:
5655 ::
5656
5657 ${STAGING_DIR_HOST}/pkgdata
5658
5659 For examples of how this data is used, see the
5660 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
5661 section in the Yocto Project Overview and Concepts Manual and the
5662 ":ref:`dev-manual/dev-manual-common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
5663 section in the Yocto Project Development Tasks Manual. For more
5664 information on the shared, global-state directory, see
5665 :term:`STAGING_DIR_HOST`.
5666
Andrew Geisslerf0343792020-11-18 10:42:21 -06005667 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005668 Points to the parent directory for files to be packaged after they
5669 have been split into individual packages. This directory defaults to
5670 the following:
5671 ::
5672
5673 ${WORKDIR}/packages-split
5674
5675 Under this directory, the build system creates directories for each
5676 package specified in :term:`PACKAGES`. Do not change
5677 this default.
5678
Andrew Geisslerf0343792020-11-18 10:42:21 -06005679 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005680 Points to a temporary work area where the
5681 :ref:`ref-tasks-package` task saves package metadata.
5682 The ``PKGDESTWORK`` location defaults to the following:
5683 ::
5684
5685 ${WORKDIR}/pkgdata
5686
5687 Do not change this default.
5688
5689 The :ref:`ref-tasks-packagedata` task copies the
5690 package metadata from ``PKGDESTWORK`` to
5691 :term:`PKGDATA_DIR` to make it available globally.
5692
Andrew Geisslerf0343792020-11-18 10:42:21 -06005693 :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005694 The epoch of the package(s) built by the recipe. By default, ``PKGE``
5695 is set to :term:`PE`.
5696
Andrew Geisslerf0343792020-11-18 10:42:21 -06005697 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005698 The revision of the package(s) built by the recipe. By default,
5699 ``PKGR`` is set to :term:`PR`.
5700
Andrew Geisslerf0343792020-11-18 10:42:21 -06005701 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005702 The version of the package(s) built by the recipe. By default,
5703 ``PKGV`` is set to :term:`PV`.
5704
Andrew Geisslerf0343792020-11-18 10:42:21 -06005705 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005706 This variable can have two separate functions depending on the
5707 context: a recipe name or a resulting package name.
5708
5709 ``PN`` refers to a recipe name in the context of a file used by the
5710 OpenEmbedded build system as input to create a package. The name is
5711 normally extracted from the recipe file name. For example, if the
5712 recipe is named ``expat_2.0.1.bb``, then the default value of ``PN``
5713 will be "expat".
5714
5715 The variable refers to a package name in the context of a file
5716 created or produced by the OpenEmbedded build system.
5717
5718 If applicable, the ``PN`` variable also contains any special suffix
5719 or prefix. For example, using ``bash`` to build packages for the
5720 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build
5721 packages for the target and for Multilib, ``PN`` would be ``bash``
5722 and ``lib64-bash``, respectively.
5723
Andrew Geisslerf0343792020-11-18 10:42:21 -06005724 :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005725 Lists recipes you do not want the OpenEmbedded build system to build.
5726 This variable works in conjunction with the
5727 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited
5728 globally.
5729
5730 To prevent a recipe from being built, use the ``PNBLACKLIST``
5731 variable in your ``local.conf`` file. Here is an example that
5732 prevents ``myrecipe`` from being built:
5733 ::
5734
5735 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5736
Andrew Geisslerf0343792020-11-18 10:42:21 -06005737 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005738 Specifies a list of functions to call once the OpenEmbedded build
5739 system has created the host part of the SDK. You can specify
5740 functions separated by semicolons:
5741 ::
5742
5743 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5744
5745 If you need to pass the SDK path to a command within a function, you
5746 can use ``${SDK_DIR}``, which points to the parent directory used by
5747 the OpenEmbedded build system when creating SDK output. See the
5748 :term:`SDK_DIR` variable for more information.
5749
Andrew Geisslerf0343792020-11-18 10:42:21 -06005750 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005751 Specifies a list of functions to call once the OpenEmbedded build
5752 system has created the target part of the SDK. You can specify
5753 functions separated by semicolons:
5754 ::
5755
5756 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5757
5758 If you need to pass the SDK path to a command within a function, you
5759 can use ``${SDK_DIR}``, which points to the parent directory used by
5760 the OpenEmbedded build system when creating SDK output. See the
5761 :term:`SDK_DIR` variable for more information.
5762
Andrew Geisslerf0343792020-11-18 10:42:21 -06005763 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005764 The revision of the recipe. The default value for this variable is
5765 "r0". Subsequent revisions of the recipe conventionally have the
5766 values "r1", "r2", and so forth. When :term:`PV` increases,
5767 ``PR`` is conventionally reset to "r0".
5768
5769 .. note::
5770
5771 The OpenEmbedded build system does not need the aid of
5772 PR
5773 to know when to rebuild a recipe. The build system uses the task
5774 input checksums
5775 along with the
5776 stamp
5777 and
5778 shared state cache
5779 mechanisms.
5780
5781 The ``PR`` variable primarily becomes significant when a package
5782 manager dynamically installs packages on an already built image. In
5783 this case, ``PR``, which is the default value of
5784 :term:`PKGR`, helps the package manager distinguish which
5785 package is the most recent one in cases where many packages have the
5786 same ``PV`` (i.e. ``PKGV``). A component having many packages with
5787 the same ``PV`` usually means that the packages all install the same
5788 upstream version, but with later (``PR``) version packages including
5789 packaging fixes.
5790
5791 .. note::
5792
5793 PR
5794 does not need to be increased for changes that do not change the
5795 package contents or metadata.
5796
5797 Because manually managing ``PR`` can be cumbersome and error-prone,
5798 an automated solution exists. See the
5799 ":ref:`dev-manual/dev-manual-common-tasks:working with a pr service`" section
5800 in the Yocto Project Development Tasks Manual for more information.
5801
Andrew Geisslerf0343792020-11-18 10:42:21 -06005802 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005803 If multiple recipes provide the same item, this variable determines
5804 which recipe is preferred and thus provides the item (i.e. the
5805 preferred provider). You should always suffix this variable with the
5806 name of the provided item. And, you should define the variable using
5807 the preferred recipe's name (:term:`PN`). Here is a common
5808 example:
5809 ::
5810
5811 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5812
5813 In the previous example, multiple recipes are providing "virtual/kernel".
5814 The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of
5815 the recipe you prefer to provide "virtual/kernel".
5816
5817 Following are more examples:
5818 ::
5819
5820 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5821 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5822
5823 For more
5824 information, see the ":ref:`metadata-virtual-providers`"
5825 section in the Yocto Project Development Tasks Manual.
5826
5827 .. note::
5828
5829 If you use a
5830 virtual/\*
5831 item with
5832 PREFERRED_PROVIDER
5833 , then any recipe that
5834 PROVIDES
5835 that item but is not selected (defined) by
5836 PREFERRED_PROVIDER
5837 is prevented from building, which is usually desirable since this
5838 mechanism is designed to select between mutually exclusive
5839 alternative providers.
5840
Andrew Geisslerf0343792020-11-18 10:42:21 -06005841 :term:`PREFERRED_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005842 If multiple versions of recipes exist, this variable determines which
5843 version is given preference. You must always suffix the variable with
5844 the :term:`PN` you want to select, and you should set the
5845 :term:`PV` accordingly for precedence.
5846
5847 The ``PREFERRED_VERSION`` variable supports limited wildcard use
5848 through the "``%``" character. You can use the character to match any
5849 number of characters, which can be useful when specifying versions
5850 that contain long revision numbers that potentially change. Here are
5851 two examples:
5852 ::
5853
5854 PREFERRED_VERSION_python = "3.4.0"
5855 PREFERRED_VERSION_linux-yocto = "5.0%"
5856
5857 .. note::
5858
5859 The use of the "%" character is limited in that it only works at the end of the
5860 string. You cannot use the wildcard character in any other
5861 location of the string.
5862
5863 The specified version is matched against :term:`PV`, which
5864 does not necessarily match the version part of the recipe's filename.
5865 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
5866 where ``foo_git.bb`` contains the following assignment:
5867 ::
5868
5869 PV = "1.1+git${SRCPV}"
5870
5871 In this case, the correct way to select
5872 ``foo_git.bb`` is by using an assignment such as the following:
5873 ::
5874
5875 PREFERRED_VERSION_foo = "1.1+git%"
5876
5877 Compare that previous example
5878 against the following incorrect example, which does not work:
5879 ::
5880
5881 PREFERRED_VERSION_foo = "git"
5882
5883 Sometimes the ``PREFERRED_VERSION`` variable can be set by
5884 configuration files in a way that is hard to change. You can use
5885 :term:`OVERRIDES` to set a machine-specific
5886 override. Here is an example:
5887 ::
5888
5889 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%"
5890
5891 Although not recommended, worst case, you can also use the
5892 "forcevariable" override, which is the strongest override possible.
5893 Here is an example:
5894 ::
5895
5896 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%"
5897
5898 .. note::
5899
5900 The \_forcevariable override is not handled specially. This override
5901 only works because the default value of OVERRIDES includes "forcevariable".
5902
Andrew Geisslerf0343792020-11-18 10:42:21 -06005903 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005904 Specifies additional paths from which the OpenEmbedded build system
5905 gets source code. When the build system searches for source code, it
5906 first tries the local download directory. If that location fails, the
5907 build system tries locations defined by ``PREMIRRORS``, the upstream
5908 source, and then locations specified by
5909 :term:`MIRRORS` in that order.
5910
5911 Assuming your distribution (:term:`DISTRO`) is "poky",
5912 the default value for ``PREMIRRORS`` is defined in the
5913 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5914
5915 Typically, you could add a specific server for the build system to
5916 attempt before any others by adding something like the following to
5917 the ``local.conf`` configuration file in the
5918 :term:`Build Directory`:
5919 ::
5920
5921 PREMIRRORS_prepend = "\
5922 git://.*/.* http://www.yoctoproject.org/sources/ \n \
5923 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
5924 http://.*/.* http://www.yoctoproject.org/sources/ \n \
5925 https://.*/.* http://www.yoctoproject.org/sources/ \n"
5926
5927 These changes cause the
5928 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5929 direct them to the ``http://`` sources mirror. You can use
5930 ``file://`` URLs to point to local directories or network shares as
5931 well.
5932
Andrew Geisslerf0343792020-11-18 10:42:21 -06005933 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005934 Indicates the importance of a package.
5935
5936 ``PRIORITY`` is considered to be part of the distribution policy
5937 because the importance of any given recipe depends on the purpose for
5938 which the distribution is being produced. Thus, ``PRIORITY`` is not
5939 normally set within recipes.
5940
5941 You can set ``PRIORITY`` to "required", "standard", "extra", and
5942 "optional", which is the default.
5943
Andrew Geisslerf0343792020-11-18 10:42:21 -06005944 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005945 Specifies libraries installed within a recipe that should be ignored
5946 by the OpenEmbedded build system's shared library resolver. This
5947 variable is typically used when software being built by a recipe has
5948 its own private versions of a library normally provided by another
5949 recipe. In this case, you would not want the package containing the
5950 private libraries to be set as a dependency on other unrelated
5951 packages that should instead depend on the package providing the
5952 standard version of the library.
5953
5954 Libraries specified in this variable should be specified by their
5955 file name. For example, from the Firefox recipe in meta-browser:
5956 ::
5957
5958 PRIVATE_LIBS = "libmozjs.so \
5959 libxpcom.so \
5960 libnspr4.so \
5961 libxul.so \
5962 libmozalloc.so \
5963 libplc4.so \
5964 libplds4.so"
5965
5966 For more information, see the
5967 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
5968 section in the Yocto Project Overview and Concepts Manual.
5969
Andrew Geisslerf0343792020-11-18 10:42:21 -06005970 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005971 A list of aliases by which a particular recipe can be known. By
5972 default, a recipe's own ``PN`` is implicitly already in its
5973 ``PROVIDES`` list and therefore does not need to mention that it
5974 provides itself. If a recipe uses ``PROVIDES``, the additional
5975 aliases are synonyms for the recipe and can be useful for satisfying
5976 dependencies of other recipes during the build as specified by
5977 ``DEPENDS``.
5978
5979 Consider the following example ``PROVIDES`` statement from the recipe
5980 file ``eudev_3.2.9.bb``:
5981 ::
5982
5983 PROVIDES = "udev"
5984
5985 The ``PROVIDES`` statement
5986 results in the "eudev" recipe also being available as simply "udev".
5987
5988 .. note::
5989
5990 Given that a recipe's own recipe name is already implicitly in its
5991 own
5992 PROVIDES
5993 list, it is unnecessary to add aliases with the "+=" operator;
5994 using a simple assignment will be sufficient. In other words,
5995 while you could write:
5996 ::
5997
5998 PROVIDES += "udev"
5999
6000
6001 in the above, the "+=" is overkill and unnecessary.
6002
6003 In addition to providing recipes under alternate names, the
6004 ``PROVIDES`` mechanism is also used to implement virtual targets. A
6005 virtual target is a name that corresponds to some particular
6006 functionality (e.g. a Linux kernel). Recipes that provide the
6007 functionality in question list the virtual target in ``PROVIDES``.
6008 Recipes that depend on the functionality in question can include the
6009 virtual target in ``DEPENDS`` to leave the choice of provider open.
6010
6011 Conventionally, virtual targets have names on the form
6012 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6013 of the name and has no syntactical significance.
6014
6015 The :term:`PREFERRED_PROVIDER` variable is
6016 used to select which particular recipe provides a virtual target.
6017
6018 .. note::
6019
6020 A corresponding mechanism for virtual runtime dependencies
6021 (packages) exists. However, the mechanism does not depend on any
6022 special functionality beyond ordinary variable assignments. For
6023 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6024 the component that manages the ``/dev`` directory.
6025
6026 Setting the "preferred provider" for runtime dependencies is as
6027 simple as using the following assignment in a configuration file:
6028 ::
6029
6030 VIRTUAL-RUNTIME_dev_manager = "udev"
6031
6032
Andrew Geisslerf0343792020-11-18 10:42:21 -06006033 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006034 The network based :term:`PR` service host and port.
6035
6036 The ``conf/local.conf.sample.extended`` configuration file in the
6037 :term:`Source Directory` shows how the
6038 ``PRSERV_HOST`` variable is set:
6039 ::
6040
6041 PRSERV_HOST = "localhost:0"
6042
6043 You must
6044 set the variable if you want to automatically start a local :ref:`PR
6045 service <dev-manual/dev-manual-common-tasks:working with a pr service>`. You can
6046 set ``PRSERV_HOST`` to other values to use a remote PR service.
6047
Andrew Geisslerf0343792020-11-18 10:42:21 -06006048 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006049 Specifies whether or not :ref:`Package
6050 Test <dev-manual/dev-manual-common-tasks:testing packages with ptest>` (ptest)
6051 functionality is enabled when building a recipe. You should not set
6052 this variable directly. Enabling and disabling building Package Tests
6053 at build time should be done by adding "ptest" to (or removing it
6054 from) :term:`DISTRO_FEATURES`.
6055
Andrew Geisslerf0343792020-11-18 10:42:21 -06006056 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006057 The version of the recipe. The version is normally extracted from the
6058 recipe filename. For example, if the recipe is named
6059 ``expat_2.0.1.bb``, then the default value of ``PV`` will be "2.0.1".
6060 ``PV`` is generally not overridden within a recipe unless it is
6061 building an unstable (i.e. development) version from a source code
6062 repository (e.g. Git or Subversion).
6063
6064 ``PV`` is the default value of the :term:`PKGV` variable.
6065
Andrew Geisslerf0343792020-11-18 10:42:21 -06006066 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006067 When used by recipes that inherit the
6068 :ref:`distutils3 <ref-classes-distutils3>`,
6069 :ref:`setuptools3 <ref-classes-setuptools3>`,
6070 :ref:`distutils <ref-classes-distutils>`, or
6071 :ref:`setuptools <ref-classes-setuptools>` classes, denotes the
6072 Application Binary Interface (ABI) currently in use for Python. By
6073 default, the ABI is "m". You do not have to set this variable as the
6074 OpenEmbedded build system sets it for you.
6075
6076 The OpenEmbedded build system uses the ABI to construct directory
6077 names used when installing the Python headers and libraries in
6078 sysroot (e.g. ``.../python3.3m/...``).
6079
6080 Recipes that inherit the ``distutils`` class during cross-builds also
6081 use this variable to locate the headers and libraries of the
6082 appropriate Python that the extension is targeting.
6083
Andrew Geisslerf0343792020-11-18 10:42:21 -06006084 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006085 When used by recipes that inherit the
6086 `distutils3 <ref-classes-distutils3>`,
6087 :ref:`setuptools3 <ref-classes-setuptools3>`,
6088 :ref:`distutils <ref-classes-distutils>`, or
6089 :ref:`setuptools <ref-classes-setuptools>` classes, specifies the
6090 major Python version being built. For Python 3.x, ``PYTHON_PN`` would
6091 be "python3". You do not have to set this variable as the
6092 OpenEmbedded build system automatically sets it for you.
6093
6094 The variable allows recipes to use common infrastructure such as the
6095 following:
6096 ::
6097
6098 DEPENDS += "${PYTHON_PN}-native"
6099
6100 In the previous example,
6101 the version of the dependency is ``PYTHON_PN``.
6102
Andrew Geisslerf0343792020-11-18 10:42:21 -06006103 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006104 The minimal command and arguments to run ``ranlib``.
6105
Andrew Geisslerf0343792020-11-18 10:42:21 -06006106 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006107 The list of packages that conflict with packages. Note that packages
6108 will not be installed if conflicting packages are not first removed.
6109
6110 Like all package-controlling variables, you must always use them in
6111 conjunction with a package name override. Here is an example:
6112 ::
6113
6114 RCONFLICTS_${PN} = "another_conflicting_package_name"
6115
6116 BitBake, which the OpenEmbedded build system uses, supports
6117 specifying versioned dependencies. Although the syntax varies
6118 depending on the packaging format, BitBake hides these differences
6119 from you. Here is the general syntax to specify versions with the
6120 ``RCONFLICTS`` variable:
6121 ::
6122
6123 RCONFLICTS_${PN} = "package (operator version)"
6124
6125 For ``operator``, you can specify the following: = < > <=
6126 >= For example, the following sets up a dependency on version 1.2 or
6127 greater of the package ``foo``:
6128 ::
6129
6130 RCONFLICTS_${PN} = "foo (>= 1.2)"
6131
Andrew Geisslerf0343792020-11-18 10:42:21 -06006132 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006133 Lists runtime dependencies of a package. These dependencies are other
6134 packages that must be installed in order for the package to function
6135 correctly. As an example, the following assignment declares that the
6136 package ``foo`` needs the packages ``bar`` and ``baz`` to be
6137 installed:
6138 ::
6139
6140 RDEPENDS_foo = "bar baz"
6141
6142 The most common types of package
6143 runtime dependencies are automatically detected and added. Therefore,
6144 most recipes do not need to set ``RDEPENDS``. For more information,
6145 see the
6146 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
6147 section in the Yocto Project Overview and Concepts Manual.
6148
6149 The practical effect of the above ``RDEPENDS`` assignment is that
6150 ``bar`` and ``baz`` will be declared as dependencies inside the
6151 package ``foo`` when it is written out by one of the
6152 ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks.
6153 Exactly how this is done depends on which package format is used,
6154 which is determined by
6155 :term:`PACKAGE_CLASSES`. When the
6156 corresponding package manager installs the package, it will know to
6157 also install the packages on which it depends.
6158
6159 To ensure that the packages ``bar`` and ``baz`` get built, the
6160 previous ``RDEPENDS`` assignment also causes a task dependency to be
6161 added. This dependency is from the recipe's
6162 :ref:`ref-tasks-build` (not to be confused with
6163 :ref:`ref-tasks-compile`) task to the
6164 ``do_package_write_*`` task of the recipes that build ``bar`` and
6165 ``baz``.
6166
6167 The names of the packages you list within ``RDEPENDS`` must be the
6168 names of other packages - they cannot be recipe names. Although
6169 package names and recipe names usually match, the important point
6170 here is that you are providing package names within the ``RDEPENDS``
6171 variable. For an example of the default list of packages created from
6172 a recipe, see the :term:`PACKAGES` variable.
6173
6174 Because the ``RDEPENDS`` variable applies to packages being built,
6175 you should always use the variable in a form with an attached package
6176 name (remember that a single recipe can build multiple packages). For
6177 example, suppose you are building a development package that depends
6178 on the ``perl`` package. In this case, you would use the following
6179 ``RDEPENDS`` statement:
6180 ::
6181
6182 RDEPENDS_${PN}-dev += "perl"
6183
6184 In the example,
6185 the development package depends on the ``perl`` package. Thus, the
6186 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of
6187 the variable.
6188
6189 .. note::
6190
6191 RDEPENDS_${PN}-dev
6192 includes
6193 ${
6194 PN
6195 }
6196 by default. This default is set in the BitBake configuration file
6197 (
6198 meta/conf/bitbake.conf
6199 ). Be careful not to accidentally remove
6200 ${PN}
6201 when modifying
6202 RDEPENDS_${PN}-dev
6203 . Use the "+=" operator rather than the "=" operator.
6204
6205 The package names you use with ``RDEPENDS`` must appear as they would
6206 in the ``PACKAGES`` variable. The :term:`PKG` variable
6207 allows a different name to be used for the final package (e.g. the
6208 :ref:`debian <ref-classes-debian>` class uses this to rename
6209 packages), but this final package name cannot be used with
6210 ``RDEPENDS``, which makes sense as ``RDEPENDS`` is meant to be
6211 independent of the package format used.
6212
6213 BitBake, which the OpenEmbedded build system uses, supports
6214 specifying versioned dependencies. Although the syntax varies
6215 depending on the packaging format, BitBake hides these differences
6216 from you. Here is the general syntax to specify versions with the
6217 ``RDEPENDS`` variable:
6218 ::
6219
6220 RDEPENDS_${PN} = "package (operator version)"
6221
6222 For operator, you can specify the following: = < > <= >= For version,
6223 provide the version number.
6224
6225 .. note::
6226
6227 You can use
6228 EXTENDPKGV
6229 to provide a full package version specification.
6230
6231 For example, the following sets up a dependency on version 1.2 or
6232 greater of the package ``foo``:
6233 ::
6234
6235 RDEPENDS_${PN} = "foo (>= 1.2)"
6236
6237 For information on build-time dependencies, see the
6238 :term:`DEPENDS` variable. You can also see the
6239 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
6240 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
6241 BitBake User Manual for additional information on tasks and
6242 dependencies.
6243
Andrew Geisslerf0343792020-11-18 10:42:21 -06006244 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006245 When inheriting the
6246 :ref:`distro_features_check <ref-classes-distro_features_check>`
6247 class, this variable identifies distribution features that must exist
6248 in the current configuration in order for the OpenEmbedded build
6249 system to build the recipe. In other words, if the
6250 ``REQUIRED_DISTRO_FEATURES`` variable lists a feature that does not
6251 appear in ``DISTRO_FEATURES`` within the current configuration, an
6252 error occurs and the build stops.
6253
Andrew Geisslerf0343792020-11-18 10:42:21 -06006254 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006255 With ``rm_work`` enabled, this variable specifies a list of recipes
6256 whose work directories should not be removed. See the
6257 ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more
6258 details.
6259
Andrew Geisslerf0343792020-11-18 10:42:21 -06006260 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006261 Defines the root home directory. By default, this directory is set as
6262 follows in the BitBake configuration file:
6263 ::
6264
6265 ROOT_HOME ??= "/home/root"
6266
6267 .. note::
6268
6269 This default value is likely used because some embedded solutions
6270 prefer to have a read-only root filesystem and prefer to keep
6271 writeable data in one place.
6272
6273 You can override the default by setting the variable in any layer or
6274 in the ``local.conf`` file. Because the default is set using a "weak"
6275 assignment (i.e. "??="), you can use either of the following forms to
6276 define your override:
6277 ::
6278
6279 ROOT_HOME = "/root"
6280 ROOT_HOME ?= "/root"
6281
6282 These
6283 override examples use ``/root``, which is probably the most commonly
6284 used override.
6285
Andrew Geisslerf0343792020-11-18 10:42:21 -06006286 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006287 Indicates a filesystem image to include as the root filesystem.
6288
6289 The ``ROOTFS`` variable is an optional variable used with the
6290 :ref:`image-live <ref-classes-image-live>` class.
6291
Andrew Geisslerf0343792020-11-18 10:42:21 -06006292 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006293 Specifies a list of functions to call after the OpenEmbedded build
6294 system has installed packages. You can specify functions separated by
6295 semicolons:
6296 ::
6297
6298 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6299
6300 If you need to pass the root filesystem path to a command within a
6301 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6302 directory that becomes the root filesystem image. See the
6303 :term:`IMAGE_ROOTFS` variable for more
6304 information.
6305
Andrew Geisslerf0343792020-11-18 10:42:21 -06006306 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006307 Specifies a list of functions to call once the OpenEmbedded build
6308 system has created the root filesystem. You can specify functions
6309 separated by semicolons:
6310 ::
6311
6312 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6313
6314 If you need to pass the root filesystem path to a command within a
6315 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6316 directory that becomes the root filesystem image. See the
6317 :term:`IMAGE_ROOTFS` variable for more
6318 information.
6319
Andrew Geisslerf0343792020-11-18 10:42:21 -06006320 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006321 Specifies a list of functions to call after the OpenEmbedded build
6322 system has removed unnecessary packages. When runtime package
6323 management is disabled in the image, several packages are removed
6324 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
6325 You can specify functions separated by semicolons:
6326 ::
6327
6328 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6329
6330 If you need to pass the root filesystem path to a command within a
6331 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6332 directory that becomes the root filesystem image. See the
6333 :term:`IMAGE_ROOTFS` variable for more
6334 information.
6335
Andrew Geisslerf0343792020-11-18 10:42:21 -06006336 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006337 Specifies a list of functions to call before the OpenEmbedded build
6338 system has created the root filesystem. You can specify functions
6339 separated by semicolons:
6340 ::
6341
6342 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6343
6344 If you need to pass the root filesystem path to a command within a
6345 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6346 directory that becomes the root filesystem image. See the
6347 :term:`IMAGE_ROOTFS` variable for more
6348 information.
6349
Andrew Geisslerf0343792020-11-18 10:42:21 -06006350 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006351 A list of package name aliases that a package also provides. These
6352 aliases are useful for satisfying runtime dependencies of other
6353 packages both during the build and on the target (as specified by
6354 ``RDEPENDS``).
6355
6356 .. note::
6357
6358 A package's own name is implicitly already in its
6359 RPROVIDES
6360 list.
6361
6362 As with all package-controlling variables, you must always use the
6363 variable in conjunction with a package name override. Here is an
6364 example:
6365 ::
6366
6367 RPROVIDES_${PN} = "widget-abi-2"
6368
Andrew Geisslerf0343792020-11-18 10:42:21 -06006369 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006370 A list of packages that extends the usability of a package being
6371 built. The package being built does not depend on this list of
6372 packages in order to successfully build, but rather uses them for
6373 extended usability. To specify runtime dependencies for packages, see
6374 the ``RDEPENDS`` variable.
6375
6376 The package manager will automatically install the ``RRECOMMENDS``
6377 list of packages when installing the built package. However, you can
6378 prevent listed packages from being installed by using the
6379 :term:`BAD_RECOMMENDATIONS`,
6380 :term:`NO_RECOMMENDATIONS`, and
6381 :term:`PACKAGE_EXCLUDE` variables.
6382
6383 Packages specified in ``RRECOMMENDS`` need not actually be produced.
6384 However, a recipe must exist that provides each package, either
6385 through the :term:`PACKAGES` or
6386 :term:`PACKAGES_DYNAMIC` variables or the
6387 :term:`RPROVIDES` variable, or an error will occur
6388 during the build. If such a recipe does exist and the package is not
6389 produced, the build continues without error.
6390
6391 Because the ``RRECOMMENDS`` variable applies to packages being built,
6392 you should always attach an override to the variable to specify the
6393 particular package whose usability is being extended. For example,
6394 suppose you are building a development package that is extended to
6395 support wireless functionality. In this case, you would use the
6396 following:
6397 ::
6398
6399 RRECOMMENDS_${PN}-dev += "wireless_package_name"
6400
6401 In the
6402 example, the package name (``${PN}-dev``) must appear as it would in
6403 the ``PACKAGES`` namespace before any renaming of the output package
6404 by classes such as ``debian.bbclass``.
6405
6406 BitBake, which the OpenEmbedded build system uses, supports
6407 specifying versioned recommends. Although the syntax varies depending
6408 on the packaging format, BitBake hides these differences from you.
6409 Here is the general syntax to specify versions with the
6410 ``RRECOMMENDS`` variable:
6411 ::
6412
6413 RRECOMMENDS_${PN} = "package (operator version)"
6414
6415 For ``operator``, you can specify the following:
6416
6417 - =
6418 - <
6419 - >
6420 - <=
6421 - >=
6422
6423 For example, the following sets up a recommend on version 1.2 or
6424 greater of the package ``foo``:
6425 ::
6426
6427 RRECOMMENDS_${PN} = "foo (>= 1.2)"
6428
Andrew Geisslerf0343792020-11-18 10:42:21 -06006429 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006430 A list of packages replaced by a package. The package manager uses
6431 this variable to determine which package should be installed to
6432 replace other package(s) during an upgrade. In order to also have the
6433 other package(s) removed at the same time, you must add the name of
6434 the other package to the ``RCONFLICTS`` variable.
6435
6436 As with all package-controlling variables, you must use this variable
6437 in conjunction with a package name override. Here is an example:
6438 ::
6439
6440 RREPLACES_${PN} = "other_package_being_replaced"
6441
6442 BitBake, which the OpenEmbedded build system uses, supports
6443 specifying versioned replacements. Although the syntax varies
6444 depending on the packaging format, BitBake hides these differences
6445 from you. Here is the general syntax to specify versions with the
6446 ``RREPLACES`` variable:
6447 ::
6448
6449 RREPLACES_${PN} = "package (operator version)"
6450
6451 For ``operator``, you can specify the following:
6452
6453 - =
6454 - <
6455 - >
6456 - <=
6457 - >=
6458
6459 For example, the following sets up a replacement using version 1.2
6460 or greater of the package ``foo``:
6461 ::
6462
6463 RREPLACES_${PN} = "foo (>= 1.2)"
6464
Andrew Geisslerf0343792020-11-18 10:42:21 -06006465 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466 A list of additional packages that you can suggest for installation
6467 by the package manager at the time a package is installed. Not all
6468 package managers support this functionality.
6469
6470 As with all package-controlling variables, you must always use this
6471 variable in conjunction with a package name override. Here is an
6472 example:
6473 ::
6474
6475 RSUGGESTS_${PN} = "useful_package another_package"
6476
Andrew Geisslerf0343792020-11-18 10:42:21 -06006477 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006478 The location in the :term:`Build Directory` where
6479 unpacked recipe source code resides. By default, this directory is
6480 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6481 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6482 version. If the source tarball extracts the code to a directory named
6483 anything other than ``${BPN}-${PV}``, or if the source code is
6484 fetched from an SCM such as Git or Subversion, then you must set
6485 ``S`` in the recipe so that the OpenEmbedded build system knows where
6486 to find the unpacked source.
6487
6488 As an example, assume a :term:`Source Directory`
6489 top-level folder named ``poky`` and a default Build Directory at
6490 ``poky/build``. In this case, the work directory the build system
6491 uses to keep the unpacked recipe for ``db`` is the following:
6492 ::
6493
6494 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6495
6496 The unpacked source code resides in the ``db-5.1.19`` folder.
6497
6498 This next example assumes a Git repository. By default, Git
6499 repositories are cloned to ``${WORKDIR}/git`` during
6500 :ref:`ref-tasks-fetch`. Since this path is different
6501 from the default value of ``S``, you must set it specifically so the
6502 source can be located:
6503 ::
6504
6505 SRC_URI = "git://path/to/repo.git"
6506 S = "${WORKDIR}/git"
6507
Andrew Geisslerf0343792020-11-18 10:42:21 -06006508 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006509 Specifies a list of command-line utilities that should be checked for
6510 during the initial sanity checking process when running BitBake. If
6511 any of the utilities are not installed on the build host, then
6512 BitBake immediately exits with an error.
6513
Andrew Geisslerf0343792020-11-18 10:42:21 -06006514 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006515 A list of the host distribution identifiers that the build system has
6516 been tested against. Identifiers consist of the host distributor ID
6517 followed by the release, as reported by the ``lsb_release`` tool or
6518 as read from ``/etc/lsb-release``. Separate the list items with
6519 explicit newline characters (``\n``). If ``SANITY_TESTED_DISTROS`` is
6520 not empty and the current value of
6521 :term:`NATIVELSBSTRING` does not appear in the
6522 list, then the build system reports a warning that indicates the
6523 current host distribution has not been tested as a build host.
6524
Andrew Geisslerf0343792020-11-18 10:42:21 -06006525 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006526 The target architecture for the SDK. Typically, you do not directly
6527 set this variable. Instead, use :term:`SDKMACHINE`.
6528
Andrew Geisslerf0343792020-11-18 10:42:21 -06006529 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006530 The directory set up and used by the
6531 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6532 the SDK is deployed. The ``populate_sdk_base`` class defines
6533 ``SDK_DEPLOY`` as follows:
6534 ::
6535
6536 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6537
Andrew Geisslerf0343792020-11-18 10:42:21 -06006538 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006539 The parent directory used by the OpenEmbedded build system when
6540 creating SDK output. The
6541 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
6542 the variable as follows:
6543 ::
6544
6545 SDK_DIR = "${WORKDIR}/sdk"
6546
6547 .. note::
6548
6549 The
6550 SDK_DIR
6551 directory is a temporary directory as it is part of
6552 WORKDIR
6553 . The final output directory is
6554 SDK_DEPLOY
6555 .
6556
Andrew Geisslerf0343792020-11-18 10:42:21 -06006557 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006558 Controls whether or not shared state artifacts are copied into the
6559 extensible SDK. The default value of "full" copies all of the
6560 required shared state artifacts into the extensible SDK. The value
6561 "minimal" leaves these artifacts out of the SDK.
6562
6563 .. note::
6564
6565 If you set the variable to "minimal", you need to ensure
6566 SSTATE_MIRRORS
6567 is set in the SDK's configuration to enable the artifacts to be
6568 fetched as needed.
6569
Andrew Geisslerf0343792020-11-18 10:42:21 -06006570 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006571 The manifest file for the host part of the SDK. This file lists all
6572 the installed packages that make up the host part of the SDK. The
6573 file contains package information on a line-per-package basis as
6574 follows:
6575 ::
6576
6577 packagename packagearch version
6578
6579 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6580 defines the manifest file as follows:
6581 ::
6582
6583 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6584
6585 The location is derived using the :term:`SDK_DEPLOY` and
6586 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6587
Andrew Geisslerf0343792020-11-18 10:42:21 -06006588 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006589 When set to "1", specifies to include the packagedata for all recipes
6590 in the "world" target in the extensible SDK. Including this data
6591 allows the ``devtool search`` command to find these recipes in search
6592 results, as well as allows the ``devtool add`` command to map
6593 dependencies more effectively.
6594
6595 .. note::
6596
6597 Enabling the
6598 SDK_INCLUDE_PKGDATA
6599 variable significantly increases build time because all of world
6600 needs to be built. Enabling the variable also slightly increases
6601 the size of the extensible SDK.
6602
Andrew Geisslerf0343792020-11-18 10:42:21 -06006603 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006604 When set to "1", specifies to include the toolchain in the extensible
6605 SDK. Including the toolchain is useful particularly when
6606 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6607 the SDK reasonably small but you still want to provide a usable
6608 toolchain. For example, suppose you want to use the toolchain from an
6609 IDE or from other tools and you do not want to perform additional
6610 steps to install the toolchain.
6611
6612 The ``SDK_INCLUDE_TOOLCHAIN`` variable defaults to "0" if
6613 ``SDK_EXT_TYPE`` is set to "minimal", and defaults to "1" if
6614 ``SDK_EXT_TYPE`` is set to "full".
6615
Andrew Geisslerf0343792020-11-18 10:42:21 -06006616 :term:`SDK_INHERIT_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006617 A list of classes to remove from the :term:`INHERIT`
6618 value globally within the extensible SDK configuration. The
6619 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
6620 default value:
6621 ::
6622
6623 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
6624
6625 Some classes are not generally applicable within the extensible SDK
6626 context. You can use this variable to disable those classes.
6627
6628 For additional information on how to customize the extensible SDK's
6629 configuration, see the
6630 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6631 section in the Yocto Project Application Development and the
6632 Extensible Software Development Kit (eSDK) manual.
6633
Andrew Geisslerf0343792020-11-18 10:42:21 -06006634 :term:`SDK_LOCAL_CONF_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006635 A list of variables not allowed through from the OpenEmbedded build
6636 system configuration into the extensible SDK configuration. Usually,
6637 these are variables that are specific to the machine on which the
6638 build system is running and thus would be potentially problematic
6639 within the extensible SDK.
6640
6641 By default, ``SDK_LOCAL_CONF_BLACKLIST`` is set in the
6642 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
6643 excludes the following variables:
6644
6645 - :term:`CONF_VERSION`
6646 - :term:`BB_NUMBER_THREADS`
6647 - :term:`bitbake:BB_NUMBER_PARSE_THREADS`
6648 - :term:`PARALLEL_MAKE`
6649 - :term:`PRSERV_HOST`
6650 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
6651 - :term:`SSTATE_DIR` :term:`TMPDIR`
6652 - :term:`BB_SERVER_TIMEOUT`
6653
6654 For additional information on how to customize the extensible SDK's
6655 configuration, see the
6656 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6657 section in the Yocto Project Application Development and the
6658 Extensible Software Development Kit (eSDK) manual.
6659
Andrew Geisslerf0343792020-11-18 10:42:21 -06006660 :term:`SDK_LOCAL_CONF_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006661 A list of variables allowed through from the OpenEmbedded build
6662 system configuration into the extensible SDK configuration. By
6663 default, the list of variables is empty and is set in the
6664 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
6665
6666 This list overrides the variables specified using the
6667 :term:`SDK_LOCAL_CONF_BLACKLIST`
6668 variable as well as any variables identified by automatic
6669 blacklisting due to the "/" character being found at the start of the
6670 value, which is usually indicative of being a path and thus might not
6671 be valid on the system where the SDK is installed.
6672
6673 For additional information on how to customize the extensible SDK's
6674 configuration, see the
6675 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6676 section in the Yocto Project Application Development and the
6677 Extensible Software Development Kit (eSDK) manual.
6678
Andrew Geisslerf0343792020-11-18 10:42:21 -06006679 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006680 The base name for SDK output files. The name is derived from the
6681 :term:`DISTRO`, :term:`TCLIBC`,
6682 :term:`SDK_ARCH`,
6683 :term:`IMAGE_BASENAME`, and
6684 :term:`TUNE_PKGARCH` variables:
6685 ::
6686
6687 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6688
Andrew Geisslerf0343792020-11-18 10:42:21 -06006689 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006690 Specifies the operating system for which the SDK will be built. The
6691 default value is the value of :term:`BUILD_OS`.
6692
Andrew Geisslerf0343792020-11-18 10:42:21 -06006693 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006694 The location used by the OpenEmbedded build system when creating SDK
6695 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
6696 class defines the variable as follows:
6697 ::
6698
6699 SDK_DIR = "${WORKDIR}/sdk"
6700 SDK_OUTPUT = "${SDK_DIR}/image"
6701 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6702
6703 .. note::
6704
6705 The SDK_OUTPUT directory is a temporary directory as it is part of
6706 WORKDIR by way of SDK_DIR. The final output directory is
6707 SDK_DEPLOY.
6708
Andrew Geisslerf0343792020-11-18 10:42:21 -06006709 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006710 Specifies a list of architectures compatible with the SDK machine.
6711 This variable is set automatically and should not normally be
6712 hand-edited. Entries are separated using spaces and listed in order
6713 of priority. The default value for ``SDK_PACKAGE_ARCHS`` is "all any
6714 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6715
Andrew Geisslerf0343792020-11-18 10:42:21 -06006716 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006717 Specifies a list of functions to call once the OpenEmbedded build
6718 system creates the SDK. You can specify functions separated by
6719 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6720
6721 If you need to pass an SDK path to a command within a function, you
6722 can use ``${SDK_DIR}``, which points to the parent directory used by
6723 the OpenEmbedded build system when creating SDK output. See the
6724 :term:`SDK_DIR` variable for more information.
6725
Andrew Geisslerf0343792020-11-18 10:42:21 -06006726 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006727 The toolchain binary prefix used for ``nativesdk`` recipes. The
6728 OpenEmbedded build system uses the ``SDK_PREFIX`` value to set the
6729 :term:`TARGET_PREFIX` when building
6730 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6731
Andrew Geisslerf0343792020-11-18 10:42:21 -06006732 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006733 A list of shared state tasks added to the extensible SDK. By default,
6734 the following tasks are added:
6735
6736 - do_populate_lic
6737 - do_package_qa
6738 - do_populate_sysroot
6739 - do_deploy
6740
6741 Despite the default value of "" for the
6742 ``SDK_RECRDEP_TASKS`` variable, the above four tasks are always added
6743 to the SDK. To specify tasks beyond these four, you need to use the
6744 ``SDK_RECRDEP_TASKS`` variable (e.g. you are defining additional
6745 tasks that are needed in order to build
6746 :term:`SDK_TARGETS`).
6747
Andrew Geisslerf0343792020-11-18 10:42:21 -06006748 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006749 Specifies the system, including the architecture and the operating
6750 system, for which the SDK will be built.
6751
6752 The OpenEmbedded build system automatically sets this variable based
6753 on :term:`SDK_ARCH`,
6754 :term:`SDK_VENDOR`, and
6755 :term:`SDK_OS`. You do not need to set the ``SDK_SYS``
6756 variable yourself.
6757
Andrew Geisslerf0343792020-11-18 10:42:21 -06006758 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006759 The manifest file for the target part of the SDK. This file lists all
6760 the installed packages that make up the target part of the SDK. The
6761 file contains package information on a line-per-package basis as
6762 follows:
6763 ::
6764
6765 packagename packagearch version
6766
6767 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6768 defines the manifest file as follows:
6769 ::
6770
6771 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6772
6773 The location is derived using the :term:`SDK_DEPLOY` and
6774 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6775
Andrew Geisslerf0343792020-11-18 10:42:21 -06006776 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006777 A list of targets to install from shared state as part of the
6778 standard or extensible SDK installation. The default value is "${PN}"
6779 (i.e. the image from which the SDK is built).
6780
6781 The ``SDK_TARGETS`` variable is an internal variable and typically
6782 would not be changed.
6783
Andrew Geisslerf0343792020-11-18 10:42:21 -06006784 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006785 The title to be printed when running the SDK installer. By default,
6786 this title is based on the :term:`DISTRO_NAME` or
6787 :term:`DISTRO` variable and is set in the
6788 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6789 follows:
6790 ::
6791
6792 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6793
6794 For the default distribution "poky",
6795 ``SDK_TITLE`` is set to "Poky (Yocto Project Reference Distro)".
6796
6797 For information on how to change this default title, see the
6798 ":ref:`sdk-manual/sdk-appendix-customizing:changing the extensible sdk installer title`"
6799 section in the Yocto Project Application Development and the
6800 Extensible Software Development Kit (eSDK) manual.
6801
Andrew Geisslerf0343792020-11-18 10:42:21 -06006802 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006803 An optional URL for an update server for the extensible SDK. If set,
6804 the value is used as the default update server when running
6805 ``devtool sdk-update`` within the extensible SDK.
6806
Andrew Geisslerf0343792020-11-18 10:42:21 -06006807 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006808 Specifies the name of the SDK vendor.
6809
Andrew Geisslerf0343792020-11-18 10:42:21 -06006810 :term:`SDK_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006811 Specifies the version of the SDK. The distribution configuration file
6812 (e.g. ``/meta-poky/conf/distro/poky.conf``) defines the
6813 ``SDK_VERSION`` as follows:
6814 ::
6815
6816 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot')}"
6817
6818 For additional information, see the
6819 :term:`DISTRO_VERSION` and
6820 :term:`DATE` variables.
6821
Andrew Geisslerf0343792020-11-18 10:42:21 -06006822 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006823 The default installation directory for the Extensible SDK. By
6824 default, this directory is based on the :term:`DISTRO`
6825 variable and is set in the
6826 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6827 follows:
6828 ::
6829
6830 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6831
6832 For the
6833 default distribution "poky", the ``SDKEXTPATH`` is set to "poky_sdk".
6834
6835 For information on how to change this default directory, see the
6836 ":ref:`sdk-manual/sdk-appendix-customizing:changing the default sdk installation directory`"
6837 section in the Yocto Project Application Development and the
6838 Extensible Software Development Kit (eSDK) manual.
6839
Andrew Geisslerf0343792020-11-18 10:42:21 -06006840 :term:`SDKIMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006841 Equivalent to ``IMAGE_FEATURES``. However, this variable applies to
6842 the SDK generated from an image using the following command:
6843 ::
6844
6845 $ bitbake -c populate_sdk imagename
6846
Andrew Geisslerf0343792020-11-18 10:42:21 -06006847 :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006848 The machine for which the SDK is built. In other words, the SDK is
6849 built such that it runs on the target you specify with the
6850 ``SDKMACHINE`` value. The value points to a corresponding ``.conf``
6851 file under ``conf/machine-sdk/``.
6852
6853 You can use "i686" and "x86_64" as possible values for this variable.
6854 The variable defaults to "i686" and is set in the local.conf file in
6855 the Build Directory.
6856 ::
6857
6858 SDKMACHINE ?= "i686"
6859
6860 .. note::
6861
6862 You cannot set the
6863 SDKMACHINE
6864 variable in your distribution configuration file. If you do, the
6865 configuration will not take affect.
6866
Andrew Geisslerf0343792020-11-18 10:42:21 -06006867 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006868 Defines the path offered to the user for installation of the SDK that
6869 is generated by the OpenEmbedded build system. The path appears as
6870 the default location for installing the SDK when you run the SDK's
6871 installation script. You can override the offered path when you run
6872 the script.
6873
Andrew Geisslerf0343792020-11-18 10:42:21 -06006874 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006875 The full path to the sysroot used for cross-compilation within an SDK
6876 as it will be when installed into the default
6877 :term:`SDKPATH`.
6878
Andrew Geisslerf0343792020-11-18 10:42:21 -06006879 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006880 The section in which packages should be categorized. Package
6881 management utilities can make use of this variable.
6882
Andrew Geisslerf0343792020-11-18 10:42:21 -06006883 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006884 Specifies the optimization flags passed to the C compiler when
6885 building for the target. The flags are passed through the default
6886 value of the :term:`TARGET_CFLAGS` variable.
6887
6888 The ``SELECTED_OPTIMIZATION`` variable takes the value of
6889 ``FULL_OPTIMIZATION`` unless ``DEBUG_BUILD`` = "1". If that is the
6890 case, the value of ``DEBUG_OPTIMIZATION`` is used.
6891
Andrew Geisslerf0343792020-11-18 10:42:21 -06006892 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006893 Defines a serial console (TTY) to enable using
6894 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6895 value that specifies the baud rate followed by the TTY device name
6896 separated by a space. You cannot specify more than one TTY device:
6897 ::
6898
6899 SERIAL_CONSOLE = "115200 ttyS0"
6900
6901 .. note::
6902
6903 The
6904 SERIAL_CONSOLE
6905 variable is deprecated. Please use the
6906 SERIAL_CONSOLES
6907 variable.
6908
Andrew Geisslerf0343792020-11-18 10:42:21 -06006909 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006910 Defines a serial console (TTY) to enable using
6911 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6912 value that specifies the baud rate followed by the TTY device name
6913 separated by a semicolon. Use spaces to separate multiple devices:
6914 ::
6915
6916 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6917
Andrew Geisslerf0343792020-11-18 10:42:21 -06006918 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919 Specifies serial consoles, which must be listed in
6920 :term:`SERIAL_CONSOLES`, to check against
6921 ``/proc/console`` before enabling them using getty. This variable
6922 allows aliasing in the format: <device>:<alias>. If a device was
6923 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
6924 ``/proc/console``, you would do the following: ::
6925
6926 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6927
6928 This variable is currently only supported with SysVinit (i.e. not
6929 with systemd).
6930
Andrew Geisslerf0343792020-11-18 10:42:21 -06006931 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006932 A list of recipe dependencies that should not be used to determine
6933 signatures of tasks from one recipe when they depend on tasks from
6934 another recipe. For example: ::
6935
6936 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6937
6938 In the previous example, ``intone`` depends on ``mplayer2``.
6939
6940 You can use the special token ``"*"`` on the left-hand side of the
6941 dependency to match all recipes except the one on the right-hand
6942 side. Here is an example: ::
6943
6944 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6945
6946 In the previous example, all recipes except ``quilt-native`` ignore
6947 task signatures from the ``quilt-native`` recipe when determining
6948 their task signatures.
6949
6950 Use of this variable is one mechanism to remove dependencies that
6951 affect task signatures and thus force rebuilds when a recipe changes.
6952
6953 .. note::
6954
6955 If you add an inappropriate dependency for a recipe relationship,
6956 the software might break during runtime if the interface of the
6957 second recipe was changed after the first recipe had been built.
6958
Andrew Geisslerf0343792020-11-18 10:42:21 -06006959 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006960 A list of recipes that are completely stable and will never change.
6961 The ABI for the recipes in the list are presented by output from the
6962 tasks run to build the recipe. Use of this variable is one way to
6963 remove dependencies from one recipe on another that affect task
6964 signatures and thus force rebuilds when the recipe changes.
6965
6966 .. note::
6967
6968 If you add an inappropriate variable to this list, the software
6969 might break at runtime if the interface of the recipe was changed
6970 after the other had been built.
6971
Andrew Geisslerf0343792020-11-18 10:42:21 -06006972 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006973 Specifies the number of bits for the target system CPU. The value
6974 should be either "32" or "64".
6975
Andrew Geisslerf0343792020-11-18 10:42:21 -06006976 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006977 Specifies the endian byte order of the target system. The value
6978 should be either "le" for little-endian or "be" for big-endian.
6979
Andrew Geisslerf0343792020-11-18 10:42:21 -06006980 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006981 Enables removal of all files from the "Provides" section of an RPM
6982 package. Removal of these files is required for packages containing
6983 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6984
6985 To enable file removal, set the variable to "1" in your
6986 ``conf/local.conf`` configuration file in your:
6987 :term:`Build Directory`.
6988 ::
6989
6990 SKIP_FILEDEPS = "1"
6991
Andrew Geisslerf0343792020-11-18 10:42:21 -06006992 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006993 Groups together machines based upon the same family of SOC (System On
6994 Chip). You typically set this variable in a common ``.inc`` file that
6995 you include in the configuration files of all the machines.
6996
6997 .. note::
6998
6999 You must include
7000 conf/machine/include/soc-family.inc
7001 for this variable to appear in
7002 MACHINEOVERRIDES
7003 .
7004
Andrew Geisslerf0343792020-11-18 10:42:21 -06007005 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007006 Defines the suffix for shared libraries used on the target platform.
7007 By default, this suffix is ".so.*" for all Linux-based systems and is
7008 defined in the ``meta/conf/bitbake.conf`` configuration file.
7009
7010 You will see this variable referenced in the default values of
7011 ``FILES_${PN}``.
7012
Andrew Geisslerf0343792020-11-18 10:42:21 -06007013 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007014 Defines the suffix for the development symbolic link (symlink) for
7015 shared libraries on the target platform. By default, this suffix is
7016 ".so" for Linux-based systems and is defined in the
7017 ``meta/conf/bitbake.conf`` configuration file.
7018
7019 You will see this variable referenced in the default values of
7020 ``FILES_${PN}-dev``.
7021
Andrew Geisslerf0343792020-11-18 10:42:21 -06007022 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007023 When you are fetching files to create a mirror of sources (i.e.
7024 creating a source mirror), setting ``SOURCE_MIRROR_FETCH`` to "1" in
7025 your ``local.conf`` configuration file ensures the source for all
7026 recipes are fetched regardless of whether or not a recipe is
7027 compatible with the configuration. A recipe is considered
7028 incompatible with the currently configured machine when either or
7029 both the :term:`COMPATIBLE_MACHINE`
7030 variable and :term:`COMPATIBLE_HOST` variables
7031 specify compatibility with a machine other than that of the current
7032 machine or host.
7033
7034 .. note::
7035
7036 Do not set the
7037 SOURCE_MIRROR_FETCH
7038 variable unless you are creating a source mirror. In other words,
7039 do not set the variable during a normal build.
7040
Andrew Geisslerf0343792020-11-18 10:42:21 -06007041 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007042 Defines your own :term:`PREMIRRORS` from which to
7043 first fetch source before attempting to fetch from the upstream
7044 specified in :term:`SRC_URI`.
7045
7046 To use this variable, you must globally inherit the
7047 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
7048 the URL to your mirrors. Here is the general syntax:
7049 ::
7050
7051 INHERIT += "own-mirrors"
7052 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7053
7054 .. note::
7055
7056 You can specify only a single URL in
7057 SOURCE_MIRROR_URL
7058 .
7059
Andrew Geisslerf0343792020-11-18 10:42:21 -06007060 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007061 Maps commonly used license names to their SPDX counterparts found in
7062 ``meta/files/common-licenses/``. For the default ``SPDXLICENSEMAP``
7063 mappings, see the ``meta/conf/licenses.conf`` file.
7064
7065 For additional information, see the :term:`LICENSE`
7066 variable.
7067
Andrew Geisslerf0343792020-11-18 10:42:21 -06007068 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007069 A list of prefixes for :term:`PN` used by the OpenEmbedded
7070 build system to create variants of recipes or packages. The list
7071 specifies the prefixes to strip off during certain circumstances such
7072 as the generation of the :term:`BPN` variable.
7073
Andrew Geisslerf0343792020-11-18 10:42:21 -06007074 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007075 The file type for the Secondary Program Loader (SPL). Some devices
7076 use an SPL from which to boot (e.g. the BeagleBone development
7077 board). For such cases, you can declare the file type of the SPL
7078 binary in the ``u-boot.inc`` include file, which is used in the
7079 U-Boot recipe.
7080
7081 The SPL file type is set to "null" by default in the ``u-boot.inc``
7082 file as follows:
7083 ::
7084
7085 # Some versions of u-boot build an SPL (Second Program Loader) image that
7086 # should be packaged along with the u-boot binary as well as placed in the
7087 # deploy directory. For those versions they can set the following variables
7088 # to allow packaging the SPL.
7089 SPL_BINARY ?= ""
7090 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7091 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7092 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7093
7094 The ``SPL_BINARY`` variable helps form
7095 various ``SPL_*`` variables used by the OpenEmbedded build system.
7096
7097 See the BeagleBone machine configuration example in the
7098 ":ref:`dev-manual/dev-manual-common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
7099 section in the Yocto Project Board Support Package Developer's Guide
7100 for additional information.
7101
Andrew Geisslerf0343792020-11-18 10:42:21 -06007102 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007103 The list of source files - local or remote. This variable tells the
7104 OpenEmbedded build system which bits to pull in for the build and how
7105 to pull them in. For example, if the recipe or append file only needs
7106 to fetch a tarball from the Internet, the recipe or append file uses
7107 a single ``SRC_URI`` entry. On the other hand, if the recipe or
7108 append file needs to fetch a tarball, apply two patches, and include
7109 a custom file, the recipe or append file would include four instances
7110 of the variable.
7111
7112 The following list explains the available URI protocols. URI
7113 protocols are highly dependent on particular BitBake Fetcher
7114 submodules. Depending on the fetcher BitBake uses, various URL
7115 parameters are employed. For specifics on the supported Fetchers, see
7116 the ":ref:`Fetchers <bitbake:bb-fetchers>`" section in the
7117 BitBake User Manual.
7118
7119 - ``file://`` - Fetches files, which are usually files shipped
7120 with the :term:`Metadata`, from the local machine (e.g.
7121 :ref:`patch <patching-dev-environment>` files).
7122 The path is relative to the :term:`FILESPATH`
7123 variable. Thus, the build system searches, in order, from the
7124 following directories, which are assumed to be a subdirectories of
7125 the directory in which the recipe file (``.bb``) or append file
7126 (``.bbappend``) resides:
7127
7128 - ``${BPN}`` - The base recipe name without any special suffix
7129 or version numbers.
7130
7131 - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and
7132 version but without any special package name suffix.
7133
7134 - *files -* Files within a directory, which is named ``files``
7135 and is also alongside the recipe or append file.
7136
7137 .. note::
7138
7139 If you want the build system to pick up files specified through
7140 a
7141 SRC_URI
7142 statement from your append file, you need to be sure to extend
7143 the
7144 FILESPATH
7145 variable by also using the
7146 FILESEXTRAPATHS
7147 variable from within your append file.
7148
7149 - ``bzr://`` - Fetches files from a Bazaar revision control
7150 repository.
7151
7152 - ``git://`` - Fetches files from a Git revision control
7153 repository.
7154
7155 - ``osc://`` - Fetches files from an OSC (OpenSUSE Build service)
7156 revision control repository.
7157
7158 - ``repo://`` - Fetches files from a repo (Git) repository.
7159
7160 - ``ccrc://`` - Fetches files from a ClearCase repository.
7161
7162 - ``http://`` - Fetches files from the Internet using ``http``.
7163
7164 - ``https://`` - Fetches files from the Internet using ``https``.
7165
7166 - ``ftp://`` - Fetches files from the Internet using ``ftp``.
7167
7168 - ``cvs://`` - Fetches files from a CVS revision control
7169 repository.
7170
7171 - ``hg://`` - Fetches files from a Mercurial (``hg``) revision
7172 control repository.
7173
7174 - ``p4://`` - Fetches files from a Perforce (``p4``) revision
7175 control repository.
7176
7177 - ``ssh://`` - Fetches files from a secure shell.
7178
7179 - ``svn://`` - Fetches files from a Subversion (``svn``) revision
7180 control repository.
7181
7182 - ``npm://`` - Fetches JavaScript modules from a registry.
7183
7184 Standard and recipe-specific options for ``SRC_URI`` exist. Here are
7185 standard options:
7186
7187 - ``apply`` - Whether to apply the patch or not. The default
7188 action is to apply the patch.
7189
7190 - ``striplevel`` - Which striplevel to use when applying the
7191 patch. The default level is 1.
7192
7193 - ``patchdir`` - Specifies the directory in which the patch should
7194 be applied. The default is ``${``\ :term:`S`\ ``}``.
7195
7196 Here are options specific to recipes building code from a revision
7197 control system:
7198
7199 - ``mindate`` - Apply the patch only if
7200 :term:`SRCDATE` is equal to or greater than
7201 ``mindate``.
7202
7203 - ``maxdate`` - Apply the patch only if ``SRCDATE`` is not later
7204 than ``maxdate``.
7205
7206 - ``minrev`` - Apply the patch only if ``SRCREV`` is equal to or
7207 greater than ``minrev``.
7208
7209 - ``maxrev`` - Apply the patch only if ``SRCREV`` is not later
7210 than ``maxrev``.
7211
7212 - ``rev`` - Apply the patch only if ``SRCREV`` is equal to
7213 ``rev``.
7214
7215 - ``notrev`` - Apply the patch only if ``SRCREV`` is not equal to
7216 ``rev``.
7217
7218 Here are some additional options worth mentioning:
7219
7220 - ``unpack`` - Controls whether or not to unpack the file if it is
7221 an archive. The default action is to unpack the file.
7222
7223 - ``destsuffix`` - Places the file (or extracts its contents) into
7224 the specified subdirectory of :term:`WORKDIR` when
7225 the Git fetcher is used.
7226
7227 - ``subdir`` - Places the file (or extracts its contents) into the
7228 specified subdirectory of ``WORKDIR`` when the local (``file://``)
7229 fetcher is used.
7230
7231 - ``localdir`` - Places the file (or extracts its contents) into
7232 the specified subdirectory of ``WORKDIR`` when the CVS fetcher is
7233 used.
7234
7235 - ``subpath`` - Limits the checkout to a specific subpath of the
7236 tree when using the Git fetcher is used.
7237
7238 - ``name`` - Specifies a name to be used for association with
7239 ``SRC_URI`` checksums when you have more than one file specified
7240 in ``SRC_URI``.
7241
7242 - ``downloadfilename`` - Specifies the filename used when storing
7243 the downloaded file.
7244
Andrew Geisslerf0343792020-11-18 10:42:21 -06007245 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007246 By default, the OpenEmbedded build system automatically detects
7247 whether ``SRC_URI`` contains files that are machine-specific. If so,
7248 the build system automatically changes ``PACKAGE_ARCH``. Setting this
7249 variable to "0" disables this behavior.
7250
Andrew Geisslerf0343792020-11-18 10:42:21 -06007251 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007252 The date of the source code used to build the package. This variable
7253 applies only if the source was fetched from a Source Code Manager
7254 (SCM).
7255
Andrew Geisslerf0343792020-11-18 10:42:21 -06007256 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007257 Returns the version string of the current package. This string is
7258 used to help define the value of :term:`PV`.
7259
7260 The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf``
7261 configuration file in the :term:`Source Directory` as
7262 follows:
7263 ::
7264
7265 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7266
7267 Recipes that need to define ``PV`` do so with the help of the
7268 ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``)
7269 located in ``meta/recipes-connectivity`` in the Source Directory
7270 defines ``PV`` as follows:
7271 ::
7272
7273 PV = "0.12-git${SRCPV}"
7274
Andrew Geisslerf0343792020-11-18 10:42:21 -06007275 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007276 The revision of the source code used to build the package. This
7277 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7278 that if you want to build a fixed revision and you want to avoid
7279 performing a query on the remote repository every time BitBake parses
7280 your recipe, you should specify a ``SRCREV`` that is a full revision
7281 identifier and not just a tag.
7282
7283 .. note::
7284
7285 For information on limitations when inheriting the latest revision
7286 of software using
7287 SRCREV
7288 , see the
7289 AUTOREV
7290 variable description and the "
7291 Automatically Incrementing a Binary Package Revision Number
7292 " section, which is in the Yocto Project Development Tasks Manual.
7293
Andrew Geisslerf0343792020-11-18 10:42:21 -06007294 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007295 The directory for the shared state cache.
7296
Andrew Geisslerf0343792020-11-18 10:42:21 -06007297 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007298 If set to "1", allows fetches from mirrors that are specified in
7299 :term:`SSTATE_MIRRORS` to work even when
7300 fetching from the network is disabled by setting ``BB_NO_NETWORK`` to
7301 "1". Using the ``SSTATE_MIRROR_ALLOW_NETWORK`` variable is useful if
7302 you have set ``SSTATE_MIRRORS`` to point to an internal server for
7303 your shared state cache, but you want to disable any other fetching
7304 from the network.
7305
Andrew Geisslerf0343792020-11-18 10:42:21 -06007306 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007307 Configures the OpenEmbedded build system to search other mirror
7308 locations for prebuilt cache data objects before building out the
7309 data. This variable works like fetcher :term:`MIRRORS`
7310 and :term:`PREMIRRORS` and points to the cache
7311 locations to check for the shared state (sstate) objects.
7312
7313 You can specify a filesystem directory or a remote URL such as HTTP
7314 or FTP. The locations you specify need to contain the shared state
7315 cache (sstate-cache) results from previous builds. The sstate-cache
7316 you point to can also be from builds on other machines.
7317
7318 When pointing to sstate build artifacts on another machine that uses
7319 a different GCC version for native builds, you must configure
7320 ``SSTATE_MIRRORS`` with a regular expression that maps local search
7321 paths to server paths. The paths need to take into account
7322 :term:`NATIVELSBSTRING` set by the
7323 :ref:`uninative <ref-classes-uninative>` class. For example, the
7324 following maps the local search path ``universal-4.9`` to the
7325 server-provided path server_url_sstate_path:
7326 ::
7327
7328 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n"
7329
7330 If a mirror uses the same structure as
7331 :term:`SSTATE_DIR`, you need to add "PATH" at the
7332 end as shown in the examples below. The build system substitutes the
7333 correct path within the directory structure.
7334 ::
7335
7336 SSTATE_MIRRORS ?= "\
7337 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
7338 file://.* file:///some-local-dir/sstate/PATH"
7339
Andrew Geisslerf0343792020-11-18 10:42:21 -06007340 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007341 Controls the list of files the OpenEmbedded build system scans for
7342 hardcoded installation paths. The variable uses a space-separated
7343 list of filenames (not paths) with standard wildcard characters
7344 allowed.
7345
7346 During a build, the OpenEmbedded build system creates a shared state
7347 (sstate) object during the first stage of preparing the sysroots.
7348 That object is scanned for hardcoded paths for original installation
7349 locations. The list of files that are scanned for paths is controlled
7350 by the ``SSTATE_SCAN_FILES`` variable. Typically, recipes add files
7351 they want to be scanned to the value of ``SSTATE_SCAN_FILES`` rather
7352 than the variable being comprehensively set. The
7353 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7354 of files.
7355
7356 For details on the process, see the
7357 :ref:`staging <ref-classes-staging>` class.
7358
Andrew Geisslerf0343792020-11-18 10:42:21 -06007359 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007360 Specifies the path to the ``/lib`` subdirectory of the sysroot
7361 directory for the build host.
7362
Andrew Geisslerf0343792020-11-18 10:42:21 -06007363 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007364 Specifies the path to the ``/lib`` subdirectory of the sysroot
7365 directory for the target for which the current recipe is being built
7366 (:term:`STAGING_DIR_HOST`).
7367
Andrew Geisslerf0343792020-11-18 10:42:21 -06007368 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007369 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7370 directory for the target for which the current recipe is being built
7371 (:term:`STAGING_DIR_HOST`).
7372
Andrew Geisslerf0343792020-11-18 10:42:21 -06007373 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007374 Specifies the path to the directory containing binary configuration
7375 scripts. These scripts provide configuration information for other
7376 software that wants to make use of libraries or include files
7377 provided by the software associated with the script.
7378
7379 .. note::
7380
7381 This style of build configuration has been largely replaced by
7382 pkg-config
7383 . Consequently, if
7384 pkg-config
7385 is supported by the library to which you are linking, it is
7386 recommended you use
7387 pkg-config
7388 instead of a provided configuration script.
7389
Andrew Geisslerf0343792020-11-18 10:42:21 -06007390 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007391 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7392 directory for the build host.
7393
Andrew Geisslerf0343792020-11-18 10:42:21 -06007394 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007395 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7396 directory for the target for which the current recipe is being built
7397 (:term:`STAGING_DIR_HOST`).
7398
Andrew Geisslerf0343792020-11-18 10:42:21 -06007399 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007400 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7401 directory for the build host.
7402
Andrew Geisslerf0343792020-11-18 10:42:21 -06007403 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007404 Helps construct the ``recipe-sysroots`` directory, which is used
7405 during packaging.
7406
7407 For information on how staging for recipe-specific sysroots occurs,
7408 see the :ref:`ref-tasks-populate_sysroot`
7409 task, the ":ref:`sdk-manual/sdk-extensible:sharing files between recipes`"
7410 section in the Yocto Project Development Tasks Manual, the
7411 ":ref:`configuration-compilation-and-staging-dev-environment`"
7412 section in the Yocto Project Overview and Concepts Manual, and the
7413 :term:`SYSROOT_DIRS` variable.
7414
7415 .. note::
7416
7417 Recipes should never write files directly under the
7418 STAGING_DIR
7419 directory because the OpenEmbedded build system manages the
7420 directory automatically. Instead, files should be installed to
7421 ${
7422 D
7423 }
7424 within your recipe's
7425 do_install
7426 task and then the OpenEmbedded build system will stage a subset of
7427 those files into the sysroot.
7428
Andrew Geisslerf0343792020-11-18 10:42:21 -06007429 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007430 Specifies the path to the sysroot directory for the system on which
7431 the component is built to run (the system that hosts the component).
7432 For most recipes, this sysroot is the one in which that recipe's
7433 :ref:`ref-tasks-populate_sysroot` task copies
7434 files. Exceptions include ``-native`` recipes, where the
7435 ``do_populate_sysroot`` task instead uses
7436 :term:`STAGING_DIR_NATIVE`. Depending on
7437 the type of recipe and the build target, ``STAGING_DIR_HOST`` can
7438 have the following values:
7439
7440 - For recipes building for the target machine, the value is
7441 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7442
7443 - For native recipes building for the build host, the value is empty
7444 given the assumption that when building for the build host, the
7445 build host's own directories should be used.
7446
7447 .. note::
7448
7449 ``-native`` recipes are not installed into host paths like such
7450 as ``/usr``. Rather, these recipes are installed into
7451 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes,
7452 standard build environment variables such as
7453 :term:`CPPFLAGS` and
7454 :term:`CFLAGS` are set up so that both host paths
7455 and ``STAGING_DIR_NATIVE`` are searched for libraries and
7456 headers using, for example, GCC's ``-isystem`` option.
7457
7458 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7459 should be viewed as input variables by tasks such as
7460 :ref:`ref-tasks-configure`,
7461 :ref:`ref-tasks-compile`, and
7462 :ref:`ref-tasks-install`. Having the real system
7463 root correspond to ``STAGING_DIR_HOST`` makes conceptual sense
7464 for ``-native`` recipes, as they make use of host headers and
7465 libraries.
7466
Andrew Geisslerf0343792020-11-18 10:42:21 -06007467 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007468 Specifies the path to the sysroot directory used when building
7469 components that run on the build host itself.
7470
Andrew Geisslerf0343792020-11-18 10:42:21 -06007471 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007472 Specifies the path to the sysroot used for the system for which the
7473 component generates code. For components that do not generate code,
7474 which is the majority, ``STAGING_DIR_TARGET`` is set to match
7475 :term:`STAGING_DIR_HOST`.
7476
7477 Some recipes build binaries that can run on the target system but
7478 those binaries in turn generate code for another different system
7479 (e.g. cross-canadian recipes). Using terminology from GNU, the
7480 primary system is referred to as the "HOST" and the secondary, or
7481 different, system is referred to as the "TARGET". Thus, the binaries
7482 run on the "HOST" system and generate binaries for the "TARGET"
7483 system. The ``STAGING_DIR_HOST`` variable points to the sysroot used
7484 for the "HOST" system, while ``STAGING_DIR_TARGET`` points to the
7485 sysroot used for the "TARGET" system.
7486
Andrew Geisslerf0343792020-11-18 10:42:21 -06007487 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007488 Specifies the path to the ``/etc`` subdirectory of the sysroot
7489 directory for the build host.
7490
Andrew Geisslerf0343792020-11-18 10:42:21 -06007491 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007492 Specifies the path to the ``/usr`` subdirectory of the sysroot
7493 directory for the target for which the current recipe is being built
7494 (:term:`STAGING_DIR_HOST`).
7495
Andrew Geisslerf0343792020-11-18 10:42:21 -06007496 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007497 Specifies the path to the ``/usr/include`` subdirectory of the
7498 sysroot directory for the target for which the current recipe being
7499 built (:term:`STAGING_DIR_HOST`).
7500
Andrew Geisslerf0343792020-11-18 10:42:21 -06007501 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007502 Specifies the path to the ``/usr/include`` subdirectory of the
7503 sysroot directory for the build host.
7504
Andrew Geisslerf0343792020-11-18 10:42:21 -06007505 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007506 Points to the directory containing the kernel build artifacts.
7507 Recipes building software that needs to access kernel build artifacts
7508 (e.g. ``systemtap-uprobes``) can look in the directory specified with
7509 the ``STAGING_KERNEL_BUILDDIR`` variable to find these artifacts
7510 after the kernel has been built.
7511
Andrew Geisslerf0343792020-11-18 10:42:21 -06007512 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007513 The directory with kernel headers that are required to build
7514 out-of-tree modules.
7515
Andrew Geisslerf0343792020-11-18 10:42:21 -06007516 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007517 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7518 directory for the target for which the current recipe is being built
7519 (:term:`STAGING_DIR_HOST`).
7520
Andrew Geisslerf0343792020-11-18 10:42:21 -06007521 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007522 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7523 directory for the build host.
7524
Andrew Geisslerf0343792020-11-18 10:42:21 -06007525 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007526 Specifies the base path used to create recipe stamp files. The path
7527 to an actual stamp file is constructed by evaluating this string and
7528 then appending additional information. Currently, the default
7529 assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf``
7530 file is:
7531 ::
7532
7533 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7534
7535 For information on how BitBake uses stamp files to determine if a
7536 task should be rerun, see the
7537 ":ref:`overview-manual/overview-manual-concepts:stamp files and the rerunning of tasks`"
7538 section in the Yocto Project Overview and Concepts Manual.
7539
7540 See :term:`STAMPS_DIR`,
7541 :term:`MULTIMACH_TARGET_SYS`,
7542 :term:`PN`, :term:`EXTENDPE`,
7543 :term:`PV`, and :term:`PR` for related variable
7544 information.
7545
Andrew Geisslerf0343792020-11-18 10:42:21 -06007546 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007547 Specifies the base directory in which the OpenEmbedded build system
7548 places stamps. The default directory is ``${TMPDIR}/stamps``.
7549
Andrew Geisslerf0343792020-11-18 10:42:21 -06007550 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007551 The minimal command and arguments to run ``strip``, which is used to
7552 strip symbols.
7553
Andrew Geisslerf0343792020-11-18 10:42:21 -06007554 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007555 The short (72 characters or less) summary of the binary package for
7556 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
7557 ``SUMMARY`` is used to define the
7558 :term:`DESCRIPTION` variable if ``DESCRIPTION`` is
7559 not set in the recipe.
7560
Andrew Geisslerf0343792020-11-18 10:42:21 -06007561 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007562 The directory in which files checked out of a Subversion system are
7563 stored.
7564
Andrew Geisslerf0343792020-11-18 10:42:21 -06007565 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007566 Specifies the kernel boot default console. If you want to use a
7567 console other than the default, set this variable in your recipe as
7568 follows where "X" is the console number you want to use:
7569 ::
7570
7571 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7572
7573 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7574 this variable to null but then checks for a value later.
7575
Andrew Geisslerf0343792020-11-18 10:42:21 -06007576 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007577 Lists additional options to add to the syslinux file. You need to set
7578 this variable in your recipe. If you want to list multiple options,
7579 separate the options with a semicolon character (``;``).
7580
7581 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7582 to create a set of options.
7583
Andrew Geisslerf0343792020-11-18 10:42:21 -06007584 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007585 Specifies the alternate serial port or turns it off. To turn off
7586 serial, set this variable to an empty string in your recipe. The
7587 variable's default value is set in the
7588 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7589 ::
7590
7591 SYSLINUX_SERIAL ?= "0 115200"
7592
7593 The class checks for and uses the variable as needed.
7594
Andrew Geisslerf0343792020-11-18 10:42:21 -06007595 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007596 Specifies the alternate console=tty... kernel boot argument. The
7597 variable's default value is set in the
7598 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7599 ::
7600
7601 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7602
7603 The class checks for and uses the variable as needed.
7604
Andrew Geisslerf0343792020-11-18 10:42:21 -06007605 :term:`SYSLINUX_SPLASH`
7606 An ``.LSS`` file used as the background for the VGA boot menu when
7607 you use the boot menu. You need to set this variable in your recipe.
7608
7609 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7610 variable and if found, the OpenEmbedded build system installs the
7611 splash screen.
7612
7613 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007614 Points to the temporary directory under the work directory (default
7615 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7616 where the files populated into the sysroot are assembled during the
7617 :ref:`ref-tasks-populate_sysroot` task.
7618
Andrew Geisslerf0343792020-11-18 10:42:21 -06007619 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007620 Directories that are staged into the sysroot by the
7621 :ref:`ref-tasks-populate_sysroot` task. By
7622 default, the following directories are staged:
7623 ::
7624
7625 SYSROOT_DIRS = " \
7626 ${includedir} \
7627 ${libdir} \
7628 ${base_libdir} \
7629 ${nonarch_base_libdir} \
7630 ${datadir} \
7631 "
7632
Andrew Geisslerf0343792020-11-18 10:42:21 -06007633 :term:`SYSROOT_DIRS_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634 Directories that are not staged into the sysroot by the
7635 :ref:`ref-tasks-populate_sysroot` task. You
7636 can use this variable to exclude certain subdirectories of
7637 directories listed in :term:`SYSROOT_DIRS` from
7638 staging. By default, the following directories are not staged:
7639 ::
7640
7641 SYSROOT_DIRS_BLACKLIST = " \
7642 ${mandir} \
7643 ${docdir} \
7644 ${infodir} \
7645 ${datadir}/locale \
7646 ${datadir}/applications \
7647 ${datadir}/fonts \
7648 ${datadir}/pixmaps \
7649 "
7650
Andrew Geisslerf0343792020-11-18 10:42:21 -06007651 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007652 Extra directories staged into the sysroot by the
7653 :ref:`ref-tasks-populate_sysroot` task for
7654 ``-native`` recipes, in addition to those specified in
7655 :term:`SYSROOT_DIRS`. By default, the following
7656 extra directories are staged:
7657 ::
7658
7659 SYSROOT_DIRS_NATIVE = " \
7660 ${bindir} \
7661 ${sbindir} \
7662 ${base_bindir} \
7663 ${base_sbindir} \
7664 ${libexecdir} \
7665 ${sysconfdir} \
7666 ${localstatedir} \
7667 "
7668
7669 .. note::
7670
7671 Programs built by
7672 -native
7673 recipes run directly from the sysroot (
7674 STAGING_DIR_NATIVE
7675 ), which is why additional directories containing program
7676 executables and supporting files need to be staged.
7677
Andrew Geisslerf0343792020-11-18 10:42:21 -06007678 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007679 A list of functions to execute after files are staged into the
7680 sysroot. These functions are usually used to apply additional
7681 processing on the staged files, or to stage additional files.
7682
Andrew Geisslerf0343792020-11-18 10:42:21 -06007683 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007684 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7685 this variable specifies whether the specified service in
7686 :term:`SYSTEMD_SERVICE` should start
7687 automatically or not. By default, the service is enabled to
7688 automatically start at boot time. The default setting is in the
7689 :ref:`systemd <ref-classes-systemd>` class as follows:
7690 ::
7691
7692 SYSTEMD_AUTO_ENABLE ??= "enable"
7693
7694 You can disable the service by setting the variable to "disable".
7695
Andrew Geisslerf0343792020-11-18 10:42:21 -06007696 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007697 When :term:`EFI_PROVIDER` is set to
7698 "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the
7699 configuration file that should be used. By default, the
7700 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7701 ``SYSTEMD_BOOT_CFG`` as follows:
7702 ::
7703
7704 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7705
7706 For information on Systemd-boot, see the `Systemd-boot
7707 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7708
Andrew Geisslerf0343792020-11-18 10:42:21 -06007709 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007710 When :term:`EFI_PROVIDER` is set to
7711 "systemd-boot", the ``SYSTEMD_BOOT_ENTRIES`` variable specifies a
7712 list of entry files (``*.conf``) to install that contain one boot
7713 entry per file. By default, the
7714 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7715 ``SYSTEMD_BOOT_ENTRIES`` as follows:
7716 ::
7717
7718 SYSTEMD_BOOT_ENTRIES ?= ""
7719
7720 For information on Systemd-boot, see the `Systemd-boot
7721 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7722
Andrew Geisslerf0343792020-11-18 10:42:21 -06007723 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007724 When :term:`EFI_PROVIDER` is set to
7725 "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the
7726 boot menu timeout in seconds. By default, the
7727 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7728 ``SYSTEMD_BOOT_TIMEOUT`` as follows:
7729 ::
7730
7731 SYSTEMD_BOOT_TIMEOUT ?= "10"
7732
7733 For information on Systemd-boot, see the `Systemd-boot
7734 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7735
Andrew Geisslerf0343792020-11-18 10:42:21 -06007736 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007737 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7738 this variable locates the systemd unit files when they are not found
7739 in the main recipe's package. By default, the ``SYSTEMD_PACKAGES``
7740 variable is set such that the systemd unit files are assumed to
7741 reside in the recipes main package:
7742 ::
7743
7744 SYSTEMD_PACKAGES ?= "${PN}"
7745
7746 If these unit files are not in this recipe's main package, you need
7747 to use ``SYSTEMD_PACKAGES`` to list the package or packages in which
7748 the build system can find the systemd unit files.
7749
Andrew Geisslerf0343792020-11-18 10:42:21 -06007750 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007751 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7752 this variable specifies the systemd service name for a package.
7753
7754 When you specify this file in your recipe, use a package name
7755 override to indicate the package to which the value applies. Here is
7756 an example from the connman recipe:
7757 ::
7758
7759 SYSTEMD_SERVICE_${PN} = "connman.service"
7760
Andrew Geisslerf0343792020-11-18 10:42:21 -06007761 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007762 When using
7763 :ref:`SysVinit <dev-manual/dev-manual-common-tasks:enabling system services>`,
7764 specifies a space-separated list of the virtual terminals that should
7765 run a `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
7766 (allowing login), assuming :term:`USE_VT` is not set to
7767 "0".
7768
7769 The default value for ``SYSVINIT_ENABLED_GETTYS`` is "1" (i.e. only
7770 run a getty on the first virtual terminal).
7771
Andrew Geisslerf0343792020-11-18 10:42:21 -06007772 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007773 This variable points to a directory were BitBake places temporary
7774 files, which consist mostly of task logs and scripts, when building a
7775 particular recipe. The variable is typically set as follows:
7776 ::
7777
7778 T = "${WORKDIR}/temp"
7779
7780 The :term:`WORKDIR` is the directory into which
7781 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7782 file sets this variable.
7783
7784 The ``T`` variable is not to be confused with the
7785 :term:`TMPDIR` variable, which points to the root of
7786 the directory tree where BitBake places the output of an entire
7787 build.
7788
Andrew Geisslerf0343792020-11-18 10:42:21 -06007789 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007790 The target machine's architecture. The OpenEmbedded build system
7791 supports many architectures. Here is an example list of architectures
7792 supported. This list is by no means complete as the architecture is
7793 configurable:
7794
7795 - arm
7796 - i586
7797 - x86_64
7798 - powerpc
7799 - powerpc64
7800 - mips
7801 - mipsel
7802
7803 For additional information on machine architectures, see the
7804 :term:`TUNE_ARCH` variable.
7805
Andrew Geisslerf0343792020-11-18 10:42:21 -06007806 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007807 Specifies architecture-specific assembler flags for the target
7808 system. ``TARGET_AS_ARCH`` is initialized from
7809 :term:`TUNE_ASARGS` by default in the BitBake
7810 configuration file (``meta/conf/bitbake.conf``):
7811 ::
7812
7813 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7814
Andrew Geisslerf0343792020-11-18 10:42:21 -06007815 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007816 Specifies architecture-specific C compiler flags for the target
7817 system. ``TARGET_CC_ARCH`` is initialized from
7818 :term:`TUNE_CCARGS` by default.
7819
7820 .. note::
7821
7822 It is a common workaround to append
7823 LDFLAGS
7824 to
7825 TARGET_CC_ARCH
7826 in recipes that build software for the target that would not
7827 otherwise respect the exported
7828 LDFLAGS
7829 variable.
7830
Andrew Geisslerf0343792020-11-18 10:42:21 -06007831 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007832 This is a specific kernel compiler flag for a CPU or Application
7833 Binary Interface (ABI) tune. The flag is used rarely and only for
7834 cases where a userspace :term:`TUNE_CCARGS` is not
7835 compatible with the kernel compilation. The ``TARGET_CC_KERNEL_ARCH``
7836 variable allows the kernel (and associated modules) to use a
7837 different configuration. See the
7838 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7839 :term:`Source Directory` for an example.
7840
Andrew Geisslerf0343792020-11-18 10:42:21 -06007841 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007842 Specifies the flags to pass to the C compiler when building for the
7843 target. When building in the target context,
7844 :term:`CFLAGS` is set to the value of this variable by
7845 default.
7846
7847 Additionally, the SDK's environment setup script sets the ``CFLAGS``
7848 variable in the environment to the ``TARGET_CFLAGS`` value so that
7849 executables built using the SDK also have the flags applied.
7850
Andrew Geisslerf0343792020-11-18 10:42:21 -06007851 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007852 Specifies the flags to pass to the C pre-processor (i.e. to both the
7853 C and the C++ compilers) when building for the target. When building
7854 in the target context, :term:`CPPFLAGS` is set to the
7855 value of this variable by default.
7856
7857 Additionally, the SDK's environment setup script sets the
7858 ``CPPFLAGS`` variable in the environment to the ``TARGET_CPPFLAGS``
7859 value so that executables built using the SDK also have the flags
7860 applied.
7861
Andrew Geisslerf0343792020-11-18 10:42:21 -06007862 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007863 Specifies the flags to pass to the C++ compiler when building for the
7864 target. When building in the target context,
7865 :term:`CXXFLAGS` is set to the value of this variable
7866 by default.
7867
7868 Additionally, the SDK's environment setup script sets the
7869 ``CXXFLAGS`` variable in the environment to the ``TARGET_CXXFLAGS``
7870 value so that executables built using the SDK also have the flags
7871 applied.
7872
Andrew Geisslerf0343792020-11-18 10:42:21 -06007873 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874 Specifies the method for handling FPU code. For FPU-less targets,
7875 which include most ARM CPUs, the variable must be set to "soft". If
7876 not, the kernel emulation gets used, which results in a performance
7877 penalty.
7878
Andrew Geisslerf0343792020-11-18 10:42:21 -06007879 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007880 Specifies architecture-specific linker flags for the target system.
7881 ``TARGET_LD_ARCH`` is initialized from
7882 :term:`TUNE_LDARGS` by default in the BitBake
7883 configuration file (``meta/conf/bitbake.conf``):
7884 ::
7885
7886 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7887
Andrew Geisslerf0343792020-11-18 10:42:21 -06007888 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007889 Specifies the flags to pass to the linker when building for the
7890 target. When building in the target context,
7891 :term:`LDFLAGS` is set to the value of this variable
7892 by default.
7893
7894 Additionally, the SDK's environment setup script sets the
7895 :term:`LDFLAGS` variable in the environment to the
7896 ``TARGET_LDFLAGS`` value so that executables built using the SDK also
7897 have the flags applied.
7898
Andrew Geisslerf0343792020-11-18 10:42:21 -06007899 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007900 Specifies the target's operating system. The variable can be set to
7901 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
7902 for musl libc. For ARM/EABI targets, "linux-gnueabi" and
7903 "linux-musleabi" possible values exist.
7904
Andrew Geisslerf0343792020-11-18 10:42:21 -06007905 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007906 Specifies the prefix used for the toolchain binary target tools.
7907
7908 Depending on the type of recipe and the build target,
7909 ``TARGET_PREFIX`` is set as follows:
7910
7911 - For recipes building for the target machine, the value is
7912 "${:term:`TARGET_SYS`}-".
7913
7914 - For native recipes, the build system sets the variable to the
7915 value of ``BUILD_PREFIX``.
7916
7917 - For native SDK recipes (``nativesdk``), the build system sets the
7918 variable to the value of ``SDK_PREFIX``.
7919
Andrew Geisslerf0343792020-11-18 10:42:21 -06007920 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007921 Specifies the system, including the architecture and the operating
7922 system, for which the build is occurring in the context of the
7923 current recipe.
7924
7925 The OpenEmbedded build system automatically sets this variable based
7926 on :term:`TARGET_ARCH`,
7927 :term:`TARGET_VENDOR`, and
7928 :term:`TARGET_OS` variables.
7929
7930 .. note::
7931
7932 You do not need to set the TARGET_SYS variable yourself.
7933
7934 Consider these two examples:
7935
7936 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7937 value is "i686-linux".
7938
7939 - Given a recipe being built for a little-endian, MIPS target
7940 running Linux, the value might be "mipsel-linux".
7941
Andrew Geisslerf0343792020-11-18 10:42:21 -06007942 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007943 Specifies the name of the target vendor.
7944
Andrew Geisslerf0343792020-11-18 10:42:21 -06007945 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007946 Specifies the GNU standard C library (``libc``) variant to use during
7947 the build process. This variable replaces ``POKYLIBC``, which is no
7948 longer supported.
7949
7950 You can select "glibc", "musl", "newlib", or "baremetal"
7951
Andrew Geisslerf0343792020-11-18 10:42:21 -06007952 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007953 Specifies a suffix to be appended onto the
7954 :term:`TMPDIR` value. The suffix identifies the
7955 ``libc`` variant for building. When you are building for multiple
7956 variants with the same :term:`Build Directory`, this
7957 mechanism ensures that output for different ``libc`` variants is kept
7958 separate to avoid potential conflicts.
7959
7960 In the ``defaultsetup.conf`` file, the default value of
7961 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky,
7962 which normally only support one ``libc`` variant, set
7963 ``TCLIBCAPPEND`` to "" in their distro configuration file resulting
7964 in no suffix being applied.
7965
Andrew Geisslerf0343792020-11-18 10:42:21 -06007966 :term:`TCMODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007967 Specifies the toolchain selector. ``TCMODE`` controls the
7968 characteristics of the generated packages and images by telling the
7969 OpenEmbedded build system which toolchain profile to use. By default,
7970 the OpenEmbedded build system builds its own internal toolchain. The
7971 variable's default value is "default", which uses that internal
7972 toolchain.
7973
7974 .. note::
7975
7976 If
7977 TCMODE
7978 is set to a value other than "default", then it is your
7979 responsibility to ensure that the toolchain is compatible with the
7980 default toolchain. Using older or newer versions of these
7981 components might cause build problems. See the Release Notes for
7982 the Yocto Project release for the specific components with which
7983 the toolchain must be compatible. To access the Release Notes, go
7984 to the
7985 Downloads
7986 page on the Yocto Project website and click on the "RELEASE
7987 INFORMATION" link for the appropriate release.
7988
7989 The ``TCMODE`` variable is similar to :term:`TCLIBC`,
7990 which controls the variant of the GNU standard C library (``libc``)
7991 used during the build process: ``glibc`` or ``musl``.
7992
7993 With additional layers, it is possible to use a pre-compiled external
7994 toolchain. One example is the Sourcery G++ Toolchain. The support for
7995 this toolchain resides in the separate Mentor Graphics
7996 ``meta-sourcery`` layer at
7997 http://github.com/MentorEmbedded/meta-sourcery/.
7998
7999 The layer's ``README`` file contains information on how to use the
8000 Sourcery G++ Toolchain as an external toolchain. In summary, you must
8001 be sure to add the layer to your ``bblayers.conf`` file in front of
8002 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
8003 in your ``local.conf`` file to the location in which you installed
8004 the toolchain.
8005
8006 The fundamentals used for this example apply to any external
8007 toolchain. You can use ``meta-sourcery`` as a template for adding
8008 support for other external toolchains.
8009
Andrew Geisslerf0343792020-11-18 10:42:21 -06008010 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008011 The location the OpenEmbedded build system uses to export tests when
8012 the :term:`TEST_EXPORT_ONLY` variable is set
8013 to "1".
8014
8015 The ``TEST_EXPORT_DIR`` variable defaults to
8016 ``"${TMPDIR}/testimage/${PN}"``.
8017
Andrew Geisslerf0343792020-11-18 10:42:21 -06008018 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008019 Specifies to export the tests only. Set this variable to "1" if you
8020 do not want to run the tests but you want them to be exported in a
8021 manner that you to run them outside of the build system.
8022
Andrew Geisslerf0343792020-11-18 10:42:21 -06008023 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008024 Holds the SSH log and the boot log for QEMU machines. The
8025 ``TEST_LOG_DIR`` variable defaults to ``"${WORKDIR}/testimage"``.
8026
8027 .. note::
8028
8029 Actual test results reside in the task log (
8030 log.do_testimage
8031 ), which is in the
8032 ${WORKDIR}/temp/
8033 directory.
8034
Andrew Geisslerf0343792020-11-18 10:42:21 -06008035 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008036 For automated hardware testing, specifies the command to use to
8037 control the power of the target machine under test. Typically, this
8038 command would point to a script that performs the appropriate action
8039 (e.g. interacting with a web-enabled power strip). The specified
8040 command should expect to receive as the last argument "off", "on" or
8041 "cycle" specifying to power off, on, or cycle (power off and then
8042 power on) the device, respectively.
8043
Andrew Geisslerf0343792020-11-18 10:42:21 -06008044 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008045 For automated hardware testing, specifies additional arguments to
8046 pass through to the command specified in
8047 :term:`TEST_POWERCONTROL_CMD`. Setting
8048 ``TEST_POWERCONTROL_EXTRA_ARGS`` is optional. You can use it if you
8049 wish, for example, to separate the machine-specific and
8050 non-machine-specific parts of the arguments.
8051
Andrew Geisslerf0343792020-11-18 10:42:21 -06008052 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008053 The time in seconds allowed for an image to boot before automated
8054 runtime tests begin to run against an image. The default timeout
8055 period to allow the boot process to reach the login prompt is 500
8056 seconds. You can specify a different value in the ``local.conf``
8057 file.
8058
8059 For more information on testing images, see the
8060 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8061 section in the Yocto Project Development Tasks Manual.
8062
Andrew Geisslerf0343792020-11-18 10:42:21 -06008063 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008064 For automated hardware testing, specifies the command to use to
8065 connect to the serial console of the target machine under test. This
8066 command simply needs to connect to the serial console and forward
8067 that connection to standard input and output as any normal terminal
8068 program does.
8069
8070 For example, to use the Picocom terminal program on serial device
8071 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:
8072 ::
8073
8074 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8075
Andrew Geisslerf0343792020-11-18 10:42:21 -06008076 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008077 For automated hardware testing, specifies additional arguments to
8078 pass through to the command specified in
8079 :term:`TEST_SERIALCONTROL_CMD`. Setting
8080 ``TEST_SERIALCONTROL_EXTRA_ARGS`` is optional. You can use it if you
8081 wish, for example, to separate the machine-specific and
8082 non-machine-specific parts of the command.
8083
Andrew Geisslerf0343792020-11-18 10:42:21 -06008084 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008085 The IP address of the build machine (host machine). This IP address
8086 is usually automatically detected. However, if detection fails, this
8087 variable needs to be set to the IP address of the build machine (i.e.
8088 where the build is taking place).
8089
8090 .. note::
8091
8092 The
8093 TEST_SERVER_IP
8094 variable is only used for a small number of tests such as the
8095 "dnf" test suite, which needs to download packages from
8096 WORKDIR/oe-rootfs-repo
8097 .
8098
Andrew Geisslerf0343792020-11-18 10:42:21 -06008099 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008100 An ordered list of tests (modules) to run against an image when
8101 performing automated runtime testing.
8102
8103 The OpenEmbedded build system provides a core set of tests that can
8104 be used against images.
8105
8106 .. note::
8107
8108 Currently, there is only support for running these tests under
8109 QEMU.
8110
8111 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
8112 your own tests to the list of tests by appending ``TEST_SUITES`` as
8113 follows:
8114 ::
8115
8116 TEST_SUITES_append = " mytest"
8117
8118 Alternatively, you can
8119 provide the "auto" option to have all applicable tests run against
8120 the image.
8121 ::
8122
8123 TEST_SUITES_append = " auto"
8124
8125 Using this option causes the
8126 build system to automatically run tests that are applicable to the
8127 image. Tests that are not applicable are skipped.
8128
8129 The order in which tests are run is important. Tests that depend on
8130 another test must appear later in the list than the test on which
8131 they depend. For example, if you append the list of tests with two
8132 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
8133 ``test_A``, then you must order the tests as follows:
8134 ::
8135
8136 TEST_SUITES = "test_A test_B"
8137
8138 For more information on testing images, see the
8139 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8140 section in the Yocto Project Development Tasks Manual.
8141
Andrew Geisslerf0343792020-11-18 10:42:21 -06008142 :term:`TEST_TARGET`
8143 Specifies the target controller to use when running tests against a
8144 test image. The default controller to use is "qemu":
8145 ::
8146
8147 TEST_TARGET = "qemu"
8148
8149 A target controller is a class that defines how an image gets
8150 deployed on a target and how a target is started. A layer can extend
8151 the controllers by adding a module in the layer's
8152 ``/lib/oeqa/controllers`` directory and by inheriting the
8153 ``BaseTarget`` class, which is an abstract class that cannot be used
8154 as a value of ``TEST_TARGET``.
8155
8156 You can provide the following arguments with ``TEST_TARGET``:
8157
8158 - *"qemu":* Boots a QEMU image and runs the tests. See the
8159 ":ref:`qemu-image-enabling-tests`" section
8160 in the Yocto Project Development Tasks Manual for more
8161 information.
8162
8163 - *"simpleremote":* Runs the tests on target hardware that is
8164 already up and running. The hardware can be on the network or it
8165 can be a device running an image on QEMU. You must also set
8166 :term:`TEST_TARGET_IP` when you use
8167 "simpleremote".
8168
8169 .. note::
8170
8171 This argument is defined in
8172 meta/lib/oeqa/controllers/simpleremote.py
8173 .
8174
8175 For information on running tests on hardware, see the
8176 ":ref:`hardware-image-enabling-tests`"
8177 section in the Yocto Project Development Tasks Manual.
8178
8179 :term:`TEST_TARGET_IP`
8180 The IP address of your hardware under test. The ``TEST_TARGET_IP``
8181 variable has no effect when :term:`TEST_TARGET` is
8182 set to "qemu".
8183
8184 When you specify the IP address, you can also include a port. Here is
8185 an example:
8186 ::
8187
8188 TEST_TARGET_IP = "192.168.1.4:2201"
8189
8190 Specifying a port is
8191 useful when SSH is started on a non-standard port or in cases when
8192 your hardware under test is behind a firewall or network that is not
8193 directly accessible from your host and you need to do port address
8194 translation.
8195
8196 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008197 Automatically runs the series of automated tests for images when an
8198 image is successfully built. Setting ``TESTIMAGE_AUTO`` to "1" causes
8199 any image that successfully builds to automatically boot under QEMU.
8200 Using the variable also adds in dependencies so that any SDK for
8201 which testing is requested is automatically built first.
8202
8203 These tests are written in Python making use of the ``unittest``
8204 module, and the majority of them run commands on the target system
8205 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8206 file in the :term:`Build Directory` to have the
8207 OpenEmbedded build system automatically run these tests after an
8208 image successfully builds:
8209
8210 TESTIMAGE_AUTO = "1"
8211
8212 For more information
8213 on enabling, running, and writing these tests, see the
8214 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8215 section in the Yocto Project Development Tasks Manual and the
8216 ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section.
8217
Andrew Geisslerf0343792020-11-18 10:42:21 -06008218 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008219 The directory in which the file BitBake is currently parsing is
8220 located. Do not manually set this variable.
8221
Andrew Geisslerf0343792020-11-18 10:42:21 -06008222 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008223 The time the build was started. Times appear using the hour, minute,
8224 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8225 seconds past 1400 hours).
8226
Andrew Geisslerf0343792020-11-18 10:42:21 -06008227 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008228 This variable is the base directory the OpenEmbedded build system
8229 uses for all build output and intermediate files (other than the
8230 shared state cache). By default, the ``TMPDIR`` variable points to
8231 ``tmp`` within the :term:`Build Directory`.
8232
8233 If you want to establish this directory in a location other than the
8234 default, you can uncomment and edit the following statement in the
8235 ``conf/local.conf`` file in the :term:`Source Directory`:
8236 ::
8237
8238 #TMPDIR = "${TOPDIR}/tmp"
8239
8240 An example use for this scenario is to set ``TMPDIR`` to a local disk,
8241 which does not use NFS, while having the Build Directory use NFS.
8242
8243 The filesystem used by ``TMPDIR`` must have standard filesystem
8244 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8245 persistent inodes). Due to various issues with NFS and bugs in some
8246 implementations, NFS does not meet this minimum requirement.
8247 Consequently, ``TMPDIR`` cannot be on NFS.
8248
Andrew Geisslerf0343792020-11-18 10:42:21 -06008249 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008250 This variable lists packages the OpenEmbedded build system uses when
8251 building an SDK, which contains a cross-development environment. The
8252 packages specified by this variable are part of the toolchain set
8253 that runs on the :term:`SDKMACHINE`, and each
8254 package should usually have the prefix ``nativesdk-``. For example,
8255 consider the following command when building an SDK:
8256 ::
8257
8258 $ bitbake -c populate_sdk imagename
8259
8260 In this case, a default list of packages is
8261 set in this variable, but you can add additional packages to the
8262 list. See the
8263 ":ref:`sdk-manual/sdk-appendix-customizing-standard:adding individual packages to the standard sdk`" section
8264 in the Yocto Project Application Development and the Extensible
8265 Software Development Kit (eSDK) manual for more information.
8266
8267 For background information on cross-development toolchains in the
8268 Yocto Project development environment, see the
8269 ":ref:`sdk-manual/sdk-intro:the cross-development toolchain`"
8270 section in the Yocto Project Overview and Concepts Manual. For
8271 information on setting up a cross-development environment, see the
8272 :doc:`../sdk-manual/sdk-manual` manual.
8273
Andrew Geisslerf0343792020-11-18 10:42:21 -06008274 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008275 This variable defines the name used for the toolchain output. The
8276 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
8277 the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:
8278 ::
8279
8280 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8281
8282 See
8283 the :term:`SDK_NAME` and
8284 :term:`SDK_VERSION` variables for additional
8285 information.
8286
Andrew Geisslerf0343792020-11-18 10:42:21 -06008287 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008288 This variable lists packages the OpenEmbedded build system uses when
8289 it creates the target part of an SDK (i.e. the part built for the
8290 target hardware), which includes libraries and headers. Use this
8291 variable to add individual packages to the part of the SDK that runs
8292 on the target. See the
8293 ":ref:`sdk-manual/sdk-appendix-customizing-standard:adding individual packages to the standard sdk`" section
8294 in the Yocto Project Application Development and the Extensible
8295 Software Development Kit (eSDK) manual for more information.
8296
8297 For background information on cross-development toolchains in the
8298 Yocto Project development environment, see the
8299 ":ref:`sdk-manual/sdk-intro:the cross-development toolchain`"
8300 section in the Yocto Project Overview and Concepts Manual. For
8301 information on setting up a cross-development environment, see the
8302 :doc:`../sdk-manual/sdk-manual` manual.
8303
Andrew Geisslerf0343792020-11-18 10:42:21 -06008304 :term:`TOPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008305 The top-level :term:`Build Directory`. BitBake
8306 automatically sets this variable when you initialize your build
8307 environment using ````` <#structure-core-script>`__.
8308
Andrew Geisslerf0343792020-11-18 10:42:21 -06008309 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008310 A sanitized version of :term:`TARGET_ARCH`. This
8311 variable is used where the architecture is needed in a value where
8312 underscores are not allowed, for example within package filenames. In
8313 this case, dash characters replace any underscore characters used in
8314 ``TARGET_ARCH``.
8315
8316 Do not edit this variable.
8317
Andrew Geisslerf0343792020-11-18 10:42:21 -06008318 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008319 The GNU canonical architecture for a specific architecture (i.e.
8320 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8321 this value to setup configuration.
8322
8323 ``TUNE_ARCH`` definitions are specific to a given architecture. The
8324 definitions can be a single static definition, or can be dynamically
8325 adjusted. You can see details for a given CPU family by looking at
8326 the architecture's ``README`` file. For example, the
8327 ``meta/conf/machine/include/mips/README`` file in the
8328 :term:`Source Directory` provides information for
8329 ``TUNE_ARCH`` specific to the ``mips`` architecture.
8330
8331 ``TUNE_ARCH`` is tied closely to
8332 :term:`TARGET_ARCH`, which defines the target
8333 machine's architecture. The BitBake configuration file
8334 (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:
8335 ::
8336
8337 TARGET_ARCH = "${TUNE_ARCH}"
8338
8339 The following list, which is by no means complete since architectures
8340 are configurable, shows supported machine architectures:
8341
8342 - arm
8343 - i586
8344 - x86_64
8345 - powerpc
8346 - powerpc64
8347 - mips
8348 - mipsel
8349
Andrew Geisslerf0343792020-11-18 10:42:21 -06008350 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008351 Specifies architecture-specific assembler flags for the target
8352 system. The set of flags is based on the selected tune features.
8353 ``TUNE_ASARGS`` is set using the tune include files, which are
8354 typically under ``meta/conf/machine/include/`` and are influenced
8355 through :term:`TUNE_FEATURES`. For example, the
8356 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8357 for the x86 architecture as follows:
8358 ::
8359
8360 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8361
8362 .. note::
8363
8364 Board Support Packages (BSPs) select the tune. The selected tune,
8365 in turn, affects the tune variables themselves (i.e. the tune can
8366 supply its own set of flags).
8367
Andrew Geisslerf0343792020-11-18 10:42:21 -06008368 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008369 Specifies architecture-specific C compiler flags for the target
8370 system. The set of flags is based on the selected tune features.
8371 ``TUNE_CCARGS`` is set using the tune include files, which are
8372 typically under ``meta/conf/machine/include/`` and are influenced
8373 through :term:`TUNE_FEATURES`.
8374
8375 .. note::
8376
8377 Board Support Packages (BSPs) select the tune. The selected tune,
8378 in turn, affects the tune variables themselves (i.e. the tune can
8379 supply its own set of flags).
8380
Andrew Geisslerf0343792020-11-18 10:42:21 -06008381 :term:`TUNE_FEATURES`
8382 Features used to "tune" a compiler for optimal use given a specific
8383 processor. The features are defined within the tune files and allow
8384 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8385 the features.
8386
8387 The OpenEmbedded build system verifies the features to be sure they
8388 are not conflicting and that they are supported.
8389
8390 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
8391 ``TUNE_FEATURES`` as follows:
8392 ::
8393
8394 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
8395
8396 See the :term:`DEFAULTTUNE` variable for more information.
8397
8398 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008399 Specifies architecture-specific linker flags for the target system.
8400 The set of flags is based on the selected tune features.
8401 ``TUNE_LDARGS`` is set using the tune include files, which are
8402 typically under ``meta/conf/machine/include/`` and are influenced
8403 through :term:`TUNE_FEATURES`. For example, the
8404 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8405 for the x86 architecture as follows:
8406 ::
8407
8408 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8409
8410 .. note::
8411
8412 Board Support Packages (BSPs) select the tune. The selected tune,
8413 in turn, affects the tune variables themselves (i.e. the tune can
8414 supply its own set of flags).
8415
Andrew Geisslerf0343792020-11-18 10:42:21 -06008416 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008417 The package architecture understood by the packaging system to define
8418 the architecture, ABI, and tuning of output packages. The specific
8419 tune is defined using the "_tune" override as follows:
8420 ::
8421
8422 TUNE_PKGARCH_tune-tune = "tune"
8423
8424 These tune-specific package architectures are defined in the machine
8425 include files. Here is an example of the "core2-32" tuning as used in
8426 the ``meta/conf/machine/include/tune-core2.inc`` file:
8427 ::
8428
8429 TUNE_PKGARCH_tune-core2-32 = "core2-32"
8430
Andrew Geisslerf0343792020-11-18 10:42:21 -06008431 :term:`TUNEABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008432 An underlying Application Binary Interface (ABI) used by a particular
8433 tuning in a given toolchain layer. Providers that use prebuilt
8434 libraries can use the ``TUNEABI``,
8435 :term:`TUNEABI_OVERRIDE`, and
8436 :term:`TUNEABI_WHITELIST` variables to check
8437 compatibility of tunings against their selection of libraries.
8438
8439 If ``TUNEABI`` is undefined, then every tuning is allowed. See the
8440 :ref:`sanity <ref-classes-sanity>` class to see how the variable is
8441 used.
8442
Andrew Geisslerf0343792020-11-18 10:42:21 -06008443 :term:`TUNEABI_OVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008444 If set, the OpenEmbedded system ignores the
8445 :term:`TUNEABI_WHITELIST` variable.
8446 Providers that use prebuilt libraries can use the
8447 ``TUNEABI_OVERRIDE``, ``TUNEABI_WHITELIST``, and
8448 :term:`TUNEABI` variables to check compatibility of a
8449 tuning against their selection of libraries.
8450
8451 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8452 variable is used.
8453
Andrew Geisslerf0343792020-11-18 10:42:21 -06008454 :term:`TUNEABI_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008455 A whitelist of permissible :term:`TUNEABI` values. If
8456 ``TUNEABI_WHITELIST`` is not set, all tunes are allowed. Providers
8457 that use prebuilt libraries can use the ``TUNEABI_WHITELIST``,
8458 :term:`TUNEABI_OVERRIDE`, and ``TUNEABI``
8459 variables to check compatibility of a tuning against their selection
8460 of libraries.
8461
8462 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8463 variable is used.
8464
Andrew Geisslerf0343792020-11-18 10:42:21 -06008465 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008466 Specifies CPU or Application Binary Interface (ABI) tuning features
8467 that conflict with feature.
8468
8469 Known tuning conflicts are specified in the machine include files in
8470 the :term:`Source Directory`. Here is an example from
8471 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8472 that lists the "o32" and "n64" features as conflicting with the "n32"
8473 feature:
8474 ::
8475
8476 TUNECONFLICTS[n32] = "o32 n64"
8477
Andrew Geisslerf0343792020-11-18 10:42:21 -06008478 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008479 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8480 feature. The specified feature is stored as a flag. Valid features
8481 are specified in the machine include files (e.g.
8482 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
8483 from that file:
8484 ::
8485
8486 TUNEVALID[bigendian] = "Enable big-endian mode."
8487
8488 See the machine include files in the :term:`Source Directory`
8489 for these features.
8490
Andrew Geisslerf0343792020-11-18 10:42:21 -06008491 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008492 Configures the :term:`UBOOT_MACHINE` and can
8493 also define :term:`IMAGE_FSTYPES` for individual
8494 cases.
8495
8496 Following is an example from the ``meta-fsl-arm`` layer. ::
8497
8498 UBOOT_CONFIG ??= "sd"
8499 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8500 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8501 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8502 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8503
8504 In this example, "sd" is selected as the configuration of the possible four for the
8505 ``UBOOT_MACHINE``. The "sd" configuration defines
8506 "mx6qsabreauto_config" as the value for ``UBOOT_MACHINE``, while the
8507 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-boot image.
8508
8509 For more information on how the ``UBOOT_CONFIG`` is handled, see the
8510 :ref:`uboot-config <ref-classes-uboot-config>`
8511 class.
8512
Andrew Geisslerf0343792020-11-18 10:42:21 -06008513 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008514 Specifies the load address for the dtb image used by U-boot. During FIT
8515 image creation, the ``UBOOT_DTB_LOADADDRESS`` variable is used in
8516 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8517 the load address to be used in
8518 creating the dtb sections of Image Tree Source for the FIT image.
8519
Andrew Geisslerf0343792020-11-18 10:42:21 -06008520 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008521 Specifies the load address for the dtbo image used by U-boot. During FIT
8522 image creation, the ``UBOOT_DTBO_LOADADDRESS`` variable is used in
8523 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8524 creating the dtbo sections of Image Tree Source for the FIT image.
8525
Andrew Geisslerf0343792020-11-18 10:42:21 -06008526 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008527 Specifies the entry point for the U-Boot image. During U-Boot image
8528 creation, the ``UBOOT_ENTRYPOINT`` variable is passed as a
8529 command-line parameter to the ``uboot-mkimage`` utility.
8530
Andrew Geisslerf0343792020-11-18 10:42:21 -06008531 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008532 Specifies the load address for the U-Boot image. During U-Boot image
8533 creation, the ``UBOOT_LOADADDRESS`` variable is passed as a
8534 command-line parameter to the ``uboot-mkimage`` utility.
8535
Andrew Geisslerf0343792020-11-18 10:42:21 -06008536 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008537 Appends a string to the name of the local version of the U-Boot
8538 image. For example, assuming the version of the U-Boot image built
8539 was "2013.10", the full version string reported by U-Boot would be
8540 "2013.10-yocto" given the following statement:
8541 ::
8542
8543 UBOOT_LOCALVERSION = "-yocto"
8544
Andrew Geisslerf0343792020-11-18 10:42:21 -06008545 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008546 Specifies the value passed on the ``make`` command line when building
8547 a U-Boot image. The value indicates the target platform
8548 configuration. You typically set this variable from the machine
8549 configuration file (i.e. ``conf/machine/machine_name.conf``).
8550
8551 Please see the "Selection of Processor Architecture and Board Type"
8552 section in the U-Boot README for valid values for this variable.
8553
Andrew Geisslerf0343792020-11-18 10:42:21 -06008554 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008555 Specifies the target called in the ``Makefile``. The default target
8556 is "all".
8557
Andrew Geisslerf0343792020-11-18 10:42:21 -06008558 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008559 Options for the device tree compiler passed to mkimage '-D'
8560 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
8561
Andrew Geisslerf0343792020-11-18 10:42:21 -06008562 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008563 Specifies the entrypoint for the RAM disk image.
8564 During FIT image creation, the
8565 ``UBOOT_RD_ENTRYPOINT`` variable is used
8566 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8567 entrypoint to be used in creating the Image Tree Source for
8568 the FIT image.
8569
Andrew Geisslerf0343792020-11-18 10:42:21 -06008570 :term:`UBOOT_RD_LOADADDRESS`
8571 Specifies the load address for the RAM disk image.
8572 During FIT image creation, the
8573 ``UBOOT_RD_LOADADDRESS`` variable is used
8574 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8575 load address to be used in creating the Image Tree Source for
8576 the FIT image.
8577
8578 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008579 Enable signing of FIT image. The default value is "0".
8580
Andrew Geisslerf0343792020-11-18 10:42:21 -06008581 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008582 Location of the directory containing the RSA key and
8583 certificate used for signing FIT image.
8584
Andrew Geisslerf0343792020-11-18 10:42:21 -06008585 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008586 The name of keys used for signing U-boot FIT image stored in
8587 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8588 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8589 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8590
Andrew Geisslerf0343792020-11-18 10:42:21 -06008591 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008592 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8593 has a ``.sb`` extension.
8594
8595 The default U-Boot extension is ``.bin``
8596
Andrew Geisslerf0343792020-11-18 10:42:21 -06008597 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008598 Specifies the target used for building U-Boot. The target is passed
8599 directly as part of the "make" command (e.g. SPL and AIS). If you do
8600 not specifically set this variable, the OpenEmbedded build process
8601 passes and uses "all" for the target during the U-Boot building
8602 process.
8603
Andrew Geisslerf0343792020-11-18 10:42:21 -06008604 :term:`UNKNOWN_CONFIGURE_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008605 Specifies a list of options that, if reported by the configure script
8606 as being invalid, should not generate a warning during the
8607 :ref:`ref-tasks-configure` task. Normally, invalid
8608 configure options are simply not passed to the configure script (e.g.
8609 should be removed from :term:`EXTRA_OECONF` or
8610 :term:`PACKAGECONFIG_CONFARGS`).
8611 However, common options, for example, exist that are passed to all
8612 configure scripts at a class level that might not be valid for some
8613 configure scripts. It follows that no benefit exists in seeing a
8614 warning about these options. For these cases, the options are added
8615 to ``UNKNOWN_CONFIGURE_WHITELIST``.
8616
8617 The configure arguments check that uses
8618 ``UNKNOWN_CONFIGURE_WHITELIST`` is part of the
8619 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8620 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8621
Andrew Geisslerf0343792020-11-18 10:42:21 -06008622 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008623 For recipes inheriting the
8624 :ref:`update-rc.d <ref-classes-update-rc.d>` class, ``UPDATERCPN``
8625 specifies the package that contains the initscript that is enabled.
8626
8627 The default value is "${PN}". Given that almost all recipes that
8628 install initscripts package them in the main package for the recipe,
8629 you rarely need to set this variable in individual recipes.
8630
Andrew Geisslerf0343792020-11-18 10:42:21 -06008631 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008632 You can perform a per-recipe check for what the latest upstream
8633 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8634 the recipe source code is provided from Git repositories, the
8635 OpenEmbedded build system determines the latest upstream version by
8636 picking the latest tag from the list of all repository tags.
8637
8638 You can use the ``UPSTREAM_CHECK_GITTAGREGEX`` variable to provide a
8639 regular expression to filter only the relevant tags should the
8640 default filter not work correctly.
8641 ::
8642
8643 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8644
Andrew Geisslerf0343792020-11-18 10:42:21 -06008645 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008646 Use the ``UPSTREAM_CHECK_REGEX`` variable to specify a different
8647 regular expression instead of the default one when the package
8648 checking system is parsing the page found using
8649 :term:`UPSTREAM_CHECK_URI`.
8650 ::
8651
8652 UPSTREAM_CHECK_REGEX = "package_regex"
8653
Andrew Geisslerf0343792020-11-18 10:42:21 -06008654 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008655 You can perform a per-recipe check for what the latest upstream
8656 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8657 the source code is provided from tarballs, the latest version is
8658 determined by fetching the directory listing where the tarball is and
8659 attempting to find a later tarball. When this approach does not work,
8660 you can use ``UPSTREAM_CHECK_URI`` to provide a different URI that
8661 contains the link to the latest tarball.
8662 ::
8663
8664 UPSTREAM_CHECK_URI = "recipe_url"
8665
Andrew Geisslerf0343792020-11-18 10:42:21 -06008666 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008667 Determines if ``devtmpfs`` is used for ``/dev`` population. The
8668 default value used for ``USE_DEVFS`` is "1" when no value is
8669 specifically set. Typically, you would set ``USE_DEVFS`` to "0" for a
8670 statically populated ``/dev`` directory.
8671
8672 See the ":ref:`selecting-dev-manager`" section in
8673 the Yocto Project Development Tasks Manual for information on how to
8674 use this variable.
8675
Andrew Geisslerf0343792020-11-18 10:42:21 -06008676 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008677 When using
8678 :ref:`SysVinit <new-recipe-enabling-system-services>`,
8679 determines whether or not to run a
8680 `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
8681 virtual terminals in order to enable logging in through those
8682 terminals.
8683
8684 The default value used for ``USE_VT`` is "1" when no default value is
8685 specifically set. Typically, you would set ``USE_VT`` to "0" in the
8686 machine configuration file for machines that do not have a graphical
8687 display attached and therefore do not need virtual terminal
8688 functionality.
8689
Andrew Geisslerf0343792020-11-18 10:42:21 -06008690 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008691 A list of classes to globally inherit. These classes are used by the
8692 OpenEmbedded build system to enable extra features (e.g.
8693 ``buildstats``, ``image-mklibs``, and so forth).
8694
8695 The default list is set in your ``local.conf`` file:
8696 ::
8697
8698 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
8699
8700 For more information, see
8701 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8702
Andrew Geisslerf0343792020-11-18 10:42:21 -06008703 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008704 If set to ``error``, forces the OpenEmbedded build system to produce
8705 an error if the user identification (``uid``) and group
8706 identification (``gid``) values are not defined in any of the files
8707 listed in :term:`USERADD_UID_TABLES` and
8708 :term:`USERADD_GID_TABLES`. If set to
8709 ``warn``, a warning will be issued instead.
8710
8711 The default behavior for the build system is to dynamically apply
8712 ``uid`` and ``gid`` values. Consequently, the
8713 ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan
8714 on using statically assigned ``gid`` and ``uid`` values, you should
8715 set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf``
8716 file as follows:
8717 ::
8718
8719 USERADD_ERROR_DYNAMIC = "error"
8720
8721 Overriding the
8722 default behavior implies you are going to also take steps to set
8723 static ``uid`` and ``gid`` values through use of the
8724 :term:`USERADDEXTENSION`,
8725 :term:`USERADD_UID_TABLES`, and
8726 :term:`USERADD_GID_TABLES` variables.
8727
8728 .. note::
8729
8730 There is a difference in behavior between setting
8731 USERADD_ERROR_DYNAMIC
8732 to
8733 error
8734 and setting it to
8735 warn
8736 . When it is set to
8737 warn
8738 , the build system will report a warning for every undefined
8739 uid
8740 and
8741 gid
8742 in any recipe. But when it is set to
8743 error
8744 , it will only report errors for recipes that are actually built.
8745 This saves you from having to add static IDs for recipes that you
8746 know will never be built.
8747
Andrew Geisslerf0343792020-11-18 10:42:21 -06008748 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008749 Specifies a password file to use for obtaining static group
8750 identification (``gid``) values when the OpenEmbedded build system
8751 adds a group to the system during package installation.
8752
8753 When applying static group identification (``gid``) values, the
8754 OpenEmbedded build system looks in :term:`BBPATH` for a
8755 ``files/group`` file and then applies those ``uid`` values. Set the
8756 variable as follows in your ``local.conf`` file:
8757 ::
8758
8759
8760 USERADD_GID_TABLES = "files/group"
8761
8762 .. note::
8763
8764 Setting the
8765 USERADDEXTENSION
8766 variable to "useradd-staticids" causes the build system to use
8767 static
8768 gid
8769 values.
8770
Andrew Geisslerf0343792020-11-18 10:42:21 -06008771 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008772 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8773 this variable specifies the individual packages within the recipe
8774 that require users and/or groups to be added.
8775
8776 You must set this variable if the recipe inherits the class. For
8777 example, the following enables adding a user for the main package in
8778 a recipe:
8779 ::
8780
8781 USERADD_PACKAGES = "${PN}"
8782
8783 .. note::
8784
8785 It follows that if you are going to use the
8786 USERADD_PACKAGES
8787 variable, you need to set one or more of the
8788 USERADD_PARAM
8789 ,
8790 GROUPADD_PARAM
8791 , or
8792 GROUPMEMS_PARAM
8793 variables.
8794
Andrew Geisslerf0343792020-11-18 10:42:21 -06008795 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008796 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8797 this variable specifies for a package what parameters should pass to
8798 the ``useradd`` command if you add a user to the system when the
8799 package is installed.
8800
8801 Here is an example from the ``dbus`` recipe:
8802 ::
8803
8804 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
8805 --no-create-home --shell /bin/false \
8806 --user-group messagebus"
8807
8808 For information on the
8809 standard Linux shell command ``useradd``, see
8810 http://linux.die.net/man/8/useradd.
8811
Andrew Geisslerf0343792020-11-18 10:42:21 -06008812 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008813 Specifies a password file to use for obtaining static user
8814 identification (``uid``) values when the OpenEmbedded build system
8815 adds a user to the system during package installation.
8816
8817 When applying static user identification (``uid``) values, the
8818 OpenEmbedded build system looks in :term:`BBPATH` for a
8819 ``files/passwd`` file and then applies those ``uid`` values. Set the
8820 variable as follows in your ``local.conf`` file:
8821 ::
8822
8823 USERADD_UID_TABLES = "files/passwd"
8824
8825 .. note::
8826
8827 Setting the
8828 USERADDEXTENSION
8829 variable to "useradd-staticids" causes the build system to use
8830 static
8831 uid
8832 values.
8833
Andrew Geisslerf0343792020-11-18 10:42:21 -06008834 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008835 When set to "useradd-staticids", causes the OpenEmbedded build system
8836 to base all user and group additions on a static ``passwd`` and
8837 ``group`` files found in :term:`BBPATH`.
8838
8839 To use static user identification (``uid``) and group identification
8840 (``gid``) values, set the variable as follows in your ``local.conf``
8841 file: USERADDEXTENSION = "useradd-staticids"
8842
8843 .. note::
8844
8845 Setting this variable to use static
8846 uid
8847 and
8848 gid
8849 values causes the OpenEmbedded build system to employ the
8850 useradd-staticids
8851 class.
8852
8853 If you use static ``uid`` and ``gid`` information, you must also
8854 specify the ``files/passwd`` and ``files/group`` files by setting the
8855 :term:`USERADD_UID_TABLES` and
8856 :term:`USERADD_GID_TABLES` variables.
8857 Additionally, you should also set the
8858 :term:`USERADD_ERROR_DYNAMIC` variable.
8859
Andrew Geisslerf0343792020-11-18 10:42:21 -06008860 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008861 Specifies the persistence of the target's ``/var/log`` directory,
8862 which is used to house postinstall target log files.
8863
8864 By default, ``VOLATILE_LOG_DIR`` is set to "yes", which means the
8865 file is not persistent. You can override this setting by setting the
8866 variable to "no" to make the log directory persistent.
8867
Andrew Geisslerf0343792020-11-18 10:42:21 -06008868 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008869 Specifies the quality assurance checks whose failures are reported as
8870 warnings by the OpenEmbedded build system. You set this variable in
8871 your distribution configuration file. For a list of the checks you
8872 can control with this variable, see the
8873 ":ref:`insane.bbclass <ref-classes-insane>`" section.
8874
Andrew Geisslerf0343792020-11-18 10:42:21 -06008875 :term:`WKS_FILE`
8876 Specifies the location of the Wic kickstart file that is used by the
8877 OpenEmbedded build system to create a partitioned image
8878 (image\ ``.wic``). For information on how to create a partitioned
8879 image, see the
8880 ":ref:`dev-manual/dev-manual-common-tasks:creating partitioned images using wic`"
8881 section in the Yocto Project Development Tasks Manual. For details on
8882 the kickstart file format, see the ":doc:`../ref-manual/ref-kickstart`" Chapter.
8883
8884 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008885 When placed in the recipe that builds your image, this variable lists
8886 build-time dependencies. The ``WKS_FILE_DEPENDS`` variable is only
8887 applicable when Wic images are active (i.e. when
8888 :term:`IMAGE_FSTYPES` contains entries related
8889 to Wic). If your recipe does not create Wic images, the variable has
8890 no effect.
8891
8892 The ``WKS_FILE_DEPENDS`` variable is similar to the
8893 :term:`DEPENDS` variable. When you use the variable in
8894 your recipe that builds the Wic image, dependencies you list in the
8895 ``WIC_FILE_DEPENDS`` variable are added to the ``DEPENDS`` variable.
8896
8897 With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to
8898 specify a list of additional dependencies (e.g. native tools,
8899 bootloaders, and so forth), that are required to build Wic images.
8900 Following is an example:
8901 ::
8902
8903 WKS_FILE_DEPENDS = "some-native-tool"
8904
8905 In the
8906 previous example, some-native-tool would be replaced with an actual
8907 native tool on which the build would depend.
8908
Andrew Geisslerf0343792020-11-18 10:42:21 -06008909 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008910 The pathname of the work directory in which the OpenEmbedded build
8911 system builds a recipe. This directory is located within the
8912 :term:`TMPDIR` directory structure and is specific to
8913 the recipe being built and the system for which it is being built.
8914
8915 The ``WORKDIR`` directory is defined as follows:
8916 ::
8917
8918 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8919
8920 The actual directory depends on several things:
8921
8922 - TMPDIR
8923 : The top-level build output directory
8924 - MULTIMACH_TARGET_SYS
8925 : The target system identifier
8926 - PN
8927 : The recipe name
8928 - EXTENDPE
8929 : The epoch - (if
8930 PE
8931 is not specified, which is usually the case for most recipes, then
8932 EXTENDPE
8933 is blank)
8934 - PV
8935 : The recipe version
8936 - PR
8937 : The recipe revision
8938
8939 As an example, assume a Source Directory top-level folder name
8940 ``poky``, a default Build Directory at ``poky/build``, and a
8941 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8942 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8943 directory the build system uses to build the package would be as
8944 follows:
8945 ::
8946
8947 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8948
Andrew Geisslerf0343792020-11-18 10:42:21 -06008949 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008950 Specifies the packages that should be installed to provide an X
8951 server and drivers for the current machine, assuming your image
8952 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8953 indirectly, includes "x11-base" in
8954 :term:`IMAGE_FEATURES`.
8955
8956 The default value of ``XSERVER``, if not specified in the machine
8957 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8958