blob: 625a37c15873abc7a3205eb40e55722ba507db86 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001.. SPDX-License-Identifier: CC-BY-2.0-UK
2
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
10`A <#var-ABIEXTENSION>`__ :term:`B` `C <#var-CACHE>`__
11:term:`D` `E <#var-EFI_PROVIDER>`__ `F <#var-FEATURE_PACKAGES>`__
12`G <#var-GCCPIE>`__ `H <#var-HOMEPAGE>`__ `I <#var-ICECC_DISABLED>`__
13`K <#var-KARCH>`__ `L <#var-LABELS>`__ `M <#var-MACHINE>`__
14`N <#var-NATIVELSBSTRING>`__ `O <#var-OBJCOPY>`__ :term:`P`
15`R <#var-RANLIB>`__ :term:`S` :term:`T`
16`U <#var-UBOOT_CONFIG>`__ `V <#var-VOLATILE_LOG_DIR>`__
17`W <#var-WARN_QA>`__ `X <#var-XSERVER>`__
18
19.. glossary::
20
21 ABIEXTENSION
22 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
32 ALLOW_EMPTY
33 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
47 ALTERNATIVE
48 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
66 ALTERNATIVE_LINK_NAME
67 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
87 ALTERNATIVE_PRIORITY
88 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
104 ALTERNATIVE_TARGET
105 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
135 APPEND
136 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
142 AR
143 The minimal command and arguments used to run ``ar``.
144
145 ARCHIVER_MODE
146 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
165 AS
166 Minimal command and arguments needed to run the assembler.
167
168 ASSUME_PROVIDED
169 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
178 ASSUME_SHLIBS
179 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
195 AUTHOR
196 The email address used to contact the original author or authors in
197 order to send patches and forward bugs.
198
199 AUTO_LIBNAME_PKGS
200 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
208 AUTO_SYSLINUXMENU
209 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
213 AUTOREV
214 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
233 AVAILABLE_LICENSES
234 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
250 AVAILTUNES
251 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
267 B
268 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
281 BAD_RECOMMENDATIONS
282 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
311 BASE_LIB
312 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
322 BASE_WORKDIR
323 Points to the base of the work directory for all recipes. The default
324 value is "${TMPDIR}/work".
325
326 BB_ALLOWED_NETWORKS
327 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
365 BB_DANGLINGAPPENDS_WARNONLY
366 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
384 BB_DISKMON_DIRS
385 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
456 BB_DISKMON_WARNINTERVAL
457 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
506 BB_GENERATE_MIRROR_TARBALLS
507 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
525 BB_NUMBER_THREADS
526 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
543 BB_SERVER_TIMEOUT
544 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
557 BBCLASSEXTEND
558 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
588 BBFILE_COLLECTIONS
589 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
593 BBFILE_PATTERN
594 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
599 BBFILE_PRIORITY
600 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
626 BBFILES
627 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
635 BBFILES_DYNAMIC
636 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
662 BBINCLUDELOGS
663 Variable that controls how BitBake displays logs on build failure.
664
665 BBINCLUDELOGS_LINES
666 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
671 BBLAYERS
672 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
686 BBMASK
687 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
699 documentation at http://docs.python.org/3/library/re.html#re.
700
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
723 BBMULTICONFIG
724 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
743 BBPATH
744 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
762 BBSERVER
763 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
777 BINCONFIG
778 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
792 BINCONFIG_GLOB
793 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
819 BP
820 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
827 BPN
828 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
836 BUGTRACKER
837 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
842 BUILD_ARCH
843 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
847 BUILD_AS_ARCH
848 Specifies the architecture-specific assembler flags for the build
849 host. By default, the value of ``BUILD_AS_ARCH`` is empty.
850
851 BUILD_CC_ARCH
852 Specifies the architecture-specific C compiler flags for the build
853 host. By default, the value of ``BUILD_CC_ARCH`` is empty.
854
855 BUILD_CCLD
856 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
862 BUILD_CFLAGS
863 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
868 BUILD_CPPFLAGS
869 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
874 BUILD_CXXFLAGS
875 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
880 BUILD_FC
881 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
886 BUILD_LD
887 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
892 BUILD_LD_ARCH
893 Specifies architecture-specific linker flags for the build host. By
894 default, the value of ``BUILD_LD_ARCH`` is empty.
895
896 BUILD_LDFLAGS
897 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
902 BUILD_OPTIMIZATION
903 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
911 BUILD_OS
912 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
917 BUILD_PREFIX
918 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
923 BUILD_STRIP
924 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
929 BUILD_SYS
930 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
940 BUILD_VENDOR
941 Specifies the vendor name to use when building for the build host.
942 The default value is an empty string ("").
943
944 BUILDDIR
945 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
952 BUILDHISTORY_COMMIT
953 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
968 BUILDHISTORY_COMMIT_AUTHOR
969 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
985 BUILDHISTORY_DIR
986 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
996 BUILDHISTORY_FEATURES
997 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
1025 BUILDHISTORY_IMAGE_FILES
1026 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
1042 BUILDHISTORY_PUSH_REPO
1043 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
1060 BUILDSDK_CFLAGS
1061 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
1066 BUILDSDK_CPPFLAGS
1067 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
1072 BUILDSDK_CXXFLAGS
1073 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
1078 BUILDSDK_LDFLAGS
1079 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
1084 BUILDSTATS_BASE
1085 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
1091 BUSYBOX_SPLIT_SUID
1092 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
1101 CACHE
1102 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
1106 CC
1107 The minimal command and arguments used to run the C compiler.
1108
1109 CFLAGS
1110 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
1126 CLASSOVERRIDE
1127 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
1161 CLEANBROKEN
1162 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
1168 COMBINED_FEATURES
1169 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
1178 COMMON_LICENSE_DIR
1179 Points to ``meta/files/common-licenses`` in the
1180 :term:`Source Directory`, which is where generic license
1181 files reside.
1182
1183 COMPATIBLE_HOST
1184 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
1194 COMPATIBLE_MACHINE
1195 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
1204 COMPLEMENTARY_GLOB
1205 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
1233 COMPONENTS_DIR
1234 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
1243 CONF_VERSION
1244 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
1248 CONFFILES
1249 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
1294 CONFIG_INITRAMFS_SOURCE
1295 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
1315 CONFIG_SITE
1316 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
1320 CONFIGURE_FLAGS
1321 The minimal arguments for GNU configure.
1322
1323 CONFLICT_DISTRO_FEATURES
1324 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
1332 COPYLEFT_LICENSE_EXCLUDE
1333 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
1353 COPYLEFT_LICENSE_INCLUDE
1354 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
1365 COPYLEFT_PN_EXCLUDE
1366 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
1379 COPYLEFT_PN_INCLUDE
1380 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
1393 COPYLEFT_RECIPE_TYPES
1394 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
1403 COPY_LIC_DIRS
1404 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
1424 COPY_LIC_MANIFEST
1425 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
1443 CORE_IMAGE_EXTRA_INSTALL
1444 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
1451 COREBASE
1452 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
1462 COREBASE_FILES
1463 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
1475 CPP
1476 The minimal command and arguments used to run the C preprocessor.
1477
1478 CPPFLAGS
1479 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
1496 CROSS_COMPILE
1497 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
1508 CVSDIR
1509 The directory in which files checked out under the CVS system are
1510 stored.
1511
1512 CXX
1513 The minimal command and arguments used to run the C++ compiler.
1514
1515 CXXFLAGS
1516 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
1532 D
1533 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
1547 DATE
1548 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
1551 DATETIME
1552 The date and time on which the current build started. The format is
1553 suitable for timestamps.
1554
1555 DEBIAN_NOAUTONAME
1556 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
1565 DEBIANNAME
1566 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
1576 DEBUG_BUILD
1577 Specifies to build packages with debugging information. This
1578 influences the value of the ``SELECTED_OPTIMIZATION`` variable.
1579
1580 DEBUG_OPTIMIZATION
1581 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
1585 DEFAULT_PREFERENCE
1586 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
1603 DEFAULTTUNE
1604 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
1614 DEPENDS
1615 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
1689 DEPLOY_DIR
1690 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
1704 DEPLOY_DIR_DEB
1705 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
1726 DEPLOY_DIR_IMAGE
1727 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
1741 DEPLOY_DIR_IPK
1742 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
1762 DEPLOY_DIR_RPM
1763 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
1783 DEPLOY_DIR_TAR
1784 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
1804 DEPLOYDIR
1805 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
1817 DESCRIPTION
1818 The package description used by package managers. If not set,
1819 ``DESCRIPTION`` takes the value of the :term:`SUMMARY`
1820 variable.
1821
1822 DISTRO
1823 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
1854 DISTRO_CODENAME
1855 Specifies a codename for the distribution being built.
1856
1857 DISTRO_EXTRA_RDEPENDS
1858 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
1865 DISTRO_EXTRA_RRECOMMENDS
1866 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
1871 DISTRO_FEATURES
1872 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
1890 DISTRO_FEATURES_BACKFILL
1891 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
1901 DISTRO_FEATURES_BACKFILL_CONSIDERED
1902 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
1907 DISTRO_FEATURES_DEFAULT
1908 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
1921 DISTRO_FEATURES_FILTER_NATIVE
1922 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
1929 DISTRO_FEATURES_FILTER_NATIVESDK
1930 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
1937 DISTRO_FEATURES_NATIVE
1938 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
1945 DISTRO_FEATURES_NATIVESDK
1946 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
1953 DISTRO_NAME
1954 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
1983 DISTRO_VERSION
1984 The version of the distribution.
1985
1986 DISTROOVERRIDES
1987 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
1998 DL_DIR
1999 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
2037 DOC_COMPRESS
2038 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
2047 EFI_PROVIDER
2048 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
2057 ENABLE_BINARY_LOCALE_GENERATION
2058 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
2062 ERR_REPORT_DIR
2063 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
2078 ERROR_QA
2079 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
2085 EXCLUDE_FROM_SHLIBS
2086 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
2109 EXCLUDE_FROM_WORLD
2110 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
2128 EXTENDPE
2129 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
2138 EXTENDPKGV
2139 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
2150 EXTERNAL_KERNEL_TOOLS
2151 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
2161 EXTERNALSRC
2162 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
2174 EXTERNALSRC_BUILD
2175 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
2188 EXTRA_AUTORECONF
2189 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
2196 EXTRA_IMAGE_FEATURES
2197 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
2240 EXTRA_IMAGECMD
2241 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
2249 EXTRA_IMAGEDEPENDS
2250 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
2264 EXTRANATIVEPATH
2265 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
2275 EXTRA_OECMAKE
2276 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2277 :ref:`cmake <ref-classes-cmake>` class for additional information.
2278
2279 EXTRA_OECONF
2280 Additional ``configure`` script options. See
2281 :term:`PACKAGECONFIG_CONFARGS` for
2282 additional information on passing configure script options.
2283
2284 EXTRA_OEMAKE
2285 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
2294 EXTRA_OESCONS
2295 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
2299 EXTRA_USERS_PARAMS
2300 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
2321 FEATURE_PACKAGES
2322 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
2343 FEED_DEPLOYDIR_BASE_URI
2344 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
2361 FILES
2362 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
2398 FILES_SOLIBSDEV
2399 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
2410 FILESEXTRAPATHS
2411 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
2482 FILESOVERRIDES
2483 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
2506 FILESPATH
2507 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
2565 FILESYSTEM_PERMS_TABLES
2566 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
2588 FIT_HASH_ALG
2589 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2590
2591 FIT_SIGN_ALG
2592 Specifies the signature algorithm used in creating the FIT Image.
2593 For e.g. rsa2048.
2594
2595 FONT_EXTRA_RDEPENDS
2596 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2597 this variable specifies the runtime dependencies for font packages.
2598 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils".
2599
2600 FONT_PACKAGES
2601 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2602 this variable identifies packages containing font files that need to
2603 be cached by Fontconfig. By default, the ``fontcache`` class assumes
2604 that fonts are in the recipe's main package (i.e.
2605 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2606 need are in a package other than that main package.
2607
2608 FORCE_RO_REMOVE
2609 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2610 during the generation of the root filesystem.
2611
2612 Set the variable to "1" to force the removal of these packages.
2613
2614 FULL_OPTIMIZATION
2615 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
2616 compiling an optimized system. This variable defaults to "-O2 -pipe
2617 ${DEBUG_FLAGS}".
2618
2619 GCCPIE
2620 Enables Position Independent Executables (PIE) within the GNU C
2621 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2622 Programming (ROP) attacks much more difficult to execute.
2623
2624 By default the ``security_flags.inc`` file enables PIE by setting the
2625 variable as follows:
2626 ::
2627
2628 GCCPIE ?= "--enable-default-pie"
2629
2630 GCCVERSION
2631 Specifies the default version of the GNU C Compiler (GCC) used for
2632 compilation. By default, ``GCCVERSION`` is set to "8.x" in the
2633 ``meta/conf/distro/include/tcmode-default.inc`` include file:
2634 ::
2635
2636 GCCVERSION ?= "8.%"
2637
2638 You can override this value by setting it in a
2639 configuration file such as the ``local.conf``.
2640
2641 GDB
2642 The minimal command and arguments to run the GNU Debugger.
2643
2644 GITDIR
2645 The directory in which a local copy of a Git repository is stored
2646 when it is cloned.
2647
2648 GLIBC_GENERATE_LOCALES
2649 Specifies the list of GLIBC locales to generate should you not wish
2650 to generate all LIBC locals, which can be time consuming.
2651
2652 .. note::
2653
2654 If you specifically remove the locale
2655 en_US.UTF-8
2656 , you must set
2657 IMAGE_LINGUAS
2658 appropriately.
2659
2660 You can set ``GLIBC_GENERATE_LOCALES`` in your ``local.conf`` file.
2661 By default, all locales are generated.
2662 ::
2663
2664 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2665
2666 GROUPADD_PARAM
2667 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2668 this variable specifies for a package what parameters should be
2669 passed to the ``groupadd`` command if you wish to add a group to the
2670 system when the package is installed.
2671
2672 Here is an example from the ``dbus`` recipe:
2673 ::
2674
2675 GROUPADD_PARAM_${PN} = "-r netdev"
2676
2677 For information on the standard Linux shell command
2678 ``groupadd``, see http://linux.die.net/man/8/groupadd.
2679
2680 GROUPMEMS_PARAM
2681 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2682 this variable specifies for a package what parameters should be
2683 passed to the ``groupmems`` command if you wish to modify the members
2684 of a group when the package is installed.
2685
2686 For information on the standard Linux shell command ``groupmems``,
2687 see http://linux.die.net/man/8/groupmems.
2688
2689 GRUB_GFXSERIAL
2690 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2691 and serial in the boot menu. Set this variable to "1" in your
2692 ``local.conf`` or distribution configuration file to enable graphics
2693 and serial in the menu.
2694
2695 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2696 information on how this variable is used.
2697
2698 GRUB_OPTS
2699 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2700 configuration. Use a semi-colon character (``;``) to separate
2701 multiple options.
2702
2703 The ``GRUB_OPTS`` variable is optional. See the
2704 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2705 on how this variable is used.
2706
2707 GRUB_TIMEOUT
2708 Specifies the timeout before executing the default ``LABEL`` in the
2709 GNU GRand Unified Bootloader (GRUB).
2710
2711 The ``GRUB_TIMEOUT`` variable is optional. See the
2712 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2713 on how this variable is used.
2714
2715 GTKIMMODULES_PACKAGES
2716 When inheriting the
2717 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2718 this variable specifies the packages that contain the GTK+ input
2719 method modules being installed when the modules are in packages other
2720 than the main package.
2721
2722 HOMEPAGE
2723 Website where more information about the software the recipe is
2724 building can be found.
2725
2726 HOST_ARCH
2727 The name of the target architecture, which is normally the same as
2728 :term:`TARGET_ARCH`. The OpenEmbedded build system
2729 supports many architectures. Here is an example list of architectures
2730 supported. This list is by no means complete as the architecture is
2731 configurable:
2732
2733 - arm
2734 - i586
2735 - x86_64
2736 - powerpc
2737 - powerpc64
2738 - mips
2739 - mipsel
2740
2741 HOST_CC_ARCH
2742 Specifies architecture-specific compiler flags that are passed to the
2743 C compiler.
2744
2745 Default initialization for ``HOST_CC_ARCH`` varies depending on what
2746 is being built:
2747
2748 - :term:`TARGET_CC_ARCH` when building for the
2749 target
2750
2751 - ``BUILD_CC_ARCH`` when building for the build host (i.e.
2752 ``-native``)
2753
2754 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2755 ``nativesdk-``)
2756
2757 HOST_OS
2758 Specifies the name of the target operating system, which is normally
2759 the same as the :term:`TARGET_OS`. The variable can
2760 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2761 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2762 "linux-musleabi" values possible.
2763
2764 HOST_PREFIX
2765 Specifies the prefix for the cross-compile toolchain. ``HOST_PREFIX``
2766 is normally the same as :term:`TARGET_PREFIX`.
2767
2768 HOST_SYS
2769 Specifies the system, including the architecture and the operating
2770 system, for which the build is occurring in the context of the
2771 current recipe.
2772
2773 The OpenEmbedded build system automatically sets this variable based
2774 on :term:`HOST_ARCH`,
2775 :term:`HOST_VENDOR`, and
2776 :term:`HOST_OS` variables.
2777
2778 .. note::
2779
2780 You do not need to set the variable yourself.
2781
2782 Consider these two examples:
2783
2784 - Given a native recipe on a 32-bit x86 machine running Linux, the
2785 value is "i686-linux".
2786
2787 - Given a recipe being built for a little-endian MIPS target running
2788 Linux, the value might be "mipsel-linux".
2789
2790 HOSTTOOLS
2791 A space-separated list (filter) of tools on the build host that
2792 should be allowed to be called from within build tasks. Using this
2793 filter helps reduce the possibility of host contamination. If a tool
2794 specified in the value of ``HOSTTOOLS`` is not found on the build
2795 host, the OpenEmbedded build system produces an error and the build
2796 is not started.
2797
2798 For additional information, see
2799 :term:`HOSTTOOLS_NONFATAL`.
2800
2801 HOSTTOOLS_NONFATAL
2802 A space-separated list (filter) of tools on the build host that
2803 should be allowed to be called from within build tasks. Using this
2804 filter helps reduce the possibility of host contamination. Unlike
2805 :term:`HOSTTOOLS`, the OpenEmbedded build system
2806 does not produce an error if a tool specified in the value of
2807 ``HOSTTOOLS_NONFATAL`` is not found on the build host. Thus, you can
2808 use ``HOSTTOOLS_NONFATAL`` to filter optional host tools.
2809
2810 HOST_VENDOR
2811 Specifies the name of the vendor. ``HOST_VENDOR`` is normally the
2812 same as :term:`TARGET_VENDOR`.
2813
2814 ICECC_DISABLED
2815 Disables or enables the ``icecc`` (Icecream) function. For more
2816 information on this function and best practices for using this
2817 variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`"
2818 section.
2819
2820 Setting this variable to "1" in your ``local.conf`` disables the
2821 function:
2822 ::
2823
2824 ICECC_DISABLED ??= "1"
2825
2826 To enable the function, set the variable as follows:
2827 ::
2828
2829 ICECC_DISABLED = ""
2830
2831 ICECC_ENV_EXEC
2832 Points to the ``icecc-create-env`` script that you provide. This
2833 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2834 set this variable in your ``local.conf`` file.
2835
2836 If you do not point to a script that you provide, the OpenEmbedded
2837 build system uses the default script provided by the
2838 ``icecc-create-env.bb`` recipe, which is a modified version and not
2839 the one that comes with ``icecc``.
2840
2841 ICECC_PARALLEL_MAKE
2842 Extra options passed to the ``make`` command during the
2843 :ref:`ref-tasks-compile` task that specify parallel
2844 compilation. This variable usually takes the form of "-j x", where x
2845 represents the maximum number of parallel threads ``make`` can run.
2846
2847 .. note::
2848
2849 The options passed affect builds on all enabled machines on the
2850 network, which are machines running the
2851 iceccd
2852 daemon.
2853
2854 If your enabled machines support multiple cores, coming up with the
2855 maximum number of parallel threads that gives you the best
2856 performance could take some experimentation since machine speed,
2857 network lag, available memory, and existing machine loads can all
2858 affect build time. Consequently, unlike the
2859 :term:`PARALLEL_MAKE` variable, there is no
2860 rule-of-thumb for setting ``ICECC_PARALLEL_MAKE`` to achieve optimal
2861 performance.
2862
2863 If you do not set ``ICECC_PARALLEL_MAKE``, the build system does not
2864 use it (i.e. the system does not detect and assign the number of
2865 cores as is done with ``PARALLEL_MAKE``).
2866
2867 ICECC_PATH
2868 The location of the ``icecc`` binary. You can set this variable in
2869 your ``local.conf`` file. If your ``local.conf`` file does not define
2870 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2871 to define it by locating ``icecc`` using ``which``.
2872
2873 ICECC_USER_CLASS_BL
2874 Identifies user classes that you do not want the Icecream distributed
2875 compile support to consider. This variable is used by the
2876 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2877 your ``local.conf`` file.
2878
2879 When you list classes using this variable, you are "blacklisting"
2880 them from distributed compilation across remote hosts. Any classes
2881 you list will be distributed and compiled locally.
2882
2883 ICECC_USER_PACKAGE_BL
2884 Identifies user recipes that you do not want the Icecream distributed
2885 compile support to consider. This variable is used by the
2886 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2887 your ``local.conf`` file.
2888
2889 When you list packages using this variable, you are "blacklisting"
2890 them from distributed compilation across remote hosts. Any packages
2891 you list will be distributed and compiled locally.
2892
2893 ICECC_USER_PACKAGE_WL
2894 Identifies user recipes that use an empty
2895 :term:`PARALLEL_MAKE` variable that you want to
2896 force remote distributed compilation on using the Icecream
2897 distributed compile support. This variable is used by the
2898 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2899 your ``local.conf`` file.
2900
2901 IMAGE_BASENAME
2902 The base name of image output files. This variable defaults to the
2903 recipe name (``${``\ :term:`PN`\ ``}``).
2904
2905 IMAGE_BOOT_FILES
2906 A space-separated list of files installed into the boot partition
2907 when preparing an image using the Wic tool with the
2908 ``bootimg-partition`` or ``bootimg-efi`` source plugin. By default,
2909 the files are
2910 installed under the same name as the source files. To change the
2911 installed name, separate it from the original name with a semi-colon
2912 (;). Source files need to be located in
2913 :term:`DEPLOY_DIR_IMAGE`. Here are two
2914 examples:
2915 ::
2916
2917 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2918 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2919
2920 Alternatively, source files can be picked up using a glob pattern. In
2921 this case, the destination file must have the same name as the base
2922 name of the source file path. To install files into a directory
2923 within the target location, pass its name after a semi-colon (;).
2924 Here are two examples:
2925 ::
2926
2927 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2928 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2929
2930 The first example
2931 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2932 into the root of the target partition. The second example installs
2933 the same files into a ``boot`` directory within the target partition.
2934
2935 You can find information on how to use the Wic tool in the
2936 ":ref:`dev-manual/dev-manual-common-tasks:creating partitioned images using wic`"
2937 section of the Yocto Project Development Tasks Manual. Reference
2938 material for Wic is located in the
2939 ":doc:`../ref-manual/ref-kickstart`" chapter.
2940
2941 IMAGE_CLASSES
2942 A list of classes that all images should inherit. You typically use
2943 this variable to specify the list of classes that register the
2944 different types of images the OpenEmbedded build system creates.
2945
2946 The default value for ``IMAGE_CLASSES`` is ``image_types``. You can
2947 set this variable in your ``local.conf`` or in a distribution
2948 configuration file.
2949
2950 For more information, see ``meta/classes/image_types.bbclass`` in the
2951 :term:`Source Directory`.
2952
2953 IMAGE_CMD
2954 Specifies the command to create the image file for a specific image
2955 type, which corresponds to the value set set in
2956 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
2957 ``btrfs``, and so forth). When setting this variable, you should use
2958 an override for the associated type. Here is an example:
2959 ::
2960
2961 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \
2962 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
2963 ${EXTRA_IMAGECMD}"
2964
2965 You typically do not need to set this variable unless you are adding
2966 support for a new image type. For more examples on how to set this
2967 variable, see the :ref:`image_types <ref-classes-image_types>`
2968 class file, which is ``meta/classes/image_types.bbclass``.
2969
2970 IMAGE_DEVICE_TABLES
2971 Specifies one or more files that contain custom device tables that
2972 are passed to the ``makedevs`` command as part of creating an image.
2973 These files list basic device nodes that should be created under
2974 ``/dev`` within the image. If ``IMAGE_DEVICE_TABLES`` is not set,
2975 ``files/device_table-minimal.txt`` is used, which is located by
2976 :term:`BBPATH`. For details on how you should write
2977 device table files, see ``meta/files/device_table-minimal.txt`` as an
2978 example.
2979
2980 IMAGE_FEATURES
2981 The primary list of features to include in an image. Typically, you
2982 configure this variable in an image recipe. Although you can use this
2983 variable from your ``local.conf`` file, which is found in the
2984 :term:`Build Directory`, best practices dictate that you do
2985 not.
2986
2987 .. note::
2988
2989 To enable extra features from outside the image recipe, use the
2990 EXTRA_IMAGE_FEATURES
2991 variable.
2992
2993 For a list of image features that ships with the Yocto Project, see
2994 the "`Image Features <#ref-features-image>`__" section.
2995
2996 For an example that shows how to customize your image by using this
2997 variable, see the ":ref:`usingpoky-extend-customimage-imagefeatures`"
2998 section in the Yocto Project Development Tasks Manual.
2999
3000 IMAGE_FSTYPES
3001 Specifies the formats the OpenEmbedded build system uses during the
3002 build when creating the root filesystem. For example, setting
3003 ``IMAGE_FSTYPES`` as follows causes the build system to create root
3004 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:
3005 ::
3006
3007 IMAGE_FSTYPES = "ext3 tar.bz2"
3008
3009 For the complete list of supported image formats from which you can
3010 choose, see :term:`IMAGE_TYPES`.
3011
3012 .. note::
3013
3014 - If an image recipe uses the "inherit image" line and you are
3015 setting ``IMAGE_FSTYPES`` inside the recipe, you must set
3016 ``IMAGE_FSTYPES`` prior to using the "inherit image" line.
3017
3018 - Due to the way the OpenEmbedded build system processes this
3019 variable, you cannot update its contents by using ``_append``
3020 or ``_prepend``. You must use the ``+=`` operator to add one or
3021 more options to the ``IMAGE_FSTYPES`` variable.
3022
3023 IMAGE_INSTALL
3024 Used by recipes to specify the packages to install into an image
3025 through the :ref:`image <ref-classes-image>` class. Use the
3026 ``IMAGE_INSTALL`` variable with care to avoid ordering issues.
3027
3028 Image recipes set ``IMAGE_INSTALL`` to specify the packages to
3029 install into an image through ``image.bbclass``. Additionally,
3030 "helper" classes such as the
3031 :ref:`core-image <ref-classes-core-image>` class exist that can
3032 take lists used with ``IMAGE_FEATURES`` and turn them into
3033 auto-generated entries in ``IMAGE_INSTALL`` in addition to its
3034 default contents.
3035
3036 When you use this variable, it is best to use it as follows:
3037 ::
3038
3039 IMAGE_INSTALL_append = " package-name"
3040
3041 Be sure to include the space
3042 between the quotation character and the start of the package name or
3043 names.
3044
3045 .. note::
3046
3047 - When working with a
3048 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
3049 image, do not use the ``IMAGE_INSTALL`` variable to specify
3050 packages for installation. Instead, use the
3051 :term:`PACKAGE_INSTALL` variable, which
3052 allows the initial RAM filesystem (initramfs) recipe to use a
3053 fixed set of packages and not be affected by ``IMAGE_INSTALL``.
3054 For information on creating an initramfs, see the
3055 ":ref:`building-an-initramfs-image`"
3056 section in the Yocto Project Development Tasks Manual.
3057
3058 - Using ``IMAGE_INSTALL`` with the
3059 :ref:`+= <bitbake:appending-and-prepending>`
3060 BitBake operator within the ``/conf/local.conf`` file or from
3061 within an image recipe is not recommended. Use of this operator
3062 in these ways can cause ordering issues. Since
3063 ``core-image.bbclass`` sets ``IMAGE_INSTALL`` to a default
3064 value using the
3065 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
3066 operator, using a ``+=`` operation against ``IMAGE_INSTALL``
3067 results in unexpected behavior when used within
3068 ``conf/local.conf``. Furthermore, the same operation from
3069 within an image recipe may or may not succeed depending on the
3070 specific situation. In both these cases, the behavior is
3071 contrary to how most users expect the ``+=`` operator to work.
3072
3073 IMAGE_LINGUAS
3074 Specifies the list of locales to install into the image during the
3075 root filesystem construction process. The OpenEmbedded build system
3076 automatically splits locale files, which are used for localization,
3077 into separate packages. Setting the ``IMAGE_LINGUAS`` variable
3078 ensures that any locale packages that correspond to packages already
3079 selected for installation into the image are also installed. Here is
3080 an example:
3081 ::
3082
3083 IMAGE_LINGUAS = "pt-br de-de"
3084
3085 In this example, the build system ensures any Brazilian Portuguese
3086 and German locale files that correspond to packages in the image are
3087 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3088 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3089 only provide locale files by language and not by country-specific
3090 language).
3091
3092 See the :term:`GLIBC_GENERATE_LOCALES`
3093 variable for information on generating GLIBC locales.
3094
3095 IMAGE_MANIFEST
3096 The manifest file for the image. This file lists all the installed
3097 packages that make up the image. The file contains package
3098 information on a line-per-package basis as follows:
3099 ::
3100
3101 packagename packagearch version
3102
3103 The :ref:`image <ref-classes-image>` class defines the manifest
3104 file as follows:
3105 ::
3106
3107 IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
3108
3109 The location is
3110 derived using the :term:`DEPLOY_DIR_IMAGE`
3111 and :term:`IMAGE_NAME` variables. You can find
3112 information on how the image is created in the ":ref:`image-generation-dev-environment`"
3113 section in the Yocto Project Overview and Concepts Manual.
3114
3115 IMAGE_NAME
3116 The name of the output image files minus the extension. This variable
3117 is derived using the :term:`IMAGE_BASENAME`,
3118 :term:`MACHINE`, and :term:`DATETIME`
3119 variables:
3120 ::
3121
3122 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
3123
3124 IMAGE_OVERHEAD_FACTOR
3125 Defines a multiplier that the build system applies to the initial
3126 image size for cases when the multiplier times the returned disk
3127 usage value for the image is greater than the sum of
3128 ``IMAGE_ROOTFS_SIZE`` and ``IMAGE_ROOTFS_EXTRA_SPACE``. The result of
3129 the multiplier applied to the initial image size creates free disk
3130 space in the image as overhead. By default, the build process uses a
3131 multiplier of 1.3 for this variable. This default value results in
3132 30% free disk space added to the image when this method is used to
3133 determine the final generated image size. You should be aware that
3134 post install scripts and the package management system uses disk
3135 space inside this overhead area. Consequently, the multiplier does
3136 not produce an image with all the theoretical free disk space. See
3137 ``IMAGE_ROOTFS_SIZE`` for information on how the build system
3138 determines the overall image size.
3139
3140 The default 30% free disk space typically gives the image enough room
3141 to boot and allows for basic post installs while still leaving a
3142 small amount of free disk space. If 30% free space is inadequate, you
3143 can increase the default value. For example, the following setting
3144 gives you 50% free space added to the image:
3145 ::
3146
3147 IMAGE_OVERHEAD_FACTOR = "1.5"
3148
3149 Alternatively, you can ensure a specific amount of free disk space is
3150 added to the image by using the ``IMAGE_ROOTFS_EXTRA_SPACE``
3151 variable.
3152
3153 IMAGE_PKGTYPE
3154 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3155 OpenEmbedded build system. The variable is defined appropriately by
3156 the :ref:`package_deb <ref-classes-package_deb>`,
3157 :ref:`package_rpm <ref-classes-package_rpm>`,
3158 :ref:`package_ipk <ref-classes-package_ipk>`, or
3159 :ref:`package_tar <ref-classes-package_tar>` class.
3160
3161 .. note::
3162
3163 The
3164 package_tar
3165 class is broken and is not supported. It is recommended that you
3166 do not use it.
3167
3168 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
3169 :ref:`image <ref-classes-image>` classes use the ``IMAGE_PKGTYPE``
3170 for packaging up images and SDKs.
3171
3172 You should not set the ``IMAGE_PKGTYPE`` manually. Rather, the
3173 variable is set indirectly through the appropriate
3174 :ref:`package_* <ref-classes-package>` class using the
3175 :term:`PACKAGE_CLASSES` variable. The
3176 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3177 or IPK) that appears with the variable
3178
3179 .. note::
3180
3181 Files using the
3182 .tar
3183 format are never used as a substitute packaging format for DEB,
3184 RPM, and IPK formatted files for your image or SDK.
3185
3186 IMAGE_POSTPROCESS_COMMAND
3187 Specifies a list of functions to call once the OpenEmbedded build
3188 system creates the final image output files. You can specify
3189 functions separated by semicolons:
3190 ::
3191
3192 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3193
3194 If you need to pass the root filesystem path to a command within the
3195 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3196 directory that becomes the root filesystem image. See the
3197 :term:`IMAGE_ROOTFS` variable for more
3198 information.
3199
3200 IMAGE_PREPROCESS_COMMAND
3201 Specifies a list of functions to call before the OpenEmbedded build
3202 system creates the final image output files. You can specify
3203 functions separated by semicolons:
3204 ::
3205
3206 IMAGE_PREPROCESS_COMMAND += "function; ... "
3207
3208 If you need to pass the root filesystem path to a command within the
3209 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3210 directory that becomes the root filesystem image. See the
3211 :term:`IMAGE_ROOTFS` variable for more
3212 information.
3213
3214 IMAGE_ROOTFS
3215 The location of the root filesystem while it is under construction
3216 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3217 variable is not configurable. Do not change it.
3218
3219 IMAGE_ROOTFS_ALIGNMENT
3220 Specifies the alignment for the output image file in Kbytes. If the
3221 size of the image is not a multiple of this value, then the size is
3222 rounded up to the nearest multiple of the value. The default value is
3223 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3224 additional information.
3225
3226 IMAGE_ROOTFS_EXTRA_SPACE
3227 Defines additional free disk space created in the image in Kbytes. By
3228 default, this variable is set to "0". This free disk space is added
3229 to the image after the build system determines the image size as
3230 described in ``IMAGE_ROOTFS_SIZE``.
3231
3232 This variable is particularly useful when you want to ensure that a
3233 specific amount of free disk space is available on a device after an
3234 image is installed and running. For example, to be sure 5 Gbytes of
3235 free disk space is available, set the variable as follows:
3236 ::
3237
3238 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3239
3240 For example, the Yocto Project Build Appliance specifically requests
3241 40 Gbytes of extra space with the line:
3242 ::
3243
3244 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3245
3246 IMAGE_ROOTFS_SIZE
3247 Defines the size in Kbytes for the generated image. The OpenEmbedded
3248 build system determines the final size for the generated image using
3249 an algorithm that takes into account the initial disk space used for
3250 the generated image, a requested size for the image, and requested
3251 additional free disk space to be added to the image. Programatically,
3252 the build system determines the final size of the generated image as
3253 follows:
3254 ::
3255
3256 if (image-du * overhead) < rootfs-size:
3257 internal-rootfs-size = rootfs-size + xspace
3258 else:
3259 internal-rootfs-size = (image-du * overhead) + xspace
3260 where:
3261 image-du = Returned value of the du command on the image.
3262 overhead = IMAGE_OVERHEAD_FACTOR
3263 rootfs-size = IMAGE_ROOTFS_SIZE
3264 internal-rootfs-size = Initial root filesystem size before any modifications.
3265 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3266
3267 See the :term:`IMAGE_OVERHEAD_FACTOR`
3268 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3269 variables for related information.
3270
3271 IMAGE_TYPEDEP
3272 Specifies a dependency from one image type on another. Here is an
3273 example from the :ref:`image-live <ref-classes-image-live>` class:
3274 ::
3275
3276 IMAGE_TYPEDEP_live = "ext3"
3277
3278 In the previous example, the variable ensures that when "live" is
3279 listed with the :term:`IMAGE_FSTYPES` variable,
3280 the OpenEmbedded build system produces an ``ext3`` image first since
3281 one of the components of the live image is an ``ext3`` formatted
3282 partition containing the root filesystem.
3283
3284 IMAGE_TYPES
3285 Specifies the complete list of supported image types by default:
3286
3287 - btrfs
3288 - container
3289 - cpio
3290 - cpio.gz
3291 - cpio.lz4
3292 - cpio.lzma
3293 - cpio.xz
3294 - cramfs
3295 - ext2
3296 - ext2.bz2
3297 - ext2.gz
3298 - ext2.lzma
3299 - ext3
3300 - ext3.gz
3301 - ext4
3302 - ext4.gz
3303 - f2fs
3304 - hddimg
3305 - iso
3306 - jffs2
3307 - jffs2.sum
3308 - multiubi
3309 - squashfs
3310 - squashfs-lz4
3311 - squashfs-lzo
3312 - squashfs-xz
3313 - tar
3314 - tar.bz2
3315 - tar.gz
3316 - tar.lz4
3317 - tar.xz
3318 - tar.zst
3319 - ubi
3320 - ubifs
3321 - wic
3322 - wic.bz2
3323 - wic.gz
3324 - wic.lzma
3325
3326 For more information about these types of images, see
3327 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3328
3329 INC_PR
3330 Helps define the recipe revision for recipes that share a common
3331 ``include`` file. You can think of this variable as part of the
3332 recipe revision as set from within an include file.
3333
3334 Suppose, for example, you have a set of recipes that are used across
3335 several projects. And, within each of those recipes the revision (its
3336 :term:`PR` value) is set accordingly. In this case, when
3337 the revision of those recipes changes, the burden is on you to find
3338 all those recipes and be sure that they get changed to reflect the
3339 updated version of the recipe. In this scenario, it can get
3340 complicated when recipes that are used in many places and provide
3341 common functionality are upgraded to a new revision.
3342
3343 A more efficient way of dealing with this situation is to set the
3344 ``INC_PR`` variable inside the ``include`` files that the recipes
3345 share and then expand the ``INC_PR`` variable within the recipes to
3346 help define the recipe revision.
3347
3348 The following provides an example that shows how to use the
3349 ``INC_PR`` variable given a common ``include`` file that defines the
3350 variable. Once the variable is defined in the ``include`` file, you
3351 can use the variable to set the ``PR`` values in each recipe. You
3352 will notice that when you set a recipe's ``PR`` you can provide more
3353 granular revisioning by appending values to the ``INC_PR`` variable:
3354 ::
3355
3356 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3357 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3358 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3359 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3360
3361 The
3362 first line of the example establishes the baseline revision to be
3363 used for all recipes that use the ``include`` file. The remaining
3364 lines in the example are from individual recipes and show how the
3365 ``PR`` value is set.
3366
3367 INCOMPATIBLE_LICENSE
3368 Specifies a space-separated list of license names (as they would
3369 appear in :term:`LICENSE`) that should be excluded
3370 from the build. Recipes that provide no alternatives to listed
3371 incompatible licenses are not built. Packages that are individually
3372 licensed with the specified incompatible licenses will be deleted.
3373
3374 .. note::
3375
3376 This functionality is only regularly tested using the following
3377 setting:
3378 ::
3379
3380 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3381
3382
3383 Although you can use other settings, you might be required to
3384 remove dependencies on or provide alternatives to components that
3385 are required to produce a functional system image.
3386
3387 .. note::
3388
3389 It is possible to define a list of licenses that are allowed to be
3390 used instead of the licenses that are excluded. To do this, define
3391 a variable
3392 COMPATIBLE_LICENSES
3393 with the names of the licences that are allowed. Then define
3394 INCOMPATIBLE_LICENSE
3395 as:
3396 ::
3397
3398 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3399
3400
3401 This will result in
3402 INCOMPATIBLE_LICENSE
3403 containing the names of all licences from
3404 AVAILABLE_LICENSES
3405 except the ones specified in
3406 COMPATIBLE_LICENSES
3407 , thus only allowing the latter licences to be used.
3408
3409 INHERIT
3410 Causes the named class or classes to be inherited globally. Anonymous
3411 functions in the class or classes are not executed for the base
3412 configuration and in each individual recipe. The OpenEmbedded build
3413 system ignores changes to ``INHERIT`` in individual recipes.
3414
3415 For more information on ``INHERIT``, see the
3416 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3417 section in the Bitbake User Manual.
3418
3419 INHERIT_DISTRO
3420 Lists classes that will be inherited at the distribution level. It is
3421 unlikely that you want to edit this variable.
3422
3423 The default value of the variable is set as follows in the
3424 ``meta/conf/distro/defaultsetup.conf`` file:
3425 ::
3426
3427 INHERIT_DISTRO ?= "debian devshell sstate license"
3428
3429 INHIBIT_DEFAULT_DEPS
3430 Prevents the default dependencies, namely the C compiler and standard
3431 C library (libc), from being added to :term:`DEPENDS`.
3432 This variable is usually used within recipes that do not require any
3433 compilation using the C compiler.
3434
3435 Set the variable to "1" to prevent the default dependencies from
3436 being added.
3437
3438 INHIBIT_PACKAGE_DEBUG_SPLIT
3439 Prevents the OpenEmbedded build system from splitting out debug
3440 information during packaging. By default, the build system splits out
3441 debugging information during the
3442 :ref:`ref-tasks-package` task. For more information on
3443 how debug information is split out, see the
3444 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3445 variable.
3446
3447 To prevent the build system from splitting out debug information
3448 during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as
3449 follows:
3450 ::
3451
3452 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3453
3454 INHIBIT_PACKAGE_STRIP
3455 If set to "1", causes the build to not strip binaries in resulting
3456 packages and prevents the ``-dbg`` package from containing the source
3457 files.
3458
3459 By default, the OpenEmbedded build system strips binaries and puts
3460 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
3461 Consequently, you should not set ``INHIBIT_PACKAGE_STRIP`` when you
3462 plan to debug in general.
3463
3464 INHIBIT_SYSROOT_STRIP
3465 If set to "1", causes the build to not strip binaries in the
3466 resulting sysroot.
3467
3468 By default, the OpenEmbedded build system strips binaries in the
3469 resulting sysroot. When you specifically set the
3470 ``INHIBIT_SYSROOT_STRIP`` variable to "1" in your recipe, you inhibit
3471 this stripping.
3472
3473 If you want to use this variable, include the
3474 :ref:`staging <ref-classes-staging>` class. This class uses a
3475 ``sys_strip()`` function to test for the variable and acts
3476 accordingly.
3477
3478 .. note::
3479
3480 Use of the
3481 INHIBIT_SYSROOT_STRIP
3482 variable occurs in rare and special circumstances. For example,
3483 suppose you are building bare-metal firmware by using an external
3484 GCC toolchain. Furthermore, even if the toolchain's binaries are
3485 strippable, other files exist that are needed for the build that
3486 are not strippable.
3487
3488 INITRAMFS_FSTYPES
3489 Defines the format for the output image of an initial RAM filesystem
3490 (initramfs), which is used during boot. Supported formats are the
3491 same as those supported by the
3492 :term:`IMAGE_FSTYPES` variable.
3493
3494 The default value of this variable, which is set in the
3495 ``meta/conf/bitbake.conf`` configuration file in the
3496 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3497 initramfs mechanism, as opposed to the initial RAM filesystem
3498 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3499 an optionally compressed cpio archive.
3500
3501 INITRAMFS_IMAGE
3502 Specifies the :term:`PROVIDES` name of an image
3503 recipe that is used to build an initial RAM filesystem (initramfs)
3504 image. In other words, the ``INITRAMFS_IMAGE`` variable causes an
3505 additional recipe to be built as a dependency to whatever root
3506 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3507 initramfs image recipe you provide should set
3508 :term:`IMAGE_FSTYPES` to
3509 :term:`INITRAMFS_FSTYPES`.
3510
3511 An initramfs image provides a temporary root filesystem used for
3512 early system initialization (e.g. loading of modules needed to locate
3513 and mount the "real" root filesystem).
3514
3515 .. note::
3516
3517 See the
3518 meta/recipes-core/images/core-image-minimal-initramfs.bb
3519 recipe in the
3520 Source Directory
3521 for an example initramfs recipe. To select this sample recipe as
3522 the one built to provide the initramfs image, set
3523 INITRAMFS_IMAGE
3524 to "core-image-minimal-initramfs".
3525
3526 You can also find more information by referencing the
3527 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3528 the Source Directory, the :ref:`image <ref-classes-image>` class,
3529 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
3530 the ``INITRAMFS_IMAGE`` variable.
3531
3532 If ``INITRAMFS_IMAGE`` is empty, which is the default, then no
3533 initramfs image is built.
3534
3535 For more information, you can also see the
3536 :term:`INITRAMFS_IMAGE_BUNDLE`
3537 variable, which allows the generated image to be bundled inside the
3538 kernel image. Additionally, for information on creating an initramfs
3539 image, see the ":ref:`building-an-initramfs-image`" section
3540 in the Yocto Project Development Tasks Manual.
3541
3542 INITRAMFS_IMAGE_BUNDLE
3543 Controls whether or not the image recipe specified by
3544 :term:`INITRAMFS_IMAGE` is run through an
3545 extra pass
3546 (:ref:`ref-tasks-bundle_initramfs`) during
3547 kernel compilation in order to build a single binary that contains
3548 both the kernel image and the initial RAM filesystem (initramfs)
3549 image. This makes use of the
3550 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3551 feature.
3552
3553 .. note::
3554
3555 Using an extra compilation pass to bundle the initramfs avoids a
3556 circular dependency between the kernel recipe and the initramfs
3557 recipe should the initramfs include kernel modules. Should that be
3558 the case, the initramfs recipe depends on the kernel for the
3559 kernel modules, and the kernel depends on the initramfs recipe
3560 since the initramfs is bundled inside the kernel image.
3561
3562 The combined binary is deposited into the ``tmp/deploy`` directory,
3563 which is part of the :term:`Build Directory`.
3564
3565 Setting the variable to "1" in a configuration file causes the
3566 OpenEmbedded build system to generate a kernel image with the
3567 initramfs specified in ``INITRAMFS_IMAGE`` bundled within:
3568 ::
3569
3570 INITRAMFS_IMAGE_BUNDLE = "1"
3571
3572 By default, the
3573 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
3574 null string as follows:
3575 ::
3576
3577 INITRAMFS_IMAGE_BUNDLE ?= ""
3578
3579 .. note::
3580
3581 You must set the
3582 INITRAMFS_IMAGE_BUNDLE
3583 variable in a configuration file. You cannot set the variable in a
3584 recipe file.
3585
3586 See the
3587 :yocto_git:`local.conf.sample.extended </cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended>`
3588 file for additional information. Also, for information on creating an
3589 initramfs, see the ":ref:`building-an-initramfs-image`" section
3590 in the Yocto Project Development Tasks Manual.
3591
3592 INITRAMFS_LINK_NAME
3593 The link name of the initial RAM filesystem image. This variable is
3594 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3595 follows:
3596 ::
3597
3598 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3599
3600 The value of the
3601 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3602 file, has the following value:
3603 ::
3604
3605 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3606
3607 See the :term:`MACHINE` variable for additional
3608 information.
3609
3610 INITRAMFS_NAME
3611 The base name of the initial RAM filesystem image. This variable is
3612 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3613 follows:
3614 ::
3615
3616 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3617
3618 The value of the :term:`KERNEL_ARTIFACT_NAME`
3619 variable, which is set in the same file, has the following value:
3620 ::
3621
3622 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3623
3624 INITRD
3625 Indicates list of filesystem images to concatenate and use as an
3626 initial RAM disk (``initrd``).
3627
3628 The ``INITRD`` variable is an optional variable used with the
3629 :ref:`image-live <ref-classes-image-live>` class.
3630
3631 INITRD_IMAGE
3632 When building a "live" bootable image (i.e. when
3633 :term:`IMAGE_FSTYPES` contains "live"),
3634 ``INITRD_IMAGE`` specifies the image recipe that should be built to
3635 provide the initial RAM disk image. The default value is
3636 "core-image-minimal-initramfs".
3637
3638 See the :ref:`image-live <ref-classes-image-live>` class for more
3639 information.
3640
3641 INITSCRIPT_NAME
3642 The filename of the initialization script as installed to
3643 ``${sysconfdir}/init.d``.
3644
3645 This variable is used in recipes when using ``update-rc.d.bbclass``.
3646 The variable is mandatory.
3647
3648 INITSCRIPT_PACKAGES
3649 A list of the packages that contain initscripts. If multiple packages
3650 are specified, you need to append the package name to the other
3651 ``INITSCRIPT_*`` as an override.
3652
3653 This variable is used in recipes when using ``update-rc.d.bbclass``.
3654 The variable is optional and defaults to the :term:`PN`
3655 variable.
3656
3657 INITSCRIPT_PARAMS
3658 Specifies the options to pass to ``update-rc.d``. Here is an example:
3659 ::
3660
3661 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3662
3663 In this example, the script has a runlevel of 99, starts the script
3664 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3665
3666 The variable's default value is "defaults", which is set in the
3667 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3668
3669 The value in ``INITSCRIPT_PARAMS`` is passed through to the
3670 ``update-rc.d`` command. For more information on valid parameters,
3671 please see the ``update-rc.d`` manual page at
3672 http://www.tin.org/bin/man.cgi?section=8&topic=update-rc.d.
3673
3674 INSANE_SKIP
3675 Specifies the QA checks to skip for a specific package within a
3676 recipe. For example, to skip the check for symbolic link ``.so``
3677 files in the main package of a recipe, add the following to the
3678 recipe. The package name override must be used, which in this example
3679 is ``${PN}``:
3680 ::
3681
3682 INSANE_SKIP_${PN} += "dev-so"
3683
3684 See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a
3685 list of the valid QA checks you can specify using this variable.
3686
3687 INSTALL_TIMEZONE_FILE
3688 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
3689 Set the ``INSTALL_TIMEZONE_FILE`` variable to "0" at the
3690 configuration level to disable this behavior.
3691
3692 IPK_FEED_URIS
3693 When the IPK backend is in use and package management is enabled on
3694 the target, you can use this variable to set up ``opkg`` in the
3695 target image to point to package feeds on a nominated server. Once
3696 the feed is established, you can perform installations or upgrades
3697 using the package manager at runtime.
3698
3699 KARCH
3700 Defines the kernel architecture used when assembling the
3701 configuration. Architectures supported for this release are:
3702
3703 - powerpc
3704 - i386
3705 - x86_64
3706 - arm
3707 - qemu
3708 - mips
3709
3710 You define the ``KARCH`` variable in the :ref:`kernel-dev/kernel-dev-advanced:bsp descriptions`.
3711
3712 KBRANCH
3713 A regular expression used by the build process to explicitly identify
3714 the kernel branch that is validated, patched, and configured during a
3715 build. You must set this variable to ensure the exact kernel branch
3716 you want is being used by the build process.
3717
3718 Values for this variable are set in the kernel's recipe file and the
3719 kernel's append file. For example, if you are using the
3720 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
3721 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH``
3722 is set as follows in that kernel recipe file:
3723 ::
3724
3725 KBRANCH ?= "standard/base"
3726
3727 This variable is also used from the kernel's append file to identify
3728 the kernel branch specific to a particular machine or target
3729 hardware. Continuing with the previous kernel example, the kernel's
3730 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3731 BSP layer for a given machine. For example, the append file for the
3732 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3733 machines (``meta-yocto-bsp``) is named
3734 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
3735 Here are the related statements from that append file:
3736 ::
3737
3738 KBRANCH_genericx86 = "standard/base"
3739 KBRANCH_genericx86-64 = "standard/base"
3740 KBRANCH_edgerouter = "standard/edgerouter"
3741 KBRANCH_beaglebone = "standard/beaglebone"
3742
3743 The ``KBRANCH`` statements
3744 identify the kernel branch to use when building for each supported
3745 BSP.
3746
3747 KBUILD_DEFCONFIG
3748 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3749 class, specifies an "in-tree" kernel configuration file for use
3750 during a kernel build.
3751
3752 Typically, when using a ``defconfig`` to configure a kernel during a
3753 build, you place the file in your layer in the same manner as you
3754 would place patch files and configuration fragment files (i.e.
3755 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3756 is part of the kernel tree (i.e. "in-tree"), you can use the
3757 ``KBUILD_DEFCONFIG`` variable and append the
3758 :term:`KMACHINE` variable to point to the
3759 ``defconfig`` file.
3760
3761 To use the variable, set it in the append file for your kernel recipe
3762 using the following form:
3763 ::
3764
3765 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3766
3767 Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses
3768 a ``defconfig`` file named "bcm2709_defconfig":
3769 ::
3770
3771 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig"
3772
3773 As an alternative, you can use the following within your append file:
3774 ::
3775
3776 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file
3777
3778 For more
3779 information on how to use the ``KBUILD_DEFCONFIG`` variable, see the
3780 ":ref:`kernel-dev/kernel-dev-common:using an "in-tree" \`\`defconfig\`\` file`"
3781 section in the Yocto Project Linux Kernel Development Manual.
3782
3783 KERNEL_ALT_IMAGETYPE
3784 Specifies an alternate kernel image type for creation in addition to
3785 the kernel image type specified using the
3786 :term:`KERNEL_IMAGETYPE` variable.
3787
3788 KERNEL_ARTIFACT_NAME
3789 Specifies the name of all of the build artifacts. You can change the
3790 name of the artifacts by changing the ``KERNEL_ARTIFACT_NAME``
3791 variable.
3792
3793 The value of ``KERNEL_ARTIFACT_NAME``, which is set in the
3794 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
3795 following default value:
3796 ::
3797
3798 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3799
3800 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, and :term:`MACHINE`
3801 variables for additional information.
3802
3803 .. note::
3804
3805 The IMAGE_VERSION_SUFFIX variable is set to DATETIME.
3806
3807 KERNEL_CLASSES
3808 A list of classes defining kernel image types that the
3809 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3810 typically append this variable to enable extended image types. An
3811 example is the "kernel-fitimage", which enables fitImage support and
3812 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
3813 custom kernel image types with the ``kernel`` class using this
3814 variable.
3815
3816 KERNEL_DEVICETREE
3817 Specifies the name of the generated Linux kernel device tree (i.e.
3818 the ``.dtb``) file.
3819
3820 .. note::
3821
3822 Legacy support exists for specifying the full path to the device
3823 tree. However, providing just the .dtb file is preferred.
3824
3825 In order to use this variable, the
3826 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3827 be inherited.
3828
3829 KERNEL_DTB_LINK_NAME
3830 The link name of the kernel device tree binary (DTB). This variable
3831 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3832 follows:
3833 ::
3834
3835 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3836
3837 The
3838 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
3839 the same file, has the following value:
3840 ::
3841
3842 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3843
3844 See the :term:`MACHINE` variable for additional
3845 information.
3846
3847 KERNEL_DTB_NAME
3848 The base name of the kernel device tree binary (DTB). This variable
3849 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3850 follows:
3851 ::
3852
3853 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3854
3855 The value of the :term:`KERNEL_ARTIFACT_NAME`
3856 variable, which is set in the same file, has the following value:
3857 ::
3858
3859 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3860
3861 KERNEL_EXTRA_ARGS
3862 Specifies additional ``make`` command-line arguments the OpenEmbedded
3863 build system passes on when compiling the kernel.
3864
3865 KERNEL_FEATURES
3866 Includes additional kernel metadata. In the OpenEmbedded build
3867 system, the default Board Support Packages (BSPs)
3868 :term:`Metadata` is provided through the
3869 :term:`KMACHINE` and :term:`KBRANCH`
3870 variables. You can use the ``KERNEL_FEATURES`` variable from within
3871 the kernel recipe or kernel append file to further add metadata for
3872 all BSPs or specific BSPs.
3873
3874 The metadata you add through this variable includes config fragments
3875 and features descriptions, which usually includes patches as well as
3876 config fragments. You typically override the ``KERNEL_FEATURES``
3877 variable for a specific machine. In this way, you can provide
3878 validated, but optional, sets of kernel configurations and features.
3879
3880 For example, the following example from the ``linux-yocto-rt_4.12``
3881 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3882 as well as "virtio" configurations to all QEMU machines. The last two
3883 statements add specific configurations to targeted machine types:
3884 ::
3885
3886 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
3887 KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}"
3888 KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc"
3889 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
3890 KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc"
3891
3892 KERNEL_FIT_LINK_NAME
3893 The link name of the kernel flattened image tree (FIT) image. This
3894 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3895 file as follows:
3896 ::
3897
3898 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3899
3900 The value of the
3901 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3902 file, has the following value:
3903 ::
3904
3905 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3906
3907 See the :term:`MACHINE` variable for additional
3908 information.
3909
3910 KERNEL_FIT_NAME
3911 The base name of the kernel flattened image tree (FIT) image. This
3912 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3913 file as follows:
3914 ::
3915
3916 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3917
3918 The value of the :term:`KERNEL_ARTIFACT_NAME`
3919 variable, which is set in the same file, has the following value:
3920 ::
3921
3922 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3923
3924 KERNEL_IMAGE_LINK_NAME
3925 The link name for the kernel image. This variable is set in the
3926 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3927 ::
3928
3929 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3930
3931 The value of
3932 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3933 file, has the following value:
3934 ::
3935
3936 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3937
3938 See the :term:`MACHINE` variable for additional
3939 information.
3940
3941 KERNEL_IMAGE_MAXSIZE
3942 Specifies the maximum size of the kernel image file in kilobytes. If
3943 ``KERNEL_IMAGE_MAXSIZE`` is set, the size of the kernel image file is
3944 checked against the set value during the
3945 :ref:`ref-tasks-sizecheck` task. The task fails if
3946 the kernel image file is larger than the setting.
3947
3948 ``KERNEL_IMAGE_MAXSIZE`` is useful for target devices that have a
3949 limited amount of space in which the kernel image must be stored.
3950
3951 By default, this variable is not set, which means the size of the
3952 kernel image is not checked.
3953
3954 KERNEL_IMAGE_NAME
3955 The base name of the kernel image. This variable is set in the
3956 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3957 ::
3958
3959 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3960
3961 The value of the
3962 :term:`KERNEL_ARTIFACT_NAME` variable,
3963 which is set in the same file, has the following value:
3964 ::
3965
3966 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3967
3968 KERNEL_IMAGETYPE
3969 The type of kernel to build for a device, usually set by the machine
3970 configuration files and defaults to "zImage". This variable is used
3971 when building the kernel and is passed to ``make`` as the target to
3972 build.
3973
3974 If you want to build an alternate kernel image type, use the
3975 :term:`KERNEL_ALT_IMAGETYPE` variable.
3976
3977 KERNEL_MODULE_AUTOLOAD
3978 Lists kernel modules that need to be auto-loaded during boot.
3979
3980 .. note::
3981
3982 This variable replaces the deprecated
3983 module_autoload
3984 variable.
3985
3986 You can use the ``KERNEL_MODULE_AUTOLOAD`` variable anywhere that it
3987 can be recognized by the kernel recipe or by an out-of-tree kernel
3988 module recipe (e.g. a machine configuration file, a distribution
3989 configuration file, an append file for the recipe, or the recipe
3990 itself).
3991
3992 Specify it as follows:
3993 ::
3994
3995 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
3996
3997 Including ``KERNEL_MODULE_AUTOLOAD`` causes the OpenEmbedded build
3998 system to populate the ``/etc/modules-load.d/modname.conf`` file with
3999 the list of modules to be auto-loaded on boot. The modules appear
4000 one-per-line in the file. Here is an example of the most common use
4001 case:
4002 ::
4003
4004 KERNEL_MODULE_AUTOLOAD += "module_name"
4005
4006 For information on how to populate the ``modname.conf`` file with
4007 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4008
4009 KERNEL_MODULE_PROBECONF
4010 Provides a list of modules for which the OpenEmbedded build system
4011 expects to find ``module_conf_``\ modname values that specify
4012 configuration for each of the modules. For information on how to
4013 provide those module configurations, see the
4014 :term:`module_conf_* <module_conf>` variable.
4015
4016 KERNEL_PATH
4017 The location of the kernel sources. This variable is set to the value
4018 of the :term:`STAGING_KERNEL_DIR` within
4019 the :ref:`module <ref-classes-module>` class. For information on
4020 how this variable is used, see the
4021 ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`"
4022 section in the Yocto Project Linux Kernel Development Manual.
4023
4024 To help maximize compatibility with out-of-tree drivers used to build
4025 modules, the OpenEmbedded build system also recognizes and uses the
4026 :term:`KERNEL_SRC` variable, which is identical to
4027 the ``KERNEL_PATH`` variable. Both variables are common variables
4028 used by external Makefiles to point to the kernel source directory.
4029
4030 KERNEL_SRC
4031 The location of the kernel sources. This variable is set to the value
4032 of the :term:`STAGING_KERNEL_DIR` within
4033 the :ref:`module <ref-classes-module>` class. For information on
4034 how this variable is used, see the
4035 ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`"
4036 section in the Yocto Project Linux Kernel Development Manual.
4037
4038 To help maximize compatibility with out-of-tree drivers used to build
4039 modules, the OpenEmbedded build system also recognizes and uses the
4040 :term:`KERNEL_PATH` variable, which is identical
4041 to the ``KERNEL_SRC`` variable. Both variables are common variables
4042 used by external Makefiles to point to the kernel source directory.
4043
4044 KERNEL_VERSION
4045 Specifies the version of the kernel as extracted from ``version.h``
4046 or ``utsrelease.h`` within the kernel sources. Effects of setting
4047 this variable do not take affect until the kernel has been
4048 configured. Consequently, attempting to refer to this variable in
4049 contexts prior to configuration will not work.
4050
4051 KERNELDEPMODDEPEND
4052 Specifies whether the data referenced through
4053 :term:`PKGDATA_DIR` is needed or not. The
4054 ``KERNELDEPMODDEPEND`` does not control whether or not that data
4055 exists, but simply whether or not it is used. If you do not need to
4056 use the data, set the ``KERNELDEPMODDEPEND`` variable in your
4057 ``initramfs`` recipe. Setting the variable there when the data is not
4058 needed avoids a potential dependency loop.
4059
4060 KFEATURE_DESCRIPTION
4061 Provides a short description of a configuration fragment. You use
4062 this variable in the ``.scc`` file that describes a configuration
4063 fragment file. Here is the variable used in a file named ``smp.scc``
4064 to describe SMP being enabled:
4065 ::
4066
4067 define KFEATURE_DESCRIPTION "Enable SMP"
4068
4069 KMACHINE
4070 The machine as known by the kernel. Sometimes the machine name used
4071 by the kernel does not match the machine name used by the
4072 OpenEmbedded build system. For example, the machine name that the
4073 OpenEmbedded build system understands as ``core2-32-intel-common``
4074 goes by a different name in the Linux Yocto kernel. The kernel
4075 understands that machine as ``intel-core2-32``. For cases like these,
4076 the ``KMACHINE`` variable maps the kernel machine name to the
4077 OpenEmbedded build system machine name.
4078
4079 These mappings between different names occur in the Yocto Linux
4080 Kernel's ``meta`` branch. As an example take a look in the
4081 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:
4082 ::
4083
4084 LINUX_VERSION_core2-32-intel-common = "3.19.0"
4085 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
4086 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4087 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4088 KMACHINE_core2-32-intel-common = "intel-core2-32"
4089 KBRANCH_core2-32-intel-common = "standard/base"
4090 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
4091
4092 The ``KMACHINE`` statement says
4093 that the kernel understands the machine name as "intel-core2-32".
4094 However, the OpenEmbedded build system understands the machine as
4095 "core2-32-intel-common".
4096
4097 KTYPE
4098 Defines the kernel type to be used in assembling the configuration.
4099 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4100 kernel types. See the ":ref:`kernel-dev/kernel-dev-advanced:kernel types`"
4101 section in the
4102 Yocto Project Linux Kernel Development Manual for more information on
4103 kernel types.
4104
4105 You define the ``KTYPE`` variable in the
4106 :ref:`kernel-dev/kernel-dev-advanced:bsp descriptions`. The
4107 value you use must match the value used for the
4108 :term:`LINUX_KERNEL_TYPE` value used by the
4109 kernel recipe.
4110
4111 LABELS
4112 Provides a list of targets for automatic configuration.
4113
4114 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4115 information on how this variable is used.
4116
4117 LAYERDEPENDS
4118 Lists the layers, separated by spaces, on which this recipe depends.
4119 Optionally, you can specify a specific layer version for a dependency
4120 by adding it to the end of the layer name. Here is an example:
4121 ::
4122
4123 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4124
4125 In this previous example,
4126 version 3 of "anotherlayer" is compared against
4127 :term:`LAYERVERSION`\ ``_anotherlayer``.
4128
4129 An error is produced if any dependency is missing or the version
4130 numbers (if specified) do not match exactly. This variable is used in
4131 the ``conf/layer.conf`` file and must be suffixed with the name of
4132 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4133
4134 LAYERDIR
4135 When used inside the ``layer.conf`` configuration file, this variable
4136 provides the path of the current layer. This variable is not
4137 available outside of ``layer.conf`` and references are expanded
4138 immediately when parsing of the file completes.
4139
4140 LAYERRECOMMENDS
4141 Lists the layers, separated by spaces, recommended for use with this
4142 layer.
4143
4144 Optionally, you can specify a specific layer version for a
4145 recommendation by adding the version to the end of the layer name.
4146 Here is an example:
4147 ::
4148
4149 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4150
4151 In this previous example, version 3 of "anotherlayer" is compared
4152 against ``LAYERVERSION_anotherlayer``.
4153
4154 This variable is used in the ``conf/layer.conf`` file and must be
4155 suffixed with the name of the specific layer (e.g.
4156 ``LAYERRECOMMENDS_mylayer``).
4157
4158 LAYERSERIES_COMPAT
4159 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
4160 a layer is compatible. Using the ``LAYERSERIES_COMPAT`` variable
4161 allows the layer maintainer to indicate which combinations of the
4162 layer and OE-Core can be expected to work. The variable gives the
4163 system a way to detect when a layer has not been tested with new
4164 releases of OE-Core (e.g. the layer is not maintained).
4165
4166 To specify the OE-Core versions for which a layer is compatible, use
4167 this variable in your layer's ``conf/layer.conf`` configuration file.
4168 For the list, use the Yocto Project
4169 :yocto_wiki:`Release Name </wiki/Releases>` (e.g.
4170 DISTRO_NAME_NO_CAP). To specify multiple OE-Core versions for the
4171 layer, use a space-separated list:
4172 ::
4173
4174 LAYERSERIES_COMPAT_layer_root_name = "DISTRO_NAME_NO_CAP DISTRO_NAME_NO_CAP_MINUS_ONE"
4175
4176 .. note::
4177
4178 Setting
4179 LAYERSERIES_COMPAT
4180 is required by the Yocto Project Compatible version 2 standard.
4181 The OpenEmbedded build system produces a warning if the variable
4182 is not set for any given layer.
4183
4184 See the ":ref:`dev-manual/dev-manual-common-tasks:creating your own layer`"
4185 section in the Yocto Project Development Tasks Manual.
4186
4187 LAYERVERSION
4188 Optionally specifies the version of a layer as a single number. You
4189 can use this within :term:`LAYERDEPENDS` for
4190 another layer in order to depend on a specific version of the layer.
4191 This variable is used in the ``conf/layer.conf`` file and must be
4192 suffixed with the name of the specific layer (e.g.
4193 ``LAYERVERSION_mylayer``).
4194
4195 LD
4196 The minimal command and arguments used to run the linker.
4197
4198 LDFLAGS
4199 Specifies the flags to pass to the linker. This variable is exported
4200 to an environment variable and thus made visible to the software
4201 being built during the compilation step.
4202
4203 Default initialization for ``LDFLAGS`` varies depending on what is
4204 being built:
4205
4206 - :term:`TARGET_LDFLAGS` when building for the
4207 target
4208
4209 - :term:`BUILD_LDFLAGS` when building for the
4210 build host (i.e. ``-native``)
4211
4212 - :term:`BUILDSDK_LDFLAGS` when building for
4213 an SDK (i.e. ``nativesdk-``)
4214
4215 LEAD_SONAME
4216 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4217 that the :ref:`debian <ref-classes-debian>` class applies its
4218 naming policy to given a recipe that packages multiple libraries.
4219
4220 This variable works in conjunction with the ``debian`` class.
4221
4222 LIC_FILES_CHKSUM
4223 Checksums of the license text in the recipe source code.
4224
4225 This variable tracks changes in license text of the source code
4226 files. If the license text is changed, it will trigger a build
4227 failure, which gives the developer an opportunity to review any
4228 license change.
4229
4230 This variable must be defined for all recipes (unless
4231 :term:`LICENSE` is set to "CLOSED").
4232
4233 For more information, see the ":ref:`usingpoky-configuring-lic_files_chksum`"
4234 section in the Yocto Project Development Tasks Manual.
4235
4236 LICENSE
4237 The list of source licenses for the recipe. Follow these rules:
4238
4239 - Do not use spaces within individual license names.
4240
4241 - Separate license names using \| (pipe) when there is a choice
4242 between licenses.
4243
4244 - Separate license names using & (ampersand) when multiple licenses
4245 exist that cover different parts of the source.
4246
4247 - You can use spaces between license names.
4248
4249 - For standard licenses, use the names of the files in
4250 ``meta/files/common-licenses/`` or the
4251 :term:`SPDXLICENSEMAP` flag names defined in
4252 ``meta/conf/licenses.conf``.
4253
4254 Here are some examples:
4255 ::
4256
4257 LICENSE = "LGPLv2.1 | GPLv3"
4258 LICENSE = "MPL-1 & LGPLv2.1"
4259 LICENSE = "GPLv2+"
4260
4261 The first example is from the
4262 recipes for Qt, which the user may choose to distribute under either
4263 the LGPL version 2.1 or GPL version 3. The second example is from
4264 Cairo where two licenses cover different parts of the source code.
4265 The final example is from ``sysstat``, which presents a single
4266 license.
4267
4268 You can also specify licenses on a per-package basis to handle
4269 situations where components of the output have different licenses.
4270 For example, a piece of software whose code is licensed under GPLv2
4271 but has accompanying documentation licensed under the GNU Free
4272 Documentation License 1.2 could be specified as follows:
4273 ::
4274
4275 LICENSE = "GFDL-1.2 & GPLv2"
4276 LICENSE_${PN} = "GPLv2"
4277 LICENSE_${PN}-doc = "GFDL-1.2"
4278
4279 LICENSE_CREATE_PACKAGE
4280 Setting ``LICENSE_CREATE_PACKAGE`` to "1" causes the OpenEmbedded
4281 build system to create an extra package (i.e.
4282 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4283 those packages to the
4284 :term:`RRECOMMENDS`\ ``_${PN}``.
4285
4286 The ``${PN}-lic`` package installs a directory in
4287 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4288 name, and installs files in that directory that contain license and
4289 copyright information (i.e. copies of the appropriate license files
4290 from ``meta/common-licenses`` that match the licenses specified in
4291 the :term:`LICENSE` variable of the recipe metadata
4292 and copies of files marked in
4293 :term:`LIC_FILES_CHKSUM` as containing
4294 license text).
4295
4296 For related information on providing license text, see the
4297 :term:`COPY_LIC_DIRS` variable, the
4298 :term:`COPY_LIC_MANIFEST` variable, and the
4299 ":ref:`dev-manual/dev-manual-common-tasks:providing license text`"
4300 section in the Yocto Project Development Tasks Manual.
4301
4302 LICENSE_FLAGS
4303 Specifies additional flags for a recipe you must whitelist through
4304 :term:`LICENSE_FLAGS_WHITELIST` in
4305 order to allow the recipe to be built. When providing multiple flags,
4306 separate them with spaces.
4307
4308 This value is independent of :term:`LICENSE` and is
4309 typically used to mark recipes that might require additional licenses
4310 in order to be used in a commercial product. For more information,
4311 see the
4312 ":ref:`dev-manual/dev-manual-common-tasks:enabling commercially licensed recipes`"
4313 section in the Yocto Project Development Tasks Manual.
4314
4315 LICENSE_FLAGS_WHITELIST
4316 Lists license flags that when specified in
4317 :term:`LICENSE_FLAGS` within a recipe should not
4318 prevent that recipe from being built. This practice is otherwise
4319 known as "whitelisting" license flags. For more information, see the
4320 ":ref:`dev-manual/dev-manual-common-tasks:enabling commercially licensed recipes`"
4321 section in the Yocto Project Development Tasks Manual.
4322
4323 LICENSE_PATH
4324 Path to additional licenses used during the build. By default, the
4325 OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the
4326 directory that holds common license text used during the build. The
4327 ``LICENSE_PATH`` variable allows you to extend that location to other
4328 areas that have additional licenses:
4329 ::
4330
4331 LICENSE_PATH += "path-to-additional-common-licenses"
4332
4333 LINUX_KERNEL_TYPE
4334 Defines the kernel type to be used in assembling the configuration.
4335 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4336 kernel types. See the ":ref:`kernel-dev/kernel-dev-advanced:kernel types`"
4337 section in the
4338 Yocto Project Linux Kernel Development Manual for more information on
4339 kernel types.
4340
4341 If you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to
4342 "standard". Together with :term:`KMACHINE`, the
4343 ``LINUX_KERNEL_TYPE`` variable defines the search arguments used by
4344 the kernel tools to find the appropriate description within the
4345 kernel :term:`Metadata` with which to build out the sources
4346 and configuration.
4347
4348 LINUX_VERSION
4349 The Linux version from ``kernel.org`` on which the Linux kernel image
4350 being built using the OpenEmbedded build system is based. You define
4351 this variable in the kernel recipe. For example, the
4352 ``linux-yocto-3.4.bb`` kernel recipe found in
4353 ``meta/recipes-kernel/linux`` defines the variables as follows:
4354 ::
4355
4356 LINUX_VERSION ?= "3.4.24"
4357
4358 The ``LINUX_VERSION`` variable is used to define :term:`PV`
4359 for the recipe:
4360 ::
4361
4362 PV = "${LINUX_VERSION}+git${SRCPV}"
4363
4364 LINUX_VERSION_EXTENSION
4365 A string extension compiled into the version string of the Linux
4366 kernel built with the OpenEmbedded build system. You define this
4367 variable in the kernel recipe. For example, the linux-yocto kernel
4368 recipes all define the variable as follows:
4369 ::
4370
4371 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4372
4373 Defining this variable essentially sets the Linux kernel
4374 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4375 the ``uname`` command. Here is an example that shows the extension
4376 assuming it was set as previously shown:
4377 ::
4378
4379 $ uname -r
4380 3.7.0-rc8-custom
4381
4382 LOG_DIR
4383 Specifies the directory to which the OpenEmbedded build system writes
4384 overall log files. The default directory is ``${TMPDIR}/log``.
4385
4386 For the directory containing logs specific to each task, see the
4387 :term:`T` variable.
4388
4389 MACHINE
4390 Specifies the target device for which the image is built. You define
4391 ``MACHINE`` in the ``local.conf`` file found in the
4392 :term:`Build Directory`. By default, ``MACHINE`` is set to
4393 "qemux86", which is an x86-based architecture machine to be emulated
4394 using QEMU:
4395 ::
4396
4397 MACHINE ?= "qemux86"
4398
4399 The variable corresponds to a machine configuration file of the same
4400 name, through which machine-specific configurations are set. Thus,
4401 when ``MACHINE`` is set to "qemux86" there exists the corresponding
4402 ``qemux86.conf`` machine configuration file, which can be found in
4403 the :term:`Source Directory` in
4404 ``meta/conf/machine``.
4405
4406 The list of machines supported by the Yocto Project as shipped
4407 include the following:
4408 ::
4409
4410 MACHINE ?= "qemuarm"
4411 MACHINE ?= "qemuarm64"
4412 MACHINE ?= "qemumips"
4413 MACHINE ?= "qemumips64"
4414 MACHINE ?= "qemuppc"
4415 MACHINE ?= "qemux86"
4416 MACHINE ?= "qemux86-64"
4417 MACHINE ?= "genericx86"
4418 MACHINE ?= "genericx86-64"
4419 MACHINE ?= "beaglebone"
4420 MACHINE ?= "edgerouter"
4421
4422 The last five are Yocto Project reference hardware
4423 boards, which are provided in the ``meta-yocto-bsp`` layer.
4424
4425 .. note::
4426
4427 Adding additional Board Support Package (BSP) layers to your
4428 configuration adds new possible settings for
4429 MACHINE
4430 .
4431
4432 MACHINE_ARCH
4433 Specifies the name of the machine-specific architecture. This
4434 variable is set automatically from :term:`MACHINE` or
4435 :term:`TUNE_PKGARCH`. You should not hand-edit
4436 the ``MACHINE_ARCH`` variable.
4437
4438 MACHINE_ESSENTIAL_EXTRA_RDEPENDS
4439 A list of required machine-specific packages to install as part of
4440 the image being built. The build process depends on these packages
4441 being present. Furthermore, because this is a "machine-essential"
4442 variable, the list of packages are essential for the machine to boot.
4443 The impact of this variable affects images based on
4444 ``packagegroup-core-boot``, including the ``core-image-minimal``
4445 image.
4446
4447 This variable is similar to the
4448 ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` variable with the exception
4449 that the image being built has a build dependency on the variable's
4450 list of packages. In other words, the image will not build if a file
4451 in this list is not found.
4452
4453 As an example, suppose the machine for which you are building
4454 requires ``example-init`` to be run during boot to initialize the
4455 hardware. In this case, you would use the following in the machine's
4456 ``.conf`` configuration file:
4457 ::
4458
4459 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4460
4461 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS
4462 A list of recommended machine-specific packages to install as part of
4463 the image being built. The build process does not depend on these
4464 packages being present. However, because this is a
4465 "machine-essential" variable, the list of packages are essential for
4466 the machine to boot. The impact of this variable affects images based
4467 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4468 image.
4469
4470 This variable is similar to the ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS``
4471 variable with the exception that the image being built does not have
4472 a build dependency on the variable's list of packages. In other
4473 words, the image will still build if a package in this list is not
4474 found. Typically, this variable is used to handle essential kernel
4475 modules, whose functionality may be selected to be built into the
4476 kernel rather than as a module, in which case a package will not be
4477 produced.
4478
4479 Consider an example where you have a custom kernel where a specific
4480 touchscreen driver is required for the machine to be usable. However,
4481 the driver can be built as a module or into the kernel depending on
4482 the kernel configuration. If the driver is built as a module, you
4483 want it to be installed. But, when the driver is built into the
4484 kernel, you still want the build to succeed. This variable sets up a
4485 "recommends" relationship so that in the latter case, the build will
4486 not fail due to the missing package. To accomplish this, assuming the
4487 package for the module was called ``kernel-module-ab123``, you would
4488 use the following in the machine's ``.conf`` configuration file:
4489 ::
4490
4491 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4492
4493 .. note::
4494
4495 In this example, the
4496 kernel-module-ab123
4497 recipe needs to explicitly set its
4498 PACKAGES
4499 variable to ensure that BitBake does not use the kernel recipe's
4500 PACKAGES_DYNAMIC
4501 variable to satisfy the dependency.
4502
4503 Some examples of these machine essentials are flash, screen,
4504 keyboard, mouse, or touchscreen drivers (depending on the machine).
4505
4506 MACHINE_EXTRA_RDEPENDS
4507 A list of machine-specific packages to install as part of the image
4508 being built that are not essential for the machine to boot. However,
4509 the build process for more fully-featured images depends on the
4510 packages being present.
4511
4512 This variable affects all images based on ``packagegroup-base``,
4513 which does not include the ``core-image-minimal`` or
4514 ``core-image-full-cmdline`` images.
4515
4516 The variable is similar to the ``MACHINE_EXTRA_RRECOMMENDS`` variable
4517 with the exception that the image being built has a build dependency
4518 on the variable's list of packages. In other words, the image will
4519 not build if a file in this list is not found.
4520
4521 An example is a machine that has WiFi capability but is not essential
4522 for the machine to boot the image. However, if you are building a
4523 more fully-featured image, you want to enable the WiFi. The package
4524 containing the firmware for the WiFi hardware is always expected to
4525 exist, so it is acceptable for the build process to depend upon
4526 finding the package. In this case, assuming the package for the
4527 firmware was called ``wifidriver-firmware``, you would use the
4528 following in the ``.conf`` file for the machine:
4529 ::
4530
4531 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4532
4533 MACHINE_EXTRA_RRECOMMENDS
4534 A list of machine-specific packages to install as part of the image
4535 being built that are not essential for booting the machine. The image
4536 being built has no build dependency on this list of packages.
4537
4538 This variable affects only images based on ``packagegroup-base``,
4539 which does not include the ``core-image-minimal`` or
4540 ``core-image-full-cmdline`` images.
4541
4542 This variable is similar to the ``MACHINE_EXTRA_RDEPENDS`` variable
4543 with the exception that the image being built does not have a build
4544 dependency on the variable's list of packages. In other words, the
4545 image will build if a file in this list is not found.
4546
4547 An example is a machine that has WiFi capability but is not essential
4548 For the machine to boot the image. However, if you are building a
4549 more fully-featured image, you want to enable WiFi. In this case, the
4550 package containing the WiFi kernel module will not be produced if the
4551 WiFi driver is built into the kernel, in which case you still want
4552 the build to succeed instead of failing as a result of the package
4553 not being found. To accomplish this, assuming the package for the
4554 module was called ``kernel-module-examplewifi``, you would use the
4555 following in the ``.conf`` file for the machine:
4556 ::
4557
4558 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4559
4560 MACHINE_FEATURES
4561 Specifies the list of hardware features the
4562 :term:`MACHINE` is capable of supporting. For related
4563 information on enabling features, see the
4564 :term:`DISTRO_FEATURES`,
4565 :term:`COMBINED_FEATURES`, and
4566 :term:`IMAGE_FEATURES` variables.
4567
4568 For a list of hardware features supported by the Yocto Project as
4569 shipped, see the "`Machine Features <#ref-features-machine>`__"
4570 section.
4571
4572 MACHINE_FEATURES_BACKFILL
4573 Features to be added to ``MACHINE_FEATURES`` if not also present in
4574 ``MACHINE_FEATURES_BACKFILL_CONSIDERED``.
4575
4576 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4577 not intended to be user-configurable. It is best to just reference
4578 the variable to see which machine features are being backfilled for
4579 all machine configurations. See the "`Feature
4580 Backfilling <#ref-features-backfill>`__" section for more
4581 information.
4582
4583 MACHINE_FEATURES_BACKFILL_CONSIDERED
4584 Features from ``MACHINE_FEATURES_BACKFILL`` that should not be
4585 backfilled (i.e. added to ``MACHINE_FEATURES``) during the build. See
4586 the "`Feature Backfilling <#ref-features-backfill>`__" section for
4587 more information.
4588
4589 MACHINEOVERRIDES
4590 A colon-separated list of overrides that apply to the current
4591 machine. By default, this list includes the value of
4592 :term:`MACHINE`.
4593
4594 You can extend ``MACHINEOVERRIDES`` to add extra overrides that
4595 should apply to a machine. For example, all machines emulated in QEMU
4596 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4597 ``meta/conf/machine/include/qemu.inc`` that prepends the following
4598 override to ``MACHINEOVERRIDES``:
4599 ::
4600
4601 MACHINEOVERRIDES =. "qemuall:"
4602
4603 This
4604 override allows variables to be overriden for all machines emulated
4605 in QEMU, like in the following example from the ``connman-conf``
4606 recipe:
4607 ::
4608
4609 SRC_URI_append_qemuall = "file://wired.config \
4610 file://wired-setup \
4611 "
4612
4613 The underlying mechanism behind
4614 ``MACHINEOVERRIDES`` is simply that it is included in the default
4615 value of :term:`OVERRIDES`.
4616
4617 MAINTAINER
4618 The email address of the distribution maintainer.
4619
4620 MIRRORS
4621 Specifies additional paths from which the OpenEmbedded build system
4622 gets source code. When the build system searches for source code, it
4623 first tries the local download directory. If that location fails, the
4624 build system tries locations defined by
4625 :term:`PREMIRRORS`, the upstream source, and then
4626 locations specified by ``MIRRORS`` in that order.
4627
4628 Assuming your distribution (:term:`DISTRO`) is "poky",
4629 the default value for ``MIRRORS`` is defined in the
4630 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4631
4632 MLPREFIX
4633 Specifies a prefix has been added to :term:`PN` to create a
4634 special version of a recipe or package (i.e. a Multilib version). The
4635 variable is used in places where the prefix needs to be added to or
4636 removed from a the name (e.g. the :term:`BPN` variable).
4637 ``MLPREFIX`` gets set when a prefix has been added to ``PN``.
4638
4639 .. note::
4640
4641 The "ML" in
4642 MLPREFIX
4643 stands for "MultiLib". This representation is historical and comes
4644 from a time when
4645 nativesdk
4646 was a suffix rather than a prefix on the recipe name. When
4647 nativesdk
4648 was turned into a prefix, it made sense to set
4649 MLPREFIX
4650 for it as well.
4651
4652 To help understand when ``MLPREFIX`` might be needed, consider when
4653 :term:`BBCLASSEXTEND` is used to provide a
4654 ``nativesdk`` version of a recipe in addition to the target version.
4655 If that recipe declares build-time dependencies on tasks in other
4656 recipes by using :term:`DEPENDS`, then a dependency on
4657 "foo" will automatically get rewritten to a dependency on
4658 "nativesdk-foo". However, dependencies like the following will not
4659 get rewritten automatically:
4660 ::
4661
4662 do_foo[depends] += "recipe:do_foo"
4663
4664 If you want such a dependency to also get transformed, you can do the
4665 following:
4666 ::
4667
4668 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4669
4670 module_autoload
4671 This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD``
4672 variable. You should replace all occurrences of ``module_autoload``
4673 with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:
4674 ::
4675
4676 module_autoload_rfcomm = "rfcomm"
4677
4678 should now be replaced with:
4679 ::
4680
4681 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4682
4683 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4684
4685 module_conf
4686 Specifies `modprobe.d <http://linux.die.net/man/5/modprobe.d>`_
4687 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4688 file.
4689
4690 You can use this variable anywhere that it can be recognized by the
4691 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4692 configuration file, a distribution configuration file, an append file
4693 for the recipe, or the recipe itself). If you use this variable, you
4694 must also be sure to list the module name in the
4695 :term:`KERNEL_MODULE_AUTOLOAD`
4696 variable.
4697
4698 Here is the general syntax:
4699 ::
4700
4701 module_conf_module_name = "modprobe.d-syntax"
4702
4703 You must use the kernel module name override.
4704
4705 Run ``man modprobe.d`` in the shell to find out more information on
4706 the exact syntax you want to provide with ``module_conf``.
4707
4708 Including ``module_conf`` causes the OpenEmbedded build system to
4709 populate the ``/etc/modprobe.d/modname.conf`` file with
4710 ``modprobe.d`` syntax lines. Here is an example that adds the options
4711 ``arg1`` and ``arg2`` to a module named ``mymodule``:
4712 ::
4713
4714 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4715
4716 For information on how to specify kernel modules to auto-load on
4717 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4718
4719 MODULE_TARBALL_DEPLOY
4720 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4721 "0" to disable creation of this file, which contains all of the
4722 kernel modules resulting from a kernel build.
4723
4724 MODULE_TARBALL_LINK_NAME
4725 The link name of the kernel module tarball. This variable is set in
4726 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4727 ::
4728
4729 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4730
4731 The value
4732 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
4733 same file, has the following value:
4734 ::
4735
4736 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4737
4738 See the :term:`MACHINE` variable for additional information.
4739
4740 MODULE_TARBALL_NAME
4741 The base name of the kernel module tarball. This variable is set in
4742 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4743 ::
4744
4745 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4746
4747 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
4748 which is set in the same file, has the following value:
4749 ::
4750
4751 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4752
4753 MULTIMACH_TARGET_SYS
4754 Uniquely identifies the type of the target system for which packages
4755 are being built. This variable allows output for different types of
4756 target systems to be put into different subdirectories of the same
4757 output directory.
4758
4759 The default value of this variable is:
4760 ::
4761
4762 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4763
4764 Some classes (e.g.
4765 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
4766 ``MULTIMACH_TARGET_SYS`` value.
4767
4768 See the :term:`STAMP` variable for an example. See the
4769 :term:`STAGING_DIR_TARGET` variable for more information.
4770
4771 NATIVELSBSTRING
4772 A string identifying the host distribution. Strings consist of the
4773 host distributor ID followed by the release, as reported by the
4774 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4775 example, when running a build on Ubuntu 12.10, the value is
4776 "Ubuntu-12.10". If this information is unable to be determined, the
4777 value resolves to "Unknown".
4778
4779 This variable is used by default to isolate native shared state
4780 packages for different distributions (e.g. to avoid problems with
4781 ``glibc`` version incompatibilities). Additionally, the variable is
4782 checked against
4783 :term:`SANITY_TESTED_DISTROS` if that
4784 variable is set.
4785
4786 NM
4787 The minimal command and arguments to run ``nm``.
4788
4789 NO_GENERIC_LICENSE
4790 Avoids QA errors when you use a non-common, non-CLOSED license in a
4791 recipe. Packages exist, such as the linux-firmware package, with many
4792 licenses that are not in any way common. Also, new licenses are added
4793 occasionally to avoid introducing a lot of common license files,
4794 which are only applicable to a specific package.
4795 ``NO_GENERIC_LICENSE`` is used to allow copying a license that does
4796 not exist in common licenses.
4797
4798 The following example shows how to add ``NO_GENERIC_LICENSE`` to a
4799 recipe:
4800 ::
4801
4802 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4803
4804 The following is an example that
4805 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
4806 source:
4807 ::
4808
4809 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4810
4811 NO_RECOMMENDATIONS
4812 Prevents installation of all "recommended-only" packages.
4813 Recommended-only packages are packages installed only through the
4814 :term:`RRECOMMENDS` variable). Setting the
4815 ``NO_RECOMMENDATIONS`` variable to "1" turns this feature on: ::
4816
4817 NO_RECOMMENDATIONS = "1"
4818
4819 You can set this variable globally in your ``local.conf`` file or you
4820 can attach it to a specific image recipe by using the recipe name
4821 override: ::
4822
4823 NO_RECOMMENDATIONS_pn-target_image = "1"
4824
4825 It is important to realize that if you choose to not install packages
4826 using this variable and some other packages are dependent on them
4827 (i.e. listed in a recipe's :term:`RDEPENDS`
4828 variable), the OpenEmbedded build system ignores your request and
4829 will install the packages to avoid dependency errors.
4830
4831 .. note::
4832
4833 Some recommended packages might be required for certain system
4834 functionality, such as kernel modules. It is up to you to add
4835 packages with the IMAGE_INSTALL variable.
4836
4837 Support for this variable exists only when using the IPK and RPM
4838 packaging backend. Support does not exist for DEB.
4839
4840 See the :term:`BAD_RECOMMENDATIONS` and
4841 the :term:`PACKAGE_EXCLUDE` variables for
4842 related information.
4843
4844 NOAUTOPACKAGEDEBUG
4845 Disables auto package from splitting ``.debug`` files. If a recipe
4846 requires ``FILES_${PN}-dbg`` to be set manually, the
4847 ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the
4848 content of the debug package. For example:
4849 ::
4850
4851 NOAUTOPACKAGEDEBUG = "1"
4852 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4853 FILES_${PN}-dbg = "/usr/src/debug/"
4854 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
4855
4856 OBJCOPY
4857 The minimal command and arguments to run ``objcopy``.
4858
4859 OBJDUMP
4860 The minimal command and arguments to run ``objdump``.
4861
4862 OE_BINCONFIG_EXTRA_MANGLE
4863 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4864 this variable specifies additional arguments passed to the "sed"
4865 command. The sed command alters any paths in configuration scripts
4866 that have been set up during compilation. Inheriting this class
4867 results in all paths in these scripts being changed to point into the
4868 ``sysroots/`` directory so that all builds that use the script will
4869 use the correct directories for the cross compiling layout.
4870
4871 See the ``meta/classes/binconfig.bbclass`` in the
4872 :term:`Source Directory` for details on how this class
4873 applies these additional sed command arguments. For general
4874 information on the ``binconfig`` class, see the
4875 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
4876
4877 OE_IMPORTS
4878 An internal variable used to tell the OpenEmbedded build system what
4879 Python modules to import for every Python function run by the system.
4880
4881 .. note::
4882
4883 Do not set this variable. It is for internal use only.
4884
4885 OE_INIT_ENV_SCRIPT
4886 The name of the build environment setup script for the purposes of
4887 setting up the environment within the extensible SDK. The default
4888 value is "oe-init-build-env".
4889
4890 If you use a custom script to set up your build environment, set the
4891 ``OE_INIT_ENV_SCRIPT`` variable to its name.
4892
4893 OE_TERMINAL
4894 Controls how the OpenEmbedded build system spawns interactive
4895 terminals on the host development system (e.g. using the BitBake
4896 command with the ``-c devshell`` command-line option). For more
4897 information, see the ":ref:`platdev-appdev-devshell`" section in
4898 the Yocto Project Development Tasks Manual.
4899
4900 You can use the following values for the ``OE_TERMINAL`` variable:
4901
4902 - auto
4903 - gnome
4904 - xfce
4905 - rxvt
4906 - screen
4907 - konsole
4908 - none
4909
4910 OEROOT
4911 The directory from which the top-level build environment setup script
4912 is sourced. The Yocto Project provides a top-level build environment
4913 setup script: ````` <#structure-core-script>`__. When you run this
4914 script, the ``OEROOT`` variable resolves to the directory that
4915 contains the script.
4916
4917 For additional information on how this variable is used, see the
4918 initialization script.
4919
4920 OLDEST_KERNEL
4921 Declares the oldest version of the Linux kernel that the produced
4922 binaries must support. This variable is passed into the build of the
4923 Embedded GNU C Library (``glibc``).
4924
4925 The default for this variable comes from the
4926 ``meta/conf/bitbake.conf`` configuration file. You can override this
4927 default by setting the variable in a custom distribution
4928 configuration file.
4929
4930 OVERRIDES
4931 A colon-separated list of overrides that currently apply. Overrides
4932 are a BitBake mechanism that allows variables to be selectively
4933 overridden at the end of parsing. The set of overrides in
4934 ``OVERRIDES`` represents the "state" during building, which includes
4935 the current recipe being built, the machine for which it is being
4936 built, and so forth.
4937
4938 As an example, if the string "an-override" appears as an element in
4939 the colon-separated list in ``OVERRIDES``, then the following
4940 assignment will override ``FOO`` with the value "overridden" at the
4941 end of parsing:
4942 ::
4943
4944 FOO_an-override = "overridden"
4945
4946 See the
4947 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
4948 section in the BitBake User Manual for more information on the
4949 overrides mechanism.
4950
4951 The default value of ``OVERRIDES`` includes the values of the
4952 :term:`CLASSOVERRIDE`,
4953 :term:`MACHINEOVERRIDES`, and
4954 :term:`DISTROOVERRIDES` variables. Another
4955 important override included by default is ``pn-${PN}``. This override
4956 allows variables to be set for a single recipe within configuration
4957 (``.conf``) files. Here is an example:
4958 ::
4959
4960 FOO_pn-myrecipe = "myrecipe-specific value"
4961
4962 .. note::
4963
4964 An easy way to see what overrides apply is to search for
4965 OVERRIDES
4966 in the output of the
4967 bitbake -e
4968 command. See the "
4969 Viewing Variable Values
4970 " section in the Yocto Project Development Tasks Manual for more
4971 information.
4972
4973 P
4974 The recipe name and version. ``P`` is comprised of the following:
4975 ::
4976
4977 ${PN}-${PV}
4978
4979 PACKAGE_ADD_METADATA
4980 This variable defines additional metdata to add to packages.
4981
4982 You may find you need to inject additional metadata into packages.
4983 This variable allows you to do that by setting the injected data as
4984 the value. Multiple fields can be added by splitting the content with
4985 the literal separator "\n".
4986
4987 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
4988 to do package type specific settings. It can also be made package
4989 specific by using the package name as a suffix.
4990
4991 You can find out more about applying this variable in the
4992 ":ref:`dev-manual/dev-manual-common-tasks:adding custom metadata to packages`"
4993 section in the Yocto Project Development Tasks Manual.
4994
4995 PACKAGE_ARCH
4996 The architecture of the resulting package or packages.
4997
4998 By default, the value of this variable is set to
4999 :term:`TUNE_PKGARCH` when building for the
5000 target, :term:`BUILD_ARCH` when building for the
5001 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5002 SDK.
5003
5004 .. note::
5005
5006 See
5007 SDK_ARCH
5008 for more information.
5009
5010 However, if your recipe's output packages are built specific to the
5011 target machine rather than generally for the architecture of the
5012 machine, you should set ``PACKAGE_ARCH`` to the value of
5013 :term:`MACHINE_ARCH` in the recipe as follows:
5014 ::
5015
5016 PACKAGE_ARCH = "${MACHINE_ARCH}"
5017
5018 PACKAGE_ARCHS
5019 Specifies a list of architectures compatible with the target machine.
5020 This variable is set automatically and should not normally be
5021 hand-edited. Entries are separated using spaces and listed in order
5022 of priority. The default value for ``PACKAGE_ARCHS`` is "all any
5023 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5024
5025 PACKAGE_BEFORE_PN
5026 Enables easily adding packages to ``PACKAGES`` before ``${PN}`` so
5027 that those added packages can pick up files that would normally be
5028 included in the default package.
5029
5030 PACKAGE_CLASSES
5031 This variable, which is set in the ``local.conf`` configuration file
5032 found in the ``conf`` folder of the
5033 :term:`Build Directory`, specifies the package manager the
5034 OpenEmbedded build system uses when packaging data.
5035
5036 You can provide one or more of the following arguments for the
5037 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5038 package_tar"
5039
5040 .. note::
5041
5042 While it is a legal option, the
5043 package_tar
5044 class has limited functionality due to no support for package
5045 dependencies by that backend. Therefore, it is recommended that
5046 you do not use it.
5047
5048 The build system uses only the first argument in the list as the
5049 package manager when creating your image or SDK. However, packages
5050 will be created using any additional packaging classes you specify.
5051 For example, if you use the following in your ``local.conf`` file:
5052 ::
5053
5054 PACKAGE_CLASSES ?= "package_ipk"
5055
5056 The OpenEmbedded build system uses
5057 the IPK package manager to create your image or SDK.
5058
5059 For information on packaging and build performance effects as a
5060 result of the package manager in use, see the
5061 ":ref:`package.bbclass <ref-classes-package>`" section.
5062
5063 PACKAGE_DEBUG_SPLIT_STYLE
5064 Determines how to split up the binary and debug information when
5065 creating ``*-dbg`` packages to be used with the GNU Project Debugger
5066 (GDB).
5067
5068 With the ``PACKAGE_DEBUG_SPLIT_STYLE`` variable, you can control
5069 where debug information, which can include or exclude source files,
5070 is stored:
5071
5072 - ".debug": Debug symbol files are placed next to the binary in a
5073 ``.debug`` directory on the target. For example, if a binary is
5074 installed into ``/bin``, the corresponding debug symbol files are
5075 installed in ``/bin/.debug``. Source files are placed in
5076 ``/usr/src/debug``.
5077
5078 - "debug-file-directory": Debug symbol files are placed under
5079 ``/usr/lib/debug`` on the target, and separated by the path from
5080 where the binary is installed. For example, if a binary is
5081 installed in ``/bin``, the corresponding debug symbols are
5082 installed in ``/usr/lib/debug/bin``. Source files are placed in
5083 ``/usr/src/debug``.
5084
5085 - "debug-without-src": The same behavior as ".debug" previously
5086 described with the exception that no source files are installed.
5087
5088 - "debug-with-srcpkg": The same behavior as ".debug" previously
5089 described with the exception that all source files are placed in a
5090 separate ``*-src`` pkg. This is the default behavior.
5091
5092 You can find out more about debugging using GDB by reading the
5093 ":ref:`platdev-gdb-remotedebug`" section
5094 in the Yocto Project Development Tasks Manual.
5095
5096 PACKAGE_EXCLUDE_COMPLEMENTARY
5097 Prevents specific packages from being installed when you are
5098 installing complementary packages.
5099
5100 You might find that you want to prevent installing certain packages
5101 when you are installing complementary packages. For example, if you
5102 are using :term:`IMAGE_FEATURES` to install
5103 ``dev-pkgs``, you might not want to install all packages from a
5104 particular multilib. If you find yourself in this situation, you can
5105 use the ``PACKAGE_EXCLUDE_COMPLEMENTARY`` variable to specify regular
5106 expressions to match the packages you want to exclude.
5107
5108 PACKAGE_EXCLUDE
5109 Lists packages that should not be installed into an image. For
5110 example:
5111 ::
5112
5113 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5114
5115 You can set this variable globally in your ``local.conf`` file or you
5116 can attach it to a specific image recipe by using the recipe name
5117 override:
5118 ::
5119
5120 PACKAGE_EXCLUDE_pn-target_image = "package_name"
5121
5122 If you choose to not install a package using this variable and some
5123 other package is dependent on it (i.e. listed in a recipe's
5124 :term:`RDEPENDS` variable), the OpenEmbedded build
5125 system generates a fatal installation error. Because the build system
5126 halts the process with a fatal error, you can use the variable with
5127 an iterative development process to remove specific components from a
5128 system.
5129
5130 Support for this variable exists only when using the IPK and RPM
5131 packaging backend. Support does not exist for DEB.
5132
5133 See the :term:`NO_RECOMMENDATIONS` and the
5134 :term:`BAD_RECOMMENDATIONS` variables for
5135 related information.
5136
5137 PACKAGE_EXTRA_ARCHS
5138 Specifies the list of architectures compatible with the device CPU.
5139 This variable is useful when you build for several different devices
5140 that use miscellaneous processors such as XScale and ARM926-EJS.
5141
5142 PACKAGE_FEED_ARCHS
5143 Optionally specifies the package architectures used as part of the
5144 package feed URIs during the build. When used, the
5145 ``PACKAGE_FEED_ARCHS`` variable is appended to the final package feed
5146 URI, which is constructed using the
5147 :term:`PACKAGE_FEED_URIS` and
5148 :term:`PACKAGE_FEED_BASE_PATHS`
5149 variables.
5150
5151 .. note::
5152
5153 You can use the
5154 PACKAGE_FEEDS_ARCHS
5155 variable to whitelist specific package architectures. If you do
5156 not need to whitelist specific architectures, which is a common
5157 case, you can omit this variable. Omitting the variable results in
5158 all available architectures for the current machine being included
5159 into remote package feeds.
5160
5161 Consider the following example where the ``PACKAGE_FEED_URIS``,
5162 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5163 defined in your ``local.conf`` file:
5164 ::
5165
5166 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5167 https://example.com/packagerepos/updates"
5168 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5169 PACKAGE_FEED_ARCHS = "all core2-64"
5170
5171 Given these settings, the resulting package feeds are as follows:
5172 ::
5173
5174 https://example.com/packagerepos/release/rpm/all
5175 https://example.com/packagerepos/release/rpm/core2-64
5176 https://example.com/packagerepos/release/rpm-dev/all
5177 https://example.com/packagerepos/release/rpm-dev/core2-64
5178 https://example.com/packagerepos/updates/rpm/all
5179 https://example.com/packagerepos/updates/rpm/core2-64
5180 https://example.com/packagerepos/updates/rpm-dev/all
5181 https://example.com/packagerepos/updates/rpm-dev/core2-64
5182
5183 PACKAGE_FEED_BASE_PATHS
5184 Specifies the base path used when constructing package feed URIs. The
5185 ``PACKAGE_FEED_BASE_PATHS`` variable makes up the middle portion of a
5186 package feed URI used by the OpenEmbedded build system. The base path
5187 lies between the :term:`PACKAGE_FEED_URIS`
5188 and :term:`PACKAGE_FEED_ARCHS` variables.
5189
5190 Consider the following example where the ``PACKAGE_FEED_URIS``,
5191 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5192 defined in your ``local.conf`` file:
5193 ::
5194
5195 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5196 https://example.com/packagerepos/updates"
5197 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5198 PACKAGE_FEED_ARCHS = "all core2-64"
5199
5200 Given these settings, the resulting package feeds are as follows:
5201 ::
5202
5203 https://example.com/packagerepos/release/rpm/all
5204 https://example.com/packagerepos/release/rpm/core2-64
5205 https://example.com/packagerepos/release/rpm-dev/all
5206 https://example.com/packagerepos/release/rpm-dev/core2-64
5207 https://example.com/packagerepos/updates/rpm/all
5208 https://example.com/packagerepos/updates/rpm/core2-64
5209 https://example.com/packagerepos/updates/rpm-dev/all
5210 https://example.com/packagerepos/updates/rpm-dev/core2-64
5211
5212 PACKAGE_FEED_URIS
5213 Specifies the front portion of the package feed URI used by the
5214 OpenEmbedded build system. Each final package feed URI is comprised
5215 of ``PACKAGE_FEED_URIS``,
5216 :term:`PACKAGE_FEED_BASE_PATHS`, and
5217 :term:`PACKAGE_FEED_ARCHS` variables.
5218
5219 Consider the following example where the ``PACKAGE_FEED_URIS``,
5220 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
5221 defined in your ``local.conf`` file:
5222 ::
5223
5224 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5225 https://example.com/packagerepos/updates"
5226 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5227 PACKAGE_FEED_ARCHS = "all core2-64"
5228
5229 Given these settings, the resulting package feeds are as follows:
5230 ::
5231
5232 https://example.com/packagerepos/release/rpm/all
5233 https://example.com/packagerepos/release/rpm/core2-64
5234 https://example.com/packagerepos/release/rpm-dev/all
5235 https://example.com/packagerepos/release/rpm-dev/core2-64
5236 https://example.com/packagerepos/updates/rpm/all
5237 https://example.com/packagerepos/updates/rpm/core2-64
5238 https://example.com/packagerepos/updates/rpm-dev/all
5239 https://example.com/packagerepos/updates/rpm-dev/core2-64
5240
5241 PACKAGE_INSTALL
5242 The final list of packages passed to the package manager for
5243 installation into the image.
5244
5245 Because the package manager controls actual installation of all
5246 packages, the list of packages passed using ``PACKAGE_INSTALL`` is
5247 not the final list of packages that are actually installed. This
5248 variable is internal to the image construction code. Consequently, in
5249 general, you should use the
5250 :term:`IMAGE_INSTALL` variable to specify
5251 packages for installation. The exception to this is when working with
5252 the
5253 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
5254 image. When working with an initial RAM filesystem (initramfs) image,
5255 use the ``PACKAGE_INSTALL`` variable. For information on creating an
5256 initramfs, see the ":ref:`building-an-initramfs-image`" section
5257 in the Yocto Project Development Tasks Manual.
5258
5259 PACKAGE_INSTALL_ATTEMPTONLY
5260 Specifies a list of packages the OpenEmbedded build system attempts
5261 to install when creating an image. If a listed package fails to
5262 install, the build system does not generate an error. This variable
5263 is generally not user-defined.
5264
5265 PACKAGE_PREPROCESS_FUNCS
5266 Specifies a list of functions run to pre-process the
5267 :term:`PKGD` directory prior to splitting the files out
5268 to individual packages.
5269
5270 PACKAGE_WRITE_DEPS
5271 Specifies a list of dependencies for post-installation and
5272 pre-installation scripts on native/cross tools. If your
5273 post-installation or pre-installation script can execute at rootfs
5274 creation time rather than on the target but depends on a native tool
5275 in order to execute, you need to list the tools in
5276 ``PACKAGE_WRITE_DEPS``.
5277
5278 For information on running post-installation scripts, see the
5279 ":ref:`dev-manual/dev-manual-common-tasks:post-installation scripts`"
5280 section in the Yocto Project Development Tasks Manual.
5281
5282 PACKAGECONFIG
5283 This variable provides a means of enabling or disabling features of a
5284 recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in
5285 recipes when you specify features and then arguments that define
5286 feature behaviors. Here is the basic block structure (broken over
5287 multiple lines for readability):
5288 ::
5289
5290 PACKAGECONFIG ??= "f1 f2 f3 ..."
5291 PACKAGECONFIG[f1] = "\
5292 --with-f1, \
5293 --without-f1, \
5294 build-deps-for-f1, \
5295 runtime-deps-for-f1, \
5296 runtime-recommends-for-f1, \
5297 packageconfig-conflicts-for-f1"
5298 PACKAGECONFIG[f2] = "\
5299 ... and so on and so on ...
5300
5301 The ``PACKAGECONFIG`` variable itself specifies a space-separated
5302 list of the features to enable. Following the features, you can
5303 determine the behavior of each feature by providing up to six
5304 order-dependent arguments, which are separated by commas. You can
5305 omit any argument you like but must retain the separating commas. The
5306 order is important and specifies the following:
5307
5308 1. Extra arguments that should be added to the configure script
5309 argument list (:term:`EXTRA_OECONF` or
5310 :term:`PACKAGECONFIG_CONFARGS`) if
5311 the feature is enabled.
5312
5313 2. Extra arguments that should be added to ``EXTRA_OECONF`` or
5314 ``PACKAGECONFIG_CONFARGS`` if the feature is disabled.
5315
5316 3. Additional build dependencies (:term:`DEPENDS`)
5317 that should be added if the feature is enabled.
5318
5319 4. Additional runtime dependencies (:term:`RDEPENDS`)
5320 that should be added if the feature is enabled.
5321
5322 5. Additional runtime recommendations
5323 (:term:`RRECOMMENDS`) that should be added if
5324 the feature is enabled.
5325
5326 6. Any conflicting (that is, mutually exclusive) ``PACKAGECONFIG``
5327 settings for this feature.
5328
5329 Consider the following ``PACKAGECONFIG`` block taken from the
5330 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5331 three arguments that determine the feature's behavior.
5332 ::
5333
5334 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5335
5336 The
5337 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5338 enabled. In this case, ``--with-gtk3`` is added to the configure
5339 script argument list and ``gtk+3`` is added to ``DEPENDS``. On the
5340 other hand, if the feature is disabled say through a ``.bbappend``
5341 file in another layer, then the second argument ``--without-gtk3`` is
5342 added to the configure script instead.
5343
5344 The basic ``PACKAGECONFIG`` structure previously described holds true
5345 regardless of whether you are creating a block or changing a block.
5346 When creating a block, use the structure inside your recipe.
5347
5348 If you want to change an existing ``PACKAGECONFIG`` block, you can do
5349 so one of two ways:
5350
5351 - *Append file:* Create an append file named
5352 recipename\ ``.bbappend`` in your layer and override the value of
5353 ``PACKAGECONFIG``. You can either completely override the
5354 variable:
5355 ::
5356
5357 PACKAGECONFIG = "f4 f5"
5358
5359 Or, you can just append the variable:
5360 ::
5361
5362 PACKAGECONFIG_append = " f4"
5363
5364 - *Configuration file:* This method is identical to changing the
5365 block through an append file except you edit your ``local.conf``
5366 or ``mydistro.conf`` file. As with append files previously
5367 described, you can either completely override the variable:
5368 PACKAGECONFIG_pn-recipename = "f4 f5" Or, you can just amend the
5369 variable:
5370 ::
5371
5372 PACKAGECONFIG_append_pn-recipename = " f4"
5373
5374 PACKAGECONFIG_CONFARGS
5375 A space-separated list of configuration options generated from the
5376 :term:`PACKAGECONFIG` setting.
5377
5378 Classes such as :ref:`autotools <ref-classes-autotools>` and
5379 :ref:`cmake <ref-classes-cmake>` use ``PACKAGECONFIG_CONFARGS`` to
5380 pass ``PACKAGECONFIG`` options to ``configure`` and ``cmake``,
5381 respectively. If you are using ``PACKAGECONFIG`` but not a class that
5382 handles the ``do_configure`` task, then you need to use
5383 ``PACKAGECONFIG_CONFARGS`` appropriately.
5384
5385 PACKAGEGROUP_DISABLE_COMPLEMENTARY
5386 For recipes inheriting the
5387 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
5388 ``PACKAGEGROUP_DISABLE_COMPLEMENTARY`` to "1" specifies that the
5389 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5390 should not be automatically created by the ``packagegroup`` recipe,
5391 which is the default behavior.
5392
5393 PACKAGES
5394 The list of packages the recipe creates. The default value is the
5395 following:
5396 ::
5397
5398 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5399
5400 During packaging, the :ref:`ref-tasks-package` task
5401 goes through ``PACKAGES`` and uses the :term:`FILES`
5402 variable corresponding to each package to assign files to the
5403 package. If a file matches the ``FILES`` variable for more than one
5404 package in ``PACKAGES``, it will be assigned to the earliest
5405 (leftmost) package.
5406
5407 Packages in the variable's list that are empty (i.e. where none of
5408 the patterns in ``FILES_``\ pkg match any files installed by the
5409 :ref:`ref-tasks-install` task) are not generated,
5410 unless generation is forced through the
5411 :term:`ALLOW_EMPTY` variable.
5412
5413 PACKAGES_DYNAMIC
5414 A promise that your recipe satisfies runtime dependencies for
5415 optional modules that are found in other recipes.
5416 ``PACKAGES_DYNAMIC`` does not actually satisfy the dependencies, it
5417 only states that they should be satisfied. For example, if a hard,
5418 runtime dependency (:term:`RDEPENDS`) of another
5419 package is satisfied at build time through the ``PACKAGES_DYNAMIC``
5420 variable, but a package with the module name is never actually
5421 produced, then the other package will be broken. Thus, if you attempt
5422 to include that package in an image, you will get a dependency
5423 failure from the packaging system during the
5424 :ref:`ref-tasks-rootfs` task.
5425
5426 Typically, if there is a chance that such a situation can occur and
5427 the package that is not created is valid without the dependency being
5428 satisfied, then you should use :term:`RRECOMMENDS`
5429 (a soft runtime dependency) instead of ``RDEPENDS``.
5430
5431 For an example of how to use the ``PACKAGES_DYNAMIC`` variable when
5432 you are splitting packages, see the
5433 ":ref:`dev-manual/dev-manual-common-tasks:handling optional module packaging`"
5434 section in the Yocto Project Development Tasks Manual.
5435
5436 PACKAGESPLITFUNCS
5437 Specifies a list of functions run to perform additional splitting of
5438 files into individual packages. Recipes can either prepend to this
5439 variable or prepend to the ``populate_packages`` function in order to
5440 perform additional package splitting. In either case, the function
5441 should set :term:`PACKAGES`,
5442 :term:`FILES`, :term:`RDEPENDS` and
5443 other packaging variables appropriately in order to perform the
5444 desired splitting.
5445
5446 PARALLEL_MAKE
5447 Extra options passed to the ``make`` command during the
5448 :ref:`ref-tasks-compile` task in order to specify
5449 parallel compilation on the local build host. This variable is
5450 usually in the form "-j x", where x represents the maximum number of
5451 parallel threads ``make`` can run.
5452
5453 .. note::
5454
5455 In order for
5456 PARALLEL_MAKE
5457 to be effective,
5458 make
5459 must be called with
5460 ${
5461 EXTRA_OEMAKE
5462 }
5463 . An easy way to ensure this is to use the
5464 oe_runmake
5465 function.
5466
5467 By default, the OpenEmbedded build system automatically sets this
5468 variable to be equal to the number of cores the build system uses.
5469
5470 .. note::
5471
5472 If the software being built experiences dependency issues during
5473 the
5474 do_compile
5475 task that result in race conditions, you can clear the
5476 PARALLEL_MAKE
5477 variable within the recipe as a workaround. For information on
5478 addressing race conditions, see the "
5479 Debugging Parallel Make Races
5480 " section in the Yocto Project Development Tasks Manual.
5481
5482 For single socket systems (i.e. one CPU), you should not have to
5483 override this variable to gain optimal parallelism during builds.
5484 However, if you have very large systems that employ multiple physical
5485 CPUs, you might want to make sure the ``PARALLEL_MAKE`` variable is
5486 not set higher than "-j 20".
5487
5488 For more information on speeding up builds, see the
5489 ":ref:`dev-manual/dev-manual-common-tasks:speeding up a build`"
5490 section in the Yocto Project Development Tasks Manual.
5491
5492 PARALLEL_MAKEINST
5493 Extra options passed to the ``make install`` command during the
5494 :ref:`ref-tasks-install` task in order to specify
5495 parallel installation. This variable defaults to the value of
5496 :term:`PARALLEL_MAKE`.
5497
5498 .. note::
5499
5500 In order for ``PARALLEL_MAKEINST`` to be effective, ``make`` must
5501 be called with
5502 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5503 way to ensure this is to use the ``oe_runmake`` function.
5504
5505 If the software being built experiences dependency issues during
5506 the ``do_install`` task that result in race conditions, you can
5507 clear the ``PARALLEL_MAKEINST`` variable within the recipe as a
5508 workaround. For information on addressing race conditions, see the
5509 ":ref:`dev-manual/dev-manual-common-tasks:debugging parallel make races`"
5510 section in the Yocto Project Development Tasks Manual.
5511
5512 PATCHRESOLVE
5513 Determines the action to take when a patch fails. You can set this
5514 variable to one of two values: "noop" and "user".
5515
5516 The default value of "noop" causes the build to simply fail when the
5517 OpenEmbedded build system cannot successfully apply a patch. Setting
5518 the value to "user" causes the build system to launch a shell and
5519 places you in the right location so that you can manually resolve the
5520 conflicts.
5521
5522 Set this variable in your ``local.conf`` file.
5523
5524 PATCHTOOL
5525 Specifies the utility used to apply patches for a recipe during the
5526 :ref:`ref-tasks-patch` task. You can specify one of
5527 three utilities: "patch", "quilt", or "git". The default utility used
5528 is "quilt" except for the quilt-native recipe itself. Because the
5529 quilt tool is not available at the time quilt-native is being
5530 patched, it uses "patch".
5531
5532 If you wish to use an alternative patching tool, set the variable in
5533 the recipe using one of the following:
5534 ::
5535
5536 PATCHTOOL = "patch"
5537 PATCHTOOL = "quilt"
5538 PATCHTOOL = "git"
5539
5540 PE
5541 The epoch of the recipe. By default, this variable is unset. The
5542 variable is used to make upgrades possible when the versioning scheme
5543 changes in some backwards incompatible way.
5544
5545 ``PE`` is the default value of the :term:`PKGE` variable.
5546
5547 PF
5548 Specifies the recipe or package name and includes all version and
5549 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5550 ``bash-4.2-r1/``). This variable is comprised of the following:
5551 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5552
5553 PIXBUF_PACKAGES
5554 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5555 class, this variable identifies packages that contain the pixbuf
5556 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5557 class assumes that the loaders are in the recipe's main package (i.e.
5558 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5559 loaders you need are in a package other than that main package.
5560
5561 PKG
5562 The name of the resulting package created by the OpenEmbedded build
5563 system.
5564
5565 .. note::
5566
5567 When using the
5568 PKG
5569 variable, you must use a package name override.
5570
5571 For example, when the :ref:`debian <ref-classes-debian>` class
5572 renames the output package, it does so by setting
5573 ``PKG_packagename``.
5574
5575 PKG_CONFIG_PATH
5576 The path to ``pkg-config`` files for the current build context.
5577 ``pkg-config`` reads this variable from the environment.
5578
5579 PKGD
5580 Points to the destination directory for files to be packaged before
5581 they are split into individual packages. This directory defaults to
5582 the following:
5583 ::
5584
5585 ${WORKDIR}/package
5586
5587 Do not change this default.
5588
5589 PKGDATA_DIR
5590 Points to a shared, global-state directory that holds data generated
5591 during the packaging process. During the packaging process, the
5592 :ref:`ref-tasks-packagedata` task packages data
5593 for each recipe and installs it into this temporary, shared area.
5594 This directory defaults to the following, which you should not
5595 change:
5596 ::
5597
5598 ${STAGING_DIR_HOST}/pkgdata
5599
5600 For examples of how this data is used, see the
5601 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
5602 section in the Yocto Project Overview and Concepts Manual and the
5603 ":ref:`dev-manual/dev-manual-common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
5604 section in the Yocto Project Development Tasks Manual. For more
5605 information on the shared, global-state directory, see
5606 :term:`STAGING_DIR_HOST`.
5607
5608 PKGDEST
5609 Points to the parent directory for files to be packaged after they
5610 have been split into individual packages. This directory defaults to
5611 the following:
5612 ::
5613
5614 ${WORKDIR}/packages-split
5615
5616 Under this directory, the build system creates directories for each
5617 package specified in :term:`PACKAGES`. Do not change
5618 this default.
5619
5620 PKGDESTWORK
5621 Points to a temporary work area where the
5622 :ref:`ref-tasks-package` task saves package metadata.
5623 The ``PKGDESTWORK`` location defaults to the following:
5624 ::
5625
5626 ${WORKDIR}/pkgdata
5627
5628 Do not change this default.
5629
5630 The :ref:`ref-tasks-packagedata` task copies the
5631 package metadata from ``PKGDESTWORK`` to
5632 :term:`PKGDATA_DIR` to make it available globally.
5633
5634 PKGE
5635 The epoch of the package(s) built by the recipe. By default, ``PKGE``
5636 is set to :term:`PE`.
5637
5638 PKGR
5639 The revision of the package(s) built by the recipe. By default,
5640 ``PKGR`` is set to :term:`PR`.
5641
5642 PKGV
5643 The version of the package(s) built by the recipe. By default,
5644 ``PKGV`` is set to :term:`PV`.
5645
5646 PN
5647 This variable can have two separate functions depending on the
5648 context: a recipe name or a resulting package name.
5649
5650 ``PN`` refers to a recipe name in the context of a file used by the
5651 OpenEmbedded build system as input to create a package. The name is
5652 normally extracted from the recipe file name. For example, if the
5653 recipe is named ``expat_2.0.1.bb``, then the default value of ``PN``
5654 will be "expat".
5655
5656 The variable refers to a package name in the context of a file
5657 created or produced by the OpenEmbedded build system.
5658
5659 If applicable, the ``PN`` variable also contains any special suffix
5660 or prefix. For example, using ``bash`` to build packages for the
5661 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build
5662 packages for the target and for Multilib, ``PN`` would be ``bash``
5663 and ``lib64-bash``, respectively.
5664
5665 PNBLACKLIST
5666 Lists recipes you do not want the OpenEmbedded build system to build.
5667 This variable works in conjunction with the
5668 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited
5669 globally.
5670
5671 To prevent a recipe from being built, use the ``PNBLACKLIST``
5672 variable in your ``local.conf`` file. Here is an example that
5673 prevents ``myrecipe`` from being built:
5674 ::
5675
5676 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5677
5678 POPULATE_SDK_POST_HOST_COMMAND
5679 Specifies a list of functions to call once the OpenEmbedded build
5680 system has created the host part of the SDK. You can specify
5681 functions separated by semicolons:
5682 ::
5683
5684 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5685
5686 If you need to pass the SDK path to a command within a function, you
5687 can use ``${SDK_DIR}``, which points to the parent directory used by
5688 the OpenEmbedded build system when creating SDK output. See the
5689 :term:`SDK_DIR` variable for more information.
5690
5691 POPULATE_SDK_POST_TARGET_COMMAND
5692 Specifies a list of functions to call once the OpenEmbedded build
5693 system has created the target part of the SDK. You can specify
5694 functions separated by semicolons:
5695 ::
5696
5697 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5698
5699 If you need to pass the SDK path to a command within a function, you
5700 can use ``${SDK_DIR}``, which points to the parent directory used by
5701 the OpenEmbedded build system when creating SDK output. See the
5702 :term:`SDK_DIR` variable for more information.
5703
5704 PR
5705 The revision of the recipe. The default value for this variable is
5706 "r0". Subsequent revisions of the recipe conventionally have the
5707 values "r1", "r2", and so forth. When :term:`PV` increases,
5708 ``PR`` is conventionally reset to "r0".
5709
5710 .. note::
5711
5712 The OpenEmbedded build system does not need the aid of
5713 PR
5714 to know when to rebuild a recipe. The build system uses the task
5715 input checksums
5716 along with the
5717 stamp
5718 and
5719 shared state cache
5720 mechanisms.
5721
5722 The ``PR`` variable primarily becomes significant when a package
5723 manager dynamically installs packages on an already built image. In
5724 this case, ``PR``, which is the default value of
5725 :term:`PKGR`, helps the package manager distinguish which
5726 package is the most recent one in cases where many packages have the
5727 same ``PV`` (i.e. ``PKGV``). A component having many packages with
5728 the same ``PV`` usually means that the packages all install the same
5729 upstream version, but with later (``PR``) version packages including
5730 packaging fixes.
5731
5732 .. note::
5733
5734 PR
5735 does not need to be increased for changes that do not change the
5736 package contents or metadata.
5737
5738 Because manually managing ``PR`` can be cumbersome and error-prone,
5739 an automated solution exists. See the
5740 ":ref:`dev-manual/dev-manual-common-tasks:working with a pr service`" section
5741 in the Yocto Project Development Tasks Manual for more information.
5742
5743 PREFERRED_PROVIDER
5744 If multiple recipes provide the same item, this variable determines
5745 which recipe is preferred and thus provides the item (i.e. the
5746 preferred provider). You should always suffix this variable with the
5747 name of the provided item. And, you should define the variable using
5748 the preferred recipe's name (:term:`PN`). Here is a common
5749 example:
5750 ::
5751
5752 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5753
5754 In the previous example, multiple recipes are providing "virtual/kernel".
5755 The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of
5756 the recipe you prefer to provide "virtual/kernel".
5757
5758 Following are more examples:
5759 ::
5760
5761 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5762 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5763
5764 For more
5765 information, see the ":ref:`metadata-virtual-providers`"
5766 section in the Yocto Project Development Tasks Manual.
5767
5768 .. note::
5769
5770 If you use a
5771 virtual/\*
5772 item with
5773 PREFERRED_PROVIDER
5774 , then any recipe that
5775 PROVIDES
5776 that item but is not selected (defined) by
5777 PREFERRED_PROVIDER
5778 is prevented from building, which is usually desirable since this
5779 mechanism is designed to select between mutually exclusive
5780 alternative providers.
5781
5782 PREFERRED_VERSION
5783 If multiple versions of recipes exist, this variable determines which
5784 version is given preference. You must always suffix the variable with
5785 the :term:`PN` you want to select, and you should set the
5786 :term:`PV` accordingly for precedence.
5787
5788 The ``PREFERRED_VERSION`` variable supports limited wildcard use
5789 through the "``%``" character. You can use the character to match any
5790 number of characters, which can be useful when specifying versions
5791 that contain long revision numbers that potentially change. Here are
5792 two examples:
5793 ::
5794
5795 PREFERRED_VERSION_python = "3.4.0"
5796 PREFERRED_VERSION_linux-yocto = "5.0%"
5797
5798 .. note::
5799
5800 The use of the "%" character is limited in that it only works at the end of the
5801 string. You cannot use the wildcard character in any other
5802 location of the string.
5803
5804 The specified version is matched against :term:`PV`, which
5805 does not necessarily match the version part of the recipe's filename.
5806 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
5807 where ``foo_git.bb`` contains the following assignment:
5808 ::
5809
5810 PV = "1.1+git${SRCPV}"
5811
5812 In this case, the correct way to select
5813 ``foo_git.bb`` is by using an assignment such as the following:
5814 ::
5815
5816 PREFERRED_VERSION_foo = "1.1+git%"
5817
5818 Compare that previous example
5819 against the following incorrect example, which does not work:
5820 ::
5821
5822 PREFERRED_VERSION_foo = "git"
5823
5824 Sometimes the ``PREFERRED_VERSION`` variable can be set by
5825 configuration files in a way that is hard to change. You can use
5826 :term:`OVERRIDES` to set a machine-specific
5827 override. Here is an example:
5828 ::
5829
5830 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%"
5831
5832 Although not recommended, worst case, you can also use the
5833 "forcevariable" override, which is the strongest override possible.
5834 Here is an example:
5835 ::
5836
5837 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%"
5838
5839 .. note::
5840
5841 The \_forcevariable override is not handled specially. This override
5842 only works because the default value of OVERRIDES includes "forcevariable".
5843
5844 PREMIRRORS
5845 Specifies additional paths from which the OpenEmbedded build system
5846 gets source code. When the build system searches for source code, it
5847 first tries the local download directory. If that location fails, the
5848 build system tries locations defined by ``PREMIRRORS``, the upstream
5849 source, and then locations specified by
5850 :term:`MIRRORS` in that order.
5851
5852 Assuming your distribution (:term:`DISTRO`) is "poky",
5853 the default value for ``PREMIRRORS`` is defined in the
5854 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5855
5856 Typically, you could add a specific server for the build system to
5857 attempt before any others by adding something like the following to
5858 the ``local.conf`` configuration file in the
5859 :term:`Build Directory`:
5860 ::
5861
5862 PREMIRRORS_prepend = "\
5863 git://.*/.* http://www.yoctoproject.org/sources/ \n \
5864 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
5865 http://.*/.* http://www.yoctoproject.org/sources/ \n \
5866 https://.*/.* http://www.yoctoproject.org/sources/ \n"
5867
5868 These changes cause the
5869 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5870 direct them to the ``http://`` sources mirror. You can use
5871 ``file://`` URLs to point to local directories or network shares as
5872 well.
5873
5874 PRIORITY
5875 Indicates the importance of a package.
5876
5877 ``PRIORITY`` is considered to be part of the distribution policy
5878 because the importance of any given recipe depends on the purpose for
5879 which the distribution is being produced. Thus, ``PRIORITY`` is not
5880 normally set within recipes.
5881
5882 You can set ``PRIORITY`` to "required", "standard", "extra", and
5883 "optional", which is the default.
5884
5885 PRIVATE_LIBS
5886 Specifies libraries installed within a recipe that should be ignored
5887 by the OpenEmbedded build system's shared library resolver. This
5888 variable is typically used when software being built by a recipe has
5889 its own private versions of a library normally provided by another
5890 recipe. In this case, you would not want the package containing the
5891 private libraries to be set as a dependency on other unrelated
5892 packages that should instead depend on the package providing the
5893 standard version of the library.
5894
5895 Libraries specified in this variable should be specified by their
5896 file name. For example, from the Firefox recipe in meta-browser:
5897 ::
5898
5899 PRIVATE_LIBS = "libmozjs.so \
5900 libxpcom.so \
5901 libnspr4.so \
5902 libxul.so \
5903 libmozalloc.so \
5904 libplc4.so \
5905 libplds4.so"
5906
5907 For more information, see the
5908 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
5909 section in the Yocto Project Overview and Concepts Manual.
5910
5911 PROVIDES
5912 A list of aliases by which a particular recipe can be known. By
5913 default, a recipe's own ``PN`` is implicitly already in its
5914 ``PROVIDES`` list and therefore does not need to mention that it
5915 provides itself. If a recipe uses ``PROVIDES``, the additional
5916 aliases are synonyms for the recipe and can be useful for satisfying
5917 dependencies of other recipes during the build as specified by
5918 ``DEPENDS``.
5919
5920 Consider the following example ``PROVIDES`` statement from the recipe
5921 file ``eudev_3.2.9.bb``:
5922 ::
5923
5924 PROVIDES = "udev"
5925
5926 The ``PROVIDES`` statement
5927 results in the "eudev" recipe also being available as simply "udev".
5928
5929 .. note::
5930
5931 Given that a recipe's own recipe name is already implicitly in its
5932 own
5933 PROVIDES
5934 list, it is unnecessary to add aliases with the "+=" operator;
5935 using a simple assignment will be sufficient. In other words,
5936 while you could write:
5937 ::
5938
5939 PROVIDES += "udev"
5940
5941
5942 in the above, the "+=" is overkill and unnecessary.
5943
5944 In addition to providing recipes under alternate names, the
5945 ``PROVIDES`` mechanism is also used to implement virtual targets. A
5946 virtual target is a name that corresponds to some particular
5947 functionality (e.g. a Linux kernel). Recipes that provide the
5948 functionality in question list the virtual target in ``PROVIDES``.
5949 Recipes that depend on the functionality in question can include the
5950 virtual target in ``DEPENDS`` to leave the choice of provider open.
5951
5952 Conventionally, virtual targets have names on the form
5953 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5954 of the name and has no syntactical significance.
5955
5956 The :term:`PREFERRED_PROVIDER` variable is
5957 used to select which particular recipe provides a virtual target.
5958
5959 .. note::
5960
5961 A corresponding mechanism for virtual runtime dependencies
5962 (packages) exists. However, the mechanism does not depend on any
5963 special functionality beyond ordinary variable assignments. For
5964 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5965 the component that manages the ``/dev`` directory.
5966
5967 Setting the "preferred provider" for runtime dependencies is as
5968 simple as using the following assignment in a configuration file:
5969 ::
5970
5971 VIRTUAL-RUNTIME_dev_manager = "udev"
5972
5973
5974 PRSERV_HOST
5975 The network based :term:`PR` service host and port.
5976
5977 The ``conf/local.conf.sample.extended`` configuration file in the
5978 :term:`Source Directory` shows how the
5979 ``PRSERV_HOST`` variable is set:
5980 ::
5981
5982 PRSERV_HOST = "localhost:0"
5983
5984 You must
5985 set the variable if you want to automatically start a local :ref:`PR
5986 service <dev-manual/dev-manual-common-tasks:working with a pr service>`. You can
5987 set ``PRSERV_HOST`` to other values to use a remote PR service.
5988
5989 PTEST_ENABLED
5990 Specifies whether or not :ref:`Package
5991 Test <dev-manual/dev-manual-common-tasks:testing packages with ptest>` (ptest)
5992 functionality is enabled when building a recipe. You should not set
5993 this variable directly. Enabling and disabling building Package Tests
5994 at build time should be done by adding "ptest" to (or removing it
5995 from) :term:`DISTRO_FEATURES`.
5996
5997 PV
5998 The version of the recipe. The version is normally extracted from the
5999 recipe filename. For example, if the recipe is named
6000 ``expat_2.0.1.bb``, then the default value of ``PV`` will be "2.0.1".
6001 ``PV`` is generally not overridden within a recipe unless it is
6002 building an unstable (i.e. development) version from a source code
6003 repository (e.g. Git or Subversion).
6004
6005 ``PV`` is the default value of the :term:`PKGV` variable.
6006
6007 PYTHON_ABI
6008 When used by recipes that inherit the
6009 :ref:`distutils3 <ref-classes-distutils3>`,
6010 :ref:`setuptools3 <ref-classes-setuptools3>`,
6011 :ref:`distutils <ref-classes-distutils>`, or
6012 :ref:`setuptools <ref-classes-setuptools>` classes, denotes the
6013 Application Binary Interface (ABI) currently in use for Python. By
6014 default, the ABI is "m". You do not have to set this variable as the
6015 OpenEmbedded build system sets it for you.
6016
6017 The OpenEmbedded build system uses the ABI to construct directory
6018 names used when installing the Python headers and libraries in
6019 sysroot (e.g. ``.../python3.3m/...``).
6020
6021 Recipes that inherit the ``distutils`` class during cross-builds also
6022 use this variable to locate the headers and libraries of the
6023 appropriate Python that the extension is targeting.
6024
6025 PYTHON_PN
6026 When used by recipes that inherit the
6027 `distutils3 <ref-classes-distutils3>`,
6028 :ref:`setuptools3 <ref-classes-setuptools3>`,
6029 :ref:`distutils <ref-classes-distutils>`, or
6030 :ref:`setuptools <ref-classes-setuptools>` classes, specifies the
6031 major Python version being built. For Python 3.x, ``PYTHON_PN`` would
6032 be "python3". You do not have to set this variable as the
6033 OpenEmbedded build system automatically sets it for you.
6034
6035 The variable allows recipes to use common infrastructure such as the
6036 following:
6037 ::
6038
6039 DEPENDS += "${PYTHON_PN}-native"
6040
6041 In the previous example,
6042 the version of the dependency is ``PYTHON_PN``.
6043
6044 RANLIB
6045 The minimal command and arguments to run ``ranlib``.
6046
6047 RCONFLICTS
6048 The list of packages that conflict with packages. Note that packages
6049 will not be installed if conflicting packages are not first removed.
6050
6051 Like all package-controlling variables, you must always use them in
6052 conjunction with a package name override. Here is an example:
6053 ::
6054
6055 RCONFLICTS_${PN} = "another_conflicting_package_name"
6056
6057 BitBake, which the OpenEmbedded build system uses, supports
6058 specifying versioned dependencies. Although the syntax varies
6059 depending on the packaging format, BitBake hides these differences
6060 from you. Here is the general syntax to specify versions with the
6061 ``RCONFLICTS`` variable:
6062 ::
6063
6064 RCONFLICTS_${PN} = "package (operator version)"
6065
6066 For ``operator``, you can specify the following: = < > <=
6067 >= For example, the following sets up a dependency on version 1.2 or
6068 greater of the package ``foo``:
6069 ::
6070
6071 RCONFLICTS_${PN} = "foo (>= 1.2)"
6072
6073 RDEPENDS
6074 Lists runtime dependencies of a package. These dependencies are other
6075 packages that must be installed in order for the package to function
6076 correctly. As an example, the following assignment declares that the
6077 package ``foo`` needs the packages ``bar`` and ``baz`` to be
6078 installed:
6079 ::
6080
6081 RDEPENDS_foo = "bar baz"
6082
6083 The most common types of package
6084 runtime dependencies are automatically detected and added. Therefore,
6085 most recipes do not need to set ``RDEPENDS``. For more information,
6086 see the
6087 ":ref:`overview-manual/overview-manual-concepts:automatically added runtime dependencies`"
6088 section in the Yocto Project Overview and Concepts Manual.
6089
6090 The practical effect of the above ``RDEPENDS`` assignment is that
6091 ``bar`` and ``baz`` will be declared as dependencies inside the
6092 package ``foo`` when it is written out by one of the
6093 ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks.
6094 Exactly how this is done depends on which package format is used,
6095 which is determined by
6096 :term:`PACKAGE_CLASSES`. When the
6097 corresponding package manager installs the package, it will know to
6098 also install the packages on which it depends.
6099
6100 To ensure that the packages ``bar`` and ``baz`` get built, the
6101 previous ``RDEPENDS`` assignment also causes a task dependency to be
6102 added. This dependency is from the recipe's
6103 :ref:`ref-tasks-build` (not to be confused with
6104 :ref:`ref-tasks-compile`) task to the
6105 ``do_package_write_*`` task of the recipes that build ``bar`` and
6106 ``baz``.
6107
6108 The names of the packages you list within ``RDEPENDS`` must be the
6109 names of other packages - they cannot be recipe names. Although
6110 package names and recipe names usually match, the important point
6111 here is that you are providing package names within the ``RDEPENDS``
6112 variable. For an example of the default list of packages created from
6113 a recipe, see the :term:`PACKAGES` variable.
6114
6115 Because the ``RDEPENDS`` variable applies to packages being built,
6116 you should always use the variable in a form with an attached package
6117 name (remember that a single recipe can build multiple packages). For
6118 example, suppose you are building a development package that depends
6119 on the ``perl`` package. In this case, you would use the following
6120 ``RDEPENDS`` statement:
6121 ::
6122
6123 RDEPENDS_${PN}-dev += "perl"
6124
6125 In the example,
6126 the development package depends on the ``perl`` package. Thus, the
6127 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of
6128 the variable.
6129
6130 .. note::
6131
6132 RDEPENDS_${PN}-dev
6133 includes
6134 ${
6135 PN
6136 }
6137 by default. This default is set in the BitBake configuration file
6138 (
6139 meta/conf/bitbake.conf
6140 ). Be careful not to accidentally remove
6141 ${PN}
6142 when modifying
6143 RDEPENDS_${PN}-dev
6144 . Use the "+=" operator rather than the "=" operator.
6145
6146 The package names you use with ``RDEPENDS`` must appear as they would
6147 in the ``PACKAGES`` variable. The :term:`PKG` variable
6148 allows a different name to be used for the final package (e.g. the
6149 :ref:`debian <ref-classes-debian>` class uses this to rename
6150 packages), but this final package name cannot be used with
6151 ``RDEPENDS``, which makes sense as ``RDEPENDS`` is meant to be
6152 independent of the package format used.
6153
6154 BitBake, which the OpenEmbedded build system uses, supports
6155 specifying versioned dependencies. Although the syntax varies
6156 depending on the packaging format, BitBake hides these differences
6157 from you. Here is the general syntax to specify versions with the
6158 ``RDEPENDS`` variable:
6159 ::
6160
6161 RDEPENDS_${PN} = "package (operator version)"
6162
6163 For operator, you can specify the following: = < > <= >= For version,
6164 provide the version number.
6165
6166 .. note::
6167
6168 You can use
6169 EXTENDPKGV
6170 to provide a full package version specification.
6171
6172 For example, the following sets up a dependency on version 1.2 or
6173 greater of the package ``foo``:
6174 ::
6175
6176 RDEPENDS_${PN} = "foo (>= 1.2)"
6177
6178 For information on build-time dependencies, see the
6179 :term:`DEPENDS` variable. You can also see the
6180 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
6181 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
6182 BitBake User Manual for additional information on tasks and
6183 dependencies.
6184
6185 REQUIRED_DISTRO_FEATURES
6186 When inheriting the
6187 :ref:`distro_features_check <ref-classes-distro_features_check>`
6188 class, this variable identifies distribution features that must exist
6189 in the current configuration in order for the OpenEmbedded build
6190 system to build the recipe. In other words, if the
6191 ``REQUIRED_DISTRO_FEATURES`` variable lists a feature that does not
6192 appear in ``DISTRO_FEATURES`` within the current configuration, an
6193 error occurs and the build stops.
6194
6195 RM_WORK_EXCLUDE
6196 With ``rm_work`` enabled, this variable specifies a list of recipes
6197 whose work directories should not be removed. See the
6198 ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more
6199 details.
6200
6201 ROOT_HOME
6202 Defines the root home directory. By default, this directory is set as
6203 follows in the BitBake configuration file:
6204 ::
6205
6206 ROOT_HOME ??= "/home/root"
6207
6208 .. note::
6209
6210 This default value is likely used because some embedded solutions
6211 prefer to have a read-only root filesystem and prefer to keep
6212 writeable data in one place.
6213
6214 You can override the default by setting the variable in any layer or
6215 in the ``local.conf`` file. Because the default is set using a "weak"
6216 assignment (i.e. "??="), you can use either of the following forms to
6217 define your override:
6218 ::
6219
6220 ROOT_HOME = "/root"
6221 ROOT_HOME ?= "/root"
6222
6223 These
6224 override examples use ``/root``, which is probably the most commonly
6225 used override.
6226
6227 ROOTFS
6228 Indicates a filesystem image to include as the root filesystem.
6229
6230 The ``ROOTFS`` variable is an optional variable used with the
6231 :ref:`image-live <ref-classes-image-live>` class.
6232
6233 ROOTFS_POSTINSTALL_COMMAND
6234 Specifies a list of functions to call after the OpenEmbedded build
6235 system has installed packages. You can specify functions separated by
6236 semicolons:
6237 ::
6238
6239 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6240
6241 If you need to pass the root filesystem path to a command within a
6242 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6243 directory that becomes the root filesystem image. See the
6244 :term:`IMAGE_ROOTFS` variable for more
6245 information.
6246
6247 ROOTFS_POSTPROCESS_COMMAND
6248 Specifies a list of functions to call once the OpenEmbedded build
6249 system has created the root filesystem. You can specify functions
6250 separated by semicolons:
6251 ::
6252
6253 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6254
6255 If you need to pass the root filesystem path to a command within a
6256 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6257 directory that becomes the root filesystem image. See the
6258 :term:`IMAGE_ROOTFS` variable for more
6259 information.
6260
6261 ROOTFS_POSTUNINSTALL_COMMAND
6262 Specifies a list of functions to call after the OpenEmbedded build
6263 system has removed unnecessary packages. When runtime package
6264 management is disabled in the image, several packages are removed
6265 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
6266 You can specify functions separated by semicolons:
6267 ::
6268
6269 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6270
6271 If you need to pass the root filesystem path to a command within a
6272 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6273 directory that becomes the root filesystem image. See the
6274 :term:`IMAGE_ROOTFS` variable for more
6275 information.
6276
6277 ROOTFS_PREPROCESS_COMMAND
6278 Specifies a list of functions to call before the OpenEmbedded build
6279 system has created the root filesystem. You can specify functions
6280 separated by semicolons:
6281 ::
6282
6283 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6284
6285 If you need to pass the root filesystem path to a command within a
6286 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6287 directory that becomes the root filesystem image. See the
6288 :term:`IMAGE_ROOTFS` variable for more
6289 information.
6290
6291 RPROVIDES
6292 A list of package name aliases that a package also provides. These
6293 aliases are useful for satisfying runtime dependencies of other
6294 packages both during the build and on the target (as specified by
6295 ``RDEPENDS``).
6296
6297 .. note::
6298
6299 A package's own name is implicitly already in its
6300 RPROVIDES
6301 list.
6302
6303 As with all package-controlling variables, you must always use the
6304 variable in conjunction with a package name override. Here is an
6305 example:
6306 ::
6307
6308 RPROVIDES_${PN} = "widget-abi-2"
6309
6310 RRECOMMENDS
6311 A list of packages that extends the usability of a package being
6312 built. The package being built does not depend on this list of
6313 packages in order to successfully build, but rather uses them for
6314 extended usability. To specify runtime dependencies for packages, see
6315 the ``RDEPENDS`` variable.
6316
6317 The package manager will automatically install the ``RRECOMMENDS``
6318 list of packages when installing the built package. However, you can
6319 prevent listed packages from being installed by using the
6320 :term:`BAD_RECOMMENDATIONS`,
6321 :term:`NO_RECOMMENDATIONS`, and
6322 :term:`PACKAGE_EXCLUDE` variables.
6323
6324 Packages specified in ``RRECOMMENDS`` need not actually be produced.
6325 However, a recipe must exist that provides each package, either
6326 through the :term:`PACKAGES` or
6327 :term:`PACKAGES_DYNAMIC` variables or the
6328 :term:`RPROVIDES` variable, or an error will occur
6329 during the build. If such a recipe does exist and the package is not
6330 produced, the build continues without error.
6331
6332 Because the ``RRECOMMENDS`` variable applies to packages being built,
6333 you should always attach an override to the variable to specify the
6334 particular package whose usability is being extended. For example,
6335 suppose you are building a development package that is extended to
6336 support wireless functionality. In this case, you would use the
6337 following:
6338 ::
6339
6340 RRECOMMENDS_${PN}-dev += "wireless_package_name"
6341
6342 In the
6343 example, the package name (``${PN}-dev``) must appear as it would in
6344 the ``PACKAGES`` namespace before any renaming of the output package
6345 by classes such as ``debian.bbclass``.
6346
6347 BitBake, which the OpenEmbedded build system uses, supports
6348 specifying versioned recommends. Although the syntax varies depending
6349 on the packaging format, BitBake hides these differences from you.
6350 Here is the general syntax to specify versions with the
6351 ``RRECOMMENDS`` variable:
6352 ::
6353
6354 RRECOMMENDS_${PN} = "package (operator version)"
6355
6356 For ``operator``, you can specify the following:
6357
6358 - =
6359 - <
6360 - >
6361 - <=
6362 - >=
6363
6364 For example, the following sets up a recommend on version 1.2 or
6365 greater of the package ``foo``:
6366 ::
6367
6368 RRECOMMENDS_${PN} = "foo (>= 1.2)"
6369
6370 RREPLACES
6371 A list of packages replaced by a package. The package manager uses
6372 this variable to determine which package should be installed to
6373 replace other package(s) during an upgrade. In order to also have the
6374 other package(s) removed at the same time, you must add the name of
6375 the other package to the ``RCONFLICTS`` variable.
6376
6377 As with all package-controlling variables, you must use this variable
6378 in conjunction with a package name override. Here is an example:
6379 ::
6380
6381 RREPLACES_${PN} = "other_package_being_replaced"
6382
6383 BitBake, which the OpenEmbedded build system uses, supports
6384 specifying versioned replacements. Although the syntax varies
6385 depending on the packaging format, BitBake hides these differences
6386 from you. Here is the general syntax to specify versions with the
6387 ``RREPLACES`` variable:
6388 ::
6389
6390 RREPLACES_${PN} = "package (operator version)"
6391
6392 For ``operator``, you can specify the following:
6393
6394 - =
6395 - <
6396 - >
6397 - <=
6398 - >=
6399
6400 For example, the following sets up a replacement using version 1.2
6401 or greater of the package ``foo``:
6402 ::
6403
6404 RREPLACES_${PN} = "foo (>= 1.2)"
6405
6406 RSUGGESTS
6407 A list of additional packages that you can suggest for installation
6408 by the package manager at the time a package is installed. Not all
6409 package managers support this functionality.
6410
6411 As with all package-controlling variables, you must always use this
6412 variable in conjunction with a package name override. Here is an
6413 example:
6414 ::
6415
6416 RSUGGESTS_${PN} = "useful_package another_package"
6417
6418 S
6419 The location in the :term:`Build Directory` where
6420 unpacked recipe source code resides. By default, this directory is
6421 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6422 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6423 version. If the source tarball extracts the code to a directory named
6424 anything other than ``${BPN}-${PV}``, or if the source code is
6425 fetched from an SCM such as Git or Subversion, then you must set
6426 ``S`` in the recipe so that the OpenEmbedded build system knows where
6427 to find the unpacked source.
6428
6429 As an example, assume a :term:`Source Directory`
6430 top-level folder named ``poky`` and a default Build Directory at
6431 ``poky/build``. In this case, the work directory the build system
6432 uses to keep the unpacked recipe for ``db`` is the following:
6433 ::
6434
6435 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6436
6437 The unpacked source code resides in the ``db-5.1.19`` folder.
6438
6439 This next example assumes a Git repository. By default, Git
6440 repositories are cloned to ``${WORKDIR}/git`` during
6441 :ref:`ref-tasks-fetch`. Since this path is different
6442 from the default value of ``S``, you must set it specifically so the
6443 source can be located:
6444 ::
6445
6446 SRC_URI = "git://path/to/repo.git"
6447 S = "${WORKDIR}/git"
6448
6449 SANITY_REQUIRED_UTILITIES
6450 Specifies a list of command-line utilities that should be checked for
6451 during the initial sanity checking process when running BitBake. If
6452 any of the utilities are not installed on the build host, then
6453 BitBake immediately exits with an error.
6454
6455 SANITY_TESTED_DISTROS
6456 A list of the host distribution identifiers that the build system has
6457 been tested against. Identifiers consist of the host distributor ID
6458 followed by the release, as reported by the ``lsb_release`` tool or
6459 as read from ``/etc/lsb-release``. Separate the list items with
6460 explicit newline characters (``\n``). If ``SANITY_TESTED_DISTROS`` is
6461 not empty and the current value of
6462 :term:`NATIVELSBSTRING` does not appear in the
6463 list, then the build system reports a warning that indicates the
6464 current host distribution has not been tested as a build host.
6465
6466 SDK_ARCH
6467 The target architecture for the SDK. Typically, you do not directly
6468 set this variable. Instead, use :term:`SDKMACHINE`.
6469
6470 SDK_DEPLOY
6471 The directory set up and used by the
6472 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6473 the SDK is deployed. The ``populate_sdk_base`` class defines
6474 ``SDK_DEPLOY`` as follows:
6475 ::
6476
6477 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6478
6479 SDK_DIR
6480 The parent directory used by the OpenEmbedded build system when
6481 creating SDK output. The
6482 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
6483 the variable as follows:
6484 ::
6485
6486 SDK_DIR = "${WORKDIR}/sdk"
6487
6488 .. note::
6489
6490 The
6491 SDK_DIR
6492 directory is a temporary directory as it is part of
6493 WORKDIR
6494 . The final output directory is
6495 SDK_DEPLOY
6496 .
6497
6498 SDK_EXT_TYPE
6499 Controls whether or not shared state artifacts are copied into the
6500 extensible SDK. The default value of "full" copies all of the
6501 required shared state artifacts into the extensible SDK. The value
6502 "minimal" leaves these artifacts out of the SDK.
6503
6504 .. note::
6505
6506 If you set the variable to "minimal", you need to ensure
6507 SSTATE_MIRRORS
6508 is set in the SDK's configuration to enable the artifacts to be
6509 fetched as needed.
6510
6511 SDK_HOST_MANIFEST
6512 The manifest file for the host part of the SDK. This file lists all
6513 the installed packages that make up the host part of the SDK. The
6514 file contains package information on a line-per-package basis as
6515 follows:
6516 ::
6517
6518 packagename packagearch version
6519
6520 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6521 defines the manifest file as follows:
6522 ::
6523
6524 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6525
6526 The location is derived using the :term:`SDK_DEPLOY` and
6527 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6528
6529 SDK_INCLUDE_PKGDATA
6530 When set to "1", specifies to include the packagedata for all recipes
6531 in the "world" target in the extensible SDK. Including this data
6532 allows the ``devtool search`` command to find these recipes in search
6533 results, as well as allows the ``devtool add`` command to map
6534 dependencies more effectively.
6535
6536 .. note::
6537
6538 Enabling the
6539 SDK_INCLUDE_PKGDATA
6540 variable significantly increases build time because all of world
6541 needs to be built. Enabling the variable also slightly increases
6542 the size of the extensible SDK.
6543
6544 SDK_INCLUDE_TOOLCHAIN
6545 When set to "1", specifies to include the toolchain in the extensible
6546 SDK. Including the toolchain is useful particularly when
6547 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6548 the SDK reasonably small but you still want to provide a usable
6549 toolchain. For example, suppose you want to use the toolchain from an
6550 IDE or from other tools and you do not want to perform additional
6551 steps to install the toolchain.
6552
6553 The ``SDK_INCLUDE_TOOLCHAIN`` variable defaults to "0" if
6554 ``SDK_EXT_TYPE`` is set to "minimal", and defaults to "1" if
6555 ``SDK_EXT_TYPE`` is set to "full".
6556
6557 SDK_INHERIT_BLACKLIST
6558 A list of classes to remove from the :term:`INHERIT`
6559 value globally within the extensible SDK configuration. The
6560 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
6561 default value:
6562 ::
6563
6564 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
6565
6566 Some classes are not generally applicable within the extensible SDK
6567 context. You can use this variable to disable those classes.
6568
6569 For additional information on how to customize the extensible SDK's
6570 configuration, see the
6571 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6572 section in the Yocto Project Application Development and the
6573 Extensible Software Development Kit (eSDK) manual.
6574
6575 SDK_LOCAL_CONF_BLACKLIST
6576 A list of variables not allowed through from the OpenEmbedded build
6577 system configuration into the extensible SDK configuration. Usually,
6578 these are variables that are specific to the machine on which the
6579 build system is running and thus would be potentially problematic
6580 within the extensible SDK.
6581
6582 By default, ``SDK_LOCAL_CONF_BLACKLIST`` is set in the
6583 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
6584 excludes the following variables:
6585
6586 - :term:`CONF_VERSION`
6587 - :term:`BB_NUMBER_THREADS`
6588 - :term:`bitbake:BB_NUMBER_PARSE_THREADS`
6589 - :term:`PARALLEL_MAKE`
6590 - :term:`PRSERV_HOST`
6591 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
6592 - :term:`SSTATE_DIR` :term:`TMPDIR`
6593 - :term:`BB_SERVER_TIMEOUT`
6594
6595 For additional information on how to customize the extensible SDK's
6596 configuration, see the
6597 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6598 section in the Yocto Project Application Development and the
6599 Extensible Software Development Kit (eSDK) manual.
6600
6601 SDK_LOCAL_CONF_WHITELIST
6602 A list of variables allowed through from the OpenEmbedded build
6603 system configuration into the extensible SDK configuration. By
6604 default, the list of variables is empty and is set in the
6605 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
6606
6607 This list overrides the variables specified using the
6608 :term:`SDK_LOCAL_CONF_BLACKLIST`
6609 variable as well as any variables identified by automatic
6610 blacklisting due to the "/" character being found at the start of the
6611 value, which is usually indicative of being a path and thus might not
6612 be valid on the system where the SDK is installed.
6613
6614 For additional information on how to customize the extensible SDK's
6615 configuration, see the
6616 ":ref:`sdk-manual/sdk-appendix-customizing:configuring the extensible sdk`"
6617 section in the Yocto Project Application Development and the
6618 Extensible Software Development Kit (eSDK) manual.
6619
6620 SDK_NAME
6621 The base name for SDK output files. The name is derived from the
6622 :term:`DISTRO`, :term:`TCLIBC`,
6623 :term:`SDK_ARCH`,
6624 :term:`IMAGE_BASENAME`, and
6625 :term:`TUNE_PKGARCH` variables:
6626 ::
6627
6628 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6629
6630 SDK_OS
6631 Specifies the operating system for which the SDK will be built. The
6632 default value is the value of :term:`BUILD_OS`.
6633
6634 SDK_OUTPUT
6635 The location used by the OpenEmbedded build system when creating SDK
6636 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
6637 class defines the variable as follows:
6638 ::
6639
6640 SDK_DIR = "${WORKDIR}/sdk"
6641 SDK_OUTPUT = "${SDK_DIR}/image"
6642 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6643
6644 .. note::
6645
6646 The SDK_OUTPUT directory is a temporary directory as it is part of
6647 WORKDIR by way of SDK_DIR. The final output directory is
6648 SDK_DEPLOY.
6649
6650 SDK_PACKAGE_ARCHS
6651 Specifies a list of architectures compatible with the SDK machine.
6652 This variable is set automatically and should not normally be
6653 hand-edited. Entries are separated using spaces and listed in order
6654 of priority. The default value for ``SDK_PACKAGE_ARCHS`` is "all any
6655 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6656
6657 SDK_POSTPROCESS_COMMAND
6658 Specifies a list of functions to call once the OpenEmbedded build
6659 system creates the SDK. You can specify functions separated by
6660 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6661
6662 If you need to pass an SDK path to a command within a function, you
6663 can use ``${SDK_DIR}``, which points to the parent directory used by
6664 the OpenEmbedded build system when creating SDK output. See the
6665 :term:`SDK_DIR` variable for more information.
6666
6667 SDK_PREFIX
6668 The toolchain binary prefix used for ``nativesdk`` recipes. The
6669 OpenEmbedded build system uses the ``SDK_PREFIX`` value to set the
6670 :term:`TARGET_PREFIX` when building
6671 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6672
6673 SDK_RECRDEP_TASKS
6674 A list of shared state tasks added to the extensible SDK. By default,
6675 the following tasks are added:
6676
6677 - do_populate_lic
6678 - do_package_qa
6679 - do_populate_sysroot
6680 - do_deploy
6681
6682 Despite the default value of "" for the
6683 ``SDK_RECRDEP_TASKS`` variable, the above four tasks are always added
6684 to the SDK. To specify tasks beyond these four, you need to use the
6685 ``SDK_RECRDEP_TASKS`` variable (e.g. you are defining additional
6686 tasks that are needed in order to build
6687 :term:`SDK_TARGETS`).
6688
6689 SDK_SYS
6690 Specifies the system, including the architecture and the operating
6691 system, for which the SDK will be built.
6692
6693 The OpenEmbedded build system automatically sets this variable based
6694 on :term:`SDK_ARCH`,
6695 :term:`SDK_VENDOR`, and
6696 :term:`SDK_OS`. You do not need to set the ``SDK_SYS``
6697 variable yourself.
6698
6699 SDK_TARGET_MANIFEST
6700 The manifest file for the target part of the SDK. This file lists all
6701 the installed packages that make up the target part of the SDK. The
6702 file contains package information on a line-per-package basis as
6703 follows:
6704 ::
6705
6706 packagename packagearch version
6707
6708 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6709 defines the manifest file as follows:
6710 ::
6711
6712 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6713
6714 The location is derived using the :term:`SDK_DEPLOY` and
6715 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6716
6717 SDK_TARGETS
6718 A list of targets to install from shared state as part of the
6719 standard or extensible SDK installation. The default value is "${PN}"
6720 (i.e. the image from which the SDK is built).
6721
6722 The ``SDK_TARGETS`` variable is an internal variable and typically
6723 would not be changed.
6724
6725 SDK_TITLE
6726 The title to be printed when running the SDK installer. By default,
6727 this title is based on the :term:`DISTRO_NAME` or
6728 :term:`DISTRO` variable and is set in the
6729 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6730 follows:
6731 ::
6732
6733 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6734
6735 For the default distribution "poky",
6736 ``SDK_TITLE`` is set to "Poky (Yocto Project Reference Distro)".
6737
6738 For information on how to change this default title, see the
6739 ":ref:`sdk-manual/sdk-appendix-customizing:changing the extensible sdk installer title`"
6740 section in the Yocto Project Application Development and the
6741 Extensible Software Development Kit (eSDK) manual.
6742
6743 SDK_UPDATE_URL
6744 An optional URL for an update server for the extensible SDK. If set,
6745 the value is used as the default update server when running
6746 ``devtool sdk-update`` within the extensible SDK.
6747
6748 SDK_VENDOR
6749 Specifies the name of the SDK vendor.
6750
6751 SDK_VERSION
6752 Specifies the version of the SDK. The distribution configuration file
6753 (e.g. ``/meta-poky/conf/distro/poky.conf``) defines the
6754 ``SDK_VERSION`` as follows:
6755 ::
6756
6757 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot')}"
6758
6759 For additional information, see the
6760 :term:`DISTRO_VERSION` and
6761 :term:`DATE` variables.
6762
6763 SDKEXTPATH
6764 The default installation directory for the Extensible SDK. By
6765 default, this directory is based on the :term:`DISTRO`
6766 variable and is set in the
6767 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6768 follows:
6769 ::
6770
6771 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6772
6773 For the
6774 default distribution "poky", the ``SDKEXTPATH`` is set to "poky_sdk".
6775
6776 For information on how to change this default directory, see the
6777 ":ref:`sdk-manual/sdk-appendix-customizing:changing the default sdk installation directory`"
6778 section in the Yocto Project Application Development and the
6779 Extensible Software Development Kit (eSDK) manual.
6780
6781 SDKIMAGE_FEATURES
6782 Equivalent to ``IMAGE_FEATURES``. However, this variable applies to
6783 the SDK generated from an image using the following command:
6784 ::
6785
6786 $ bitbake -c populate_sdk imagename
6787
6788 SDKMACHINE
6789 The machine for which the SDK is built. In other words, the SDK is
6790 built such that it runs on the target you specify with the
6791 ``SDKMACHINE`` value. The value points to a corresponding ``.conf``
6792 file under ``conf/machine-sdk/``.
6793
6794 You can use "i686" and "x86_64" as possible values for this variable.
6795 The variable defaults to "i686" and is set in the local.conf file in
6796 the Build Directory.
6797 ::
6798
6799 SDKMACHINE ?= "i686"
6800
6801 .. note::
6802
6803 You cannot set the
6804 SDKMACHINE
6805 variable in your distribution configuration file. If you do, the
6806 configuration will not take affect.
6807
6808 SDKPATH
6809 Defines the path offered to the user for installation of the SDK that
6810 is generated by the OpenEmbedded build system. The path appears as
6811 the default location for installing the SDK when you run the SDK's
6812 installation script. You can override the offered path when you run
6813 the script.
6814
6815 SDKTARGETSYSROOT
6816 The full path to the sysroot used for cross-compilation within an SDK
6817 as it will be when installed into the default
6818 :term:`SDKPATH`.
6819
6820 SECTION
6821 The section in which packages should be categorized. Package
6822 management utilities can make use of this variable.
6823
6824 SELECTED_OPTIMIZATION
6825 Specifies the optimization flags passed to the C compiler when
6826 building for the target. The flags are passed through the default
6827 value of the :term:`TARGET_CFLAGS` variable.
6828
6829 The ``SELECTED_OPTIMIZATION`` variable takes the value of
6830 ``FULL_OPTIMIZATION`` unless ``DEBUG_BUILD`` = "1". If that is the
6831 case, the value of ``DEBUG_OPTIMIZATION`` is used.
6832
6833 SERIAL_CONSOLE
6834 Defines a serial console (TTY) to enable using
6835 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6836 value that specifies the baud rate followed by the TTY device name
6837 separated by a space. You cannot specify more than one TTY device:
6838 ::
6839
6840 SERIAL_CONSOLE = "115200 ttyS0"
6841
6842 .. note::
6843
6844 The
6845 SERIAL_CONSOLE
6846 variable is deprecated. Please use the
6847 SERIAL_CONSOLES
6848 variable.
6849
6850 SERIAL_CONSOLES
6851 Defines a serial console (TTY) to enable using
6852 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6853 value that specifies the baud rate followed by the TTY device name
6854 separated by a semicolon. Use spaces to separate multiple devices:
6855 ::
6856
6857 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6858
6859 SERIAL_CONSOLES_CHECK
6860 Specifies serial consoles, which must be listed in
6861 :term:`SERIAL_CONSOLES`, to check against
6862 ``/proc/console`` before enabling them using getty. This variable
6863 allows aliasing in the format: <device>:<alias>. If a device was
6864 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
6865 ``/proc/console``, you would do the following: ::
6866
6867 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6868
6869 This variable is currently only supported with SysVinit (i.e. not
6870 with systemd).
6871
6872 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS
6873 A list of recipe dependencies that should not be used to determine
6874 signatures of tasks from one recipe when they depend on tasks from
6875 another recipe. For example: ::
6876
6877 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6878
6879 In the previous example, ``intone`` depends on ``mplayer2``.
6880
6881 You can use the special token ``"*"`` on the left-hand side of the
6882 dependency to match all recipes except the one on the right-hand
6883 side. Here is an example: ::
6884
6885 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6886
6887 In the previous example, all recipes except ``quilt-native`` ignore
6888 task signatures from the ``quilt-native`` recipe when determining
6889 their task signatures.
6890
6891 Use of this variable is one mechanism to remove dependencies that
6892 affect task signatures and thus force rebuilds when a recipe changes.
6893
6894 .. note::
6895
6896 If you add an inappropriate dependency for a recipe relationship,
6897 the software might break during runtime if the interface of the
6898 second recipe was changed after the first recipe had been built.
6899
6900 SIGGEN_EXCLUDERECIPES_ABISAFE
6901 A list of recipes that are completely stable and will never change.
6902 The ABI for the recipes in the list are presented by output from the
6903 tasks run to build the recipe. Use of this variable is one way to
6904 remove dependencies from one recipe on another that affect task
6905 signatures and thus force rebuilds when the recipe changes.
6906
6907 .. note::
6908
6909 If you add an inappropriate variable to this list, the software
6910 might break at runtime if the interface of the recipe was changed
6911 after the other had been built.
6912
6913 SITEINFO_BITS
6914 Specifies the number of bits for the target system CPU. The value
6915 should be either "32" or "64".
6916
6917 SITEINFO_ENDIANNESS
6918 Specifies the endian byte order of the target system. The value
6919 should be either "le" for little-endian or "be" for big-endian.
6920
6921 SKIP_FILEDEPS
6922 Enables removal of all files from the "Provides" section of an RPM
6923 package. Removal of these files is required for packages containing
6924 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6925
6926 To enable file removal, set the variable to "1" in your
6927 ``conf/local.conf`` configuration file in your:
6928 :term:`Build Directory`.
6929 ::
6930
6931 SKIP_FILEDEPS = "1"
6932
6933 SOC_FAMILY
6934 Groups together machines based upon the same family of SOC (System On
6935 Chip). You typically set this variable in a common ``.inc`` file that
6936 you include in the configuration files of all the machines.
6937
6938 .. note::
6939
6940 You must include
6941 conf/machine/include/soc-family.inc
6942 for this variable to appear in
6943 MACHINEOVERRIDES
6944 .
6945
6946 SOLIBS
6947 Defines the suffix for shared libraries used on the target platform.
6948 By default, this suffix is ".so.*" for all Linux-based systems and is
6949 defined in the ``meta/conf/bitbake.conf`` configuration file.
6950
6951 You will see this variable referenced in the default values of
6952 ``FILES_${PN}``.
6953
6954 SOLIBSDEV
6955 Defines the suffix for the development symbolic link (symlink) for
6956 shared libraries on the target platform. By default, this suffix is
6957 ".so" for Linux-based systems and is defined in the
6958 ``meta/conf/bitbake.conf`` configuration file.
6959
6960 You will see this variable referenced in the default values of
6961 ``FILES_${PN}-dev``.
6962
6963 SOURCE_MIRROR_FETCH
6964 When you are fetching files to create a mirror of sources (i.e.
6965 creating a source mirror), setting ``SOURCE_MIRROR_FETCH`` to "1" in
6966 your ``local.conf`` configuration file ensures the source for all
6967 recipes are fetched regardless of whether or not a recipe is
6968 compatible with the configuration. A recipe is considered
6969 incompatible with the currently configured machine when either or
6970 both the :term:`COMPATIBLE_MACHINE`
6971 variable and :term:`COMPATIBLE_HOST` variables
6972 specify compatibility with a machine other than that of the current
6973 machine or host.
6974
6975 .. note::
6976
6977 Do not set the
6978 SOURCE_MIRROR_FETCH
6979 variable unless you are creating a source mirror. In other words,
6980 do not set the variable during a normal build.
6981
6982 SOURCE_MIRROR_URL
6983 Defines your own :term:`PREMIRRORS` from which to
6984 first fetch source before attempting to fetch from the upstream
6985 specified in :term:`SRC_URI`.
6986
6987 To use this variable, you must globally inherit the
6988 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
6989 the URL to your mirrors. Here is the general syntax:
6990 ::
6991
6992 INHERIT += "own-mirrors"
6993 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
6994
6995 .. note::
6996
6997 You can specify only a single URL in
6998 SOURCE_MIRROR_URL
6999 .
7000
7001 SPDXLICENSEMAP
7002 Maps commonly used license names to their SPDX counterparts found in
7003 ``meta/files/common-licenses/``. For the default ``SPDXLICENSEMAP``
7004 mappings, see the ``meta/conf/licenses.conf`` file.
7005
7006 For additional information, see the :term:`LICENSE`
7007 variable.
7008
7009 SPECIAL_PKGSUFFIX
7010 A list of prefixes for :term:`PN` used by the OpenEmbedded
7011 build system to create variants of recipes or packages. The list
7012 specifies the prefixes to strip off during certain circumstances such
7013 as the generation of the :term:`BPN` variable.
7014
7015 SPL_BINARY
7016 The file type for the Secondary Program Loader (SPL). Some devices
7017 use an SPL from which to boot (e.g. the BeagleBone development
7018 board). For such cases, you can declare the file type of the SPL
7019 binary in the ``u-boot.inc`` include file, which is used in the
7020 U-Boot recipe.
7021
7022 The SPL file type is set to "null" by default in the ``u-boot.inc``
7023 file as follows:
7024 ::
7025
7026 # Some versions of u-boot build an SPL (Second Program Loader) image that
7027 # should be packaged along with the u-boot binary as well as placed in the
7028 # deploy directory. For those versions they can set the following variables
7029 # to allow packaging the SPL.
7030 SPL_BINARY ?= ""
7031 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7032 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7033 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7034
7035 The ``SPL_BINARY`` variable helps form
7036 various ``SPL_*`` variables used by the OpenEmbedded build system.
7037
7038 See the BeagleBone machine configuration example in the
7039 ":ref:`dev-manual/dev-manual-common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
7040 section in the Yocto Project Board Support Package Developer's Guide
7041 for additional information.
7042
7043 SRC_URI
7044 The list of source files - local or remote. This variable tells the
7045 OpenEmbedded build system which bits to pull in for the build and how
7046 to pull them in. For example, if the recipe or append file only needs
7047 to fetch a tarball from the Internet, the recipe or append file uses
7048 a single ``SRC_URI`` entry. On the other hand, if the recipe or
7049 append file needs to fetch a tarball, apply two patches, and include
7050 a custom file, the recipe or append file would include four instances
7051 of the variable.
7052
7053 The following list explains the available URI protocols. URI
7054 protocols are highly dependent on particular BitBake Fetcher
7055 submodules. Depending on the fetcher BitBake uses, various URL
7056 parameters are employed. For specifics on the supported Fetchers, see
7057 the ":ref:`Fetchers <bitbake:bb-fetchers>`" section in the
7058 BitBake User Manual.
7059
7060 - ``file://`` - Fetches files, which are usually files shipped
7061 with the :term:`Metadata`, from the local machine (e.g.
7062 :ref:`patch <patching-dev-environment>` files).
7063 The path is relative to the :term:`FILESPATH`
7064 variable. Thus, the build system searches, in order, from the
7065 following directories, which are assumed to be a subdirectories of
7066 the directory in which the recipe file (``.bb``) or append file
7067 (``.bbappend``) resides:
7068
7069 - ``${BPN}`` - The base recipe name without any special suffix
7070 or version numbers.
7071
7072 - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and
7073 version but without any special package name suffix.
7074
7075 - *files -* Files within a directory, which is named ``files``
7076 and is also alongside the recipe or append file.
7077
7078 .. note::
7079
7080 If you want the build system to pick up files specified through
7081 a
7082 SRC_URI
7083 statement from your append file, you need to be sure to extend
7084 the
7085 FILESPATH
7086 variable by also using the
7087 FILESEXTRAPATHS
7088 variable from within your append file.
7089
7090 - ``bzr://`` - Fetches files from a Bazaar revision control
7091 repository.
7092
7093 - ``git://`` - Fetches files from a Git revision control
7094 repository.
7095
7096 - ``osc://`` - Fetches files from an OSC (OpenSUSE Build service)
7097 revision control repository.
7098
7099 - ``repo://`` - Fetches files from a repo (Git) repository.
7100
7101 - ``ccrc://`` - Fetches files from a ClearCase repository.
7102
7103 - ``http://`` - Fetches files from the Internet using ``http``.
7104
7105 - ``https://`` - Fetches files from the Internet using ``https``.
7106
7107 - ``ftp://`` - Fetches files from the Internet using ``ftp``.
7108
7109 - ``cvs://`` - Fetches files from a CVS revision control
7110 repository.
7111
7112 - ``hg://`` - Fetches files from a Mercurial (``hg``) revision
7113 control repository.
7114
7115 - ``p4://`` - Fetches files from a Perforce (``p4``) revision
7116 control repository.
7117
7118 - ``ssh://`` - Fetches files from a secure shell.
7119
7120 - ``svn://`` - Fetches files from a Subversion (``svn``) revision
7121 control repository.
7122
7123 - ``npm://`` - Fetches JavaScript modules from a registry.
7124
7125 Standard and recipe-specific options for ``SRC_URI`` exist. Here are
7126 standard options:
7127
7128 - ``apply`` - Whether to apply the patch or not. The default
7129 action is to apply the patch.
7130
7131 - ``striplevel`` - Which striplevel to use when applying the
7132 patch. The default level is 1.
7133
7134 - ``patchdir`` - Specifies the directory in which the patch should
7135 be applied. The default is ``${``\ :term:`S`\ ``}``.
7136
7137 Here are options specific to recipes building code from a revision
7138 control system:
7139
7140 - ``mindate`` - Apply the patch only if
7141 :term:`SRCDATE` is equal to or greater than
7142 ``mindate``.
7143
7144 - ``maxdate`` - Apply the patch only if ``SRCDATE`` is not later
7145 than ``maxdate``.
7146
7147 - ``minrev`` - Apply the patch only if ``SRCREV`` is equal to or
7148 greater than ``minrev``.
7149
7150 - ``maxrev`` - Apply the patch only if ``SRCREV`` is not later
7151 than ``maxrev``.
7152
7153 - ``rev`` - Apply the patch only if ``SRCREV`` is equal to
7154 ``rev``.
7155
7156 - ``notrev`` - Apply the patch only if ``SRCREV`` is not equal to
7157 ``rev``.
7158
7159 Here are some additional options worth mentioning:
7160
7161 - ``unpack`` - Controls whether or not to unpack the file if it is
7162 an archive. The default action is to unpack the file.
7163
7164 - ``destsuffix`` - Places the file (or extracts its contents) into
7165 the specified subdirectory of :term:`WORKDIR` when
7166 the Git fetcher is used.
7167
7168 - ``subdir`` - Places the file (or extracts its contents) into the
7169 specified subdirectory of ``WORKDIR`` when the local (``file://``)
7170 fetcher is used.
7171
7172 - ``localdir`` - Places the file (or extracts its contents) into
7173 the specified subdirectory of ``WORKDIR`` when the CVS fetcher is
7174 used.
7175
7176 - ``subpath`` - Limits the checkout to a specific subpath of the
7177 tree when using the Git fetcher is used.
7178
7179 - ``name`` - Specifies a name to be used for association with
7180 ``SRC_URI`` checksums when you have more than one file specified
7181 in ``SRC_URI``.
7182
7183 - ``downloadfilename`` - Specifies the filename used when storing
7184 the downloaded file.
7185
7186 SRC_URI_OVERRIDES_PACKAGE_ARCH
7187 By default, the OpenEmbedded build system automatically detects
7188 whether ``SRC_URI`` contains files that are machine-specific. If so,
7189 the build system automatically changes ``PACKAGE_ARCH``. Setting this
7190 variable to "0" disables this behavior.
7191
7192 SRCDATE
7193 The date of the source code used to build the package. This variable
7194 applies only if the source was fetched from a Source Code Manager
7195 (SCM).
7196
7197 SRCPV
7198 Returns the version string of the current package. This string is
7199 used to help define the value of :term:`PV`.
7200
7201 The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf``
7202 configuration file in the :term:`Source Directory` as
7203 follows:
7204 ::
7205
7206 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7207
7208 Recipes that need to define ``PV`` do so with the help of the
7209 ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``)
7210 located in ``meta/recipes-connectivity`` in the Source Directory
7211 defines ``PV`` as follows:
7212 ::
7213
7214 PV = "0.12-git${SRCPV}"
7215
7216 SRCREV
7217 The revision of the source code used to build the package. This
7218 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7219 that if you want to build a fixed revision and you want to avoid
7220 performing a query on the remote repository every time BitBake parses
7221 your recipe, you should specify a ``SRCREV`` that is a full revision
7222 identifier and not just a tag.
7223
7224 .. note::
7225
7226 For information on limitations when inheriting the latest revision
7227 of software using
7228 SRCREV
7229 , see the
7230 AUTOREV
7231 variable description and the "
7232 Automatically Incrementing a Binary Package Revision Number
7233 " section, which is in the Yocto Project Development Tasks Manual.
7234
7235 SSTATE_DIR
7236 The directory for the shared state cache.
7237
7238 SSTATE_MIRROR_ALLOW_NETWORK
7239 If set to "1", allows fetches from mirrors that are specified in
7240 :term:`SSTATE_MIRRORS` to work even when
7241 fetching from the network is disabled by setting ``BB_NO_NETWORK`` to
7242 "1". Using the ``SSTATE_MIRROR_ALLOW_NETWORK`` variable is useful if
7243 you have set ``SSTATE_MIRRORS`` to point to an internal server for
7244 your shared state cache, but you want to disable any other fetching
7245 from the network.
7246
7247 SSTATE_MIRRORS
7248 Configures the OpenEmbedded build system to search other mirror
7249 locations for prebuilt cache data objects before building out the
7250 data. This variable works like fetcher :term:`MIRRORS`
7251 and :term:`PREMIRRORS` and points to the cache
7252 locations to check for the shared state (sstate) objects.
7253
7254 You can specify a filesystem directory or a remote URL such as HTTP
7255 or FTP. The locations you specify need to contain the shared state
7256 cache (sstate-cache) results from previous builds. The sstate-cache
7257 you point to can also be from builds on other machines.
7258
7259 When pointing to sstate build artifacts on another machine that uses
7260 a different GCC version for native builds, you must configure
7261 ``SSTATE_MIRRORS`` with a regular expression that maps local search
7262 paths to server paths. The paths need to take into account
7263 :term:`NATIVELSBSTRING` set by the
7264 :ref:`uninative <ref-classes-uninative>` class. For example, the
7265 following maps the local search path ``universal-4.9`` to the
7266 server-provided path server_url_sstate_path:
7267 ::
7268
7269 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n"
7270
7271 If a mirror uses the same structure as
7272 :term:`SSTATE_DIR`, you need to add "PATH" at the
7273 end as shown in the examples below. The build system substitutes the
7274 correct path within the directory structure.
7275 ::
7276
7277 SSTATE_MIRRORS ?= "\
7278 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
7279 file://.* file:///some-local-dir/sstate/PATH"
7280
7281 SSTATE_SCAN_FILES
7282 Controls the list of files the OpenEmbedded build system scans for
7283 hardcoded installation paths. The variable uses a space-separated
7284 list of filenames (not paths) with standard wildcard characters
7285 allowed.
7286
7287 During a build, the OpenEmbedded build system creates a shared state
7288 (sstate) object during the first stage of preparing the sysroots.
7289 That object is scanned for hardcoded paths for original installation
7290 locations. The list of files that are scanned for paths is controlled
7291 by the ``SSTATE_SCAN_FILES`` variable. Typically, recipes add files
7292 they want to be scanned to the value of ``SSTATE_SCAN_FILES`` rather
7293 than the variable being comprehensively set. The
7294 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7295 of files.
7296
7297 For details on the process, see the
7298 :ref:`staging <ref-classes-staging>` class.
7299
7300 STAGING_BASE_LIBDIR_NATIVE
7301 Specifies the path to the ``/lib`` subdirectory of the sysroot
7302 directory for the build host.
7303
7304 STAGING_BASELIBDIR
7305 Specifies the path to the ``/lib`` subdirectory of the sysroot
7306 directory for the target for which the current recipe is being built
7307 (:term:`STAGING_DIR_HOST`).
7308
7309 STAGING_BINDIR
7310 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7311 directory for the target for which the current recipe is being built
7312 (:term:`STAGING_DIR_HOST`).
7313
7314 STAGING_BINDIR_CROSS
7315 Specifies the path to the directory containing binary configuration
7316 scripts. These scripts provide configuration information for other
7317 software that wants to make use of libraries or include files
7318 provided by the software associated with the script.
7319
7320 .. note::
7321
7322 This style of build configuration has been largely replaced by
7323 pkg-config
7324 . Consequently, if
7325 pkg-config
7326 is supported by the library to which you are linking, it is
7327 recommended you use
7328 pkg-config
7329 instead of a provided configuration script.
7330
7331 STAGING_BINDIR_NATIVE
7332 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7333 directory for the build host.
7334
7335 STAGING_DATADIR
7336 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7337 directory for the target for which the current recipe is being built
7338 (:term:`STAGING_DIR_HOST`).
7339
7340 STAGING_DATADIR_NATIVE
7341 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7342 directory for the build host.
7343
7344 STAGING_DIR
7345 Helps construct the ``recipe-sysroots`` directory, which is used
7346 during packaging.
7347
7348 For information on how staging for recipe-specific sysroots occurs,
7349 see the :ref:`ref-tasks-populate_sysroot`
7350 task, the ":ref:`sdk-manual/sdk-extensible:sharing files between recipes`"
7351 section in the Yocto Project Development Tasks Manual, the
7352 ":ref:`configuration-compilation-and-staging-dev-environment`"
7353 section in the Yocto Project Overview and Concepts Manual, and the
7354 :term:`SYSROOT_DIRS` variable.
7355
7356 .. note::
7357
7358 Recipes should never write files directly under the
7359 STAGING_DIR
7360 directory because the OpenEmbedded build system manages the
7361 directory automatically. Instead, files should be installed to
7362 ${
7363 D
7364 }
7365 within your recipe's
7366 do_install
7367 task and then the OpenEmbedded build system will stage a subset of
7368 those files into the sysroot.
7369
7370 STAGING_DIR_HOST
7371 Specifies the path to the sysroot directory for the system on which
7372 the component is built to run (the system that hosts the component).
7373 For most recipes, this sysroot is the one in which that recipe's
7374 :ref:`ref-tasks-populate_sysroot` task copies
7375 files. Exceptions include ``-native`` recipes, where the
7376 ``do_populate_sysroot`` task instead uses
7377 :term:`STAGING_DIR_NATIVE`. Depending on
7378 the type of recipe and the build target, ``STAGING_DIR_HOST`` can
7379 have the following values:
7380
7381 - For recipes building for the target machine, the value is
7382 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7383
7384 - For native recipes building for the build host, the value is empty
7385 given the assumption that when building for the build host, the
7386 build host's own directories should be used.
7387
7388 .. note::
7389
7390 ``-native`` recipes are not installed into host paths like such
7391 as ``/usr``. Rather, these recipes are installed into
7392 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes,
7393 standard build environment variables such as
7394 :term:`CPPFLAGS` and
7395 :term:`CFLAGS` are set up so that both host paths
7396 and ``STAGING_DIR_NATIVE`` are searched for libraries and
7397 headers using, for example, GCC's ``-isystem`` option.
7398
7399 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7400 should be viewed as input variables by tasks such as
7401 :ref:`ref-tasks-configure`,
7402 :ref:`ref-tasks-compile`, and
7403 :ref:`ref-tasks-install`. Having the real system
7404 root correspond to ``STAGING_DIR_HOST`` makes conceptual sense
7405 for ``-native`` recipes, as they make use of host headers and
7406 libraries.
7407
7408 STAGING_DIR_NATIVE
7409 Specifies the path to the sysroot directory used when building
7410 components that run on the build host itself.
7411
7412 STAGING_DIR_TARGET
7413 Specifies the path to the sysroot used for the system for which the
7414 component generates code. For components that do not generate code,
7415 which is the majority, ``STAGING_DIR_TARGET`` is set to match
7416 :term:`STAGING_DIR_HOST`.
7417
7418 Some recipes build binaries that can run on the target system but
7419 those binaries in turn generate code for another different system
7420 (e.g. cross-canadian recipes). Using terminology from GNU, the
7421 primary system is referred to as the "HOST" and the secondary, or
7422 different, system is referred to as the "TARGET". Thus, the binaries
7423 run on the "HOST" system and generate binaries for the "TARGET"
7424 system. The ``STAGING_DIR_HOST`` variable points to the sysroot used
7425 for the "HOST" system, while ``STAGING_DIR_TARGET`` points to the
7426 sysroot used for the "TARGET" system.
7427
7428 STAGING_ETCDIR_NATIVE
7429 Specifies the path to the ``/etc`` subdirectory of the sysroot
7430 directory for the build host.
7431
7432 STAGING_EXECPREFIXDIR
7433 Specifies the path to the ``/usr`` subdirectory of the sysroot
7434 directory for the target for which the current recipe is being built
7435 (:term:`STAGING_DIR_HOST`).
7436
7437 STAGING_INCDIR
7438 Specifies the path to the ``/usr/include`` subdirectory of the
7439 sysroot directory for the target for which the current recipe being
7440 built (:term:`STAGING_DIR_HOST`).
7441
7442 STAGING_INCDIR_NATIVE
7443 Specifies the path to the ``/usr/include`` subdirectory of the
7444 sysroot directory for the build host.
7445
7446 STAGING_KERNEL_BUILDDIR
7447 Points to the directory containing the kernel build artifacts.
7448 Recipes building software that needs to access kernel build artifacts
7449 (e.g. ``systemtap-uprobes``) can look in the directory specified with
7450 the ``STAGING_KERNEL_BUILDDIR`` variable to find these artifacts
7451 after the kernel has been built.
7452
7453 STAGING_KERNEL_DIR
7454 The directory with kernel headers that are required to build
7455 out-of-tree modules.
7456
7457 STAGING_LIBDIR
7458 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7459 directory for the target for which the current recipe is being built
7460 (:term:`STAGING_DIR_HOST`).
7461
7462 STAGING_LIBDIR_NATIVE
7463 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7464 directory for the build host.
7465
7466 STAMP
7467 Specifies the base path used to create recipe stamp files. The path
7468 to an actual stamp file is constructed by evaluating this string and
7469 then appending additional information. Currently, the default
7470 assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf``
7471 file is:
7472 ::
7473
7474 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7475
7476 For information on how BitBake uses stamp files to determine if a
7477 task should be rerun, see the
7478 ":ref:`overview-manual/overview-manual-concepts:stamp files and the rerunning of tasks`"
7479 section in the Yocto Project Overview and Concepts Manual.
7480
7481 See :term:`STAMPS_DIR`,
7482 :term:`MULTIMACH_TARGET_SYS`,
7483 :term:`PN`, :term:`EXTENDPE`,
7484 :term:`PV`, and :term:`PR` for related variable
7485 information.
7486
7487 STAMPS_DIR
7488 Specifies the base directory in which the OpenEmbedded build system
7489 places stamps. The default directory is ``${TMPDIR}/stamps``.
7490
7491 STRIP
7492 The minimal command and arguments to run ``strip``, which is used to
7493 strip symbols.
7494
7495 SUMMARY
7496 The short (72 characters or less) summary of the binary package for
7497 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
7498 ``SUMMARY`` is used to define the
7499 :term:`DESCRIPTION` variable if ``DESCRIPTION`` is
7500 not set in the recipe.
7501
7502 SVNDIR
7503 The directory in which files checked out of a Subversion system are
7504 stored.
7505
7506 SYSLINUX_DEFAULT_CONSOLE
7507 Specifies the kernel boot default console. If you want to use a
7508 console other than the default, set this variable in your recipe as
7509 follows where "X" is the console number you want to use:
7510 ::
7511
7512 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7513
7514 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7515 this variable to null but then checks for a value later.
7516
7517 SYSLINUX_OPTS
7518 Lists additional options to add to the syslinux file. You need to set
7519 this variable in your recipe. If you want to list multiple options,
7520 separate the options with a semicolon character (``;``).
7521
7522 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7523 to create a set of options.
7524
7525 SYSLINUX_SERIAL
7526 Specifies the alternate serial port or turns it off. To turn off
7527 serial, set this variable to an empty string in your recipe. The
7528 variable's default value is set in the
7529 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7530 ::
7531
7532 SYSLINUX_SERIAL ?= "0 115200"
7533
7534 The class checks for and uses the variable as needed.
7535
7536 SYSLINUX_SPLASH
7537 An ``.LSS`` file used as the background for the VGA boot menu when
7538 you use the boot menu. You need to set this variable in your recipe.
7539
7540 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7541 variable and if found, the OpenEmbedded build system installs the
7542 splash screen.
7543
7544 SYSLINUX_SERIAL_TTY
7545 Specifies the alternate console=tty... kernel boot argument. The
7546 variable's default value is set in the
7547 :ref:`syslinux <ref-classes-syslinux>` class as follows:
7548 ::
7549
7550 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7551
7552 The class checks for and uses the variable as needed.
7553
7554 SYSROOT_DESTDIR
7555 Points to the temporary directory under the work directory (default
7556 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7557 where the files populated into the sysroot are assembled during the
7558 :ref:`ref-tasks-populate_sysroot` task.
7559
7560 SYSROOT_DIRS
7561 Directories that are staged into the sysroot by the
7562 :ref:`ref-tasks-populate_sysroot` task. By
7563 default, the following directories are staged:
7564 ::
7565
7566 SYSROOT_DIRS = " \
7567 ${includedir} \
7568 ${libdir} \
7569 ${base_libdir} \
7570 ${nonarch_base_libdir} \
7571 ${datadir} \
7572 "
7573
7574 SYSROOT_DIRS_BLACKLIST
7575 Directories that are not staged into the sysroot by the
7576 :ref:`ref-tasks-populate_sysroot` task. You
7577 can use this variable to exclude certain subdirectories of
7578 directories listed in :term:`SYSROOT_DIRS` from
7579 staging. By default, the following directories are not staged:
7580 ::
7581
7582 SYSROOT_DIRS_BLACKLIST = " \
7583 ${mandir} \
7584 ${docdir} \
7585 ${infodir} \
7586 ${datadir}/locale \
7587 ${datadir}/applications \
7588 ${datadir}/fonts \
7589 ${datadir}/pixmaps \
7590 "
7591
7592 SYSROOT_DIRS_NATIVE
7593 Extra directories staged into the sysroot by the
7594 :ref:`ref-tasks-populate_sysroot` task for
7595 ``-native`` recipes, in addition to those specified in
7596 :term:`SYSROOT_DIRS`. By default, the following
7597 extra directories are staged:
7598 ::
7599
7600 SYSROOT_DIRS_NATIVE = " \
7601 ${bindir} \
7602 ${sbindir} \
7603 ${base_bindir} \
7604 ${base_sbindir} \
7605 ${libexecdir} \
7606 ${sysconfdir} \
7607 ${localstatedir} \
7608 "
7609
7610 .. note::
7611
7612 Programs built by
7613 -native
7614 recipes run directly from the sysroot (
7615 STAGING_DIR_NATIVE
7616 ), which is why additional directories containing program
7617 executables and supporting files need to be staged.
7618
7619 SYSROOT_PREPROCESS_FUNCS
7620 A list of functions to execute after files are staged into the
7621 sysroot. These functions are usually used to apply additional
7622 processing on the staged files, or to stage additional files.
7623
7624 SYSTEMD_AUTO_ENABLE
7625 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7626 this variable specifies whether the specified service in
7627 :term:`SYSTEMD_SERVICE` should start
7628 automatically or not. By default, the service is enabled to
7629 automatically start at boot time. The default setting is in the
7630 :ref:`systemd <ref-classes-systemd>` class as follows:
7631 ::
7632
7633 SYSTEMD_AUTO_ENABLE ??= "enable"
7634
7635 You can disable the service by setting the variable to "disable".
7636
7637 SYSTEMD_BOOT_CFG
7638 When :term:`EFI_PROVIDER` is set to
7639 "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the
7640 configuration file that should be used. By default, the
7641 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7642 ``SYSTEMD_BOOT_CFG`` as follows:
7643 ::
7644
7645 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7646
7647 For information on Systemd-boot, see the `Systemd-boot
7648 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7649
7650 SYSTEMD_BOOT_ENTRIES
7651 When :term:`EFI_PROVIDER` is set to
7652 "systemd-boot", the ``SYSTEMD_BOOT_ENTRIES`` variable specifies a
7653 list of entry files (``*.conf``) to install that contain one boot
7654 entry per file. By default, the
7655 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7656 ``SYSTEMD_BOOT_ENTRIES`` as follows:
7657 ::
7658
7659 SYSTEMD_BOOT_ENTRIES ?= ""
7660
7661 For information on Systemd-boot, see the `Systemd-boot
7662 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7663
7664 SYSTEMD_BOOT_TIMEOUT
7665 When :term:`EFI_PROVIDER` is set to
7666 "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the
7667 boot menu timeout in seconds. By default, the
7668 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7669 ``SYSTEMD_BOOT_TIMEOUT`` as follows:
7670 ::
7671
7672 SYSTEMD_BOOT_TIMEOUT ?= "10"
7673
7674 For information on Systemd-boot, see the `Systemd-boot
7675 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7676
7677 SYSTEMD_PACKAGES
7678 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7679 this variable locates the systemd unit files when they are not found
7680 in the main recipe's package. By default, the ``SYSTEMD_PACKAGES``
7681 variable is set such that the systemd unit files are assumed to
7682 reside in the recipes main package:
7683 ::
7684
7685 SYSTEMD_PACKAGES ?= "${PN}"
7686
7687 If these unit files are not in this recipe's main package, you need
7688 to use ``SYSTEMD_PACKAGES`` to list the package or packages in which
7689 the build system can find the systemd unit files.
7690
7691 SYSTEMD_SERVICE
7692 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7693 this variable specifies the systemd service name for a package.
7694
7695 When you specify this file in your recipe, use a package name
7696 override to indicate the package to which the value applies. Here is
7697 an example from the connman recipe:
7698 ::
7699
7700 SYSTEMD_SERVICE_${PN} = "connman.service"
7701
7702 SYSVINIT_ENABLED_GETTYS
7703 When using
7704 :ref:`SysVinit <dev-manual/dev-manual-common-tasks:enabling system services>`,
7705 specifies a space-separated list of the virtual terminals that should
7706 run a `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
7707 (allowing login), assuming :term:`USE_VT` is not set to
7708 "0".
7709
7710 The default value for ``SYSVINIT_ENABLED_GETTYS`` is "1" (i.e. only
7711 run a getty on the first virtual terminal).
7712
7713 T
7714 This variable points to a directory were BitBake places temporary
7715 files, which consist mostly of task logs and scripts, when building a
7716 particular recipe. The variable is typically set as follows:
7717 ::
7718
7719 T = "${WORKDIR}/temp"
7720
7721 The :term:`WORKDIR` is the directory into which
7722 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7723 file sets this variable.
7724
7725 The ``T`` variable is not to be confused with the
7726 :term:`TMPDIR` variable, which points to the root of
7727 the directory tree where BitBake places the output of an entire
7728 build.
7729
7730 TARGET_ARCH
7731 The target machine's architecture. The OpenEmbedded build system
7732 supports many architectures. Here is an example list of architectures
7733 supported. This list is by no means complete as the architecture is
7734 configurable:
7735
7736 - arm
7737 - i586
7738 - x86_64
7739 - powerpc
7740 - powerpc64
7741 - mips
7742 - mipsel
7743
7744 For additional information on machine architectures, see the
7745 :term:`TUNE_ARCH` variable.
7746
7747 TARGET_AS_ARCH
7748 Specifies architecture-specific assembler flags for the target
7749 system. ``TARGET_AS_ARCH`` is initialized from
7750 :term:`TUNE_ASARGS` by default in the BitBake
7751 configuration file (``meta/conf/bitbake.conf``):
7752 ::
7753
7754 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7755
7756 TARGET_CC_ARCH
7757 Specifies architecture-specific C compiler flags for the target
7758 system. ``TARGET_CC_ARCH`` is initialized from
7759 :term:`TUNE_CCARGS` by default.
7760
7761 .. note::
7762
7763 It is a common workaround to append
7764 LDFLAGS
7765 to
7766 TARGET_CC_ARCH
7767 in recipes that build software for the target that would not
7768 otherwise respect the exported
7769 LDFLAGS
7770 variable.
7771
7772 TARGET_CC_KERNEL_ARCH
7773 This is a specific kernel compiler flag for a CPU or Application
7774 Binary Interface (ABI) tune. The flag is used rarely and only for
7775 cases where a userspace :term:`TUNE_CCARGS` is not
7776 compatible with the kernel compilation. The ``TARGET_CC_KERNEL_ARCH``
7777 variable allows the kernel (and associated modules) to use a
7778 different configuration. See the
7779 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7780 :term:`Source Directory` for an example.
7781
7782 TARGET_CFLAGS
7783 Specifies the flags to pass to the C compiler when building for the
7784 target. When building in the target context,
7785 :term:`CFLAGS` is set to the value of this variable by
7786 default.
7787
7788 Additionally, the SDK's environment setup script sets the ``CFLAGS``
7789 variable in the environment to the ``TARGET_CFLAGS`` value so that
7790 executables built using the SDK also have the flags applied.
7791
7792 TARGET_CPPFLAGS
7793 Specifies the flags to pass to the C pre-processor (i.e. to both the
7794 C and the C++ compilers) when building for the target. When building
7795 in the target context, :term:`CPPFLAGS` is set to the
7796 value of this variable by default.
7797
7798 Additionally, the SDK's environment setup script sets the
7799 ``CPPFLAGS`` variable in the environment to the ``TARGET_CPPFLAGS``
7800 value so that executables built using the SDK also have the flags
7801 applied.
7802
7803 TARGET_CXXFLAGS
7804 Specifies the flags to pass to the C++ compiler when building for the
7805 target. When building in the target context,
7806 :term:`CXXFLAGS` is set to the value of this variable
7807 by default.
7808
7809 Additionally, the SDK's environment setup script sets the
7810 ``CXXFLAGS`` variable in the environment to the ``TARGET_CXXFLAGS``
7811 value so that executables built using the SDK also have the flags
7812 applied.
7813
7814 TARGET_FPU
7815 Specifies the method for handling FPU code. For FPU-less targets,
7816 which include most ARM CPUs, the variable must be set to "soft". If
7817 not, the kernel emulation gets used, which results in a performance
7818 penalty.
7819
7820 TARGET_LD_ARCH
7821 Specifies architecture-specific linker flags for the target system.
7822 ``TARGET_LD_ARCH`` is initialized from
7823 :term:`TUNE_LDARGS` by default in the BitBake
7824 configuration file (``meta/conf/bitbake.conf``):
7825 ::
7826
7827 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7828
7829 TARGET_LDFLAGS
7830 Specifies the flags to pass to the linker when building for the
7831 target. When building in the target context,
7832 :term:`LDFLAGS` is set to the value of this variable
7833 by default.
7834
7835 Additionally, the SDK's environment setup script sets the
7836 :term:`LDFLAGS` variable in the environment to the
7837 ``TARGET_LDFLAGS`` value so that executables built using the SDK also
7838 have the flags applied.
7839
7840 TARGET_OS
7841 Specifies the target's operating system. The variable can be set to
7842 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
7843 for musl libc. For ARM/EABI targets, "linux-gnueabi" and
7844 "linux-musleabi" possible values exist.
7845
7846 TARGET_PREFIX
7847 Specifies the prefix used for the toolchain binary target tools.
7848
7849 Depending on the type of recipe and the build target,
7850 ``TARGET_PREFIX`` is set as follows:
7851
7852 - For recipes building for the target machine, the value is
7853 "${:term:`TARGET_SYS`}-".
7854
7855 - For native recipes, the build system sets the variable to the
7856 value of ``BUILD_PREFIX``.
7857
7858 - For native SDK recipes (``nativesdk``), the build system sets the
7859 variable to the value of ``SDK_PREFIX``.
7860
7861 TARGET_SYS
7862 Specifies the system, including the architecture and the operating
7863 system, for which the build is occurring in the context of the
7864 current recipe.
7865
7866 The OpenEmbedded build system automatically sets this variable based
7867 on :term:`TARGET_ARCH`,
7868 :term:`TARGET_VENDOR`, and
7869 :term:`TARGET_OS` variables.
7870
7871 .. note::
7872
7873 You do not need to set the TARGET_SYS variable yourself.
7874
7875 Consider these two examples:
7876
7877 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7878 value is "i686-linux".
7879
7880 - Given a recipe being built for a little-endian, MIPS target
7881 running Linux, the value might be "mipsel-linux".
7882
7883 TARGET_VENDOR
7884 Specifies the name of the target vendor.
7885
7886 TCLIBC
7887 Specifies the GNU standard C library (``libc``) variant to use during
7888 the build process. This variable replaces ``POKYLIBC``, which is no
7889 longer supported.
7890
7891 You can select "glibc", "musl", "newlib", or "baremetal"
7892
7893 TCLIBCAPPEND
7894 Specifies a suffix to be appended onto the
7895 :term:`TMPDIR` value. The suffix identifies the
7896 ``libc`` variant for building. When you are building for multiple
7897 variants with the same :term:`Build Directory`, this
7898 mechanism ensures that output for different ``libc`` variants is kept
7899 separate to avoid potential conflicts.
7900
7901 In the ``defaultsetup.conf`` file, the default value of
7902 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky,
7903 which normally only support one ``libc`` variant, set
7904 ``TCLIBCAPPEND`` to "" in their distro configuration file resulting
7905 in no suffix being applied.
7906
7907 TCMODE
7908 Specifies the toolchain selector. ``TCMODE`` controls the
7909 characteristics of the generated packages and images by telling the
7910 OpenEmbedded build system which toolchain profile to use. By default,
7911 the OpenEmbedded build system builds its own internal toolchain. The
7912 variable's default value is "default", which uses that internal
7913 toolchain.
7914
7915 .. note::
7916
7917 If
7918 TCMODE
7919 is set to a value other than "default", then it is your
7920 responsibility to ensure that the toolchain is compatible with the
7921 default toolchain. Using older or newer versions of these
7922 components might cause build problems. See the Release Notes for
7923 the Yocto Project release for the specific components with which
7924 the toolchain must be compatible. To access the Release Notes, go
7925 to the
7926 Downloads
7927 page on the Yocto Project website and click on the "RELEASE
7928 INFORMATION" link for the appropriate release.
7929
7930 The ``TCMODE`` variable is similar to :term:`TCLIBC`,
7931 which controls the variant of the GNU standard C library (``libc``)
7932 used during the build process: ``glibc`` or ``musl``.
7933
7934 With additional layers, it is possible to use a pre-compiled external
7935 toolchain. One example is the Sourcery G++ Toolchain. The support for
7936 this toolchain resides in the separate Mentor Graphics
7937 ``meta-sourcery`` layer at
7938 http://github.com/MentorEmbedded/meta-sourcery/.
7939
7940 The layer's ``README`` file contains information on how to use the
7941 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7942 be sure to add the layer to your ``bblayers.conf`` file in front of
7943 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7944 in your ``local.conf`` file to the location in which you installed
7945 the toolchain.
7946
7947 The fundamentals used for this example apply to any external
7948 toolchain. You can use ``meta-sourcery`` as a template for adding
7949 support for other external toolchains.
7950
7951 TEST_EXPORT_DIR
7952 The location the OpenEmbedded build system uses to export tests when
7953 the :term:`TEST_EXPORT_ONLY` variable is set
7954 to "1".
7955
7956 The ``TEST_EXPORT_DIR`` variable defaults to
7957 ``"${TMPDIR}/testimage/${PN}"``.
7958
7959 TEST_EXPORT_ONLY
7960 Specifies to export the tests only. Set this variable to "1" if you
7961 do not want to run the tests but you want them to be exported in a
7962 manner that you to run them outside of the build system.
7963
7964 TEST_LOG_DIR
7965 Holds the SSH log and the boot log for QEMU machines. The
7966 ``TEST_LOG_DIR`` variable defaults to ``"${WORKDIR}/testimage"``.
7967
7968 .. note::
7969
7970 Actual test results reside in the task log (
7971 log.do_testimage
7972 ), which is in the
7973 ${WORKDIR}/temp/
7974 directory.
7975
7976 TEST_POWERCONTROL_CMD
7977 For automated hardware testing, specifies the command to use to
7978 control the power of the target machine under test. Typically, this
7979 command would point to a script that performs the appropriate action
7980 (e.g. interacting with a web-enabled power strip). The specified
7981 command should expect to receive as the last argument "off", "on" or
7982 "cycle" specifying to power off, on, or cycle (power off and then
7983 power on) the device, respectively.
7984
7985 TEST_POWERCONTROL_EXTRA_ARGS
7986 For automated hardware testing, specifies additional arguments to
7987 pass through to the command specified in
7988 :term:`TEST_POWERCONTROL_CMD`. Setting
7989 ``TEST_POWERCONTROL_EXTRA_ARGS`` is optional. You can use it if you
7990 wish, for example, to separate the machine-specific and
7991 non-machine-specific parts of the arguments.
7992
7993 TEST_QEMUBOOT_TIMEOUT
7994 The time in seconds allowed for an image to boot before automated
7995 runtime tests begin to run against an image. The default timeout
7996 period to allow the boot process to reach the login prompt is 500
7997 seconds. You can specify a different value in the ``local.conf``
7998 file.
7999
8000 For more information on testing images, see the
8001 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8002 section in the Yocto Project Development Tasks Manual.
8003
8004 TEST_SERIALCONTROL_CMD
8005 For automated hardware testing, specifies the command to use to
8006 connect to the serial console of the target machine under test. This
8007 command simply needs to connect to the serial console and forward
8008 that connection to standard input and output as any normal terminal
8009 program does.
8010
8011 For example, to use the Picocom terminal program on serial device
8012 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:
8013 ::
8014
8015 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8016
8017 TEST_SERIALCONTROL_EXTRA_ARGS
8018 For automated hardware testing, specifies additional arguments to
8019 pass through to the command specified in
8020 :term:`TEST_SERIALCONTROL_CMD`. Setting
8021 ``TEST_SERIALCONTROL_EXTRA_ARGS`` is optional. You can use it if you
8022 wish, for example, to separate the machine-specific and
8023 non-machine-specific parts of the command.
8024
8025 TEST_SERVER_IP
8026 The IP address of the build machine (host machine). This IP address
8027 is usually automatically detected. However, if detection fails, this
8028 variable needs to be set to the IP address of the build machine (i.e.
8029 where the build is taking place).
8030
8031 .. note::
8032
8033 The
8034 TEST_SERVER_IP
8035 variable is only used for a small number of tests such as the
8036 "dnf" test suite, which needs to download packages from
8037 WORKDIR/oe-rootfs-repo
8038 .
8039
8040 TEST_TARGET
8041 Specifies the target controller to use when running tests against a
8042 test image. The default controller to use is "qemu":
8043 ::
8044
8045 TEST_TARGET = "qemu"
8046
8047 A target controller is a class that defines how an image gets
8048 deployed on a target and how a target is started. A layer can extend
8049 the controllers by adding a module in the layer's
8050 ``/lib/oeqa/controllers`` directory and by inheriting the
8051 ``BaseTarget`` class, which is an abstract class that cannot be used
8052 as a value of ``TEST_TARGET``.
8053
8054 You can provide the following arguments with ``TEST_TARGET``:
8055
8056 - *"qemu":* Boots a QEMU image and runs the tests. See the
8057 ":ref:`qemu-image-enabling-tests`" section
8058 in the Yocto Project Development Tasks Manual for more
8059 information.
8060
8061 - *"simpleremote":* Runs the tests on target hardware that is
8062 already up and running. The hardware can be on the network or it
8063 can be a device running an image on QEMU. You must also set
8064 :term:`TEST_TARGET_IP` when you use
8065 "simpleremote".
8066
8067 .. note::
8068
8069 This argument is defined in
8070 meta/lib/oeqa/controllers/simpleremote.py
8071 .
8072
8073 For information on running tests on hardware, see the
8074 ":ref:`hardware-image-enabling-tests`"
8075 section in the Yocto Project Development Tasks Manual.
8076
8077 TEST_TARGET_IP
8078 The IP address of your hardware under test. The ``TEST_TARGET_IP``
8079 variable has no effect when :term:`TEST_TARGET` is
8080 set to "qemu".
8081
8082 When you specify the IP address, you can also include a port. Here is
8083 an example:
8084 ::
8085
8086 TEST_TARGET_IP = "192.168.1.4:2201"
8087
8088 Specifying a port is
8089 useful when SSH is started on a non-standard port or in cases when
8090 your hardware under test is behind a firewall or network that is not
8091 directly accessible from your host and you need to do port address
8092 translation.
8093
8094 TEST_SUITES
8095 An ordered list of tests (modules) to run against an image when
8096 performing automated runtime testing.
8097
8098 The OpenEmbedded build system provides a core set of tests that can
8099 be used against images.
8100
8101 .. note::
8102
8103 Currently, there is only support for running these tests under
8104 QEMU.
8105
8106 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
8107 your own tests to the list of tests by appending ``TEST_SUITES`` as
8108 follows:
8109 ::
8110
8111 TEST_SUITES_append = " mytest"
8112
8113 Alternatively, you can
8114 provide the "auto" option to have all applicable tests run against
8115 the image.
8116 ::
8117
8118 TEST_SUITES_append = " auto"
8119
8120 Using this option causes the
8121 build system to automatically run tests that are applicable to the
8122 image. Tests that are not applicable are skipped.
8123
8124 The order in which tests are run is important. Tests that depend on
8125 another test must appear later in the list than the test on which
8126 they depend. For example, if you append the list of tests with two
8127 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
8128 ``test_A``, then you must order the tests as follows:
8129 ::
8130
8131 TEST_SUITES = "test_A test_B"
8132
8133 For more information on testing images, see the
8134 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8135 section in the Yocto Project Development Tasks Manual.
8136
8137 TESTIMAGE_AUTO
8138 Automatically runs the series of automated tests for images when an
8139 image is successfully built. Setting ``TESTIMAGE_AUTO`` to "1" causes
8140 any image that successfully builds to automatically boot under QEMU.
8141 Using the variable also adds in dependencies so that any SDK for
8142 which testing is requested is automatically built first.
8143
8144 These tests are written in Python making use of the ``unittest``
8145 module, and the majority of them run commands on the target system
8146 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8147 file in the :term:`Build Directory` to have the
8148 OpenEmbedded build system automatically run these tests after an
8149 image successfully builds:
8150
8151 TESTIMAGE_AUTO = "1"
8152
8153 For more information
8154 on enabling, running, and writing these tests, see the
8155 ":ref:`dev-manual/dev-manual-common-tasks:performing automated runtime testing`"
8156 section in the Yocto Project Development Tasks Manual and the
8157 ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section.
8158
8159 THISDIR
8160 The directory in which the file BitBake is currently parsing is
8161 located. Do not manually set this variable.
8162
8163 TIME
8164 The time the build was started. Times appear using the hour, minute,
8165 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8166 seconds past 1400 hours).
8167
8168 TMPDIR
8169 This variable is the base directory the OpenEmbedded build system
8170 uses for all build output and intermediate files (other than the
8171 shared state cache). By default, the ``TMPDIR`` variable points to
8172 ``tmp`` within the :term:`Build Directory`.
8173
8174 If you want to establish this directory in a location other than the
8175 default, you can uncomment and edit the following statement in the
8176 ``conf/local.conf`` file in the :term:`Source Directory`:
8177 ::
8178
8179 #TMPDIR = "${TOPDIR}/tmp"
8180
8181 An example use for this scenario is to set ``TMPDIR`` to a local disk,
8182 which does not use NFS, while having the Build Directory use NFS.
8183
8184 The filesystem used by ``TMPDIR`` must have standard filesystem
8185 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8186 persistent inodes). Due to various issues with NFS and bugs in some
8187 implementations, NFS does not meet this minimum requirement.
8188 Consequently, ``TMPDIR`` cannot be on NFS.
8189
8190 TOOLCHAIN_HOST_TASK
8191 This variable lists packages the OpenEmbedded build system uses when
8192 building an SDK, which contains a cross-development environment. The
8193 packages specified by this variable are part of the toolchain set
8194 that runs on the :term:`SDKMACHINE`, and each
8195 package should usually have the prefix ``nativesdk-``. For example,
8196 consider the following command when building an SDK:
8197 ::
8198
8199 $ bitbake -c populate_sdk imagename
8200
8201 In this case, a default list of packages is
8202 set in this variable, but you can add additional packages to the
8203 list. See the
8204 ":ref:`sdk-manual/sdk-appendix-customizing-standard:adding individual packages to the standard sdk`" section
8205 in the Yocto Project Application Development and the Extensible
8206 Software Development Kit (eSDK) manual for more information.
8207
8208 For background information on cross-development toolchains in the
8209 Yocto Project development environment, see the
8210 ":ref:`sdk-manual/sdk-intro:the cross-development toolchain`"
8211 section in the Yocto Project Overview and Concepts Manual. For
8212 information on setting up a cross-development environment, see the
8213 :doc:`../sdk-manual/sdk-manual` manual.
8214
8215 TOOLCHAIN_OUTPUTNAME
8216 This variable defines the name used for the toolchain output. The
8217 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
8218 the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:
8219 ::
8220
8221 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8222
8223 See
8224 the :term:`SDK_NAME` and
8225 :term:`SDK_VERSION` variables for additional
8226 information.
8227
8228 TOOLCHAIN_TARGET_TASK
8229 This variable lists packages the OpenEmbedded build system uses when
8230 it creates the target part of an SDK (i.e. the part built for the
8231 target hardware), which includes libraries and headers. Use this
8232 variable to add individual packages to the part of the SDK that runs
8233 on the target. See the
8234 ":ref:`sdk-manual/sdk-appendix-customizing-standard:adding individual packages to the standard sdk`" section
8235 in the Yocto Project Application Development and the Extensible
8236 Software Development Kit (eSDK) manual for more information.
8237
8238 For background information on cross-development toolchains in the
8239 Yocto Project development environment, see the
8240 ":ref:`sdk-manual/sdk-intro:the cross-development toolchain`"
8241 section in the Yocto Project Overview and Concepts Manual. For
8242 information on setting up a cross-development environment, see the
8243 :doc:`../sdk-manual/sdk-manual` manual.
8244
8245 TOPDIR
8246 The top-level :term:`Build Directory`. BitBake
8247 automatically sets this variable when you initialize your build
8248 environment using ````` <#structure-core-script>`__.
8249
8250 TRANSLATED_TARGET_ARCH
8251 A sanitized version of :term:`TARGET_ARCH`. This
8252 variable is used where the architecture is needed in a value where
8253 underscores are not allowed, for example within package filenames. In
8254 this case, dash characters replace any underscore characters used in
8255 ``TARGET_ARCH``.
8256
8257 Do not edit this variable.
8258
8259 TUNE_ARCH
8260 The GNU canonical architecture for a specific architecture (i.e.
8261 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8262 this value to setup configuration.
8263
8264 ``TUNE_ARCH`` definitions are specific to a given architecture. The
8265 definitions can be a single static definition, or can be dynamically
8266 adjusted. You can see details for a given CPU family by looking at
8267 the architecture's ``README`` file. For example, the
8268 ``meta/conf/machine/include/mips/README`` file in the
8269 :term:`Source Directory` provides information for
8270 ``TUNE_ARCH`` specific to the ``mips`` architecture.
8271
8272 ``TUNE_ARCH`` is tied closely to
8273 :term:`TARGET_ARCH`, which defines the target
8274 machine's architecture. The BitBake configuration file
8275 (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:
8276 ::
8277
8278 TARGET_ARCH = "${TUNE_ARCH}"
8279
8280 The following list, which is by no means complete since architectures
8281 are configurable, shows supported machine architectures:
8282
8283 - arm
8284 - i586
8285 - x86_64
8286 - powerpc
8287 - powerpc64
8288 - mips
8289 - mipsel
8290
8291 TUNE_ASARGS
8292 Specifies architecture-specific assembler flags for the target
8293 system. The set of flags is based on the selected tune features.
8294 ``TUNE_ASARGS`` is set using the tune include files, which are
8295 typically under ``meta/conf/machine/include/`` and are influenced
8296 through :term:`TUNE_FEATURES`. For example, the
8297 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8298 for the x86 architecture as follows:
8299 ::
8300
8301 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8302
8303 .. note::
8304
8305 Board Support Packages (BSPs) select the tune. The selected tune,
8306 in turn, affects the tune variables themselves (i.e. the tune can
8307 supply its own set of flags).
8308
8309 TUNE_CCARGS
8310 Specifies architecture-specific C compiler flags for the target
8311 system. The set of flags is based on the selected tune features.
8312 ``TUNE_CCARGS`` is set using the tune include files, which are
8313 typically under ``meta/conf/machine/include/`` and are influenced
8314 through :term:`TUNE_FEATURES`.
8315
8316 .. note::
8317
8318 Board Support Packages (BSPs) select the tune. The selected tune,
8319 in turn, affects the tune variables themselves (i.e. the tune can
8320 supply its own set of flags).
8321
8322 TUNE_LDARGS
8323 Specifies architecture-specific linker flags for the target system.
8324 The set of flags is based on the selected tune features.
8325 ``TUNE_LDARGS`` is set using the tune include files, which are
8326 typically under ``meta/conf/machine/include/`` and are influenced
8327 through :term:`TUNE_FEATURES`. For example, the
8328 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8329 for the x86 architecture as follows:
8330 ::
8331
8332 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8333
8334 .. note::
8335
8336 Board Support Packages (BSPs) select the tune. The selected tune,
8337 in turn, affects the tune variables themselves (i.e. the tune can
8338 supply its own set of flags).
8339
8340 TUNE_FEATURES
8341 Features used to "tune" a compiler for optimal use given a specific
8342 processor. The features are defined within the tune files and allow
8343 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8344 the features.
8345
8346 The OpenEmbedded build system verifies the features to be sure they
8347 are not conflicting and that they are supported.
8348
8349 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
8350 ``TUNE_FEATURES`` as follows:
8351 ::
8352
8353 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
8354
8355 See the :term:`DEFAULTTUNE` variable for more information.
8356
8357 TUNE_PKGARCH
8358 The package architecture understood by the packaging system to define
8359 the architecture, ABI, and tuning of output packages. The specific
8360 tune is defined using the "_tune" override as follows:
8361 ::
8362
8363 TUNE_PKGARCH_tune-tune = "tune"
8364
8365 These tune-specific package architectures are defined in the machine
8366 include files. Here is an example of the "core2-32" tuning as used in
8367 the ``meta/conf/machine/include/tune-core2.inc`` file:
8368 ::
8369
8370 TUNE_PKGARCH_tune-core2-32 = "core2-32"
8371
8372 TUNEABI
8373 An underlying Application Binary Interface (ABI) used by a particular
8374 tuning in a given toolchain layer. Providers that use prebuilt
8375 libraries can use the ``TUNEABI``,
8376 :term:`TUNEABI_OVERRIDE`, and
8377 :term:`TUNEABI_WHITELIST` variables to check
8378 compatibility of tunings against their selection of libraries.
8379
8380 If ``TUNEABI`` is undefined, then every tuning is allowed. See the
8381 :ref:`sanity <ref-classes-sanity>` class to see how the variable is
8382 used.
8383
8384 TUNEABI_OVERRIDE
8385 If set, the OpenEmbedded system ignores the
8386 :term:`TUNEABI_WHITELIST` variable.
8387 Providers that use prebuilt libraries can use the
8388 ``TUNEABI_OVERRIDE``, ``TUNEABI_WHITELIST``, and
8389 :term:`TUNEABI` variables to check compatibility of a
8390 tuning against their selection of libraries.
8391
8392 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8393 variable is used.
8394
8395 TUNEABI_WHITELIST
8396 A whitelist of permissible :term:`TUNEABI` values. If
8397 ``TUNEABI_WHITELIST`` is not set, all tunes are allowed. Providers
8398 that use prebuilt libraries can use the ``TUNEABI_WHITELIST``,
8399 :term:`TUNEABI_OVERRIDE`, and ``TUNEABI``
8400 variables to check compatibility of a tuning against their selection
8401 of libraries.
8402
8403 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8404 variable is used.
8405
8406 TUNECONFLICTS[feature]
8407 Specifies CPU or Application Binary Interface (ABI) tuning features
8408 that conflict with feature.
8409
8410 Known tuning conflicts are specified in the machine include files in
8411 the :term:`Source Directory`. Here is an example from
8412 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8413 that lists the "o32" and "n64" features as conflicting with the "n32"
8414 feature:
8415 ::
8416
8417 TUNECONFLICTS[n32] = "o32 n64"
8418
8419 TUNEVALID[feature]
8420 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8421 feature. The specified feature is stored as a flag. Valid features
8422 are specified in the machine include files (e.g.
8423 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
8424 from that file:
8425 ::
8426
8427 TUNEVALID[bigendian] = "Enable big-endian mode."
8428
8429 See the machine include files in the :term:`Source Directory`
8430 for these features.
8431
8432 UBOOT_CONFIG
8433 Configures the :term:`UBOOT_MACHINE` and can
8434 also define :term:`IMAGE_FSTYPES` for individual
8435 cases.
8436
8437 Following is an example from the ``meta-fsl-arm`` layer. ::
8438
8439 UBOOT_CONFIG ??= "sd"
8440 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8441 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8442 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8443 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8444
8445 In this example, "sd" is selected as the configuration of the possible four for the
8446 ``UBOOT_MACHINE``. The "sd" configuration defines
8447 "mx6qsabreauto_config" as the value for ``UBOOT_MACHINE``, while the
8448 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-boot image.
8449
8450 For more information on how the ``UBOOT_CONFIG`` is handled, see the
8451 :ref:`uboot-config <ref-classes-uboot-config>`
8452 class.
8453
8454 UBOOT_DTB_LOADADDRESS
8455 Specifies the load address for the dtb image used by U-boot. During FIT
8456 image creation, the ``UBOOT_DTB_LOADADDRESS`` variable is used in
8457 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8458 the load address to be used in
8459 creating the dtb sections of Image Tree Source for the FIT image.
8460
8461 UBOOT_DTBO_LOADADDRESS
8462 Specifies the load address for the dtbo image used by U-boot. During FIT
8463 image creation, the ``UBOOT_DTBO_LOADADDRESS`` variable is used in
8464 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8465 creating the dtbo sections of Image Tree Source for the FIT image.
8466
8467 UBOOT_ENTRYPOINT
8468 Specifies the entry point for the U-Boot image. During U-Boot image
8469 creation, the ``UBOOT_ENTRYPOINT`` variable is passed as a
8470 command-line parameter to the ``uboot-mkimage`` utility.
8471
8472 UBOOT_LOADADDRESS
8473 Specifies the load address for the U-Boot image. During U-Boot image
8474 creation, the ``UBOOT_LOADADDRESS`` variable is passed as a
8475 command-line parameter to the ``uboot-mkimage`` utility.
8476
8477 UBOOT_LOCALVERSION
8478 Appends a string to the name of the local version of the U-Boot
8479 image. For example, assuming the version of the U-Boot image built
8480 was "2013.10", the full version string reported by U-Boot would be
8481 "2013.10-yocto" given the following statement:
8482 ::
8483
8484 UBOOT_LOCALVERSION = "-yocto"
8485
8486 UBOOT_MACHINE
8487 Specifies the value passed on the ``make`` command line when building
8488 a U-Boot image. The value indicates the target platform
8489 configuration. You typically set this variable from the machine
8490 configuration file (i.e. ``conf/machine/machine_name.conf``).
8491
8492 Please see the "Selection of Processor Architecture and Board Type"
8493 section in the U-Boot README for valid values for this variable.
8494
8495 UBOOT_MAKE_TARGET
8496 Specifies the target called in the ``Makefile``. The default target
8497 is "all".
8498
8499 UBOOT_MKIMAGE_DTCOPTS
8500 Options for the device tree compiler passed to mkimage '-D'
8501 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
8502
8503 UBOOT_RD_LOADADDRESS
8504 Specifies the load address for the RAM disk image.
8505 During FIT image creation, the
8506 ``UBOOT_RD_LOADADDRESS`` variable is used
8507 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8508 load address to be used in creating the Image Tree Source for
8509 the FIT image.
8510
8511 UBOOT_RD_ENTRYPOINT
8512 Specifies the entrypoint for the RAM disk image.
8513 During FIT image creation, the
8514 ``UBOOT_RD_ENTRYPOINT`` variable is used
8515 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8516 entrypoint to be used in creating the Image Tree Source for
8517 the FIT image.
8518
8519 UBOOT_SIGN_ENABLE
8520 Enable signing of FIT image. The default value is "0".
8521
8522 UBOOT_SIGN_KEYDIR
8523 Location of the directory containing the RSA key and
8524 certificate used for signing FIT image.
8525
8526 UBOOT_SIGN_KEYNAME
8527 The name of keys used for signing U-boot FIT image stored in
8528 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8529 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8530 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8531
8532 UBOOT_SUFFIX
8533 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8534 has a ``.sb`` extension.
8535
8536 The default U-Boot extension is ``.bin``
8537
8538 UBOOT_TARGET
8539 Specifies the target used for building U-Boot. The target is passed
8540 directly as part of the "make" command (e.g. SPL and AIS). If you do
8541 not specifically set this variable, the OpenEmbedded build process
8542 passes and uses "all" for the target during the U-Boot building
8543 process.
8544
8545 UNKNOWN_CONFIGURE_WHITELIST
8546 Specifies a list of options that, if reported by the configure script
8547 as being invalid, should not generate a warning during the
8548 :ref:`ref-tasks-configure` task. Normally, invalid
8549 configure options are simply not passed to the configure script (e.g.
8550 should be removed from :term:`EXTRA_OECONF` or
8551 :term:`PACKAGECONFIG_CONFARGS`).
8552 However, common options, for example, exist that are passed to all
8553 configure scripts at a class level that might not be valid for some
8554 configure scripts. It follows that no benefit exists in seeing a
8555 warning about these options. For these cases, the options are added
8556 to ``UNKNOWN_CONFIGURE_WHITELIST``.
8557
8558 The configure arguments check that uses
8559 ``UNKNOWN_CONFIGURE_WHITELIST`` is part of the
8560 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8561 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8562
8563 UPDATERCPN
8564 For recipes inheriting the
8565 :ref:`update-rc.d <ref-classes-update-rc.d>` class, ``UPDATERCPN``
8566 specifies the package that contains the initscript that is enabled.
8567
8568 The default value is "${PN}". Given that almost all recipes that
8569 install initscripts package them in the main package for the recipe,
8570 you rarely need to set this variable in individual recipes.
8571
8572 UPSTREAM_CHECK_GITTAGREGEX
8573 You can perform a per-recipe check for what the latest upstream
8574 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8575 the recipe source code is provided from Git repositories, the
8576 OpenEmbedded build system determines the latest upstream version by
8577 picking the latest tag from the list of all repository tags.
8578
8579 You can use the ``UPSTREAM_CHECK_GITTAGREGEX`` variable to provide a
8580 regular expression to filter only the relevant tags should the
8581 default filter not work correctly.
8582 ::
8583
8584 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8585
8586 UPSTREAM_CHECK_REGEX
8587 Use the ``UPSTREAM_CHECK_REGEX`` variable to specify a different
8588 regular expression instead of the default one when the package
8589 checking system is parsing the page found using
8590 :term:`UPSTREAM_CHECK_URI`.
8591 ::
8592
8593 UPSTREAM_CHECK_REGEX = "package_regex"
8594
8595 UPSTREAM_CHECK_URI
8596 You can perform a per-recipe check for what the latest upstream
8597 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8598 the source code is provided from tarballs, the latest version is
8599 determined by fetching the directory listing where the tarball is and
8600 attempting to find a later tarball. When this approach does not work,
8601 you can use ``UPSTREAM_CHECK_URI`` to provide a different URI that
8602 contains the link to the latest tarball.
8603 ::
8604
8605 UPSTREAM_CHECK_URI = "recipe_url"
8606
8607 USE_DEVFS
8608 Determines if ``devtmpfs`` is used for ``/dev`` population. The
8609 default value used for ``USE_DEVFS`` is "1" when no value is
8610 specifically set. Typically, you would set ``USE_DEVFS`` to "0" for a
8611 statically populated ``/dev`` directory.
8612
8613 See the ":ref:`selecting-dev-manager`" section in
8614 the Yocto Project Development Tasks Manual for information on how to
8615 use this variable.
8616
8617 USE_VT
8618 When using
8619 :ref:`SysVinit <new-recipe-enabling-system-services>`,
8620 determines whether or not to run a
8621 `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
8622 virtual terminals in order to enable logging in through those
8623 terminals.
8624
8625 The default value used for ``USE_VT`` is "1" when no default value is
8626 specifically set. Typically, you would set ``USE_VT`` to "0" in the
8627 machine configuration file for machines that do not have a graphical
8628 display attached and therefore do not need virtual terminal
8629 functionality.
8630
8631 USER_CLASSES
8632 A list of classes to globally inherit. These classes are used by the
8633 OpenEmbedded build system to enable extra features (e.g.
8634 ``buildstats``, ``image-mklibs``, and so forth).
8635
8636 The default list is set in your ``local.conf`` file:
8637 ::
8638
8639 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
8640
8641 For more information, see
8642 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8643
8644 USERADD_ERROR_DYNAMIC
8645 If set to ``error``, forces the OpenEmbedded build system to produce
8646 an error if the user identification (``uid``) and group
8647 identification (``gid``) values are not defined in any of the files
8648 listed in :term:`USERADD_UID_TABLES` and
8649 :term:`USERADD_GID_TABLES`. If set to
8650 ``warn``, a warning will be issued instead.
8651
8652 The default behavior for the build system is to dynamically apply
8653 ``uid`` and ``gid`` values. Consequently, the
8654 ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan
8655 on using statically assigned ``gid`` and ``uid`` values, you should
8656 set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf``
8657 file as follows:
8658 ::
8659
8660 USERADD_ERROR_DYNAMIC = "error"
8661
8662 Overriding the
8663 default behavior implies you are going to also take steps to set
8664 static ``uid`` and ``gid`` values through use of the
8665 :term:`USERADDEXTENSION`,
8666 :term:`USERADD_UID_TABLES`, and
8667 :term:`USERADD_GID_TABLES` variables.
8668
8669 .. note::
8670
8671 There is a difference in behavior between setting
8672 USERADD_ERROR_DYNAMIC
8673 to
8674 error
8675 and setting it to
8676 warn
8677 . When it is set to
8678 warn
8679 , the build system will report a warning for every undefined
8680 uid
8681 and
8682 gid
8683 in any recipe. But when it is set to
8684 error
8685 , it will only report errors for recipes that are actually built.
8686 This saves you from having to add static IDs for recipes that you
8687 know will never be built.
8688
8689 USERADD_GID_TABLES
8690 Specifies a password file to use for obtaining static group
8691 identification (``gid``) values when the OpenEmbedded build system
8692 adds a group to the system during package installation.
8693
8694 When applying static group identification (``gid``) values, the
8695 OpenEmbedded build system looks in :term:`BBPATH` for a
8696 ``files/group`` file and then applies those ``uid`` values. Set the
8697 variable as follows in your ``local.conf`` file:
8698 ::
8699
8700
8701 USERADD_GID_TABLES = "files/group"
8702
8703 .. note::
8704
8705 Setting the
8706 USERADDEXTENSION
8707 variable to "useradd-staticids" causes the build system to use
8708 static
8709 gid
8710 values.
8711
8712 USERADD_PACKAGES
8713 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8714 this variable specifies the individual packages within the recipe
8715 that require users and/or groups to be added.
8716
8717 You must set this variable if the recipe inherits the class. For
8718 example, the following enables adding a user for the main package in
8719 a recipe:
8720 ::
8721
8722 USERADD_PACKAGES = "${PN}"
8723
8724 .. note::
8725
8726 It follows that if you are going to use the
8727 USERADD_PACKAGES
8728 variable, you need to set one or more of the
8729 USERADD_PARAM
8730 ,
8731 GROUPADD_PARAM
8732 , or
8733 GROUPMEMS_PARAM
8734 variables.
8735
8736 USERADD_PARAM
8737 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8738 this variable specifies for a package what parameters should pass to
8739 the ``useradd`` command if you add a user to the system when the
8740 package is installed.
8741
8742 Here is an example from the ``dbus`` recipe:
8743 ::
8744
8745 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
8746 --no-create-home --shell /bin/false \
8747 --user-group messagebus"
8748
8749 For information on the
8750 standard Linux shell command ``useradd``, see
8751 http://linux.die.net/man/8/useradd.
8752
8753 USERADD_UID_TABLES
8754 Specifies a password file to use for obtaining static user
8755 identification (``uid``) values when the OpenEmbedded build system
8756 adds a user to the system during package installation.
8757
8758 When applying static user identification (``uid``) values, the
8759 OpenEmbedded build system looks in :term:`BBPATH` for a
8760 ``files/passwd`` file and then applies those ``uid`` values. Set the
8761 variable as follows in your ``local.conf`` file:
8762 ::
8763
8764 USERADD_UID_TABLES = "files/passwd"
8765
8766 .. note::
8767
8768 Setting the
8769 USERADDEXTENSION
8770 variable to "useradd-staticids" causes the build system to use
8771 static
8772 uid
8773 values.
8774
8775 USERADDEXTENSION
8776 When set to "useradd-staticids", causes the OpenEmbedded build system
8777 to base all user and group additions on a static ``passwd`` and
8778 ``group`` files found in :term:`BBPATH`.
8779
8780 To use static user identification (``uid``) and group identification
8781 (``gid``) values, set the variable as follows in your ``local.conf``
8782 file: USERADDEXTENSION = "useradd-staticids"
8783
8784 .. note::
8785
8786 Setting this variable to use static
8787 uid
8788 and
8789 gid
8790 values causes the OpenEmbedded build system to employ the
8791 useradd-staticids
8792 class.
8793
8794 If you use static ``uid`` and ``gid`` information, you must also
8795 specify the ``files/passwd`` and ``files/group`` files by setting the
8796 :term:`USERADD_UID_TABLES` and
8797 :term:`USERADD_GID_TABLES` variables.
8798 Additionally, you should also set the
8799 :term:`USERADD_ERROR_DYNAMIC` variable.
8800
8801 VOLATILE_LOG_DIR
8802 Specifies the persistence of the target's ``/var/log`` directory,
8803 which is used to house postinstall target log files.
8804
8805 By default, ``VOLATILE_LOG_DIR`` is set to "yes", which means the
8806 file is not persistent. You can override this setting by setting the
8807 variable to "no" to make the log directory persistent.
8808
8809 WARN_QA
8810 Specifies the quality assurance checks whose failures are reported as
8811 warnings by the OpenEmbedded build system. You set this variable in
8812 your distribution configuration file. For a list of the checks you
8813 can control with this variable, see the
8814 ":ref:`insane.bbclass <ref-classes-insane>`" section.
8815
8816 WKS_FILE_DEPENDS
8817 When placed in the recipe that builds your image, this variable lists
8818 build-time dependencies. The ``WKS_FILE_DEPENDS`` variable is only
8819 applicable when Wic images are active (i.e. when
8820 :term:`IMAGE_FSTYPES` contains entries related
8821 to Wic). If your recipe does not create Wic images, the variable has
8822 no effect.
8823
8824 The ``WKS_FILE_DEPENDS`` variable is similar to the
8825 :term:`DEPENDS` variable. When you use the variable in
8826 your recipe that builds the Wic image, dependencies you list in the
8827 ``WIC_FILE_DEPENDS`` variable are added to the ``DEPENDS`` variable.
8828
8829 With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to
8830 specify a list of additional dependencies (e.g. native tools,
8831 bootloaders, and so forth), that are required to build Wic images.
8832 Following is an example:
8833 ::
8834
8835 WKS_FILE_DEPENDS = "some-native-tool"
8836
8837 In the
8838 previous example, some-native-tool would be replaced with an actual
8839 native tool on which the build would depend.
8840
8841 WKS_FILE
8842 Specifies the location of the Wic kickstart file that is used by the
8843 OpenEmbedded build system to create a partitioned image
8844 (image\ ``.wic``). For information on how to create a partitioned
8845 image, see the
8846 ":ref:`dev-manual/dev-manual-common-tasks:creating partitioned images using wic`"
8847 section in the Yocto Project Development Tasks Manual. For details on
8848 the kickstart file format, see the ":doc:`../ref-manual/ref-kickstart`" Chapter.
8849
8850 WORKDIR
8851 The pathname of the work directory in which the OpenEmbedded build
8852 system builds a recipe. This directory is located within the
8853 :term:`TMPDIR` directory structure and is specific to
8854 the recipe being built and the system for which it is being built.
8855
8856 The ``WORKDIR`` directory is defined as follows:
8857 ::
8858
8859 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8860
8861 The actual directory depends on several things:
8862
8863 - TMPDIR
8864 : The top-level build output directory
8865 - MULTIMACH_TARGET_SYS
8866 : The target system identifier
8867 - PN
8868 : The recipe name
8869 - EXTENDPE
8870 : The epoch - (if
8871 PE
8872 is not specified, which is usually the case for most recipes, then
8873 EXTENDPE
8874 is blank)
8875 - PV
8876 : The recipe version
8877 - PR
8878 : The recipe revision
8879
8880 As an example, assume a Source Directory top-level folder name
8881 ``poky``, a default Build Directory at ``poky/build``, and a
8882 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8883 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8884 directory the build system uses to build the package would be as
8885 follows:
8886 ::
8887
8888 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8889
8890 XSERVER
8891 Specifies the packages that should be installed to provide an X
8892 server and drivers for the current machine, assuming your image
8893 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8894 indirectly, includes "x11-base" in
8895 :term:`IMAGE_FEATURES`.
8896
8897 The default value of ``XSERVER``, if not specified in the machine
8898 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8899