1.. SPDX-License-Identifier: CC-BY-SA-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:term:`A <ABIEXTENSION>` :term:`B` :term:`C <CACHE>` 11:term:`D` :term:`E <EFI_PROVIDER>` :term:`F <FEATURE_PACKAGES>` 12:term:`G <GCCPIE>` :term:`H <HOMEPAGE>` :term:`I <ICECC_DISABLED>` 13:term:`K <KARCH>` :term:`L <LABELS>` :term:`M <MACHINE>` 14:term:`N <NATIVELSBSTRING>` :term:`O <OBJCOPY>` :term:`P` 15:term:`R <RANLIB>` :term:`S` :term:`T` 16:term:`U <UBOOT_CONFIG>` :term:`V <VOLATILE_LOG_DIR>` 17:term:`W <WARN_QA>` :term:`X <XSERVER>` 18 19.. glossary:: 20 21 :term:`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 ABIEXTENSION = "eabi" 30 31 :term:`ALLOW_EMPTY` 32 Specifies whether to produce an output package even if it is empty. 33 By default, BitBake does not produce empty packages. This default 34 behavior can cause issues when there is an 35 :term:`RDEPENDS` or some other hard runtime 36 requirement on the existence of the package. 37 38 Like all package-controlling variables, you must always use them in 39 conjunction with a package name override, as in:: 40 41 ALLOW_EMPTY_${PN} = "1" 42 ALLOW_EMPTY_${PN}-dev = "1" 43 ALLOW_EMPTY_${PN}-staticdev = "1" 44 45 :term:`ALTERNATIVE` 46 Lists commands in a package that need an alternative binary naming 47 scheme. Sometimes the same command is provided in multiple packages. 48 When this occurs, the OpenEmbedded build system needs to use the 49 alternatives system to create a different binary naming scheme so the 50 commands can co-exist. 51 52 To use the variable, list out the package's commands that are also 53 provided by another package. For example, if the ``busybox`` package 54 has four such commands, you identify them as follows:: 55 56 ALTERNATIVE_busybox = "sh sed test bracket" 57 58 For more information on the alternatives system, see the 59 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" 60 section. 61 62 :term:`ALTERNATIVE_LINK_NAME` 63 Used by the alternatives system to map duplicated commands to actual 64 locations. For example, if the ``bracket`` command provided by the 65 ``busybox`` package is duplicated through another package, you must 66 use the ``ALTERNATIVE_LINK_NAME`` variable to specify the actual 67 location:: 68 69 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" 70 71 In this example, the binary for the ``bracket`` command (i.e. ``[``) 72 from the ``busybox`` package resides in ``/usr/bin/``. 73 74 .. note:: 75 76 If ``ALTERNATIVE_LINK_NAME`` is not defined, it defaults to ``${bindir}/name``. 77 78 For more information on the alternatives system, see the 79 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" 80 section. 81 82 :term:`ALTERNATIVE_PRIORITY` 83 Used by the alternatives system to create default priorities for 84 duplicated commands. You can use the variable to create a single 85 default regardless of the command name or package, a default for 86 specific duplicated commands regardless of the package, or a default 87 for specific commands tied to particular packages. Here are the 88 available syntax forms:: 89 90 ALTERNATIVE_PRIORITY = "priority" 91 ALTERNATIVE_PRIORITY[name] = "priority" 92 ALTERNATIVE_PRIORITY_pkg[name] = "priority" 93 94 For more information on the alternatives system, see the 95 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" 96 section. 97 98 :term:`ALTERNATIVE_TARGET` 99 Used by the alternatives system to create default link locations for 100 duplicated commands. You can use the variable to create a single 101 default location for all duplicated commands regardless of the 102 command name or package, a default for specific duplicated commands 103 regardless of the package, or a default for specific commands tied to 104 particular packages. Here are the available syntax forms:: 105 106 ALTERNATIVE_TARGET = "target" 107 ALTERNATIVE_TARGET[name] = "target" 108 ALTERNATIVE_TARGET_pkg[name] = "target" 109 110 .. note:: 111 112 If ``ALTERNATIVE_TARGET`` is not defined, it inherits the value 113 from the :term:`ALTERNATIVE_LINK_NAME` variable. 114 115 If ``ALTERNATIVE_LINK_NAME`` and ``ALTERNATIVE_TARGET`` are the 116 same, the target for ``ALTERNATIVE_TARGET`` has "``.{BPN}``" 117 appended to it. 118 119 Finally, if the file referenced has not been renamed, the 120 alternatives system will rename it to avoid the need to rename 121 alternative files in the :ref:`ref-tasks-install` 122 task while retaining support for the command if necessary. 123 124 For more information on the alternatives system, see the 125 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`" 126 section. 127 128 :term:`ANY_OF_DISTRO_FEATURES` 129 When inheriting the 130 :ref:`features_check <ref-classes-features_check>` 131 class, this variable identifies a list of distribution features where 132 at least one must be enabled in the current configuration in order 133 for the OpenEmbedded build system to build the recipe. In other words, 134 if none of the features listed in ``ANY_OF_DISTRO_FEATURES`` 135 appear in ``DISTRO_FEATURES`` within the current configuration, then 136 the recipe will be skipped, and if the build system attempts to build 137 the recipe then an error will be triggered. 138 139 140 :term:`APPEND` 141 An override list of append strings for each target specified with 142 :term:`LABELS`. 143 144 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more 145 information on how this variable is used. 146 147 :term:`AR` 148 The minimal command and arguments used to run ``ar``. 149 150 :term:`ARCHIVER_MODE` 151 When used with the :ref:`archiver <ref-classes-archiver>` class, 152 determines the type of information used to create a released archive. 153 You can use this variable to create archives of patched source, 154 original source, configured source, and so forth by employing the 155 following variable flags (varflags):: 156 157 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. 158 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. 159 ARCHIVER_MODE[src] = "configured" # Uses configured source files. 160 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. 161 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. 162 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. 163 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. 164 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. 165 166 For information on how the variable works, see the 167 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. 168 169 :term:`AS` 170 Minimal command and arguments needed to run the assembler. 171 172 :term:`ASSUME_PROVIDED` 173 Lists recipe names (:term:`PN` values) BitBake does not 174 attempt to build. Instead, BitBake assumes these recipes have already 175 been built. 176 177 In OpenEmbedded-Core, ``ASSUME_PROVIDED`` mostly specifies native 178 tools that should not be built. An example is ``git-native``, which 179 when specified, allows for the Git binary from the host to be used 180 rather than building ``git-native``. 181 182 :term:`ASSUME_SHLIBS` 183 Provides additional ``shlibs`` provider mapping information, which 184 adds to or overwrites the information provided automatically by the 185 system. Separate multiple entries using spaces. 186 187 As an example, use the following form to add an ``shlib`` provider of 188 shlibname in packagename with the optional version:: 189 190 shlibname:packagename[_version] 191 192 Here is an example that adds a shared library named ``libEGL.so.1`` 193 as being provided by the ``libegl-implementation`` package:: 194 195 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" 196 197 :term:`AUTHOR` 198 The email address used to contact the original author or authors in 199 order to send patches and forward bugs. 200 201 :term:`AUTO_LIBNAME_PKGS` 202 When the :ref:`debian <ref-classes-debian>` class is inherited, 203 which is the default behavior, ``AUTO_LIBNAME_PKGS`` specifies which 204 packages should be checked for libraries and renamed according to 205 Debian library package naming. 206 207 The default value is "${PACKAGES}", which causes the debian class to 208 act on all packages that are explicitly generated by the recipe. 209 210 :term:`AUTO_SYSLINUXMENU` 211 Enables creating an automatic menu for the syslinux bootloader. You 212 must set this variable in your recipe. The 213 :ref:`syslinux <ref-classes-syslinux>` class checks this variable. 214 215 :term:`AUTOREV` 216 When ``SRCREV`` is set to the value of this variable, it specifies to 217 use the latest source revision in the repository. Here is an example:: 218 219 SRCREV = "${AUTOREV}" 220 221 If you use the previous statement to retrieve the latest version of 222 software, you need to be sure :term:`PV` contains 223 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you 224 have a kernel recipe that inherits the 225 :ref:`kernel <ref-classes-kernel>` class and you use the previous 226 statement. In this example, ``${SRCPV}`` does not automatically get 227 into ``PV``. Consequently, you need to change ``PV`` in your recipe 228 so that it does contain ``${SRCPV}``. 229 230 For more information see the 231 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" 232 section in the Yocto Project Development Tasks Manual. 233 234 :term:`AVAILABLE_LICENSES` 235 List of licenses found in the directories specified by 236 :term:`COMMON_LICENSE_DIR` and 237 :term:`LICENSE_PATH`. 238 239 .. note:: 240 241 It is assumed that all changes to ``COMMON_LICENSE_DIR`` and 242 ``LICENSE_PATH`` have been done before ``AVAILABLE_LICENSES`` 243 is defined (in :ref:`ref-classes-license`). 244 245 :term:`AVAILTUNES` 246 The list of defined CPU and Application Binary Interface (ABI) 247 tunings (i.e. "tunes") available for use by the OpenEmbedded build 248 system. 249 250 The list simply presents the tunes that are available. Not all tunes 251 may be compatible with a particular machine configuration, or with 252 each other in a 253 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>` 254 configuration. 255 256 To add a tune to the list, be sure to append it with spaces using the 257 "+=" BitBake operator. Do not simply replace the list by using the 258 "=" operator. See the 259 ":ref:`Basic Syntax <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax>`" section in the BitBake 260 User Manual for more information. 261 262 :term:`AZ_SAS` 263 Azure Storage Shared Access Signature, when using the 264 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` 265 This variable can be defined to be used by the fetcher to authenticate 266 and gain access to non-public artifacts. 267 :: 268 269 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" 270 271 For more information see Microsoft's Azure Storage documentation at 272 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview 273 274 :term:`B` 275 The directory within the :term:`Build Directory` in 276 which the OpenEmbedded build system places generated objects during a 277 recipe's build process. By default, this directory is the same as the 278 :term:`S` directory, which is defined as:: 279 280 S = "${WORKDIR}/${BP}" 281 282 You can separate the (``S``) directory and the directory pointed to 283 by the ``B`` variable. Most Autotools-based recipes support 284 separating these directories. The build system defaults to using 285 separate directories for ``gcc`` and some kernel recipes. 286 287 :term:`BAD_RECOMMENDATIONS` 288 Lists "recommended-only" packages to not install. Recommended-only 289 packages are packages installed only through the 290 :term:`RRECOMMENDS` variable. You can prevent any 291 of these "recommended" packages from being installed by listing them 292 with the ``BAD_RECOMMENDATIONS`` variable:: 293 294 BAD_RECOMMENDATIONS = "package_name package_name package_name ..." 295 296 You can set this variable globally in your ``local.conf`` file or you 297 can attach it to a specific image recipe by using the recipe name 298 override:: 299 300 BAD_RECOMMENDATIONS_pn-target_image = "package_name" 301 302 It is important to realize that if you choose to not install packages 303 using this variable and some other packages are dependent on them 304 (i.e. listed in a recipe's :term:`RDEPENDS` 305 variable), the OpenEmbedded build system ignores your request and 306 will install the packages to avoid dependency errors. 307 308 This variable is supported only when using the IPK and RPM 309 packaging backends. DEB is not supported. 310 311 See the :term:`NO_RECOMMENDATIONS` and the 312 :term:`PACKAGE_EXCLUDE` variables for related 313 information. 314 315 :term:`BASE_LIB` 316 The library directory name for the CPU or Application Binary 317 Interface (ABI) tune. The ``BASE_LIB`` applies only in the Multilib 318 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`" 319 section in the Yocto Project Development Tasks Manual for information 320 on Multilib. 321 322 The ``BASE_LIB`` variable is defined in the machine include files in 323 the :term:`Source Directory`. If Multilib is not 324 being used, the value defaults to "lib". 325 326 :term:`BASE_WORKDIR` 327 Points to the base of the work directory for all recipes. The default 328 value is "${TMPDIR}/work". 329 330 :term:`BB_ALLOWED_NETWORKS` 331 Specifies a space-delimited list of hosts that the fetcher is allowed 332 to use to obtain the required source code. Following are 333 considerations surrounding this variable: 334 335 - This host list is only used if ``BB_NO_NETWORK`` is either not set 336 or set to "0". 337 338 - There is limited support for wildcard matching against the beginning of 339 host names. For example, the following setting matches 340 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``. 341 :: 342 343 BB_ALLOWED_NETWORKS = "*.gnu.org" 344 345 .. note:: 346 347 The use of the "``*``" character only works at the beginning of 348 a host name and it must be isolated from the remainder of the 349 host name. You cannot use the wildcard character in any other 350 location of the name or combined with the front part of the 351 name. 352 353 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` 354 is not. 355 356 - Mirrors not in the host list are skipped and logged in debug. 357 358 - Attempts to access networks not in the host list cause a failure. 359 360 Using ``BB_ALLOWED_NETWORKS`` in conjunction with 361 :term:`PREMIRRORS` is very useful. Adding the host 362 you want to use to ``PREMIRRORS`` results in the source code being 363 fetched from an allowed location and avoids raising an error when a 364 host that is not allowed is in a :term:`SRC_URI` 365 statement. This is because the fetcher does not attempt to use the 366 host listed in ``SRC_URI`` after a successful fetch from the 367 ``PREMIRRORS`` occurs. 368 369 :term:`BB_DANGLINGAPPENDS_WARNONLY` 370 Defines how BitBake handles situations where an append file 371 (``.bbappend``) has no corresponding recipe file (``.bb``). This 372 condition often occurs when layers get out of sync (e.g. ``oe-core`` 373 bumps a recipe version and the old recipe no longer exists and the 374 other layer has not been updated to the new version of the recipe 375 yet). 376 377 The default fatal behavior is safest because it is the sane reaction 378 given something is out of sync. It is important to realize when your 379 changes are no longer being applied. 380 381 You can change the default behavior by setting this variable to "1", 382 "yes", or "true" in your ``local.conf`` file, which is located in the 383 :term:`Build Directory`: Here is an example:: 384 385 BB_DANGLINGAPPENDS_WARNONLY = "1" 386 387 :term:`BB_DISKMON_DIRS` 388 Monitors disk space and available inodes during the build and allows 389 you to control the build based on these parameters. 390 391 Disk space monitoring is disabled by default. To enable monitoring, 392 add the ``BB_DISKMON_DIRS`` variable to your ``conf/local.conf`` file 393 found in the :term:`Build Directory`. Use the 394 following form: 395 396 .. code-block:: none 397 398 BB_DISKMON_DIRS = "action,dir,threshold [...]" 399 400 where: 401 402 action is: 403 ABORT: Immediately abort the build when 404 a threshold is broken. 405 STOPTASKS: Stop the build after the currently 406 executing tasks have finished when 407 a threshold is broken. 408 WARN: Issue a warning but continue the 409 build when a threshold is broken. 410 Subsequent warnings are issued as 411 defined by the BB_DISKMON_WARNINTERVAL 412 variable, which must be defined in 413 the conf/local.conf file. 414 415 dir is: 416 Any directory you choose. You can specify one or 417 more directories to monitor by separating the 418 groupings with a space. If two directories are 419 on the same device, only the first directory 420 is monitored. 421 422 threshold is: 423 Either the minimum available disk space, 424 the minimum number of free inodes, or 425 both. You must specify at least one. To 426 omit one or the other, simply omit the value. 427 Specify the threshold using G, M, K for Gbytes, 428 Mbytes, and Kbytes, respectively. If you do 429 not specify G, M, or K, Kbytes is assumed by 430 default. Do not use GB, MB, or KB. 431 432 Here are some examples:: 433 434 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" 435 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" 436 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" 437 438 The first example works only if you also provide the 439 :term:`BB_DISKMON_WARNINTERVAL` 440 variable in the ``conf/local.conf``. This example causes the build 441 system to immediately abort when either the disk space in 442 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops 443 below 100 Kbytes. Because two directories are provided with the 444 variable, the build system also issue a warning when the disk space 445 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number 446 of free inodes drops below 100 Kbytes. Subsequent warnings are issued 447 during intervals as defined by the ``BB_DISKMON_WARNINTERVAL`` 448 variable. 449 450 The second example stops the build after all currently executing 451 tasks complete when the minimum disk space in the ``${TMPDIR}`` 452 directory drops below 1 Gbyte. No disk monitoring occurs for the free 453 inodes in this case. 454 455 The final example immediately aborts the build when the number of 456 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No 457 disk space monitoring for the directory itself occurs in this case. 458 459 :term:`BB_DISKMON_WARNINTERVAL` 460 Defines the disk space and free inode warning intervals. To set these 461 intervals, define the variable in your ``conf/local.conf`` file in 462 the :term:`Build Directory`. 463 464 If you are going to use the ``BB_DISKMON_WARNINTERVAL`` variable, you 465 must also use the :term:`BB_DISKMON_DIRS` 466 variable and define its action as "WARN". During the build, 467 subsequent warnings are issued each time disk space or number of free 468 inodes further reduces by the respective interval. 469 470 If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you 471 do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk 472 monitoring interval defaults to the following:: 473 474 BB_DISKMON_WARNINTERVAL = "50M,5K" 475 476 When specifying the variable in your configuration file, use the 477 following form: 478 479 .. code-block:: none 480 481 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" 482 483 where: 484 485 disk_space_interval is: 486 An interval of memory expressed in either 487 G, M, or K for Gbytes, Mbytes, or Kbytes, 488 respectively. You cannot use GB, MB, or KB. 489 490 disk_inode_interval is: 491 An interval of free inodes expressed in either 492 G, M, or K for Gbytes, Mbytes, or Kbytes, 493 respectively. You cannot use GB, MB, or KB. 494 495 Here is an example:: 496 497 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" 498 BB_DISKMON_WARNINTERVAL = "50M,5K" 499 500 These variables cause the 501 OpenEmbedded build system to issue subsequent warnings each time the 502 available disk space further reduces by 50 Mbytes or the number of 503 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` 504 directory. Subsequent warnings based on the interval occur each time 505 a respective interval is reached beyond the initial warning (i.e. 1 506 Gbytes and 100 Kbytes). 507 508 :term:`BB_GENERATE_MIRROR_TARBALLS` 509 Causes tarballs of the source control repositories (e.g. Git 510 repositories), including metadata, to be placed in the 511 :term:`DL_DIR` directory. 512 513 For performance reasons, creating and placing tarballs of these 514 repositories is not the default action by the OpenEmbedded build 515 system. 516 :: 517 518 BB_GENERATE_MIRROR_TARBALLS = "1" 519 520 Set this variable in your 521 ``local.conf`` file in the :term:`Build Directory`. 522 523 Once you have the tarballs containing your source files, you can 524 clean up your ``DL_DIR`` directory by deleting any Git or other 525 source control work directories. 526 527 :term:`BB_NUMBER_THREADS` 528 The maximum number of tasks BitBake should run in parallel at any one 529 time. The OpenEmbedded build system automatically configures this 530 variable to be equal to the number of cores on the build system. For 531 example, a system with a dual core processor that also uses 532 hyper-threading causes the ``BB_NUMBER_THREADS`` variable to default 533 to "4". 534 535 For single socket systems (i.e. one CPU), you should not have to 536 override this variable to gain optimal parallelism during builds. 537 However, if you have very large systems that employ multiple physical 538 CPUs, you might want to make sure the ``BB_NUMBER_THREADS`` variable 539 is not set higher than "20". 540 541 For more information on speeding up builds, see the 542 ":ref:`dev-manual/common-tasks:speeding up a build`" 543 section in the Yocto Project Development Tasks Manual. 544 545 :term:`BB_SERVER_TIMEOUT` 546 Specifies the time (in seconds) after which to unload the BitBake 547 server due to inactivity. Set ``BB_SERVER_TIMEOUT`` to determine how 548 long the BitBake server stays resident between invocations. 549 550 For example, the following statement in your ``local.conf`` file 551 instructs the server to be unloaded after 20 seconds of inactivity:: 552 553 BB_SERVER_TIMEOUT = "20" 554 555 If you want the server to never be unloaded, 556 set ``BB_SERVER_TIMEOUT`` to "-1". 557 558 :term:`BBCLASSEXTEND` 559 Allows you to extend a recipe so that it builds variants of the 560 software. There are common variants for recipes as "natives" like 561 ``quilt-native``, which is a copy of Quilt built to run on the build 562 system; "crosses" such as ``gcc-cross``, which is a compiler built to 563 run on the build machine but produces binaries that run on the target 564 :term:`MACHINE`; "nativesdk", which targets the SDK 565 machine instead of ``MACHINE``; and "mulitlibs" in the form 566 "``multilib:``\ multilib_name". 567 568 To build a different variant of the recipe with a minimal amount of 569 code, it usually is as simple as adding the following to your recipe:: 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 :term:`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 :term:`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 :term:`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 ``bitbake-layers show-layers`` 623 to list all configured layers along with their priorities. 624 625 :term:`BBFILES` 626 A space-separated list of recipe files BitBake uses to build 627 software. 628 629 When specifying recipe files, you can pattern match using Python's 630 `glob <https://docs.python.org/3/library/glob.html>`_ syntax. 631 For details on the syntax, see the documentation by following the 632 previous link. 633 634 :term:`BBFILES_DYNAMIC` 635 Activates content when identified layers are present. You identify 636 the layers by the collections that the layers define. 637 638 Use the ``BBFILES_DYNAMIC`` variable to avoid ``.bbappend`` files 639 whose corresponding ``.bb`` file is in a layer that attempts to 640 modify other layers through ``.bbappend`` but does not want to 641 introduce a hard dependency on those other layers. 642 643 Use the following form for ``BBFILES_DYNAMIC``: 644 collection_name:filename_pattern The following example identifies two 645 collection names and two filename patterns:: 646 647 BBFILES_DYNAMIC += " \ 648 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ 649 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ 650 " 651 652 This next example shows an error message that occurs because invalid 653 entries are found, which cause parsing to abort: 654 655 .. code-block:: none 656 657 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: 658 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend 659 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend 660 661 :term:`BBINCLUDELOGS` 662 Variable that controls how BitBake displays logs on build failure. 663 664 :term:`BBINCLUDELOGS_LINES` 665 If :term:`BBINCLUDELOGS` is set, specifies the 666 maximum number of lines from the task log file to print when 667 reporting a failed task. If you do not set ``BBINCLUDELOGS_LINES``, 668 the entire log is printed. 669 670 :term:`BBLAYERS` 671 Lists the layers to enable during the build. This variable is defined 672 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. 673 Here is an example:: 674 675 BBLAYERS = " \ 676 /home/scottrif/poky/meta \ 677 /home/scottrif/poky/meta-poky \ 678 /home/scottrif/poky/meta-yocto-bsp \ 679 /home/scottrif/poky/meta-mykernel \ 680 " 681 682 This example enables four layers, one of which is a custom, 683 user-defined layer named ``meta-mykernel``. 684 685 :term:`BBMASK` 686 Prevents BitBake from processing recipes and recipe append files. 687 688 You can use the ``BBMASK`` variable to "hide" these ``.bb`` and 689 ``.bbappend`` files. BitBake ignores any recipe or recipe append 690 files that match any of the expressions. It is as if BitBake does not 691 see them at all. Consequently, matching files are not parsed or 692 otherwise used by BitBake. 693 694 The values you provide are passed to Python's regular expression 695 compiler. Consequently, the syntax follows Python's Regular 696 Expression (re) syntax. The expressions are compared against the full 697 paths to the files. For complete syntax information, see Python's 698 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax. 699 700 The following example uses a complete regular expression to tell 701 BitBake to ignore all recipe and recipe append files in the 702 ``meta-ti/recipes-misc/`` directory:: 703 704 BBMASK = "meta-ti/recipes-misc/" 705 706 If you want to mask out multiple directories or recipes, you can 707 specify multiple regular expression fragments. This next example 708 masks out multiple directories and individual recipes:: 709 710 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" 711 BBMASK += "/meta-oe/recipes-support/" 712 BBMASK += "/meta-foo/.*/openldap" 713 BBMASK += "opencv.*\.bbappend" 714 BBMASK += "lzma" 715 716 .. note:: 717 718 When specifying a directory name, use the trailing slash character 719 to ensure you match just that directory name. 720 721 :term:`BBMULTICONFIG` 722 Specifies each additional separate configuration when you are 723 building targets with multiple configurations. Use this variable in 724 your ``conf/local.conf`` configuration file. Specify a 725 multiconfigname for each configuration file you are using. For 726 example, the following line specifies three configuration files:: 727 728 BBMULTICONFIG = "configA configB configC" 729 730 Each configuration file you 731 use must reside in the :term:`Build Directory` 732 ``conf/multiconfig`` directory (e.g. 733 build_directory\ ``/conf/multiconfig/configA.conf``). 734 735 For information on how to use ``BBMULTICONFIG`` in an environment 736 that supports building targets with multiple configurations, see the 737 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`" 738 section in the Yocto Project Development Tasks Manual. 739 740 :term:`BBPATH` 741 Used by BitBake to locate ``.bbclass`` and configuration files. This 742 variable is analogous to the ``PATH`` variable. 743 744 .. note:: 745 746 If you run BitBake from a directory outside of the 747 :term:`Build Directory`, you must be sure to set ``BBPATH`` 748 to point to the Build Directory. Set the variable as you would any 749 environment variable and then run BitBake:: 750 751 $ BBPATH = "build_directory" 752 $ export BBPATH 753 $ bitbake target 754 755 756 :term:`BBSERVER` 757 If defined in the BitBake environment, ``BBSERVER`` points to the 758 BitBake remote server. 759 760 Use the following format to export the variable to the BitBake 761 environment:: 762 763 export BBSERVER=localhost:$port 764 765 By default, ``BBSERVER`` also appears in 766 :term:`bitbake:BB_HASHBASE_WHITELIST`. 767 Consequently, ``BBSERVER`` is excluded from checksum and dependency 768 data. 769 770 :term:`BINCONFIG` 771 When inheriting the 772 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class, 773 this variable specifies binary configuration scripts to disable in 774 favor of using ``pkg-config`` to query the information. The 775 ``binconfig-disabled`` class will modify the specified scripts to 776 return an error so that calls to them can be easily found and 777 replaced. 778 779 To add multiple scripts, separate them by spaces. Here is an example 780 from the ``libpng`` recipe:: 781 782 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" 783 784 :term:`BINCONFIG_GLOB` 785 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, 786 this variable specifies a wildcard for configuration scripts that 787 need editing. The scripts are edited to correct any paths that have 788 been set up during compilation so that they are correct for use when 789 installed into the sysroot and called by the build processes of other 790 recipes. 791 792 .. note:: 793 794 The ``BINCONFIG_GLOB`` variable uses 795 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, 796 which is recognition and expansion of wildcards during pattern 797 matching. Shell globbing is very similar to 798 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ 799 and `glob <https://docs.python.org/3/library/glob.html>`__. 800 801 For more information on how this variable works, see 802 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`. 803 You can also find general 804 information on the class in the 805 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section. 806 807 :term:`BP` 808 The base recipe name and version but without any special recipe name 809 suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is 810 comprised of the following:: 811 812 ${BPN}-${PV} 813 814 :term:`BPN` 815 This variable is a version of the :term:`PN` variable with 816 common prefixes and suffixes removed, such as ``nativesdk-``, 817 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. 818 The exact lists of prefixes and suffixes removed are specified by the 819 :term:`MLPREFIX` and 820 :term:`SPECIAL_PKGSUFFIX` variables, 821 respectively. 822 823 :term:`BUGTRACKER` 824 Specifies a URL for an upstream bug tracking website for a recipe. 825 The OpenEmbedded build system does not use this variable. Rather, the 826 variable is a useful pointer in case a bug in the software being 827 built needs to be manually reported. 828 829 :term:`BUILD_ARCH` 830 Specifies the architecture of the build host (e.g. ``i686``). The 831 OpenEmbedded build system sets the value of ``BUILD_ARCH`` from the 832 machine name reported by the ``uname`` command. 833 834 :term:`BUILD_AS_ARCH` 835 Specifies the architecture-specific assembler flags for the build 836 host. By default, the value of ``BUILD_AS_ARCH`` is empty. 837 838 :term:`BUILD_CC_ARCH` 839 Specifies the architecture-specific C compiler flags for the build 840 host. By default, the value of ``BUILD_CC_ARCH`` is empty. 841 842 :term:`BUILD_CCLD` 843 Specifies the linker command to be used for the build host when the C 844 compiler is being used as the linker. By default, ``BUILD_CCLD`` 845 points to GCC and passes as arguments the value of 846 :term:`BUILD_CC_ARCH`, assuming 847 ``BUILD_CC_ARCH`` is set. 848 849 :term:`BUILD_CFLAGS` 850 Specifies the flags to pass to the C compiler when building for the 851 build host. When building in the ``-native`` context, 852 :term:`CFLAGS` is set to the value of this variable by 853 default. 854 855 :term:`BUILD_CPPFLAGS` 856 Specifies the flags to pass to the C preprocessor (i.e. to both the C 857 and the C++ compilers) when building for the build host. When 858 building in the ``-native`` context, :term:`CPPFLAGS` 859 is set to the value of this variable by default. 860 861 :term:`BUILD_CXXFLAGS` 862 Specifies the flags to pass to the C++ compiler when building for the 863 build host. When building in the ``-native`` context, 864 :term:`CXXFLAGS` is set to the value of this variable 865 by default. 866 867 :term:`BUILD_FC` 868 Specifies the Fortran compiler command for the build host. By 869 default, ``BUILD_FC`` points to Gfortran and passes as arguments the 870 value of :term:`BUILD_CC_ARCH`, assuming 871 ``BUILD_CC_ARCH`` is set. 872 873 :term:`BUILD_LD` 874 Specifies the linker command for the build host. By default, 875 ``BUILD_LD`` points to the GNU linker (ld) and passes as arguments 876 the value of :term:`BUILD_LD_ARCH`, assuming 877 ``BUILD_LD_ARCH`` is set. 878 879 :term:`BUILD_LD_ARCH` 880 Specifies architecture-specific linker flags for the build host. By 881 default, the value of ``BUILD_LD_ARCH`` is empty. 882 883 :term:`BUILD_LDFLAGS` 884 Specifies the flags to pass to the linker when building for the build 885 host. When building in the ``-native`` context, 886 :term:`LDFLAGS` is set to the value of this variable 887 by default. 888 889 :term:`BUILD_OPTIMIZATION` 890 Specifies the optimization flags passed to the C compiler when 891 building for the build host or the SDK. The flags are passed through 892 the :term:`BUILD_CFLAGS` and 893 :term:`BUILDSDK_CFLAGS` default values. 894 895 The default value of the ``BUILD_OPTIMIZATION`` variable is "-O2 896 -pipe". 897 898 :term:`BUILD_OS` 899 Specifies the operating system in use on the build host (e.g. 900 "linux"). The OpenEmbedded build system sets the value of 901 ``BUILD_OS`` from the OS reported by the ``uname`` command - the 902 first word, converted to lower-case characters. 903 904 :term:`BUILD_PREFIX` 905 The toolchain binary prefix used for native recipes. The OpenEmbedded 906 build system uses the ``BUILD_PREFIX`` value to set the 907 :term:`TARGET_PREFIX` when building for 908 ``native`` recipes. 909 910 :term:`BUILD_STRIP` 911 Specifies the command to be used to strip debugging symbols from 912 binaries produced for the build host. By default, ``BUILD_STRIP`` 913 points to 914 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. 915 916 :term:`BUILD_SYS` 917 Specifies the system, including the architecture and the operating 918 system, to use when building for the build host (i.e. when building 919 ``native`` recipes). 920 921 The OpenEmbedded build system automatically sets this variable based 922 on :term:`BUILD_ARCH`, 923 :term:`BUILD_VENDOR`, and 924 :term:`BUILD_OS`. You do not need to set the 925 ``BUILD_SYS`` variable yourself. 926 927 :term:`BUILD_VENDOR` 928 Specifies the vendor name to use when building for the build host. 929 The default value is an empty string (""). 930 931 :term:`BUILDDIR` 932 Points to the location of the :term:`Build Directory`. 933 You can define this directory indirectly through the 934 :ref:`structure-core-script` script by passing in a Build 935 Directory path when you run the script. If you run the script and do 936 not provide a Build Directory path, the ``BUILDDIR`` defaults to 937 ``build`` in the current directory. 938 939 :term:`BUILDHISTORY_COMMIT` 940 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 941 class, this variable specifies whether or not to commit the build 942 history output in a local Git repository. If set to "1", this local 943 repository will be maintained automatically by the ``buildhistory`` 944 class and a commit will be created on every build for changes to each 945 top-level subdirectory of the build history output (images, packages, 946 and sdk). If you want to track changes to build history over time, 947 you should set this value to "1". 948 949 By default, the ``buildhistory`` class does not commit the build 950 history output in a local Git repository:: 951 952 BUILDHISTORY_COMMIT ?= "0" 953 954 :term:`BUILDHISTORY_COMMIT_AUTHOR` 955 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 956 class, this variable specifies the author to use for each Git commit. 957 In order for the ``BUILDHISTORY_COMMIT_AUTHOR`` variable to work, the 958 :term:`BUILDHISTORY_COMMIT` variable must 959 be set to "1". 960 961 Git requires that the value you provide for the 962 ``BUILDHISTORY_COMMIT_AUTHOR`` variable takes the form of "name 963 email@host". Providing an email address or host that is not valid 964 does not produce an error. 965 966 By default, the ``buildhistory`` class sets the variable as follows:: 967 968 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" 969 970 :term:`BUILDHISTORY_DIR` 971 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 972 class, this variable specifies the directory in which build history 973 information is kept. For more information on how the variable works, 974 see the ``buildhistory.class``. 975 976 By default, the ``buildhistory`` class sets the directory as follows:: 977 978 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" 979 980 :term:`BUILDHISTORY_FEATURES` 981 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 982 class, this variable specifies the build history features to be 983 enabled. For more information on how build history works, see the 984 ":ref:`dev-manual/common-tasks:maintaining build output quality`" 985 section in the Yocto Project Development Tasks Manual. 986 987 You can specify these features in the form of a space-separated list: 988 989 - *image:* Analysis of the contents of images, which includes the 990 list of installed packages among other things. 991 992 - *package:* Analysis of the contents of individual packages. 993 994 - *sdk:* Analysis of the contents of the software development kit 995 (SDK). 996 997 - *task:* Save output file signatures for 998 :ref:`shared state <overview-manual/concepts:shared state cache>` 999 (sstate) tasks. 1000 This saves one file per task and lists the SHA-256 checksums for 1001 each file staged (i.e. the output of the task). 1002 1003 By default, the ``buildhistory`` class enables the following 1004 features:: 1005 1006 BUILDHISTORY_FEATURES ?= "image package sdk" 1007 1008 :term:`BUILDHISTORY_IMAGE_FILES` 1009 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 1010 class, this variable specifies a list of paths to files copied from 1011 the image contents into the build history directory under an 1012 "image-files" directory in the directory for the image, so that you 1013 can track the contents of each file. The default is to copy 1014 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for 1015 changes in user and group entries. You can modify the list to include 1016 any file. Specifying an invalid path does not produce an error. 1017 Consequently, you can include files that might not always be present. 1018 1019 By default, the ``buildhistory`` class provides paths to the 1020 following files:: 1021 1022 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" 1023 1024 :term:`BUILDHISTORY_PUSH_REPO` 1025 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>` 1026 class, this variable optionally specifies a remote repository to 1027 which build history pushes Git changes. In order for 1028 ``BUILDHISTORY_PUSH_REPO`` to work, 1029 :term:`BUILDHISTORY_COMMIT` must be set to 1030 "1". 1031 1032 The repository should correspond to a remote address that specifies a 1033 repository as understood by Git, or alternatively to a remote name 1034 that you have set up manually using ``git remote`` within the local 1035 repository. 1036 1037 By default, the ``buildhistory`` class sets the variable as follows:: 1038 1039 BUILDHISTORY_PUSH_REPO ?= "" 1040 1041 :term:`BUILDSDK_CFLAGS` 1042 Specifies the flags to pass to the C compiler when building for the 1043 SDK. When building in the ``nativesdk-`` context, 1044 :term:`CFLAGS` is set to the value of this variable by 1045 default. 1046 1047 :term:`BUILDSDK_CPPFLAGS` 1048 Specifies the flags to pass to the C pre-processor (i.e. to both the 1049 C and the C++ compilers) when building for the SDK. When building in 1050 the ``nativesdk-`` context, :term:`CPPFLAGS` is set 1051 to the value of this variable by default. 1052 1053 :term:`BUILDSDK_CXXFLAGS` 1054 Specifies the flags to pass to the C++ compiler when building for the 1055 SDK. When building in the ``nativesdk-`` context, 1056 :term:`CXXFLAGS` is set to the value of this variable 1057 by default. 1058 1059 :term:`BUILDSDK_LDFLAGS` 1060 Specifies the flags to pass to the linker when building for the SDK. 1061 When building in the ``nativesdk-`` context, 1062 :term:`LDFLAGS` is set to the value of this variable 1063 by default. 1064 1065 :term:`BUILDSTATS_BASE` 1066 Points to the location of the directory that holds build statistics 1067 when you use and enable the 1068 :ref:`buildstats <ref-classes-buildstats>` class. The 1069 ``BUILDSTATS_BASE`` directory defaults to 1070 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. 1071 1072 :term:`BUSYBOX_SPLIT_SUID` 1073 For the BusyBox recipe, specifies whether to split the output 1074 executable file into two parts: one for features that require 1075 ``setuid root``, and one for the remaining features (i.e. those that 1076 do not require ``setuid root``). 1077 1078 The ``BUSYBOX_SPLIT_SUID`` variable defaults to "1", which results in 1079 splitting the output executable file. Set the variable to "0" to get 1080 a single output executable file. 1081 1082 :term:`CACHE` 1083 Specifies the directory BitBake uses to store a cache of the 1084 :term:`Metadata` so it does not need to be parsed every time 1085 BitBake is started. 1086 1087 :term:`CC` 1088 The minimal command and arguments used to run the C compiler. 1089 1090 :term:`CFLAGS` 1091 Specifies the flags to pass to the C compiler. This variable is 1092 exported to an environment variable and thus made visible to the 1093 software being built during the compilation step. 1094 1095 Default initialization for ``CFLAGS`` varies depending on what is 1096 being built: 1097 1098 - :term:`TARGET_CFLAGS` when building for the 1099 target 1100 1101 - :term:`BUILD_CFLAGS` when building for the 1102 build host (i.e. ``-native``) 1103 1104 - :term:`BUILDSDK_CFLAGS` when building for 1105 an SDK (i.e. ``nativesdk-``) 1106 1107 :term:`CLASSOVERRIDE` 1108 An internal variable specifying the special class override that 1109 should currently apply (e.g. "class-target", "class-native", and so 1110 forth). The classes that use this variable (e.g. 1111 :ref:`native <ref-classes-native>`, 1112 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the 1113 variable to appropriate values. 1114 1115 .. note:: 1116 1117 ``CLASSOVERRIDE`` gets its default "class-target" value from the 1118 ``bitbake.conf`` file. 1119 1120 As an example, the following override allows you to install extra 1121 files, but only when building for the target:: 1122 1123 do_install_append_class-target() { 1124 install my-extra-file ${D}${sysconfdir} 1125 } 1126 1127 Here is an example where ``FOO`` is set to 1128 "native" when building for the build host, and to "other" when not 1129 building for the build host:: 1130 1131 FOO_class-native = "native" 1132 FOO = "other" 1133 1134 The underlying mechanism behind ``CLASSOVERRIDE`` is simply 1135 that it is included in the default value of 1136 :term:`OVERRIDES`. 1137 1138 :term:`CLEANBROKEN` 1139 If set to "1" within a recipe, ``CLEANBROKEN`` specifies that the 1140 ``make clean`` command does not work for the software being built. 1141 Consequently, the OpenEmbedded build system will not try to run 1142 ``make clean`` during the :ref:`ref-tasks-configure` 1143 task, which is the default behavior. 1144 1145 :term:`COMBINED_FEATURES` 1146 Provides a list of hardware features that are enabled in both 1147 :term:`MACHINE_FEATURES` and 1148 :term:`DISTRO_FEATURES`. This select list of 1149 features contains features that make sense to be controlled both at 1150 the machine and distribution configuration level. For example, the 1151 "bluetooth" feature requires hardware support but should also be 1152 optional at the distribution level, in case the hardware supports 1153 Bluetooth but you do not ever intend to use it. 1154 1155 :term:`COMMON_LICENSE_DIR` 1156 Points to ``meta/files/common-licenses`` in the 1157 :term:`Source Directory`, which is where generic license 1158 files reside. 1159 1160 :term:`COMPATIBLE_HOST` 1161 A regular expression that resolves to one or more hosts (when the 1162 recipe is native) or one or more targets (when the recipe is 1163 non-native) with which a recipe is compatible. The regular expression 1164 is matched against :term:`HOST_SYS`. You can use the 1165 variable to stop recipes from being built for classes of systems with 1166 which the recipes are not compatible. Stopping these builds is 1167 particularly useful with kernels. The variable also helps to increase 1168 parsing speed since the build system skips parsing recipes not 1169 compatible with the current system. 1170 1171 :term:`COMPATIBLE_MACHINE` 1172 A regular expression that resolves to one or more target machines 1173 with which a recipe is compatible. The regular expression is matched 1174 against :term:`MACHINEOVERRIDES`. You can use 1175 the variable to stop recipes from being built for machines with which 1176 the recipes are not compatible. Stopping these builds is particularly 1177 useful with kernels. The variable also helps to increase parsing 1178 speed since the build system skips parsing recipes not compatible 1179 with the current machine. 1180 1181 :term:`COMPLEMENTARY_GLOB` 1182 Defines wildcards to match when installing a list of complementary 1183 packages for all the packages explicitly (or implicitly) installed in 1184 an image. 1185 1186 .. note:: 1187 1188 The ``COMPLEMENTARY_GLOB`` variable uses Unix filename pattern matching 1189 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), 1190 which is similar to the Unix style pathname pattern expansion 1191 (`glob <https://docs.python.org/3/library/glob.html>`__). 1192 1193 The resulting list of complementary packages is associated with an 1194 item that can be added to 1195 :term:`IMAGE_FEATURES`. An example usage of 1196 this is the "dev-pkgs" item that when added to ``IMAGE_FEATURES`` 1197 will install -dev packages (containing headers and other development 1198 files) for every package in the image. 1199 1200 To add a new feature item pointing to a wildcard, use a variable flag 1201 to specify the feature item name and use the value to specify the 1202 wildcard. Here is an example:: 1203 1204 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' 1205 1206 :term:`COMPONENTS_DIR` 1207 Stores sysroot components for each recipe. The OpenEmbedded build 1208 system uses ``COMPONENTS_DIR`` when constructing recipe-specific 1209 sysroots for other recipes. 1210 1211 The default is 1212 "``${``\ :term:`STAGING_DIR`\ ``}-components``." 1213 (i.e. 1214 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). 1215 1216 :term:`CONF_VERSION` 1217 Tracks the version of the local configuration file (i.e. 1218 ``local.conf``). The value for ``CONF_VERSION`` increments each time 1219 ``build/conf/`` compatibility changes. 1220 1221 :term:`CONFFILES` 1222 Identifies editable or configurable files that are part of a package. 1223 If the Package Management System (PMS) is being used to update 1224 packages on the target system, it is possible that configuration 1225 files you have changed after the original installation and that you 1226 now want to remain unchanged are overwritten. In other words, 1227 editable files might exist in the package that you do not want reset 1228 as part of the package update process. You can use the ``CONFFILES`` 1229 variable to list the files in the package that you wish to prevent 1230 the PMS from overwriting during this update process. 1231 1232 To use the ``CONFFILES`` variable, provide a package name override 1233 that identifies the resulting package. Then, provide a 1234 space-separated list of files. Here is an example:: 1235 1236 CONFFILES_${PN} += "${sysconfdir}/file1 \ 1237 ${sysconfdir}/file2 ${sysconfdir}/file3" 1238 1239 There is a relationship between the ``CONFFILES`` and ``FILES`` 1240 variables. The files listed within ``CONFFILES`` must be a subset of 1241 the files listed within ``FILES``. Because the configuration files 1242 you provide with ``CONFFILES`` are simply being identified so that 1243 the PMS will not overwrite them, it makes sense that the files must 1244 already be included as part of the package through the ``FILES`` 1245 variable. 1246 1247 .. note:: 1248 1249 When specifying paths as part of the ``CONFFILES`` variable, it is 1250 good practice to use appropriate path variables. 1251 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` 1252 rather than ``/usr/bin``. You can find a list of these variables at 1253 the top of the ``meta/conf/bitbake.conf`` file in the 1254 :term:`Source Directory`. 1255 1256 :term:`CONFIG_INITRAMFS_SOURCE` 1257 Identifies the initial RAM filesystem (initramfs) source files. The 1258 OpenEmbedded build system receives and uses this kernel Kconfig 1259 variable as an environment variable. By default, the variable is set 1260 to null (""). 1261 1262 The ``CONFIG_INITRAMFS_SOURCE`` can be either a single cpio archive 1263 with a ``.cpio`` suffix or a space-separated list of directories and 1264 files for building the initramfs image. A cpio archive should contain 1265 a filesystem archive to be used as an initramfs image. Directories 1266 should contain a filesystem layout to be included in the initramfs 1267 image. Files should contain entries according to the format described 1268 by the ``usr/gen_init_cpio`` program in the kernel tree. 1269 1270 If you specify multiple directories and files, the initramfs image 1271 will be the aggregate of all of them. 1272 1273 For information on creating an initramfs, see the 1274 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section 1275 in the Yocto Project Development Tasks Manual. 1276 1277 :term:`CONFIG_SITE` 1278 A list of files that contains ``autoconf`` test results relevant to 1279 the current build. This variable is used by the Autotools utilities 1280 when running ``configure``. 1281 1282 :term:`CONFIGURE_FLAGS` 1283 The minimal arguments for GNU configure. 1284 1285 :term:`CONFLICT_DISTRO_FEATURES` 1286 When inheriting the 1287 :ref:`features_check <ref-classes-features_check>` 1288 class, this variable identifies distribution features that would be 1289 in conflict should the recipe be built. In other words, if the 1290 ``CONFLICT_DISTRO_FEATURES`` variable lists a feature that also 1291 appears in ``DISTRO_FEATURES`` within the current configuration, then 1292 the recipe will be skipped, and if the build system attempts to build 1293 the recipe then an error will be triggered. 1294 1295 :term:`COPYLEFT_LICENSE_EXCLUDE` 1296 A space-separated list of licenses to exclude from the source 1297 archived by the :ref:`archiver <ref-classes-archiver>` class. In 1298 other words, if a license in a recipe's 1299 :term:`LICENSE` value is in the value of 1300 ``COPYLEFT_LICENSE_EXCLUDE``, then its source is not archived by the 1301 class. 1302 1303 .. note:: 1304 1305 The ``COPYLEFT_LICENSE_EXCLUDE`` variable takes precedence over the 1306 :term:`COPYLEFT_LICENSE_INCLUDE` variable. 1307 1308 The default value, which is "CLOSED Proprietary", for 1309 ``COPYLEFT_LICENSE_EXCLUDE`` is set by the 1310 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which 1311 is inherited by the ``archiver`` class. 1312 1313 :term:`COPYLEFT_LICENSE_INCLUDE` 1314 A space-separated list of licenses to include in the source archived 1315 by the :ref:`archiver <ref-classes-archiver>` class. In other 1316 words, if a license in a recipe's :term:`LICENSE` 1317 value is in the value of ``COPYLEFT_LICENSE_INCLUDE``, then its 1318 source is archived by the class. 1319 1320 The default value is set by the 1321 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which 1322 is inherited by the ``archiver`` class. The default value includes 1323 "GPL*", "LGPL*", and "AGPL*". 1324 1325 :term:`COPYLEFT_PN_EXCLUDE` 1326 A list of recipes to exclude in the source archived by the 1327 :ref:`archiver <ref-classes-archiver>` class. The 1328 ``COPYLEFT_PN_EXCLUDE`` variable overrides the license inclusion and 1329 exclusion caused through the 1330 :term:`COPYLEFT_LICENSE_INCLUDE` and 1331 :term:`COPYLEFT_LICENSE_EXCLUDE` 1332 variables, respectively. 1333 1334 The default value, which is "" indicating to not explicitly exclude 1335 any recipes by name, for ``COPYLEFT_PN_EXCLUDE`` is set by the 1336 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which 1337 is inherited by the ``archiver`` class. 1338 1339 :term:`COPYLEFT_PN_INCLUDE` 1340 A list of recipes to include in the source archived by the 1341 :ref:`archiver <ref-classes-archiver>` class. The 1342 ``COPYLEFT_PN_INCLUDE`` variable overrides the license inclusion and 1343 exclusion caused through the 1344 :term:`COPYLEFT_LICENSE_INCLUDE` and 1345 :term:`COPYLEFT_LICENSE_EXCLUDE` 1346 variables, respectively. 1347 1348 The default value, which is "" indicating to not explicitly include 1349 any recipes by name, for ``COPYLEFT_PN_INCLUDE`` is set by the 1350 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which 1351 is inherited by the ``archiver`` class. 1352 1353 :term:`COPYLEFT_RECIPE_TYPES` 1354 A space-separated list of recipe types to include in the source 1355 archived by the :ref:`archiver <ref-classes-archiver>` class. 1356 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``, 1357 ``crosssdk``, and ``cross-canadian``. 1358 1359 The default value, which is "target*", for ``COPYLEFT_RECIPE_TYPES`` 1360 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>` 1361 class, which is inherited by the ``archiver`` class. 1362 1363 :term:`COPY_LIC_DIRS` 1364 If set to "1" along with the 1365 :term:`COPY_LIC_MANIFEST` variable, the 1366 OpenEmbedded build system copies into the image the license files, 1367 which are located in ``/usr/share/common-licenses``, for each 1368 package. The license files are placed in directories within the image 1369 itself during build time. 1370 1371 .. note:: 1372 1373 The ``COPY_LIC_DIRS`` does not offer a path for adding licenses for 1374 newly installed packages to an image, which might be most suitable for 1375 read-only filesystems that cannot be upgraded. See the 1376 :term:`LICENSE_CREATE_PACKAGE` variable for additional information. 1377 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" 1378 section in the Yocto Project Development Tasks Manual for 1379 information on providing license text. 1380 1381 :term:`COPY_LIC_MANIFEST` 1382 If set to "1", the OpenEmbedded build system copies the license 1383 manifest for the image to 1384 ``/usr/share/common-licenses/license.manifest`` within the image 1385 itself during build time. 1386 1387 .. note:: 1388 1389 The ``COPY_LIC_MANIFEST`` does not offer a path for adding licenses for 1390 newly installed packages to an image, which might be most suitable for 1391 read-only filesystems that cannot be upgraded. See the 1392 :term:`LICENSE_CREATE_PACKAGE` variable for additional information. 1393 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`" 1394 section in the Yocto Project Development Tasks Manual for 1395 information on providing license text. 1396 1397 :term:`CORE_IMAGE_EXTRA_INSTALL` 1398 Specifies the list of packages to be added to the image. You should 1399 only set this variable in the ``local.conf`` configuration file found 1400 in the :term:`Build Directory`. 1401 1402 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer 1403 supported. 1404 1405 :term:`COREBASE` 1406 Specifies the parent directory of the OpenEmbedded-Core Metadata 1407 layer (i.e. ``meta``). 1408 1409 It is an important distinction that ``COREBASE`` points to the parent 1410 of this layer and not the layer itself. Consider an example where you 1411 have cloned the Poky Git repository and retained the ``poky`` name 1412 for your local copy of the repository. In this case, ``COREBASE`` 1413 points to the ``poky`` folder because it is the parent directory of 1414 the ``poky/meta`` layer. 1415 1416 :term:`COREBASE_FILES` 1417 Lists files from the :term:`COREBASE` directory that 1418 should be copied other than the layers listed in the 1419 ``bblayers.conf`` file. The ``COREBASE_FILES`` variable allows 1420 to copy metadata from the OpenEmbedded build system 1421 into the extensible SDK. 1422 1423 Explicitly listing files in ``COREBASE`` is needed because it 1424 typically contains build directories and other files that should not 1425 normally be copied into the extensible SDK. Consequently, the value 1426 of ``COREBASE_FILES`` is used in order to only copy the files that 1427 are actually needed. 1428 1429 :term:`CPP` 1430 The minimal command and arguments used to run the C preprocessor. 1431 1432 :term:`CPPFLAGS` 1433 Specifies the flags to pass to the C pre-processor (i.e. to both the 1434 C and the C++ compilers). This variable is exported to an environment 1435 variable and thus made visible to the software being built during the 1436 compilation step. 1437 1438 Default initialization for ``CPPFLAGS`` varies depending on what is 1439 being built: 1440 1441 - :term:`TARGET_CPPFLAGS` when building for 1442 the target 1443 1444 - :term:`BUILD_CPPFLAGS` when building for the 1445 build host (i.e. ``-native``) 1446 1447 - :term:`BUILDSDK_CPPFLAGS` when building 1448 for an SDK (i.e. ``nativesdk-``) 1449 1450 :term:`CROSS_COMPILE` 1451 The toolchain binary prefix for the target tools. The 1452 ``CROSS_COMPILE`` variable is the same as the 1453 :term:`TARGET_PREFIX` variable. 1454 1455 .. note:: 1456 1457 The OpenEmbedded build system sets the ``CROSS_COMPILE`` 1458 variable only in certain contexts (e.g. when building for kernel 1459 and kernel module recipes). 1460 1461 :term:`CVSDIR` 1462 The directory in which files checked out under the CVS system are 1463 stored. 1464 1465 :term:`CXX` 1466 The minimal command and arguments used to run the C++ compiler. 1467 1468 :term:`CXXFLAGS` 1469 Specifies the flags to pass to the C++ compiler. This variable is 1470 exported to an environment variable and thus made visible to the 1471 software being built during the compilation step. 1472 1473 Default initialization for ``CXXFLAGS`` varies depending on what is 1474 being built: 1475 1476 - :term:`TARGET_CXXFLAGS` when building for 1477 the target 1478 1479 - :term:`BUILD_CXXFLAGS` when building for the 1480 build host (i.e. ``-native``) 1481 1482 - :term:`BUILDSDK_CXXFLAGS` when building 1483 for an SDK (i.e. ``nativesdk-``) 1484 1485 :term:`D` 1486 The destination directory. The location in the :term:`Build Directory` 1487 where components are installed by the 1488 :ref:`ref-tasks-install` task. This location defaults 1489 to:: 1490 1491 ${WORKDIR}/image 1492 1493 .. note:: 1494 1495 Tasks that read from or write to this directory should run under 1496 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. 1497 1498 :term:`DATE` 1499 The date the build was started. Dates appear using the year, month, 1500 and day (YMD) format (e.g. "20150209" for February 9th, 2015). 1501 1502 :term:`DATETIME` 1503 The date and time on which the current build started. The format is 1504 suitable for timestamps. 1505 1506 :term:`DEBIAN_NOAUTONAME` 1507 When the :ref:`debian <ref-classes-debian>` class is inherited, 1508 which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a 1509 particular package should not be renamed according to Debian library 1510 package naming. You must use the package name as an override when you 1511 set this variable. Here is an example from the ``fontconfig`` recipe:: 1512 1513 DEBIAN_NOAUTONAME_fontconfig-utils = "1" 1514 1515 :term:`DEBIANNAME` 1516 When the :ref:`debian <ref-classes-debian>` class is inherited, 1517 which is the default behavior, ``DEBIANNAME`` allows you to override 1518 the library name for an individual package. Overriding the library 1519 name in these cases is rare. You must use the package name as an 1520 override when you set this variable. Here is an example from the 1521 ``dbus`` recipe:: 1522 1523 DEBIANNAME_${PN} = "dbus-1" 1524 1525 :term:`DEBUG_BUILD` 1526 Specifies to build packages with debugging information. This 1527 influences the value of the :term:`SELECTED_OPTIMIZATION` variable. 1528 1529 :term:`DEBUG_OPTIMIZATION` 1530 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when 1531 compiling a system for debugging. This variable defaults to "-O 1532 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". 1533 1534 :term:`DEFAULT_PREFERENCE` 1535 Specifies a weak bias for recipe selection priority. 1536 1537 The most common usage of this is variable is to set it to "-1" within 1538 a recipe for a development version of a piece of software. Using the 1539 variable in this way causes the stable version of the recipe to build 1540 by default in the absence of :term:`PREFERRED_VERSION` being used to 1541 build the development version. 1542 1543 .. note:: 1544 1545 The bias provided by ``DEFAULT_PREFERENCE`` is weak and is overridden 1546 by :term:`BBFILE_PRIORITY` if that variable is different between two 1547 layers that contain different versions of the same recipe. 1548 1549 :term:`DEFAULTTUNE` 1550 The default CPU and Application Binary Interface (ABI) tunings (i.e. 1551 the "tune") used by the OpenEmbedded build system. The 1552 ``DEFAULTTUNE`` helps define 1553 :term:`TUNE_FEATURES`. 1554 1555 The default tune is either implicitly or explicitly set by the 1556 machine (:term:`MACHINE`). However, you can override 1557 the setting using available tunes as defined with 1558 :term:`AVAILTUNES`. 1559 1560 :term:`DEPENDS` 1561 Lists a recipe's build-time dependencies. These are dependencies on 1562 other recipes whose contents (e.g. headers and shared libraries) are 1563 needed by the recipe at build time. 1564 1565 As an example, consider a recipe ``foo`` that contains the following 1566 assignment:: 1567 1568 DEPENDS = "bar" 1569 1570 The practical effect of the previous 1571 assignment is that all files installed by bar will be available in 1572 the appropriate staging sysroot, given by the 1573 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the 1574 :ref:`ref-tasks-configure` task for ``foo`` runs. 1575 This mechanism is implemented by having ``do_configure`` depend on 1576 the :ref:`ref-tasks-populate_sysroot` task of 1577 each recipe listed in ``DEPENDS``, through a 1578 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` 1579 declaration in the :ref:`base <ref-classes-base>` class. 1580 1581 .. note:: 1582 1583 It seldom is necessary to reference, for example, ``STAGING_DIR_HOST`` 1584 explicitly. The standard classes and build-related variables are 1585 configured to automatically use the appropriate staging sysroots. 1586 1587 As another example, ``DEPENDS`` can also be used to add utilities 1588 that run on the build machine during the build. For example, a recipe 1589 that makes use of a code generator built by the recipe ``codegen`` 1590 might have the following:: 1591 1592 DEPENDS = "codegen-native" 1593 1594 For more 1595 information, see the :ref:`native <ref-classes-native>` class and 1596 the :term:`EXTRANATIVEPATH` variable. 1597 1598 .. note:: 1599 1600 - ``DEPENDS`` is a list of recipe names. Or, to be more precise, 1601 it is a list of :term:`PROVIDES` names, which 1602 usually match recipe names. Putting a package name such as 1603 "foo-dev" in ``DEPENDS`` does not make sense. Use "foo" 1604 instead, as this will put files from all the packages that make 1605 up ``foo``, which includes those from ``foo-dev``, into the 1606 sysroot. 1607 1608 - One recipe having another recipe in ``DEPENDS`` does not by 1609 itself add any runtime dependencies between the packages 1610 produced by the two recipes. However, as explained in the 1611 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 1612 section in the Yocto Project Overview and Concepts Manual, 1613 runtime dependencies will often be added automatically, meaning 1614 ``DEPENDS`` alone is sufficient for most recipes. 1615 1616 - Counterintuitively, ``DEPENDS`` is often necessary even for 1617 recipes that install precompiled components. For example, if 1618 ``libfoo`` is a precompiled library that links against 1619 ``libbar``, then linking against ``libfoo`` requires both 1620 ``libfoo`` and ``libbar`` to be available in the sysroot. 1621 Without a ``DEPENDS`` from the recipe that installs ``libfoo`` 1622 to the recipe that installs ``libbar``, other recipes might 1623 fail to link against ``libfoo``. 1624 1625 For information on runtime dependencies, see the 1626 :term:`RDEPENDS` variable. You can also see the 1627 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and 1628 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the 1629 BitBake User Manual for additional information on tasks and 1630 dependencies. 1631 1632 :term:`DEPLOY_DIR` 1633 Points to the general area that the OpenEmbedded build system uses to 1634 place images, packages, SDKs, and other output files that are ready 1635 to be used outside of the build system. By default, this directory 1636 resides within the :term:`Build Directory` as 1637 ``${TMPDIR}/deploy``. 1638 1639 For more information on the structure of the Build Directory, see 1640 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. 1641 For more detail on the contents of the ``deploy`` directory, see the 1642 ":ref:`overview-manual/concepts:images`", 1643 ":ref:`overview-manual/concepts:package feeds`", and 1644 ":ref:`overview-manual/concepts:application development sdk`" sections all in the 1645 Yocto Project Overview and Concepts Manual. 1646 1647 :term:`DEPLOY_DIR_DEB` 1648 Points to the area that the OpenEmbedded build system uses to place 1649 Debian packages that are ready to be used outside of the build 1650 system. This variable applies only when 1651 :term:`PACKAGE_CLASSES` contains 1652 "package_deb". 1653 1654 The BitBake configuration file initially defines the 1655 ``DEPLOY_DIR_DEB`` variable as a sub-folder of 1656 :term:`DEPLOY_DIR`:: 1657 1658 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" 1659 1660 The :ref:`package_deb <ref-classes-package_deb>` class uses the 1661 ``DEPLOY_DIR_DEB`` variable to make sure the 1662 :ref:`ref-tasks-package_write_deb` task 1663 writes Debian packages into the appropriate folder. For more 1664 information on how packaging works, see the 1665 ":ref:`overview-manual/concepts:package feeds`" section 1666 in the Yocto Project Overview and Concepts Manual. 1667 1668 :term:`DEPLOY_DIR_IMAGE` 1669 Points to the area that the OpenEmbedded build system uses to place 1670 images and other associated output files that are ready to be 1671 deployed onto the target machine. The directory is machine-specific 1672 as it contains the ``${MACHINE}`` name. By default, this directory 1673 resides within the :term:`Build Directory` as 1674 ``${DEPLOY_DIR}/images/${MACHINE}/``. 1675 1676 For more information on the structure of the Build Directory, see 1677 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section. 1678 For more detail on the contents of the ``deploy`` directory, see the 1679 ":ref:`overview-manual/concepts:images`" and 1680 ":ref:`overview-manual/concepts:application development sdk`" sections both in 1681 the Yocto Project Overview and Concepts Manual. 1682 1683 :term:`DEPLOY_DIR_IPK` 1684 Points to the area that the OpenEmbedded build system uses to place 1685 IPK packages that are ready to be used outside of the build system. 1686 This variable applies only when 1687 :term:`PACKAGE_CLASSES` contains 1688 "package_ipk". 1689 1690 The BitBake configuration file initially defines this variable as a 1691 sub-folder of :term:`DEPLOY_DIR`:: 1692 1693 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" 1694 1695 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the 1696 ``DEPLOY_DIR_IPK`` variable to make sure the 1697 :ref:`ref-tasks-package_write_ipk` task 1698 writes IPK packages into the appropriate folder. For more information 1699 on how packaging works, see the 1700 ":ref:`overview-manual/concepts:package feeds`" section 1701 in the Yocto Project Overview and Concepts Manual. 1702 1703 :term:`DEPLOY_DIR_RPM` 1704 Points to the area that the OpenEmbedded build system uses to place 1705 RPM packages that are ready to be used outside of the build system. 1706 This variable applies only when 1707 :term:`PACKAGE_CLASSES` contains 1708 "package_rpm". 1709 1710 The BitBake configuration file initially defines this variable as a 1711 sub-folder of :term:`DEPLOY_DIR`:: 1712 1713 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" 1714 1715 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the 1716 ``DEPLOY_DIR_RPM`` variable to make sure the 1717 :ref:`ref-tasks-package_write_rpm` task 1718 writes RPM packages into the appropriate folder. For more information 1719 on how packaging works, see the 1720 ":ref:`overview-manual/concepts:package feeds`" section 1721 in the Yocto Project Overview and Concepts Manual. 1722 1723 :term:`DEPLOY_DIR_TAR` 1724 Points to the area that the OpenEmbedded build system uses to place 1725 tarballs that are ready to be used outside of the build system. This 1726 variable applies only when 1727 :term:`PACKAGE_CLASSES` contains 1728 "package_tar". 1729 1730 The BitBake configuration file initially defines this variable as a 1731 sub-folder of :term:`DEPLOY_DIR`:: 1732 1733 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" 1734 1735 The :ref:`package_tar <ref-classes-package_tar>` class uses the 1736 ``DEPLOY_DIR_TAR`` variable to make sure the 1737 :ref:`ref-tasks-package_write_tar` task 1738 writes TAR packages into the appropriate folder. For more information 1739 on how packaging works, see the 1740 ":ref:`overview-manual/concepts:package feeds`" section 1741 in the Yocto Project Overview and Concepts Manual. 1742 1743 :term:`DEPLOYDIR` 1744 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the 1745 ``DEPLOYDIR`` points to a temporary work area for deployed files that 1746 is set in the ``deploy`` class as follows:: 1747 1748 DEPLOYDIR = "${WORKDIR}/deploy-${PN}" 1749 1750 Recipes inheriting the ``deploy`` class should copy files to be 1751 deployed into ``DEPLOYDIR``, and the class will take care of copying 1752 them into :term:`DEPLOY_DIR_IMAGE` 1753 afterwards. 1754 1755 :term:`DESCRIPTION` 1756 The package description used by package managers. If not set, 1757 ``DESCRIPTION`` takes the value of the :term:`SUMMARY` 1758 variable. 1759 1760 :term:`DISTRO` 1761 The short name of the distribution. For information on the long name 1762 of the distribution, see the :term:`DISTRO_NAME` 1763 variable. 1764 1765 The ``DISTRO`` variable corresponds to a distribution configuration 1766 file whose root name is the same as the variable's argument and whose 1767 filename extension is ``.conf``. For example, the distribution 1768 configuration file for the Poky distribution is named ``poky.conf`` 1769 and resides in the ``meta-poky/conf/distro`` directory of the 1770 :term:`Source Directory`. 1771 1772 Within that ``poky.conf`` file, the ``DISTRO`` variable is set as 1773 follows:: 1774 1775 DISTRO = "poky" 1776 1777 Distribution configuration files are located in a ``conf/distro`` 1778 directory within the :term:`Metadata` that contains the 1779 distribution configuration. The value for ``DISTRO`` must not contain 1780 spaces, and is typically all lower-case. 1781 1782 .. note:: 1783 1784 If the ``DISTRO`` variable is blank, a set of default configurations 1785 are used, which are specified within 1786 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. 1787 1788 :term:`DISTRO_CODENAME` 1789 Specifies a codename for the distribution being built. 1790 1791 :term:`DISTRO_EXTRA_RDEPENDS` 1792 Specifies a list of distro-specific packages to add to all images. 1793 This variable takes affect through ``packagegroup-base`` so the 1794 variable only really applies to the more full-featured images that 1795 include ``packagegroup-base``. You can use this variable to keep 1796 distro policy out of generic images. As with all other distro 1797 variables, you set this variable in the distro ``.conf`` file. 1798 1799 :term:`DISTRO_EXTRA_RRECOMMENDS` 1800 Specifies a list of distro-specific packages to add to all images if 1801 the packages exist. The packages might not exist or be empty (e.g. 1802 kernel modules). The list of packages are automatically installed but 1803 you can remove them. 1804 1805 :term:`DISTRO_FEATURES` 1806 The software support you want in your distribution for various 1807 features. You define your distribution features in the distribution 1808 configuration file. 1809 1810 In most cases, the presence or absence of a feature in 1811 ``DISTRO_FEATURES`` is translated to the appropriate option supplied 1812 to the configure script during the 1813 :ref:`ref-tasks-configure` task for recipes that 1814 optionally support the feature. For example, specifying "x11" in 1815 ``DISTRO_FEATURES``, causes every piece of software built for the 1816 target that can optionally support X11 to have its X11 support 1817 enabled. 1818 1819 Two more examples are Bluetooth and NFS support. For a more complete 1820 list of features that ships with the Yocto Project and that you can 1821 provide with this variable, see the ":ref:`ref-features-distro`" section. 1822 1823 :term:`DISTRO_FEATURES_BACKFILL` 1824 Features to be added to ``DISTRO_FEATURES`` if not also present in 1825 ``DISTRO_FEATURES_BACKFILL_CONSIDERED``. 1826 1827 This variable is set in the ``meta/conf/bitbake.conf`` file. It is 1828 not intended to be user-configurable. It is best to just reference 1829 the variable to see which distro features are being backfilled for 1830 all distro configurations. See the ":ref:`ref-features-backfill`" section 1831 for more information. 1832 1833 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` 1834 Features from ``DISTRO_FEATURES_BACKFILL`` that should not be 1835 backfilled (i.e. added to ``DISTRO_FEATURES``) during the build. See 1836 the ":ref:`ref-features-backfill`" section for more information. 1837 1838 :term:`DISTRO_FEATURES_DEFAULT` 1839 A convenience variable that gives you the default list of distro 1840 features with the exception of any features specific to the C library 1841 (``libc``). 1842 1843 When creating a custom distribution, you might find it useful to be 1844 able to reuse the default 1845 :term:`DISTRO_FEATURES` options without the 1846 need to write out the full set. Here is an example that uses 1847 ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file:: 1848 1849 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" 1850 1851 :term:`DISTRO_FEATURES_FILTER_NATIVE` 1852 Specifies a list of features that if present in the target 1853 :term:`DISTRO_FEATURES` value should be 1854 included in ``DISTRO_FEATURES`` when building native recipes. This 1855 variable is used in addition to the features filtered using the 1856 :term:`DISTRO_FEATURES_NATIVE` 1857 variable. 1858 1859 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` 1860 Specifies a list of features that if present in the target 1861 :term:`DISTRO_FEATURES` value should be 1862 included in ``DISTRO_FEATURES`` when building nativesdk recipes. This 1863 variable is used in addition to the features filtered using the 1864 :term:`DISTRO_FEATURES_NATIVESDK` 1865 variable. 1866 1867 :term:`DISTRO_FEATURES_NATIVE` 1868 Specifies a list of features that should be included in 1869 :term:`DISTRO_FEATURES` when building native 1870 recipes. This variable is used in addition to the features filtered 1871 using the 1872 :term:`DISTRO_FEATURES_FILTER_NATIVE` 1873 variable. 1874 1875 :term:`DISTRO_FEATURES_NATIVESDK` 1876 Specifies a list of features that should be included in 1877 :term:`DISTRO_FEATURES` when building 1878 nativesdk recipes. This variable is used in addition to the features 1879 filtered using the 1880 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` 1881 variable. 1882 1883 :term:`DISTRO_NAME` 1884 The long name of the distribution. For information on the short name 1885 of the distribution, see the :term:`DISTRO` variable. 1886 1887 The ``DISTRO_NAME`` variable corresponds to a distribution 1888 configuration file whose root name is the same as the variable's 1889 argument and whose filename extension is ``.conf``. For example, the 1890 distribution configuration file for the Poky distribution is named 1891 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory 1892 of the :term:`Source Directory`. 1893 1894 Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set 1895 as follows:: 1896 1897 DISTRO_NAME = "Poky (Yocto Project Reference Distro)" 1898 1899 Distribution configuration files are located in a ``conf/distro`` 1900 directory within the :term:`Metadata` that contains the 1901 distribution configuration. 1902 1903 .. note:: 1904 1905 If the ``DISTRO_NAME`` variable is blank, a set of default 1906 configurations are used, which are specified within 1907 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. 1908 1909 :term:`DISTRO_VERSION` 1910 The version of the distribution. 1911 1912 :term:`DISTROOVERRIDES` 1913 A colon-separated list of overrides specific to the current 1914 distribution. By default, this list includes the value of 1915 :term:`DISTRO`. 1916 1917 You can extend ``DISTROOVERRIDES`` to add extra overrides that should 1918 apply to the distribution. 1919 1920 The underlying mechanism behind ``DISTROOVERRIDES`` is simply that it 1921 is included in the default value of 1922 :term:`OVERRIDES`. 1923 1924 :term:`DISTUTILS_SETUP_PATH` 1925 When used by recipes that inherit the 1926 :ref:`distutils3 <ref-classes-distutils3>` or 1927 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should 1928 be used to specify the directory in which the ``setup.py`` file is 1929 located if it is not at the root of the source tree (as specified by 1930 :term:`S`). For example, in a recipe where the sources are fetched from 1931 a Git repository and ``setup.py`` is in a ``python/pythonmodule`` 1932 subdirectory, you would have this:: 1933 1934 S = "${WORKDIR}/git" 1935 DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule" 1936 1937 :term:`DL_DIR` 1938 The central download directory used by the build process to store 1939 downloads. By default, ``DL_DIR`` gets files suitable for mirroring 1940 for everything except Git repositories. If you want tarballs of Git 1941 repositories, use the 1942 :term:`BB_GENERATE_MIRROR_TARBALLS` 1943 variable. 1944 1945 You can set this directory by defining the ``DL_DIR`` variable in the 1946 ``conf/local.conf`` file. This directory is self-maintaining and you 1947 should not have to touch it. By default, the directory is 1948 ``downloads`` in the :term:`Build Directory`. 1949 :: 1950 1951 #DL_DIR ?= "${TOPDIR}/downloads" 1952 1953 To specify a different download directory, 1954 simply remove the comment from the line and provide your directory. 1955 1956 During a first build, the system downloads many different source code 1957 tarballs from various upstream projects. Downloading can take a 1958 while, particularly if your network connection is slow. Tarballs are 1959 all stored in the directory defined by ``DL_DIR`` and the build 1960 system looks there first to find source tarballs. 1961 1962 .. note:: 1963 1964 When wiping and rebuilding, you can preserve this directory to 1965 speed up this part of subsequent builds. 1966 1967 You can safely share this directory between multiple builds on the 1968 same development machine. For additional information on how the build 1969 process gets source files when working behind a firewall or proxy 1970 server, see this specific question in the ":doc:`faq`" 1971 chapter. You can also refer to the 1972 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" 1973 Wiki page. 1974 1975 :term:`DOC_COMPRESS` 1976 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>` 1977 class, this variable sets the compression policy used when the 1978 OpenEmbedded build system compresses man pages and info pages. By 1979 default, the compression method used is gz (gzip). Other policies 1980 available are xz and bz2. 1981 1982 For information on policies and on how to use this variable, see the 1983 comments in the ``meta/classes/compress_doc.bbclass`` file. 1984 1985 :term:`EFI_PROVIDER` 1986 When building bootable images (i.e. where ``hddimg``, ``iso``, or 1987 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the 1988 ``EFI_PROVIDER`` variable specifies the EFI bootloader to use. The 1989 default is "grub-efi", but "systemd-boot" can be used instead. 1990 1991 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and 1992 :ref:`image-live <ref-classes-image-live>` classes for more 1993 information. 1994 1995 :term:`ENABLE_BINARY_LOCALE_GENERATION` 1996 Variable that controls which locales for ``glibc`` are generated 1997 during the build (useful if the target device has 64Mbytes of RAM or 1998 less). 1999 2000 :term:`ERR_REPORT_DIR` 2001 When used with the :ref:`report-error <ref-classes-report-error>` 2002 class, specifies the path used for storing the debug files created by 2003 the :ref:`error reporting 2004 tool <dev-manual/common-tasks:using the error reporting tool>`, which 2005 allows you to submit build errors you encounter to a central 2006 database. By default, the value of this variable is 2007 ``${``\ :term:`LOG_DIR`\ ``}/error-report``. 2008 2009 You can set ``ERR_REPORT_DIR`` to the path you want the error 2010 reporting tool to store the debug files as follows in your 2011 ``local.conf`` file:: 2012 2013 ERR_REPORT_DIR = "path" 2014 2015 :term:`ERROR_QA` 2016 Specifies the quality assurance checks whose failures are reported as 2017 errors by the OpenEmbedded build system. You set this variable in 2018 your distribution configuration file. For a list of the checks you 2019 can control with this variable, see the 2020 ":ref:`insane.bbclass <ref-classes-insane>`" section. 2021 2022 :term:`EXCLUDE_FROM_SHLIBS` 2023 Triggers the OpenEmbedded build system's shared libraries resolver to 2024 exclude an entire package when scanning for shared libraries. 2025 2026 .. note:: 2027 2028 The shared libraries resolver's functionality results in part from 2029 the internal function ``package_do_shlibs``, which is part of the 2030 :ref:`ref-tasks-package` task. You should be aware that the shared 2031 libraries resolver might implicitly define some dependencies between 2032 packages. 2033 2034 The ``EXCLUDE_FROM_SHLIBS`` variable is similar to the 2035 :term:`PRIVATE_LIBS` variable, which excludes a 2036 package's particular libraries only and not the whole package. 2037 2038 Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a 2039 particular package:: 2040 2041 EXCLUDE_FROM_SHLIBS = "1" 2042 2043 :term:`EXCLUDE_FROM_WORLD` 2044 Directs BitBake to exclude a recipe from world builds (i.e. 2045 ``bitbake world``). During world builds, BitBake locates, parses and 2046 builds all recipes found in every layer exposed in the 2047 ``bblayers.conf`` configuration file. 2048 2049 To exclude a recipe from a world build using this variable, set the 2050 variable to "1" in the recipe. 2051 2052 .. note:: 2053 2054 Recipes added to ``EXCLUDE_FROM_WORLD`` may still be built during a 2055 world build in order to satisfy dependencies of other recipes. Adding 2056 a recipe to ``EXCLUDE_FROM_WORLD`` only ensures that the recipe is not 2057 explicitly added to the list of build targets in a world build. 2058 2059 :term:`EXTENDPE` 2060 Used with file and pathnames to create a prefix for a recipe's 2061 version based on the recipe's :term:`PE` value. If ``PE`` 2062 is set and greater than zero for a recipe, ``EXTENDPE`` becomes that 2063 value (e.g if ``PE`` is equal to "1" then ``EXTENDPE`` becomes "1"). 2064 If a recipe's ``PE`` is not set (the default) or is equal to zero, 2065 ``EXTENDPE`` becomes "". 2066 2067 See the :term:`STAMP` variable for an example. 2068 2069 :term:`EXTENDPKGV` 2070 The full package version specification as it appears on the final 2071 packages produced by a recipe. The variable's value is normally used 2072 to fix a runtime dependency to the exact same version of another 2073 package in the same recipe:: 2074 2075 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" 2076 2077 The dependency relationships are intended to force the package 2078 manager to upgrade these types of packages in lock-step. 2079 2080 :term:`EXTERNAL_KERNEL_TOOLS` 2081 When set, the ``EXTERNAL_KERNEL_TOOLS`` variable indicates that these 2082 tools are not in the source tree. 2083 2084 When kernel tools are available in the tree, they are preferred over 2085 any externally installed tools. Setting the ``EXTERNAL_KERNEL_TOOLS`` 2086 variable tells the OpenEmbedded build system to prefer the installed 2087 external tools. See the 2088 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in 2089 ``meta/classes`` to see how the variable is used. 2090 2091 :term:`EXTERNALSRC` 2092 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` 2093 class, this variable points to the source tree, which is outside of 2094 the OpenEmbedded build system. When set, this variable sets the 2095 :term:`S` variable, which is what the OpenEmbedded build 2096 system uses to locate unpacked recipe source code. 2097 2098 For more information on ``externalsrc.bbclass``, see the 2099 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You 2100 can also find information on how to use this variable in the 2101 ":ref:`dev-manual/common-tasks:building software from an external source`" 2102 section in the Yocto Project Development Tasks Manual. 2103 2104 :term:`EXTERNALSRC_BUILD` 2105 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` 2106 class, this variable points to the directory in which the recipe's 2107 source code is built, which is outside of the OpenEmbedded build 2108 system. When set, this variable sets the :term:`B` variable, 2109 which is what the OpenEmbedded build system uses to locate the Build 2110 Directory. 2111 2112 For more information on ``externalsrc.bbclass``, see the 2113 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You 2114 can also find information on how to use this variable in the 2115 ":ref:`dev-manual/common-tasks:building software from an external source`" 2116 section in the Yocto Project Development Tasks Manual. 2117 2118 :term:`EXTRA_AUTORECONF` 2119 For recipes inheriting the :ref:`autotools <ref-classes-autotools>` 2120 class, you can use ``EXTRA_AUTORECONF`` to specify extra options to 2121 pass to the ``autoreconf`` command that is executed during the 2122 :ref:`ref-tasks-configure` task. 2123 2124 The default value is "--exclude=autopoint". 2125 2126 :term:`EXTRA_IMAGE_FEATURES` 2127 A list of additional features to include in an image. When listing 2128 more than one feature, separate them with a space. 2129 2130 Typically, you configure this variable in your ``local.conf`` file, 2131 which is found in the :term:`Build Directory`. 2132 Although you can use this variable from within a recipe, best 2133 practices dictate that you do not. 2134 2135 .. note:: 2136 2137 To enable primary features from within the image recipe, use the 2138 :term:`IMAGE_FEATURES` variable. 2139 2140 Here are some examples of features you can add: 2141 2142 - "dbg-pkgs" - Adds -dbg packages for all installed packages including 2143 symbol information for debugging and profiling. 2144 2145 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and 2146 enables post-installation logging. See the 'allow-empty-password' and 2147 'post-install-logging' features in the ":ref:`ref-features-image`" 2148 section for more information. 2149 - "dev-pkgs" - Adds -dev packages for all installed packages. This is 2150 useful if you want to develop against the libraries in the image. 2151 - "read-only-rootfs" - Creates an image whose root filesystem is 2152 read-only. See the 2153 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`" 2154 section in the Yocto Project Development Tasks Manual for more 2155 information 2156 - "tools-debug" - Adds debugging tools such as gdb and strace. 2157 - "tools-sdk" - Adds development tools such as gcc, make, 2158 pkgconfig and so forth. 2159 - "tools-testapps" - Adds useful testing tools 2160 such as ts_print, aplay, arecord and so forth. 2161 2162 For a complete list of image features that ships with the Yocto 2163 Project, see the ":ref:`ref-features-image`" section. 2164 2165 For an example that shows how to customize your image by using this 2166 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" 2167 section in the Yocto Project Development Tasks Manual. 2168 2169 :term:`EXTRA_IMAGECMD` 2170 Specifies additional options for the image creation command that has 2171 been specified in :term:`IMAGE_CMD`. When setting 2172 this variable, use an override for the associated image type. Here is 2173 an example:: 2174 2175 EXTRA_IMAGECMD_ext3 ?= "-i 4096" 2176 2177 :term:`EXTRA_IMAGEDEPENDS` 2178 A list of recipes to build that do not provide packages for 2179 installing into the root filesystem. 2180 2181 Sometimes a recipe is required to build the final image but is not 2182 needed in the root filesystem. You can use the ``EXTRA_IMAGEDEPENDS`` 2183 variable to list these recipes and thus specify the dependencies. A 2184 typical example is a required bootloader in a machine configuration. 2185 2186 .. note:: 2187 2188 To add packages to the root filesystem, see the various 2189 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. 2190 2191 :term:`EXTRANATIVEPATH` 2192 A list of subdirectories of 2193 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` 2194 added to the beginning of the environment variable ``PATH``. As an 2195 example, the following prepends 2196 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to 2197 ``PATH``:: 2198 2199 EXTRANATIVEPATH = "foo bar" 2200 2201 :term:`EXTRA_OECMAKE` 2202 Additional `CMake <https://cmake.org/overview/>`__ options. See the 2203 :ref:`cmake <ref-classes-cmake>` class for additional information. 2204 2205 :term:`EXTRA_OECONF` 2206 Additional ``configure`` script options. See 2207 :term:`PACKAGECONFIG_CONFARGS` for 2208 additional information on passing configure script options. 2209 2210 :term:`EXTRA_OEMAKE` 2211 Additional GNU ``make`` options. 2212 2213 Because the ``EXTRA_OEMAKE`` defaults to "", you need to set the 2214 variable to specify any required GNU options. 2215 2216 :term:`PARALLEL_MAKE` and 2217 :term:`PARALLEL_MAKEINST` also make use of 2218 ``EXTRA_OEMAKE`` to pass the required flags. 2219 2220 :term:`EXTRA_OESCONS` 2221 When inheriting the :ref:`scons <ref-classes-scons>` class, this 2222 variable specifies additional configuration options you want to pass 2223 to the ``scons`` command line. 2224 2225 :term:`EXTRA_USERS_PARAMS` 2226 When inheriting the :ref:`extrausers <ref-classes-extrausers>` 2227 class, this variable provides image level user and group operations. 2228 This is a more global method of providing user and group 2229 configuration as compared to using the 2230 :ref:`useradd <ref-classes-useradd>` class, which ties user and 2231 group configurations to a specific recipe. 2232 2233 The set list of commands you can configure using the 2234 ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These 2235 commands map to the normal Unix commands of the same names:: 2236 2237 # EXTRA_USERS_PARAMS = "\ 2238 # useradd -p '' tester; \ 2239 # groupadd developers; \ 2240 # userdel nobody; \ 2241 # groupdel -g video; \ 2242 # groupmod -g 1020 developers; \ 2243 # usermod -s /bin/sh tester; \ 2244 # " 2245 2246 Additionally there is a special ``passwd-expire`` command that will 2247 cause the password for a user to be expired and thus force changing it 2248 on first login, for example:: 2249 2250 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" 2251 2252 .. note:: 2253 2254 At present, ``passwd-expire`` may only work for remote logins when 2255 using OpenSSH and not dropbear as an SSH server. 2256 2257 :term:`FEATURE_PACKAGES` 2258 Defines one or more packages to include in an image when a specific 2259 item is included in :term:`IMAGE_FEATURES`. 2260 When setting the value, ``FEATURE_PACKAGES`` should have the name of 2261 the feature item as an override. Here is an example:: 2262 2263 FEATURE_PACKAGES_widget = "package1 package2" 2264 2265 In this example, if "widget" were added to ``IMAGE_FEATURES``, 2266 package1 and package2 would be included in the image. 2267 2268 .. note:: 2269 2270 Packages installed by features defined through ``FEATURE_PACKAGES`` 2271 are often package groups. While similarly named, you should not 2272 confuse the ``FEATURE_PACKAGES`` variable with package groups, which 2273 are discussed elsewhere in the documentation. 2274 2275 :term:`FEED_DEPLOYDIR_BASE_URI` 2276 Points to the base URL of the server and location within the 2277 document-root that provides the metadata and packages required by 2278 OPKG to support runtime package management of IPK packages. You set 2279 this variable in your ``local.conf`` file. 2280 2281 Consider the following example:: 2282 2283 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" 2284 2285 This example assumes you are serving 2286 your packages over HTTP and your databases are located in a directory 2287 named ``BOARD-dir``, which is underneath your HTTP server's 2288 document-root. In this case, the OpenEmbedded build system generates 2289 a set of configuration files for you in your target that work with 2290 the feed. 2291 2292 :term:`FILES` 2293 The list of files and directories that are placed in a package. The 2294 :term:`PACKAGES` variable lists the packages 2295 generated by a recipe. 2296 2297 To use the ``FILES`` variable, provide a package name override that 2298 identifies the resulting package. Then, provide a space-separated 2299 list of files or paths that identify the files you want included as 2300 part of the resulting package. Here is an example:: 2301 2302 FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" 2303 2304 .. note:: 2305 2306 - When specifying files or paths, you can pattern match using 2307 Python's 2308 `glob <https://docs.python.org/3/library/glob.html>`_ 2309 syntax. For details on the syntax, see the documentation by 2310 following the previous link. 2311 2312 - When specifying paths as part of the ``FILES`` variable, it is 2313 good practice to use appropriate path variables. For example, 2314 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` 2315 rather than ``/usr/bin``. You can find a list of these 2316 variables at the top of the ``meta/conf/bitbake.conf`` file in 2317 the :term:`Source Directory`. You will also 2318 find the default values of the various ``FILES_*`` variables in 2319 this file. 2320 2321 If some of the files you provide with the ``FILES`` variable are 2322 editable and you know they should not be overwritten during the 2323 package update process by the Package Management System (PMS), you 2324 can identify these files so that the PMS will not overwrite them. See 2325 the :term:`CONFFILES` variable for information on 2326 how to identify these files to the PMS. 2327 2328 :term:`FILES_SOLIBSDEV` 2329 Defines the file specification to match 2330 :term:`SOLIBSDEV`. In other words, 2331 ``FILES_SOLIBSDEV`` defines the full path name of the development 2332 symbolic link (symlink) for shared libraries on the target platform. 2333 2334 The following statement from the ``bitbake.conf`` shows how it is 2335 set:: 2336 2337 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" 2338 2339 :term:`FILESEXTRAPATHS` 2340 Extends the search path the OpenEmbedded build system uses when 2341 looking for files and patches as it processes recipes and append 2342 files. The default directories BitBake uses when it processes recipes 2343 are initially defined by the :term:`FILESPATH` 2344 variable. You can extend ``FILESPATH`` variable by using 2345 ``FILESEXTRAPATHS``. 2346 2347 Best practices dictate that you accomplish this by using 2348 ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you 2349 prepend paths as follows:: 2350 2351 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 2352 2353 In the above example, the build system first 2354 looks for files in a directory that has the same name as the 2355 corresponding append file. 2356 2357 .. note:: 2358 2359 When extending ``FILESEXTRAPATHS``, be sure to use the immediate 2360 expansion (``:=``) operator. Immediate expansion makes sure that 2361 BitBake evaluates :term:`THISDIR` at the time the 2362 directive is encountered rather than at some later time when 2363 expansion might result in a directory that does not contain the 2364 files you need. 2365 2366 Also, include the trailing separating colon character if you are 2367 prepending. The trailing colon character is necessary because you 2368 are directing BitBake to extend the path by prepending directories 2369 to the search path. 2370 2371 Here is another common use:: 2372 2373 FILESEXTRAPATHS_prepend := "${THISDIR}/files:" 2374 2375 In this example, the build system extends the 2376 ``FILESPATH`` variable to include a directory named ``files`` that is 2377 in the same directory as the corresponding append file. 2378 2379 This next example specifically adds three paths:: 2380 2381 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:" 2382 2383 A final example shows how you can extend the search path and include 2384 a :term:`MACHINE`-specific override, which is useful 2385 in a BSP layer:: 2386 2387 FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" 2388 2389 The previous statement appears in the 2390 ``linux-yocto-dev.bbappend`` file, which is found in the 2391 :ref:`overview-manual/development-environment:yocto project source repositories` in 2392 ``meta-intel/common/recipes-kernel/linux``. Here, the machine 2393 override is a special :term:`PACKAGE_ARCH` 2394 definition for multiple ``meta-intel`` machines. 2395 2396 .. note:: 2397 2398 For a layer that supports a single BSP, the override could just be 2399 the value of ``MACHINE``. 2400 2401 By prepending paths in ``.bbappend`` files, you allow multiple append 2402 files that reside in different layers but are used for the same 2403 recipe to correctly extend the path. 2404 2405 :term:`FILESOVERRIDES` 2406 A subset of :term:`OVERRIDES` used by the 2407 OpenEmbedded build system for creating 2408 :term:`FILESPATH`. The ``FILESOVERRIDES`` variable 2409 uses overrides to automatically extend the 2410 :term:`FILESPATH` variable. For an example of how 2411 that works, see the :term:`FILESPATH` variable 2412 description. Additionally, you find more information on how overrides 2413 are handled in the 2414 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" 2415 section of the BitBake User Manual. 2416 2417 By default, the ``FILESOVERRIDES`` variable is defined as:: 2418 2419 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" 2420 2421 .. note:: 2422 2423 Do not hand-edit the ``FILESOVERRIDES`` variable. The values match up 2424 with expected overrides and are used in an expected manner by the 2425 build system. 2426 2427 :term:`FILESPATH` 2428 The default set of directories the OpenEmbedded build system uses 2429 when searching for patches and files. 2430 2431 During the build process, BitBake searches each directory in 2432 ``FILESPATH`` in the specified order when looking for files and 2433 patches specified by each ``file://`` URI in a recipe's 2434 :term:`SRC_URI` statements. 2435 2436 The default value for the ``FILESPATH`` variable is defined in the 2437 ``base.bbclass`` class found in ``meta/classes`` in the 2438 :term:`Source Directory`:: 2439 2440 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ 2441 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" 2442 2443 The 2444 ``FILESPATH`` variable is automatically extended using the overrides 2445 from the :term:`FILESOVERRIDES` variable. 2446 2447 .. note:: 2448 2449 - Do not hand-edit the ``FILESPATH`` variable. If you want the 2450 build system to look in directories other than the defaults, 2451 extend the ``FILESPATH`` variable by using the 2452 :term:`FILESEXTRAPATHS` variable. 2453 2454 - Be aware that the default ``FILESPATH`` directories do not map 2455 to directories in custom layers where append files 2456 (``.bbappend``) are used. If you want the build system to find 2457 patches or files that reside with your append files, you need 2458 to extend the ``FILESPATH`` variable by using the 2459 ``FILESEXTRAPATHS`` variable. 2460 2461 You can take advantage of this searching behavior in useful ways. For 2462 example, consider a case where there is the following directory structure 2463 for general and machine-specific configurations:: 2464 2465 files/defconfig 2466 files/MACHINEA/defconfig 2467 files/MACHINEB/defconfig 2468 2469 Also in the example, the ``SRC_URI`` statement contains 2470 "file://defconfig". Given this scenario, you can set 2471 :term:`MACHINE` to "MACHINEA" and cause the build 2472 system to use files from ``files/MACHINEA``. Set ``MACHINE`` to 2473 "MACHINEB" and the build system uses files from ``files/MACHINEB``. 2474 Finally, for any machine other than "MACHINEA" and "MACHINEB", the 2475 build system uses files from ``files/defconfig``. 2476 2477 You can find out more about the patching process in the 2478 ":ref:`overview-manual/concepts:patching`" section 2479 in the Yocto Project Overview and Concepts Manual and the 2480 ":ref:`dev-manual/common-tasks:patching code`" section in 2481 the Yocto Project Development Tasks Manual. See the 2482 :ref:`ref-tasks-patch` task as well. 2483 2484 :term:`FILESYSTEM_PERMS_TABLES` 2485 Allows you to define your own file permissions settings table as part 2486 of your configuration for the packaging process. For example, suppose 2487 you need a consistent set of custom permissions for a set of groups 2488 and users across an entire work project. It is best to do this in the 2489 packages themselves but this is not always possible. 2490 2491 By default, the OpenEmbedded build system uses the ``fs-perms.txt``, 2492 which is located in the ``meta/files`` folder in the :term:`Source Directory`. 2493 If you create your own file 2494 permissions setting table, you should place it in your layer or the 2495 distro's layer. 2496 2497 You define the ``FILESYSTEM_PERMS_TABLES`` variable in the 2498 ``conf/local.conf`` file, which is found in the :term:`Build Directory`, 2499 to point to your custom 2500 ``fs-perms.txt``. You can specify more than a single file permissions 2501 setting table. The paths you specify to these files must be defined 2502 within the :term:`BBPATH` variable. 2503 2504 For guidance on how to create your own file permissions settings 2505 table file, examine the existing ``fs-perms.txt``. 2506 2507 :term:`FIT_DESC` 2508 Specifies the description string encoded into a fitImage. The default 2509 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` 2510 class as follows:: 2511 2512 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 2513 2514 :term:`FIT_GENERATE_KEYS` 2515 Decides whether to generate the keys for signing fitImage if they 2516 don't already exist. The keys are created in ``UBOOT_SIGN_KEYDIR``. 2517 The default value is 0. 2518 2519 :term:`FIT_HASH_ALG` 2520 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. 2521 2522 :term:`FIT_KERNEL_COMP_ALG` 2523 Compression algorithm to use for the kernel image inside the FIT Image. 2524 At present, the only supported values are "gzip" (default) or "none" 2525 If you set this variable to anything other than "none" you may also need 2526 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. 2527 2528 :term:`FIT_KERNEL_COMP_ALG_EXTENSION` 2529 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default 2530 value is ".gz". 2531 2532 :term:`FIT_KEY_GENRSA_ARGS` 2533 Arguments to openssl genrsa for generating RSA private key for signing 2534 fitImage. The default value is "-F4". i.e. the public exponent 65537 to 2535 use. 2536 2537 :term:`FIT_KEY_REQ_ARGS` 2538 Arguments to openssl req for generating certificate for signing fitImage. 2539 The default value is "-batch -new". batch for non interactive mode 2540 and new for generating new keys. 2541 2542 :term:`FIT_KEY_SIGN_PKCS` 2543 Format for public key certificate used in signing fitImage. 2544 The default value is "x509". 2545 2546 :term:`FIT_SIGN_ALG` 2547 Specifies the signature algorithm used in creating the FIT Image. 2548 For e.g. rsa2048. 2549 2550 :term:`FIT_SIGN_NUMBITS` 2551 Size of private key in number of bits used in fitImage. The default 2552 value is "2048". 2553 2554 :term:`FIT_SIGN_INDIVIDUAL` 2555 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` 2556 class will sign the kernel, dtb and ramdisk images individually in addition 2557 to signing the fitImage itself. This could be useful if you are 2558 intending to verify signatures in another context than booting via 2559 U-Boot. 2560 2561 :term:`FONT_EXTRA_RDEPENDS` 2562 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, 2563 this variable specifies the runtime dependencies for font packages. 2564 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils". 2565 2566 :term:`FONT_PACKAGES` 2567 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class, 2568 this variable identifies packages containing font files that need to 2569 be cached by Fontconfig. By default, the ``fontcache`` class assumes 2570 that fonts are in the recipe's main package (i.e. 2571 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you 2572 need are in a package other than that main package. 2573 2574 :term:`FORCE_RO_REMOVE` 2575 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` 2576 during the generation of the root filesystem. 2577 2578 Set the variable to "1" to force the removal of these packages. 2579 2580 :term:`FULL_OPTIMIZATION` 2581 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when 2582 compiling an optimized system. This variable defaults to "-O2 -pipe 2583 ${DEBUG_FLAGS}". 2584 2585 :term:`GCCPIE` 2586 Enables Position Independent Executables (PIE) within the GNU C 2587 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented 2588 Programming (ROP) attacks much more difficult to execute. 2589 2590 By default the ``security_flags.inc`` file enables PIE by setting the 2591 variable as follows:: 2592 2593 GCCPIE ?= "--enable-default-pie" 2594 2595 :term:`GCCVERSION` 2596 Specifies the default version of the GNU C Compiler (GCC) used for 2597 compilation. By default, ``GCCVERSION`` is set to "8.x" in the 2598 ``meta/conf/distro/include/tcmode-default.inc`` include file:: 2599 2600 GCCVERSION ?= "8.%" 2601 2602 You can override this value by setting it in a 2603 configuration file such as the ``local.conf``. 2604 2605 :term:`GDB` 2606 The minimal command and arguments to run the GNU Debugger. 2607 2608 :term:`GITDIR` 2609 The directory in which a local copy of a Git repository is stored 2610 when it is cloned. 2611 2612 :term:`GLIBC_GENERATE_LOCALES` 2613 Specifies the list of GLIBC locales to generate should you not wish 2614 to generate all LIBC locals, which can be time consuming. 2615 2616 .. note:: 2617 2618 If you specifically remove the locale ``en_US.UTF-8``, you must set 2619 :term:`IMAGE_LINGUAS` appropriately. 2620 2621 You can set ``GLIBC_GENERATE_LOCALES`` in your ``local.conf`` file. 2622 By default, all locales are generated. 2623 :: 2624 2625 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" 2626 2627 :term:`GROUPADD_PARAM` 2628 When inheriting the :ref:`useradd <ref-classes-useradd>` class, 2629 this variable specifies for a package what parameters should be 2630 passed to the ``groupadd`` command if you wish to add a group to the 2631 system when the package is installed. 2632 2633 Here is an example from the ``dbus`` recipe:: 2634 2635 GROUPADD_PARAM_${PN} = "-r netdev" 2636 2637 For information on the standard Linux shell command 2638 ``groupadd``, see https://linux.die.net/man/8/groupadd. 2639 2640 :term:`GROUPMEMS_PARAM` 2641 When inheriting the :ref:`useradd <ref-classes-useradd>` class, 2642 this variable specifies for a package what parameters should be 2643 passed to the ``groupmems`` command if you wish to modify the members 2644 of a group when the package is installed. 2645 2646 For information on the standard Linux shell command ``groupmems``, 2647 see https://linux.die.net/man/8/groupmems. 2648 2649 :term:`GRUB_GFXSERIAL` 2650 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics 2651 and serial in the boot menu. Set this variable to "1" in your 2652 ``local.conf`` or distribution configuration file to enable graphics 2653 and serial in the menu. 2654 2655 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more 2656 information on how this variable is used. 2657 2658 :term:`GRUB_OPTS` 2659 Additional options to add to the GNU GRand Unified Bootloader (GRUB) 2660 configuration. Use a semi-colon character (``;``) to separate 2661 multiple options. 2662 2663 The ``GRUB_OPTS`` variable is optional. See the 2664 :ref:`grub-efi <ref-classes-grub-efi>` class for more information 2665 on how this variable is used. 2666 2667 :term:`GRUB_TIMEOUT` 2668 Specifies the timeout before executing the default ``LABEL`` in the 2669 GNU GRand Unified Bootloader (GRUB). 2670 2671 The ``GRUB_TIMEOUT`` variable is optional. See the 2672 :ref:`grub-efi <ref-classes-grub-efi>` class for more information 2673 on how this variable is used. 2674 2675 :term:`GTKIMMODULES_PACKAGES` 2676 When inheriting the 2677 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class, 2678 this variable specifies the packages that contain the GTK+ input 2679 method modules being installed when the modules are in packages other 2680 than the main package. 2681 2682 :term:`HOMEPAGE` 2683 Website where more information about the software the recipe is 2684 building can be found. 2685 2686 :term:`HOST_ARCH` 2687 The name of the target architecture, which is normally the same as 2688 :term:`TARGET_ARCH`. The OpenEmbedded build system 2689 supports many architectures. Here is an example list of architectures 2690 supported. This list is by no means complete as the architecture is 2691 configurable: 2692 2693 - arm 2694 - i586 2695 - x86_64 2696 - powerpc 2697 - powerpc64 2698 - mips 2699 - mipsel 2700 2701 :term:`HOST_CC_ARCH` 2702 Specifies architecture-specific compiler flags that are passed to the 2703 C compiler. 2704 2705 Default initialization for ``HOST_CC_ARCH`` varies depending on what 2706 is being built: 2707 2708 - :term:`TARGET_CC_ARCH` when building for the 2709 target 2710 2711 - :term:`BUILD_CC_ARCH` when building for the build host (i.e. 2712 ``-native``) 2713 2714 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. 2715 ``nativesdk-``) 2716 2717 :term:`HOST_OS` 2718 Specifies the name of the target operating system, which is normally 2719 the same as the :term:`TARGET_OS`. The variable can 2720 be set to "linux" for ``glibc``-based systems and to "linux-musl" for 2721 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and 2722 "linux-musleabi" values possible. 2723 2724 :term:`HOST_PREFIX` 2725 Specifies the prefix for the cross-compile toolchain. ``HOST_PREFIX`` 2726 is normally the same as :term:`TARGET_PREFIX`. 2727 2728 :term:`HOST_SYS` 2729 Specifies the system, including the architecture and the operating 2730 system, for which the build is occurring in the context of the 2731 current recipe. 2732 2733 The OpenEmbedded build system automatically sets this variable based 2734 on :term:`HOST_ARCH`, 2735 :term:`HOST_VENDOR`, and 2736 :term:`HOST_OS` variables. 2737 2738 .. note:: 2739 2740 You do not need to set the variable yourself. 2741 2742 Consider these two examples: 2743 2744 - Given a native recipe on a 32-bit x86 machine running Linux, the 2745 value is "i686-linux". 2746 2747 - Given a recipe being built for a little-endian MIPS target running 2748 Linux, the value might be "mipsel-linux". 2749 2750 :term:`HOSTTOOLS` 2751 A space-separated list (filter) of tools on the build host that 2752 should be allowed to be called from within build tasks. Using this 2753 filter helps reduce the possibility of host contamination. If a tool 2754 specified in the value of ``HOSTTOOLS`` is not found on the build 2755 host, the OpenEmbedded build system produces an error and the build 2756 is not started. 2757 2758 For additional information, see 2759 :term:`HOSTTOOLS_NONFATAL`. 2760 2761 :term:`HOSTTOOLS_NONFATAL` 2762 A space-separated list (filter) of tools on the build host that 2763 should be allowed to be called from within build tasks. Using this 2764 filter helps reduce the possibility of host contamination. Unlike 2765 :term:`HOSTTOOLS`, the OpenEmbedded build system 2766 does not produce an error if a tool specified in the value of 2767 ``HOSTTOOLS_NONFATAL`` is not found on the build host. Thus, you can 2768 use ``HOSTTOOLS_NONFATAL`` to filter optional host tools. 2769 2770 :term:`HOST_VENDOR` 2771 Specifies the name of the vendor. ``HOST_VENDOR`` is normally the 2772 same as :term:`TARGET_VENDOR`. 2773 2774 :term:`ICECC_DISABLED` 2775 Disables or enables the ``icecc`` (Icecream) function. For more 2776 information on this function and best practices for using this 2777 variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`" 2778 section. 2779 2780 Setting this variable to "1" in your ``local.conf`` disables the 2781 function:: 2782 2783 ICECC_DISABLED ??= "1" 2784 2785 To enable the function, set the variable as follows:: 2786 2787 ICECC_DISABLED = "" 2788 2789 :term:`ICECC_ENV_EXEC` 2790 Points to the ``icecc-create-env`` script that you provide. This 2791 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You 2792 set this variable in your ``local.conf`` file. 2793 2794 If you do not point to a script that you provide, the OpenEmbedded 2795 build system uses the default script provided by the 2796 ``icecc-create-env.bb`` recipe, which is a modified version and not 2797 the one that comes with ``icecc``. 2798 2799 :term:`ICECC_PARALLEL_MAKE` 2800 Extra options passed to the ``make`` command during the 2801 :ref:`ref-tasks-compile` task that specify parallel 2802 compilation. This variable usually takes the form of "-j x", where x 2803 represents the maximum number of parallel threads ``make`` can run. 2804 2805 .. note:: 2806 2807 The options passed affect builds on all enabled machines on the 2808 network, which are machines running the ``iceccd`` daemon. 2809 2810 If your enabled machines support multiple cores, coming up with the 2811 maximum number of parallel threads that gives you the best 2812 performance could take some experimentation since machine speed, 2813 network lag, available memory, and existing machine loads can all 2814 affect build time. Consequently, unlike the 2815 :term:`PARALLEL_MAKE` variable, there is no 2816 rule-of-thumb for setting ``ICECC_PARALLEL_MAKE`` to achieve optimal 2817 performance. 2818 2819 If you do not set ``ICECC_PARALLEL_MAKE``, the build system does not 2820 use it (i.e. the system does not detect and assign the number of 2821 cores as is done with ``PARALLEL_MAKE``). 2822 2823 :term:`ICECC_PATH` 2824 The location of the ``icecc`` binary. You can set this variable in 2825 your ``local.conf`` file. If your ``local.conf`` file does not define 2826 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts 2827 to define it by locating ``icecc`` using ``which``. 2828 2829 :term:`ICECC_USER_CLASS_BL` 2830 Identifies user classes that you do not want the Icecream distributed 2831 compile support to consider. This variable is used by the 2832 :ref:`icecc <ref-classes-icecc>` class. You set this variable in 2833 your ``local.conf`` file. 2834 2835 When you list classes using this variable, you are "blacklisting" 2836 them from distributed compilation across remote hosts. Any classes 2837 you list will be distributed and compiled locally. 2838 2839 :term:`ICECC_USER_PACKAGE_BL` 2840 Identifies user recipes that you do not want the Icecream distributed 2841 compile support to consider. This variable is used by the 2842 :ref:`icecc <ref-classes-icecc>` class. You set this variable in 2843 your ``local.conf`` file. 2844 2845 When you list packages using this variable, you are "blacklisting" 2846 them from distributed compilation across remote hosts. Any packages 2847 you list will be distributed and compiled locally. 2848 2849 :term:`ICECC_USER_PACKAGE_WL` 2850 Identifies user recipes that use an empty 2851 :term:`PARALLEL_MAKE` variable that you want to 2852 force remote distributed compilation on using the Icecream 2853 distributed compile support. This variable is used by the 2854 :ref:`icecc <ref-classes-icecc>` class. You set this variable in 2855 your ``local.conf`` file. 2856 2857 :term:`IMAGE_BASENAME` 2858 The base name of image output files. This variable defaults to the 2859 recipe name (``${``\ :term:`PN`\ ``}``). 2860 2861 :term:`IMAGE_EFI_BOOT_FILES` 2862 A space-separated list of files installed into the boot partition 2863 when preparing an image using the Wic tool with the 2864 ``bootimg-efi`` source plugin. By default, 2865 the files are 2866 installed under the same name as the source files. To change the 2867 installed name, separate it from the original name with a semi-colon 2868 (;). Source files need to be located in 2869 :term:`DEPLOY_DIR_IMAGE`. Here are two 2870 examples:: 2871 2872 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" 2873 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" 2874 2875 Alternatively, source files can be picked up using a glob pattern. In 2876 this case, the destination file must have the same name as the base 2877 name of the source file path. To install files into a directory 2878 within the target location, pass its name after a semi-colon (;). 2879 Here are two examples:: 2880 2881 IMAGE_EFI_BOOT_FILES = "boot/loader/*" 2882 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" 2883 2884 The first example 2885 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` 2886 into the root of the target partition. The second example installs 2887 the same files into a ``boot`` directory within the target partition. 2888 2889 You can find information on how to use the Wic tool in the 2890 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" 2891 section of the Yocto Project Development Tasks Manual. Reference 2892 material for Wic is located in the 2893 ":doc:`/ref-manual/kickstart`" chapter. 2894 2895 :term:`IMAGE_BOOT_FILES` 2896 A space-separated list of files installed into the boot partition 2897 when preparing an image using the Wic tool with the 2898 ``bootimg-partition`` source plugin. By default, 2899 the files are 2900 installed under the same name as the source files. To change the 2901 installed name, separate it from the original name with a semi-colon 2902 (;). Source files need to be located in 2903 :term:`DEPLOY_DIR_IMAGE`. Here are two 2904 examples:: 2905 2906 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" 2907 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" 2908 2909 Alternatively, source files can be picked up using a glob pattern. In 2910 this case, the destination file must have the same name as the base 2911 name of the source file path. To install files into a directory 2912 within the target location, pass its name after a semi-colon (;). 2913 Here are two examples:: 2914 2915 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" 2916 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" 2917 2918 The first example 2919 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` 2920 into the root of the target partition. The second example installs 2921 the same files into a ``boot`` directory within the target partition. 2922 2923 You can find information on how to use the Wic tool in the 2924 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" 2925 section of the Yocto Project Development Tasks Manual. Reference 2926 material for Wic is located in the 2927 ":doc:`/ref-manual/kickstart`" chapter. 2928 2929 :term:`IMAGE_CLASSES` 2930 A list of classes that all images should inherit. You typically use 2931 this variable to specify the list of classes that register the 2932 different types of images the OpenEmbedded build system creates. 2933 2934 The default value for ``IMAGE_CLASSES`` is ``image_types``. You can 2935 set this variable in your ``local.conf`` or in a distribution 2936 configuration file. 2937 2938 For more information, see ``meta/classes/image_types.bbclass`` in the 2939 :term:`Source Directory`. 2940 2941 :term:`IMAGE_CMD` 2942 Specifies the command to create the image file for a specific image 2943 type, which corresponds to the value set in 2944 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, 2945 ``btrfs``, and so forth). When setting this variable, you should use 2946 an override for the associated type. Here is an example:: 2947 2948 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \ 2949 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ 2950 ${EXTRA_IMAGECMD}" 2951 2952 You typically do not need to set this variable unless you are adding 2953 support for a new image type. For more examples on how to set this 2954 variable, see the :ref:`image_types <ref-classes-image_types>` 2955 class file, which is ``meta/classes/image_types.bbclass``. 2956 2957 :term:`IMAGE_DEVICE_TABLES` 2958 Specifies one or more files that contain custom device tables that 2959 are passed to the ``makedevs`` command as part of creating an image. 2960 These files list basic device nodes that should be created under 2961 ``/dev`` within the image. If ``IMAGE_DEVICE_TABLES`` is not set, 2962 ``files/device_table-minimal.txt`` is used, which is located by 2963 :term:`BBPATH`. For details on how you should write 2964 device table files, see ``meta/files/device_table-minimal.txt`` as an 2965 example. 2966 2967 :term:`IMAGE_FEATURES` 2968 The primary list of features to include in an image. Typically, you 2969 configure this variable in an image recipe. Although you can use this 2970 variable from your ``local.conf`` file, which is found in the 2971 :term:`Build Directory`, best practices dictate that you do 2972 not. 2973 2974 .. note:: 2975 2976 To enable extra features from outside the image recipe, use the 2977 :term:`EXTRA_IMAGE_FEATURES` variable. 2978 2979 For a list of image features that ships with the Yocto Project, see 2980 the ":ref:`ref-features-image`" section. 2981 2982 For an example that shows how to customize your image by using this 2983 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" 2984 section in the Yocto Project Development Tasks Manual. 2985 2986 :term:`IMAGE_FSTYPES` 2987 Specifies the formats the OpenEmbedded build system uses during the 2988 build when creating the root filesystem. For example, setting 2989 ``IMAGE_FSTYPES`` as follows causes the build system to create root 2990 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: 2991 2992 IMAGE_FSTYPES = "ext3 tar.bz2" 2993 2994 For the complete list of supported image formats from which you can 2995 choose, see :term:`IMAGE_TYPES`. 2996 2997 .. note:: 2998 2999 - If an image recipe uses the "inherit image" line and you are 3000 setting ``IMAGE_FSTYPES`` inside the recipe, you must set 3001 ``IMAGE_FSTYPES`` prior to using the "inherit image" line. 3002 3003 - Due to the way the OpenEmbedded build system processes this 3004 variable, you cannot update its contents by using ``_append`` 3005 or ``_prepend``. You must use the ``+=`` operator to add one or 3006 more options to the ``IMAGE_FSTYPES`` variable. 3007 3008 :term:`IMAGE_INSTALL` 3009 Used by recipes to specify the packages to install into an image 3010 through the :ref:`image <ref-classes-image>` class. Use the 3011 ``IMAGE_INSTALL`` variable with care to avoid ordering issues. 3012 3013 Image recipes set ``IMAGE_INSTALL`` to specify the packages to 3014 install into an image through ``image.bbclass``. Additionally, 3015 there are "helper" classes such as the 3016 :ref:`core-image <ref-classes-core-image>` class which can 3017 take lists used with ``IMAGE_FEATURES`` and turn them into 3018 auto-generated entries in ``IMAGE_INSTALL`` in addition to its 3019 default contents. 3020 3021 When you use this variable, it is best to use it as follows:: 3022 3023 IMAGE_INSTALL_append = " package-name" 3024 3025 Be sure to include the space 3026 between the quotation character and the start of the package name or 3027 names. 3028 3029 .. note:: 3030 3031 - When working with a 3032 :ref:`core-image-minimal-initramfs <ref-manual/images:images>` 3033 image, do not use the ``IMAGE_INSTALL`` variable to specify 3034 packages for installation. Instead, use the 3035 :term:`PACKAGE_INSTALL` variable, which 3036 allows the initial RAM filesystem (initramfs) recipe to use a 3037 fixed set of packages and not be affected by ``IMAGE_INSTALL``. 3038 For information on creating an initramfs, see the 3039 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" 3040 section in the Yocto Project Development Tasks Manual. 3041 3042 - Using ``IMAGE_INSTALL`` with the 3043 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>` 3044 BitBake operator within the ``/conf/local.conf`` file or from 3045 within an image recipe is not recommended. Use of this operator 3046 in these ways can cause ordering issues. Since 3047 ``core-image.bbclass`` sets ``IMAGE_INSTALL`` to a default 3048 value using the 3049 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` 3050 operator, using a ``+=`` operation against ``IMAGE_INSTALL`` 3051 results in unexpected behavior when used within 3052 ``conf/local.conf``. Furthermore, the same operation from 3053 within an image recipe may or may not succeed depending on the 3054 specific situation. In both these cases, the behavior is 3055 contrary to how most users expect the ``+=`` operator to work. 3056 3057 :term:`IMAGE_LINGUAS` 3058 Specifies the list of locales to install into the image during the 3059 root filesystem construction process. The OpenEmbedded build system 3060 automatically splits locale files, which are used for localization, 3061 into separate packages. Setting the ``IMAGE_LINGUAS`` variable 3062 ensures that any locale packages that correspond to packages already 3063 selected for installation into the image are also installed. Here is 3064 an example:: 3065 3066 IMAGE_LINGUAS = "pt-br de-de" 3067 3068 In this example, the build system ensures any Brazilian Portuguese 3069 and German locale files that correspond to packages in the image are 3070 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as 3071 ``*-locale-pt`` and ``*-locale-de``, since some software packages 3072 only provide locale files by language and not by country-specific 3073 language). 3074 3075 See the :term:`GLIBC_GENERATE_LOCALES` 3076 variable for information on generating GLIBC locales. 3077 3078 3079 :term:`IMAGE_LINK_NAME` 3080 The name of the output image symlink (which does not include 3081 the version part as :term:`IMAGE_NAME` does). The default value 3082 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` 3083 variables:: 3084 3085 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" 3086 3087 3088 :term:`IMAGE_MANIFEST` 3089 The manifest file for the image. This file lists all the installed 3090 packages that make up the image. The file contains package 3091 information on a line-per-package basis as follows:: 3092 3093 packagename packagearch version 3094 3095 The :ref:`image <ref-classes-image>` class defines the manifest 3096 file as follows:: 3097 3098 IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" 3099 3100 The location is 3101 derived using the :term:`DEPLOY_DIR_IMAGE` 3102 and :term:`IMAGE_NAME` variables. You can find 3103 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`" 3104 section in the Yocto Project Overview and Concepts Manual. 3105 3106 :term:`IMAGE_NAME` 3107 The name of the output image files minus the extension. This variable 3108 is derived using the :term:`IMAGE_BASENAME`, 3109 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` 3110 variables:: 3111 3112 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3113 3114 :term:`IMAGE_NAME_SUFFIX` 3115 Suffix used for the image output file name - defaults to ``".rootfs"`` 3116 to distinguish the image file from other files created during image 3117 building; however if this suffix is redundant or not desired you can 3118 clear the value of this variable (set the value to ""). For example, 3119 this is typically cleared in initramfs image recipes. 3120 3121 :term:`IMAGE_OVERHEAD_FACTOR` 3122 Defines a multiplier that the build system applies to the initial 3123 image size for cases when the multiplier times the returned disk 3124 usage value for the image is greater than the sum of 3125 ``IMAGE_ROOTFS_SIZE`` and ``IMAGE_ROOTFS_EXTRA_SPACE``. The result of 3126 the multiplier applied to the initial image size creates free disk 3127 space in the image as overhead. By default, the build process uses a 3128 multiplier of 1.3 for this variable. This default value results in 3129 30% free disk space added to the image when this method is used to 3130 determine the final generated image size. You should be aware that 3131 post install scripts and the package management system uses disk 3132 space inside this overhead area. Consequently, the multiplier does 3133 not produce an image with all the theoretical free disk space. See 3134 ``IMAGE_ROOTFS_SIZE`` for information on how the build system 3135 determines the overall image size. 3136 3137 The default 30% free disk space typically gives the image enough room 3138 to boot and allows for basic post installs while still leaving a 3139 small amount of free disk space. If 30% free space is inadequate, you 3140 can increase the default value. For example, the following setting 3141 gives you 50% free space added to the image:: 3142 3143 IMAGE_OVERHEAD_FACTOR = "1.5" 3144 3145 Alternatively, you can ensure a specific amount of free disk space is 3146 added to the image by using the ``IMAGE_ROOTFS_EXTRA_SPACE`` 3147 variable. 3148 3149 :term:`IMAGE_PKGTYPE` 3150 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the 3151 OpenEmbedded build system. The variable is defined appropriately by 3152 the :ref:`package_deb <ref-classes-package_deb>`, 3153 :ref:`package_rpm <ref-classes-package_rpm>`, 3154 :ref:`package_ipk <ref-classes-package_ipk>`, or 3155 :ref:`package_tar <ref-classes-package_tar>` class. 3156 3157 .. note:: 3158 3159 The ``package_tar`` class is broken and is not supported. It is 3160 recommended that you do not use it. 3161 3162 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and 3163 :ref:`image <ref-classes-image>` classes use the ``IMAGE_PKGTYPE`` 3164 for packaging up images and SDKs. 3165 3166 You should not set the ``IMAGE_PKGTYPE`` manually. Rather, the 3167 variable is set indirectly through the appropriate 3168 :ref:`package_* <ref-classes-package>` class using the 3169 :term:`PACKAGE_CLASSES` variable. The 3170 OpenEmbedded build system uses the first package type (e.g. DEB, RPM, 3171 or IPK) that appears with the variable 3172 3173 .. note:: 3174 3175 Files using the ``.tar`` format are never used as a substitute 3176 packaging format for DEB, RPM, and IPK formatted files for your image 3177 or SDK. 3178 3179 :term:`IMAGE_POSTPROCESS_COMMAND` 3180 Specifies a list of functions to call once the OpenEmbedded build 3181 system creates the final image output files. You can specify 3182 functions separated by semicolons:: 3183 3184 IMAGE_POSTPROCESS_COMMAND += "function; ... " 3185 3186 If you need to pass the root filesystem path to a command within the 3187 function, you can use ``${IMAGE_ROOTFS}``, which points to the 3188 directory that becomes the root filesystem image. See the 3189 :term:`IMAGE_ROOTFS` variable for more 3190 information. 3191 3192 :term:`IMAGE_PREPROCESS_COMMAND` 3193 Specifies a list of functions to call before the OpenEmbedded build 3194 system creates the final image output files. You can specify 3195 functions separated by semicolons:: 3196 3197 IMAGE_PREPROCESS_COMMAND += "function; ... " 3198 3199 If you need to pass the root filesystem path to a command within the 3200 function, you can use ``${IMAGE_ROOTFS}``, which points to the 3201 directory that becomes the root filesystem image. See the 3202 :term:`IMAGE_ROOTFS` variable for more 3203 information. 3204 3205 :term:`IMAGE_ROOTFS` 3206 The location of the root filesystem while it is under construction 3207 (i.e. during the :ref:`ref-tasks-rootfs` task). This 3208 variable is not configurable. Do not change it. 3209 3210 :term:`IMAGE_ROOTFS_ALIGNMENT` 3211 Specifies the alignment for the output image file in Kbytes. If the 3212 size of the image is not a multiple of this value, then the size is 3213 rounded up to the nearest multiple of the value. The default value is 3214 "1". See :term:`IMAGE_ROOTFS_SIZE` for 3215 additional information. 3216 3217 :term:`IMAGE_ROOTFS_EXTRA_SPACE` 3218 Defines additional free disk space created in the image in Kbytes. By 3219 default, this variable is set to "0". This free disk space is added 3220 to the image after the build system determines the image size as 3221 described in ``IMAGE_ROOTFS_SIZE``. 3222 3223 This variable is particularly useful when you want to ensure that a 3224 specific amount of free disk space is available on a device after an 3225 image is installed and running. For example, to be sure 5 Gbytes of 3226 free disk space is available, set the variable as follows:: 3227 3228 IMAGE_ROOTFS_EXTRA_SPACE = "5242880" 3229 3230 For example, the Yocto Project Build Appliance specifically requests 3231 40 Gbytes of extra space with the line:: 3232 3233 IMAGE_ROOTFS_EXTRA_SPACE = "41943040" 3234 3235 :term:`IMAGE_ROOTFS_SIZE` 3236 Defines the size in Kbytes for the generated image. The OpenEmbedded 3237 build system determines the final size for the generated image using 3238 an algorithm that takes into account the initial disk space used for 3239 the generated image, a requested size for the image, and requested 3240 additional free disk space to be added to the image. Programatically, 3241 the build system determines the final size of the generated image as 3242 follows:: 3243 3244 if (image-du * overhead) < rootfs-size: 3245 internal-rootfs-size = rootfs-size + xspace 3246 else: 3247 internal-rootfs-size = (image-du * overhead) + xspace 3248 where: 3249 image-du = Returned value of the du command on the image. 3250 overhead = IMAGE_OVERHEAD_FACTOR 3251 rootfs-size = IMAGE_ROOTFS_SIZE 3252 internal-rootfs-size = Initial root filesystem size before any modifications. 3253 xspace = IMAGE_ROOTFS_EXTRA_SPACE 3254 3255 See the :term:`IMAGE_OVERHEAD_FACTOR` 3256 and :term:`IMAGE_ROOTFS_EXTRA_SPACE` 3257 variables for related information. 3258 3259 :term:`IMAGE_TYPEDEP` 3260 Specifies a dependency from one image type on another. Here is an 3261 example from the :ref:`image-live <ref-classes-image-live>` class:: 3262 3263 IMAGE_TYPEDEP_live = "ext3" 3264 3265 In the previous example, the variable ensures that when "live" is 3266 listed with the :term:`IMAGE_FSTYPES` variable, 3267 the OpenEmbedded build system produces an ``ext3`` image first since 3268 one of the components of the live image is an ``ext3`` formatted 3269 partition containing the root filesystem. 3270 3271 :term:`IMAGE_TYPES` 3272 Specifies the complete list of supported image types by default: 3273 3274 - btrfs 3275 - container 3276 - cpio 3277 - cpio.gz 3278 - cpio.lz4 3279 - cpio.lzma 3280 - cpio.xz 3281 - cramfs 3282 - ext2 3283 - ext2.bz2 3284 - ext2.gz 3285 - ext2.lzma 3286 - ext3 3287 - ext3.gz 3288 - ext4 3289 - ext4.gz 3290 - f2fs 3291 - hddimg 3292 - iso 3293 - jffs2 3294 - jffs2.sum 3295 - multiubi 3296 - squashfs 3297 - squashfs-lz4 3298 - squashfs-lzo 3299 - squashfs-xz 3300 - tar 3301 - tar.bz2 3302 - tar.gz 3303 - tar.lz4 3304 - tar.xz 3305 - tar.zst 3306 - ubi 3307 - ubifs 3308 - wic 3309 - wic.bz2 3310 - wic.gz 3311 - wic.lzma 3312 3313 For more information about these types of images, see 3314 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`. 3315 3316 :term:`IMAGE_VERSION_SUFFIX` 3317 Version suffix that is part of the default :term:`IMAGE_NAME` and 3318 :term:`KERNEL_ARTIFACT_NAME` values. 3319 Defaults to ``"-${DATETIME}"``, however you could set this to a 3320 version string that comes from your external build environment if 3321 desired, and this suffix would then be used consistently across 3322 the build artifacts. 3323 3324 :term:`INC_PR` 3325 Helps define the recipe revision for recipes that share a common 3326 ``include`` file. You can think of this variable as part of the 3327 recipe revision as set from within an include file. 3328 3329 Suppose, for example, you have a set of recipes that are used across 3330 several projects. And, within each of those recipes the revision (its 3331 :term:`PR` value) is set accordingly. In this case, when 3332 the revision of those recipes changes, the burden is on you to find 3333 all those recipes and be sure that they get changed to reflect the 3334 updated version of the recipe. In this scenario, it can get 3335 complicated when recipes that are used in many places and provide 3336 common functionality are upgraded to a new revision. 3337 3338 A more efficient way of dealing with this situation is to set the 3339 ``INC_PR`` variable inside the ``include`` files that the recipes 3340 share and then expand the ``INC_PR`` variable within the recipes to 3341 help define the recipe revision. 3342 3343 The following provides an example that shows how to use the 3344 ``INC_PR`` variable given a common ``include`` file that defines the 3345 variable. Once the variable is defined in the ``include`` file, you 3346 can use the variable to set the ``PR`` values in each recipe. You 3347 will notice that when you set a recipe's ``PR`` you can provide more 3348 granular revisioning by appending values to the ``INC_PR`` variable:: 3349 3350 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" 3351 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" 3352 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" 3353 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" 3354 3355 The 3356 first line of the example establishes the baseline revision to be 3357 used for all recipes that use the ``include`` file. The remaining 3358 lines in the example are from individual recipes and show how the 3359 ``PR`` value is set. 3360 3361 :term:`INCOMPATIBLE_LICENSE` 3362 Specifies a space-separated list of license names (as they would 3363 appear in :term:`LICENSE`) that should be excluded 3364 from the build. Recipes that provide no alternatives to listed 3365 incompatible licenses are not built. Packages that are individually 3366 licensed with the specified incompatible licenses will be deleted. 3367 3368 .. note:: 3369 3370 This functionality is only regularly tested using the following 3371 setting:: 3372 3373 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" 3374 3375 3376 Although you can use other settings, you might be required to 3377 remove dependencies on or provide alternatives to components that 3378 are required to produce a functional system image. 3379 3380 .. note:: 3381 3382 It is possible to define a list of licenses that are allowed to be 3383 used instead of the licenses that are excluded. To do this, define 3384 a variable ``COMPATIBLE_LICENSES`` with the names of the licenses 3385 that are allowed. Then define ``INCOMPATIBLE_LICENSE`` as:: 3386 3387 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}" 3388 3389 3390 This will result in ``INCOMPATIBLE_LICENSE`` containing the names of 3391 all licenses from :term:`AVAILABLE_LICENSES` except the ones specified 3392 in ``COMPATIBLE_LICENSES``, thus only allowing the latter licenses to 3393 be used. 3394 3395 :term:`INHERIT` 3396 Causes the named class or classes to be inherited globally. Anonymous 3397 functions in the class or classes are not executed for the base 3398 configuration and in each individual recipe. The OpenEmbedded build 3399 system ignores changes to ``INHERIT`` in individual recipes. 3400 3401 For more information on ``INHERIT``, see the 3402 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" 3403 section in the Bitbake User Manual. 3404 3405 :term:`INHERIT_DISTRO` 3406 Lists classes that will be inherited at the distribution level. It is 3407 unlikely that you want to edit this variable. 3408 3409 The default value of the variable is set as follows in the 3410 ``meta/conf/distro/defaultsetup.conf`` file:: 3411 3412 INHERIT_DISTRO ?= "debian devshell sstate license" 3413 3414 :term:`INHIBIT_DEFAULT_DEPS` 3415 Prevents the default dependencies, namely the C compiler and standard 3416 C library (libc), from being added to :term:`DEPENDS`. 3417 This variable is usually used within recipes that do not require any 3418 compilation using the C compiler. 3419 3420 Set the variable to "1" to prevent the default dependencies from 3421 being added. 3422 3423 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` 3424 Prevents the OpenEmbedded build system from splitting out debug 3425 information during packaging. By default, the build system splits out 3426 debugging information during the 3427 :ref:`ref-tasks-package` task. For more information on 3428 how debug information is split out, see the 3429 :term:`PACKAGE_DEBUG_SPLIT_STYLE` 3430 variable. 3431 3432 To prevent the build system from splitting out debug information 3433 during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as 3434 follows:: 3435 3436 INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 3437 3438 :term:`INHIBIT_PACKAGE_STRIP` 3439 If set to "1", causes the build to not strip binaries in resulting 3440 packages and prevents the ``-dbg`` package from containing the source 3441 files. 3442 3443 By default, the OpenEmbedded build system strips binaries and puts 3444 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. 3445 Consequently, you should not set ``INHIBIT_PACKAGE_STRIP`` when you 3446 plan to debug in general. 3447 3448 :term:`INHIBIT_SYSROOT_STRIP` 3449 If set to "1", causes the build to not strip binaries in the 3450 resulting sysroot. 3451 3452 By default, the OpenEmbedded build system strips binaries in the 3453 resulting sysroot. When you specifically set the 3454 ``INHIBIT_SYSROOT_STRIP`` variable to "1" in your recipe, you inhibit 3455 this stripping. 3456 3457 If you want to use this variable, include the 3458 :ref:`staging <ref-classes-staging>` class. This class uses a 3459 ``sys_strip()`` function to test for the variable and acts 3460 accordingly. 3461 3462 .. note:: 3463 3464 Use of the ``INHIBIT_SYSROOT_STRIP`` variable occurs in rare and 3465 special circumstances. For example, suppose you are building 3466 bare-metal firmware by using an external GCC toolchain. Furthermore, 3467 even if the toolchain's binaries are strippable, there are other files 3468 needed for the build that are not strippable. 3469 3470 :term:`INITRAMFS_FSTYPES` 3471 Defines the format for the output image of an initial RAM filesystem 3472 (initramfs), which is used during boot. Supported formats are the 3473 same as those supported by the 3474 :term:`IMAGE_FSTYPES` variable. 3475 3476 The default value of this variable, which is set in the 3477 ``meta/conf/bitbake.conf`` configuration file in the 3478 :term:`Source Directory`, is "cpio.gz". The Linux kernel's 3479 initramfs mechanism, as opposed to the initial RAM filesystem 3480 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects 3481 an optionally compressed cpio archive. 3482 3483 :term:`INITRAMFS_IMAGE` 3484 Specifies the :term:`PROVIDES` name of an image 3485 recipe that is used to build an initial RAM filesystem (initramfs) 3486 image. In other words, the ``INITRAMFS_IMAGE`` variable causes an 3487 additional recipe to be built as a dependency to whatever root 3488 filesystem recipe you might be using (e.g. ``core-image-sato``). The 3489 initramfs image recipe you provide should set 3490 :term:`IMAGE_FSTYPES` to 3491 :term:`INITRAMFS_FSTYPES`. 3492 3493 An initramfs image provides a temporary root filesystem used for 3494 early system initialization (e.g. loading of modules needed to locate 3495 and mount the "real" root filesystem). 3496 3497 .. note:: 3498 3499 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` 3500 recipe in the :term:`Source Directory` 3501 for an example initramfs recipe. To select this sample recipe as 3502 the one built to provide the initramfs image, set ``INITRAMFS_IMAGE`` 3503 to "core-image-minimal-initramfs". 3504 3505 You can also find more information by referencing the 3506 ``meta-poky/conf/local.conf.sample.extended`` configuration file in 3507 the Source Directory, the :ref:`image <ref-classes-image>` class, 3508 and the :ref:`kernel <ref-classes-kernel>` class to see how to use 3509 the ``INITRAMFS_IMAGE`` variable. 3510 3511 If ``INITRAMFS_IMAGE`` is empty, which is the default, then no 3512 initramfs image is built. 3513 3514 For more information, you can also see the 3515 :term:`INITRAMFS_IMAGE_BUNDLE` 3516 variable, which allows the generated image to be bundled inside the 3517 kernel image. Additionally, for information on creating an initramfs 3518 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section 3519 in the Yocto Project Development Tasks Manual. 3520 3521 :term:`INITRAMFS_IMAGE_BUNDLE` 3522 Controls whether or not the image recipe specified by 3523 :term:`INITRAMFS_IMAGE` is run through an 3524 extra pass 3525 (:ref:`ref-tasks-bundle_initramfs`) during 3526 kernel compilation in order to build a single binary that contains 3527 both the kernel image and the initial RAM filesystem (initramfs) 3528 image. This makes use of the 3529 :term:`CONFIG_INITRAMFS_SOURCE` kernel 3530 feature. 3531 3532 .. note:: 3533 3534 Using an extra compilation pass to bundle the initramfs avoids a 3535 circular dependency between the kernel recipe and the initramfs 3536 recipe should the initramfs include kernel modules. Should that be 3537 the case, the initramfs recipe depends on the kernel for the 3538 kernel modules, and the kernel depends on the initramfs recipe 3539 since the initramfs is bundled inside the kernel image. 3540 3541 The combined binary is deposited into the ``tmp/deploy`` directory, 3542 which is part of the :term:`Build Directory`. 3543 3544 Setting the variable to "1" in a configuration file causes the 3545 OpenEmbedded build system to generate a kernel image with the 3546 initramfs specified in ``INITRAMFS_IMAGE`` bundled within:: 3547 3548 INITRAMFS_IMAGE_BUNDLE = "1" 3549 3550 By default, the 3551 :ref:`kernel <ref-classes-kernel>` class sets this variable to a 3552 null string as follows:: 3553 3554 INITRAMFS_IMAGE_BUNDLE ?= "" 3555 3556 .. note:: 3557 3558 You must set the ``INITRAMFS_IMAGE_BUNDLE`` variable in a 3559 configuration file. You cannot set the variable in a recipe file. 3560 3561 See the 3562 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>` 3563 file for additional information. Also, for information on creating an 3564 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section 3565 in the Yocto Project Development Tasks Manual. 3566 3567 :term:`INITRAMFS_LINK_NAME` 3568 The link name of the initial RAM filesystem image. This variable is 3569 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as 3570 follows:: 3571 3572 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" 3573 3574 The value of the 3575 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same 3576 file, has the following value:: 3577 3578 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 3579 3580 See the :term:`MACHINE` variable for additional 3581 information. 3582 3583 :term:`INITRAMFS_NAME` 3584 The base name of the initial RAM filesystem image. This variable is 3585 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as 3586 follows:: 3587 3588 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" 3589 3590 The value of the :term:`KERNEL_ARTIFACT_NAME` 3591 variable, which is set in the same file, has the following value:: 3592 3593 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3594 3595 :term:`INITRD` 3596 Indicates list of filesystem images to concatenate and use as an 3597 initial RAM disk (``initrd``). 3598 3599 The ``INITRD`` variable is an optional variable used with the 3600 :ref:`image-live <ref-classes-image-live>` class. 3601 3602 :term:`INITRD_IMAGE` 3603 When building a "live" bootable image (i.e. when 3604 :term:`IMAGE_FSTYPES` contains "live"), 3605 ``INITRD_IMAGE`` specifies the image recipe that should be built to 3606 provide the initial RAM disk image. The default value is 3607 "core-image-minimal-initramfs". 3608 3609 See the :ref:`image-live <ref-classes-image-live>` class for more 3610 information. 3611 3612 :term:`INITSCRIPT_NAME` 3613 The filename of the initialization script as installed to 3614 ``${sysconfdir}/init.d``. 3615 3616 This variable is used in recipes when using ``update-rc.d.bbclass``. 3617 The variable is mandatory. 3618 3619 :term:`INITSCRIPT_PACKAGES` 3620 A list of the packages that contain initscripts. If multiple packages 3621 are specified, you need to append the package name to the other 3622 ``INITSCRIPT_*`` as an override. 3623 3624 This variable is used in recipes when using ``update-rc.d.bbclass``. 3625 The variable is optional and defaults to the :term:`PN` 3626 variable. 3627 3628 :term:`INITSCRIPT_PARAMS` 3629 Specifies the options to pass to ``update-rc.d``. Here is an example:: 3630 3631 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." 3632 3633 In this example, the script has a runlevel of 99, starts the script 3634 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. 3635 3636 The variable's default value is "defaults", which is set in the 3637 :ref:`update-rc.d <ref-classes-update-rc.d>` class. 3638 3639 The value in ``INITSCRIPT_PARAMS`` is passed through to the 3640 ``update-rc.d`` command. For more information on valid parameters, 3641 please see the ``update-rc.d`` manual page at 3642 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html 3643 3644 :term:`INSANE_SKIP` 3645 Specifies the QA checks to skip for a specific package within a 3646 recipe. For example, to skip the check for symbolic link ``.so`` 3647 files in the main package of a recipe, add the following to the 3648 recipe. The package name override must be used, which in this example 3649 is ``${PN}``:: 3650 3651 INSANE_SKIP_${PN} += "dev-so" 3652 3653 See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a 3654 list of the valid QA checks you can specify using this variable. 3655 3656 :term:`INSTALL_TIMEZONE_FILE` 3657 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. 3658 Set the ``INSTALL_TIMEZONE_FILE`` variable to "0" at the 3659 configuration level to disable this behavior. 3660 3661 :term:`IPK_FEED_URIS` 3662 When the IPK backend is in use and package management is enabled on 3663 the target, you can use this variable to set up ``opkg`` in the 3664 target image to point to package feeds on a nominated server. Once 3665 the feed is established, you can perform installations or upgrades 3666 using the package manager at runtime. 3667 3668 :term:`KARCH` 3669 Defines the kernel architecture used when assembling the 3670 configuration. Architectures supported for this release are: 3671 3672 - powerpc 3673 - i386 3674 - x86_64 3675 - arm 3676 - qemu 3677 - mips 3678 3679 You define the ``KARCH`` variable in the :ref:`kernel-dev/advanced:bsp descriptions`. 3680 3681 :term:`KBRANCH` 3682 A regular expression used by the build process to explicitly identify 3683 the kernel branch that is validated, patched, and configured during a 3684 build. You must set this variable to ensure the exact kernel branch 3685 you want is being used by the build process. 3686 3687 Values for this variable are set in the kernel's recipe file and the 3688 kernel's append file. For example, if you are using the 3689 ``linux-yocto_4.12`` kernel, the kernel recipe file is the 3690 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH`` 3691 is set as follows in that kernel recipe file:: 3692 3693 KBRANCH ?= "standard/base" 3694 3695 This variable is also used from the kernel's append file to identify 3696 the kernel branch specific to a particular machine or target 3697 hardware. Continuing with the previous kernel example, the kernel's 3698 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the 3699 BSP layer for a given machine. For example, the append file for the 3700 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA 3701 machines (``meta-yocto-bsp``) is named 3702 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. 3703 Here are the related statements from that append file:: 3704 3705 KBRANCH_genericx86 = "standard/base" 3706 KBRANCH_genericx86-64 = "standard/base" 3707 KBRANCH_edgerouter = "standard/edgerouter" 3708 KBRANCH_beaglebone = "standard/beaglebone" 3709 3710 The ``KBRANCH`` statements 3711 identify the kernel branch to use when building for each supported 3712 BSP. 3713 3714 :term:`KBUILD_DEFCONFIG` 3715 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` 3716 class, specifies an "in-tree" kernel configuration file for use 3717 during a kernel build. 3718 3719 Typically, when using a ``defconfig`` to configure a kernel during a 3720 build, you place the file in your layer in the same manner as you 3721 would place patch files and configuration fragment files (i.e. 3722 "out-of-tree"). However, if you want to use a ``defconfig`` file that 3723 is part of the kernel tree (i.e. "in-tree"), you can use the 3724 ``KBUILD_DEFCONFIG`` variable and append the 3725 :term:`KMACHINE` variable to point to the 3726 ``defconfig`` file. 3727 3728 To use the variable, set it in the append file for your kernel recipe 3729 using the following form:: 3730 3731 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file 3732 3733 Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses 3734 a ``defconfig`` file named "bcm2709_defconfig":: 3735 3736 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig" 3737 3738 As an alternative, you can use the following within your append file:: 3739 3740 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file 3741 3742 For more 3743 information on how to use the ``KBUILD_DEFCONFIG`` variable, see the 3744 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" 3745 section in the Yocto Project Linux Kernel Development Manual. 3746 3747 :term:`KCONFIG_MODE` 3748 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>` 3749 class, specifies the kernel configuration values to use for options 3750 not specified in the provided ``defconfig`` file. Valid options are:: 3751 3752 KCONFIG_MODE = "alldefconfig" 3753 KCONFIG_MODE = "allnoconfig" 3754 3755 In ``alldefconfig`` mode the options not explicitly specified will be 3756 assigned their Kconfig default value. In ``allnoconfig`` mode the 3757 options not explicitly specified will be disabled in the kernel 3758 config. 3759 3760 In case ``KCONFIG_MODE`` is not set the behaviour will depend on where 3761 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file 3762 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed 3763 in ``${WORKDIR}`` through a meta-layer will be handled in 3764 ``allnoconfig`` mode. 3765 3766 An "in-tree" ``defconfig`` file can be selected via the 3767 :term:`KBUILD_DEFCONFIG` variable. ``KCONFIG_MODE`` does not need to 3768 be explicitly set. 3769 3770 A ``defconfig`` file compatible with ``allnoconfig`` mode can be 3771 generated by copying the ``.config`` file from a working Linux kernel 3772 build, renaming it to ``defconfig`` and placing it into the Linux 3773 kernel ``${WORKDIR}`` through your meta-layer. ``KCONFIG_MODE`` does 3774 not need to be explicitly set. 3775 3776 A ``defconfig`` file compatible with ``alldefconfig`` mode can be 3777 generated using the 3778 :ref:`ref-tasks-savedefconfig` 3779 task and placed into the Linux kernel ``${WORKDIR}`` through your 3780 meta-layer. Explicitely set ``KCONFIG_MODE``:: 3781 3782 KCONFIG_MODE = "alldefconfig" 3783 3784 3785 :term:`KERNEL_ALT_IMAGETYPE` 3786 Specifies an alternate kernel image type for creation in addition to 3787 the kernel image type specified using the 3788 :term:`KERNEL_IMAGETYPE` variable. 3789 3790 :term:`KERNEL_ARTIFACT_NAME` 3791 Specifies the name of all of the build artifacts. You can change the 3792 name of the artifacts by changing the ``KERNEL_ARTIFACT_NAME`` 3793 variable. 3794 3795 The value of ``KERNEL_ARTIFACT_NAME``, which is set in the 3796 ``meta/classes/kernel-artifact-names.bbclass`` file, has the 3797 following default value:: 3798 3799 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3800 3801 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE` 3802 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. 3803 3804 :term:`KERNEL_CLASSES` 3805 A list of classes defining kernel image types that the 3806 :ref:`kernel <ref-classes-kernel>` class should inherit. You 3807 typically append this variable to enable extended image types. An 3808 example is the "kernel-fitimage", which enables fitImage support and 3809 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register 3810 custom kernel image types with the ``kernel`` class using this 3811 variable. 3812 3813 :term:`KERNEL_DEVICETREE` 3814 Specifies the name of the generated Linux kernel device tree (i.e. 3815 the ``.dtb``) file. 3816 3817 .. note:: 3818 3819 There is legacy support for specifying the full path to the device 3820 tree. However, providing just the ``.dtb`` file is preferred. 3821 3822 In order to use this variable, the 3823 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must 3824 be inherited. 3825 3826 :term:`KERNEL_DTB_LINK_NAME` 3827 The link name of the kernel device tree binary (DTB). This variable 3828 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as 3829 follows:: 3830 3831 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 3832 3833 The 3834 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in 3835 the same file, has the following value:: 3836 3837 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 3838 3839 See the :term:`MACHINE` variable for additional 3840 information. 3841 3842 :term:`KERNEL_DTB_NAME` 3843 The base name of the kernel device tree binary (DTB). This variable 3844 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as 3845 follows:: 3846 3847 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" 3848 3849 The value of the :term:`KERNEL_ARTIFACT_NAME` 3850 variable, which is set in the same file, has the following value:: 3851 3852 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3853 3854 :term:`KERNEL_DTC_FLAGS` 3855 Specifies the ``dtc`` flags that are passed to the Linux kernel build 3856 system when generating the device trees (via ``DTC_FLAGS`` environment 3857 variable). 3858 3859 In order to use this variable, the 3860 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must 3861 be inherited. 3862 3863 :term:`KERNEL_EXTRA_ARGS` 3864 Specifies additional ``make`` command-line arguments the OpenEmbedded 3865 build system passes on when compiling the kernel. 3866 3867 :term:`KERNEL_FEATURES` 3868 Includes additional kernel metadata. In the OpenEmbedded build 3869 system, the default Board Support Packages (BSPs) 3870 :term:`Metadata` is provided through the 3871 :term:`KMACHINE` and :term:`KBRANCH` 3872 variables. You can use the ``KERNEL_FEATURES`` variable from within 3873 the kernel recipe or kernel append file to further add metadata for 3874 all BSPs or specific BSPs. 3875 3876 The metadata you add through this variable includes config fragments 3877 and features descriptions, which usually includes patches as well as 3878 config fragments. You typically override the ``KERNEL_FEATURES`` 3879 variable for a specific machine. In this way, you can provide 3880 validated, but optional, sets of kernel configurations and features. 3881 3882 For example, the following example from the ``linux-yocto-rt_4.12`` 3883 kernel recipe adds "netfilter" and "taskstats" features to all BSPs 3884 as well as "virtio" configurations to all QEMU machines. The last two 3885 statements add specific configurations to targeted machine types:: 3886 3887 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" 3888 KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}" 3889 KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc" 3890 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" 3891 KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc" 3892 3893 :term:`KERNEL_FIT_LINK_NAME` 3894 The link name of the kernel flattened image tree (FIT) image. This 3895 variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` 3896 file as follows:: 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 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 3905 3906 See the :term:`MACHINE` variable for additional 3907 information. 3908 3909 :term:`KERNEL_FIT_NAME` 3910 The base name of the kernel flattened image tree (FIT) image. This 3911 variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` 3912 file as follows:: 3913 3914 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" 3915 3916 The value of the :term:`KERNEL_ARTIFACT_NAME` 3917 variable, which is set in the same file, has the following value:: 3918 3919 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3920 3921 :term:`KERNEL_IMAGE_LINK_NAME` 3922 The link name for the kernel image. This variable is set in the 3923 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: 3924 3925 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 3926 3927 The value of 3928 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same 3929 file, has the following value:: 3930 3931 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 3932 3933 See the :term:`MACHINE` variable for additional 3934 information. 3935 3936 :term:`KERNEL_IMAGE_MAXSIZE` 3937 Specifies the maximum size of the kernel image file in kilobytes. If 3938 ``KERNEL_IMAGE_MAXSIZE`` is set, the size of the kernel image file is 3939 checked against the set value during the 3940 :ref:`ref-tasks-sizecheck` task. The task fails if 3941 the kernel image file is larger than the setting. 3942 3943 ``KERNEL_IMAGE_MAXSIZE`` is useful for target devices that have a 3944 limited amount of space in which the kernel image must be stored. 3945 3946 By default, this variable is not set, which means the size of the 3947 kernel image is not checked. 3948 3949 :term:`KERNEL_IMAGE_NAME` 3950 The base name of the kernel image. This variable is set in the 3951 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: 3952 3953 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" 3954 3955 The value of the 3956 :term:`KERNEL_ARTIFACT_NAME` variable, 3957 which is set in the same file, has the following value:: 3958 3959 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 3960 3961 :term:`KERNEL_IMAGETYPE` 3962 The type of kernel to build for a device, usually set by the machine 3963 configuration files and defaults to "zImage". This variable is used 3964 when building the kernel and is passed to ``make`` as the target to 3965 build. 3966 3967 If you want to build an alternate kernel image type in addition to that 3968 specified by ``KERNEL_IMAGETYPE``, use the :term:`KERNEL_ALT_IMAGETYPE` 3969 variable. 3970 3971 :term:`KERNEL_MODULE_AUTOLOAD` 3972 Lists kernel modules that need to be auto-loaded during boot. 3973 3974 .. note:: 3975 3976 This variable replaces the deprecated :term:`module_autoload` 3977 variable. 3978 3979 You can use the ``KERNEL_MODULE_AUTOLOAD`` variable anywhere that it 3980 can be recognized by the kernel recipe or by an out-of-tree kernel 3981 module recipe (e.g. a machine configuration file, a distribution 3982 configuration file, an append file for the recipe, or the recipe 3983 itself). 3984 3985 Specify it as follows:: 3986 3987 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" 3988 3989 Including ``KERNEL_MODULE_AUTOLOAD`` causes the OpenEmbedded build 3990 system to populate the ``/etc/modules-load.d/modname.conf`` file with 3991 the list of modules to be auto-loaded on boot. The modules appear 3992 one-per-line in the file. Here is an example of the most common use 3993 case:: 3994 3995 KERNEL_MODULE_AUTOLOAD += "module_name" 3996 3997 For information on how to populate the ``modname.conf`` file with 3998 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. 3999 4000 :term:`KERNEL_MODULE_PROBECONF` 4001 Provides a list of modules for which the OpenEmbedded build system 4002 expects to find ``module_conf_``\ modname values that specify 4003 configuration for each of the modules. For information on how to 4004 provide those module configurations, see the 4005 :term:`module_conf_* <module_conf>` variable. 4006 4007 :term:`KERNEL_PATH` 4008 The location of the kernel sources. This variable is set to the value 4009 of the :term:`STAGING_KERNEL_DIR` within 4010 the :ref:`module <ref-classes-module>` class. For information on 4011 how this variable is used, see the 4012 ":ref:`kernel-dev/common:incorporating out-of-tree modules`" 4013 section in the Yocto Project Linux Kernel Development Manual. 4014 4015 To help maximize compatibility with out-of-tree drivers used to build 4016 modules, the OpenEmbedded build system also recognizes and uses the 4017 :term:`KERNEL_SRC` variable, which is identical to 4018 the ``KERNEL_PATH`` variable. Both variables are common variables 4019 used by external Makefiles to point to the kernel source directory. 4020 4021 :term:`KERNEL_SRC` 4022 The location of the kernel sources. This variable is set to the value 4023 of the :term:`STAGING_KERNEL_DIR` within 4024 the :ref:`module <ref-classes-module>` class. For information on 4025 how this variable is used, see the 4026 ":ref:`kernel-dev/common:incorporating out-of-tree modules`" 4027 section in the Yocto Project Linux Kernel Development Manual. 4028 4029 To help maximize compatibility with out-of-tree drivers used to build 4030 modules, the OpenEmbedded build system also recognizes and uses the 4031 :term:`KERNEL_PATH` variable, which is identical 4032 to the ``KERNEL_SRC`` variable. Both variables are common variables 4033 used by external Makefiles to point to the kernel source directory. 4034 4035 :term:`KERNEL_VERSION` 4036 Specifies the version of the kernel as extracted from ``version.h`` 4037 or ``utsrelease.h`` within the kernel sources. Effects of setting 4038 this variable do not take affect until the kernel has been 4039 configured. Consequently, attempting to refer to this variable in 4040 contexts prior to configuration will not work. 4041 4042 :term:`KERNELDEPMODDEPEND` 4043 Specifies whether the data referenced through 4044 :term:`PKGDATA_DIR` is needed or not. 4045 ``KERNELDEPMODDEPEND`` does not control whether or not that data 4046 exists, but simply whether or not it is used. If you do not need to 4047 use the data, set the ``KERNELDEPMODDEPEND`` variable in your 4048 ``initramfs`` recipe. Setting the variable there when the data is not 4049 needed avoids a potential dependency loop. 4050 4051 :term:`KFEATURE_DESCRIPTION` 4052 Provides a short description of a configuration fragment. You use 4053 this variable in the ``.scc`` file that describes a configuration 4054 fragment file. Here is the variable used in a file named ``smp.scc`` 4055 to describe SMP being enabled:: 4056 4057 define KFEATURE_DESCRIPTION "Enable SMP" 4058 4059 :term:`KMACHINE` 4060 The machine as known by the kernel. Sometimes the machine name used 4061 by the kernel does not match the machine name used by the 4062 OpenEmbedded build system. For example, the machine name that the 4063 OpenEmbedded build system understands as ``core2-32-intel-common`` 4064 goes by a different name in the Linux Yocto kernel. The kernel 4065 understands that machine as ``intel-core2-32``. For cases like these, 4066 the ``KMACHINE`` variable maps the kernel machine name to the 4067 OpenEmbedded build system machine name. 4068 4069 These mappings between different names occur in the Yocto Linux 4070 Kernel's ``meta`` branch. As an example take a look in the 4071 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: 4072 4073 LINUX_VERSION_core2-32-intel-common = "3.19.0" 4074 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" 4075 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" 4076 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" 4077 KMACHINE_core2-32-intel-common = "intel-core2-32" 4078 KBRANCH_core2-32-intel-common = "standard/base" 4079 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" 4080 4081 The ``KMACHINE`` statement says 4082 that the kernel understands the machine name as "intel-core2-32". 4083 However, the OpenEmbedded build system understands the machine as 4084 "core2-32-intel-common". 4085 4086 :term:`KTYPE` 4087 Defines the kernel type to be used in assembling the configuration. 4088 The linux-yocto recipes define "standard", "tiny", and "preempt-rt" 4089 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" 4090 section in the 4091 Yocto Project Linux Kernel Development Manual for more information on 4092 kernel types. 4093 4094 You define the ``KTYPE`` variable in the 4095 :ref:`kernel-dev/advanced:bsp descriptions`. The 4096 value you use must match the value used for the 4097 :term:`LINUX_KERNEL_TYPE` value used by the 4098 kernel recipe. 4099 4100 :term:`LABELS` 4101 Provides a list of targets for automatic configuration. 4102 4103 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more 4104 information on how this variable is used. 4105 4106 :term:`LAYERDEPENDS` 4107 Lists the layers, separated by spaces, on which this recipe depends. 4108 Optionally, you can specify a specific layer version for a dependency 4109 by adding it to the end of the layer name. Here is an example:: 4110 4111 LAYERDEPENDS_mylayer = "anotherlayer (=3)" 4112 4113 In this previous example, 4114 version 3 of "anotherlayer" is compared against 4115 :term:`LAYERVERSION`\ ``_anotherlayer``. 4116 4117 An error is produced if any dependency is missing or the version 4118 numbers (if specified) do not match exactly. This variable is used in 4119 the ``conf/layer.conf`` file and must be suffixed with the name of 4120 the specific layer (e.g. ``LAYERDEPENDS_mylayer``). 4121 4122 :term:`LAYERDIR` 4123 When used inside the ``layer.conf`` configuration file, this variable 4124 provides the path of the current layer. This variable is not 4125 available outside of ``layer.conf`` and references are expanded 4126 immediately when parsing of the file completes. 4127 4128 :term:`LAYERRECOMMENDS` 4129 Lists the layers, separated by spaces, recommended for use with this 4130 layer. 4131 4132 Optionally, you can specify a specific layer version for a 4133 recommendation by adding the version to the end of the layer name. 4134 Here is an example:: 4135 4136 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" 4137 4138 In this previous example, version 3 of "anotherlayer" is compared 4139 against ``LAYERVERSION_anotherlayer``. 4140 4141 This variable is used in the ``conf/layer.conf`` file and must be 4142 suffixed with the name of the specific layer (e.g. 4143 ``LAYERRECOMMENDS_mylayer``). 4144 4145 :term:`LAYERSERIES_COMPAT` 4146 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which 4147 a layer is compatible. Using the ``LAYERSERIES_COMPAT`` variable 4148 allows the layer maintainer to indicate which combinations of the 4149 layer and OE-Core can be expected to work. The variable gives the 4150 system a way to detect when a layer has not been tested with new 4151 releases of OE-Core (e.g. the layer is not maintained). 4152 4153 To specify the OE-Core versions for which a layer is compatible, use 4154 this variable in your layer's ``conf/layer.conf`` configuration file. 4155 For the list, use the Yocto Project 4156 :yocto_wiki:`Release Name </Releases>` (e.g. 4157 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the 4158 layer, use a space-separated list:: 4159 4160 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;" 4161 4162 .. note:: 4163 4164 Setting ``LAYERSERIES_COMPAT`` is required by the Yocto Project 4165 Compatible version 2 standard. 4166 The OpenEmbedded build system produces a warning if the variable 4167 is not set for any given layer. 4168 4169 See the ":ref:`dev-manual/common-tasks:creating your own layer`" 4170 section in the Yocto Project Development Tasks Manual. 4171 4172 :term:`LAYERVERSION` 4173 Optionally specifies the version of a layer as a single number. You 4174 can use this within :term:`LAYERDEPENDS` for 4175 another layer in order to depend on a specific version of the layer. 4176 This variable is used in the ``conf/layer.conf`` file and must be 4177 suffixed with the name of the specific layer (e.g. 4178 ``LAYERVERSION_mylayer``). 4179 4180 :term:`LD` 4181 The minimal command and arguments used to run the linker. 4182 4183 :term:`LDFLAGS` 4184 Specifies the flags to pass to the linker. This variable is exported 4185 to an environment variable and thus made visible to the software 4186 being built during the compilation step. 4187 4188 Default initialization for ``LDFLAGS`` varies depending on what is 4189 being built: 4190 4191 - :term:`TARGET_LDFLAGS` when building for the 4192 target 4193 4194 - :term:`BUILD_LDFLAGS` when building for the 4195 build host (i.e. ``-native``) 4196 4197 - :term:`BUILDSDK_LDFLAGS` when building for 4198 an SDK (i.e. ``nativesdk-``) 4199 4200 :term:`LEAD_SONAME` 4201 Specifies the lead (or primary) compiled library file (i.e. ``.so``) 4202 that the :ref:`debian <ref-classes-debian>` class applies its 4203 naming policy to given a recipe that packages multiple libraries. 4204 4205 This variable works in conjunction with the ``debian`` class. 4206 4207 :term:`LIC_FILES_CHKSUM` 4208 Checksums of the license text in the recipe source code. 4209 4210 This variable tracks changes in license text of the source code 4211 files. If the license text is changed, it will trigger a build 4212 failure, which gives the developer an opportunity to review any 4213 license change. 4214 4215 This variable must be defined for all recipes (unless 4216 :term:`LICENSE` is set to "CLOSED"). 4217 4218 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`" 4219 section in the Yocto Project Development Tasks Manual. 4220 4221 :term:`LICENSE` 4222 The list of source licenses for the recipe. Follow these rules: 4223 4224 - Do not use spaces within individual license names. 4225 4226 - Separate license names using \| (pipe) when there is a choice 4227 between licenses. 4228 4229 - Separate license names using & (ampersand) when there are 4230 multiple licenses for different parts of the source. 4231 4232 - You can use spaces between license names. 4233 4234 - For standard licenses, use the names of the files in 4235 ``meta/files/common-licenses/`` or the 4236 :term:`SPDXLICENSEMAP` flag names defined in 4237 ``meta/conf/licenses.conf``. 4238 4239 Here are some examples:: 4240 4241 LICENSE = "LGPLv2.1 | GPLv3" 4242 LICENSE = "MPL-1 & LGPLv2.1" 4243 LICENSE = "GPLv2+" 4244 4245 The first example is from the 4246 recipes for Qt, which the user may choose to distribute under either 4247 the LGPL version 2.1 or GPL version 3. The second example is from 4248 Cairo where two licenses cover different parts of the source code. 4249 The final example is from ``sysstat``, which presents a single 4250 license. 4251 4252 You can also specify licenses on a per-package basis to handle 4253 situations where components of the output have different licenses. 4254 For example, a piece of software whose code is licensed under GPLv2 4255 but has accompanying documentation licensed under the GNU Free 4256 Documentation License 1.2 could be specified as follows:: 4257 4258 LICENSE = "GFDL-1.2 & GPLv2" 4259 LICENSE_${PN} = "GPLv2" 4260 LICENSE_${PN}-doc = "GFDL-1.2" 4261 4262 :term:`LICENSE_CREATE_PACKAGE` 4263 Setting ``LICENSE_CREATE_PACKAGE`` to "1" causes the OpenEmbedded 4264 build system to create an extra package (i.e. 4265 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add 4266 those packages to the 4267 :term:`RRECOMMENDS`\ ``_${PN}``. 4268 4269 The ``${PN}-lic`` package installs a directory in 4270 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base 4271 name, and installs files in that directory that contain license and 4272 copyright information (i.e. copies of the appropriate license files 4273 from ``meta/common-licenses`` that match the licenses specified in 4274 the :term:`LICENSE` variable of the recipe metadata 4275 and copies of files marked in 4276 :term:`LIC_FILES_CHKSUM` as containing 4277 license text). 4278 4279 For related information on providing license text, see the 4280 :term:`COPY_LIC_DIRS` variable, the 4281 :term:`COPY_LIC_MANIFEST` variable, and the 4282 ":ref:`dev-manual/common-tasks:providing license text`" 4283 section in the Yocto Project Development Tasks Manual. 4284 4285 :term:`LICENSE_FLAGS` 4286 Specifies additional flags for a recipe you must whitelist through 4287 :term:`LICENSE_FLAGS_WHITELIST` in 4288 order to allow the recipe to be built. When providing multiple flags, 4289 separate them with spaces. 4290 4291 This value is independent of :term:`LICENSE` and is 4292 typically used to mark recipes that might require additional licenses 4293 in order to be used in a commercial product. For more information, 4294 see the 4295 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" 4296 section in the Yocto Project Development Tasks Manual. 4297 4298 :term:`LICENSE_FLAGS_WHITELIST` 4299 Lists license flags that when specified in 4300 :term:`LICENSE_FLAGS` within a recipe should not 4301 prevent that recipe from being built. This practice is otherwise 4302 known as "whitelisting" license flags. For more information, see the 4303 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`" 4304 section in the Yocto Project Development Tasks Manual. 4305 4306 :term:`LICENSE_PATH` 4307 Path to additional licenses used during the build. By default, the 4308 OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the 4309 directory that holds common license text used during the build. The 4310 ``LICENSE_PATH`` variable allows you to extend that location to other 4311 areas that have additional licenses:: 4312 4313 LICENSE_PATH += "path-to-additional-common-licenses" 4314 4315 :term:`LINUX_KERNEL_TYPE` 4316 Defines the kernel type to be used in assembling the configuration. 4317 The linux-yocto recipes define "standard", "tiny", and "preempt-rt" 4318 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" 4319 section in the 4320 Yocto Project Linux Kernel Development Manual for more information on 4321 kernel types. 4322 4323 If you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to 4324 "standard". Together with :term:`KMACHINE`, the 4325 ``LINUX_KERNEL_TYPE`` variable defines the search arguments used by 4326 the kernel tools to find the appropriate description within the 4327 kernel :term:`Metadata` with which to build out the sources 4328 and configuration. 4329 4330 :term:`LINUX_VERSION` 4331 The Linux version from ``kernel.org`` on which the Linux kernel image 4332 being built using the OpenEmbedded build system is based. You define 4333 this variable in the kernel recipe. For example, the 4334 ``linux-yocto-3.4.bb`` kernel recipe found in 4335 ``meta/recipes-kernel/linux`` defines the variables as follows:: 4336 4337 LINUX_VERSION ?= "3.4.24" 4338 4339 The ``LINUX_VERSION`` variable is used to define :term:`PV` 4340 for the recipe:: 4341 4342 PV = "${LINUX_VERSION}+git${SRCPV}" 4343 4344 :term:`LINUX_VERSION_EXTENSION` 4345 A string extension compiled into the version string of the Linux 4346 kernel built with the OpenEmbedded build system. You define this 4347 variable in the kernel recipe. For example, the linux-yocto kernel 4348 recipes all define the variable as follows:: 4349 4350 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" 4351 4352 Defining this variable essentially sets the Linux kernel 4353 configuration item ``CONFIG_LOCALVERSION``, which is visible through 4354 the ``uname`` command. Here is an example that shows the extension 4355 assuming it was set as previously shown:: 4356 4357 $ uname -r 4358 3.7.0-rc8-custom 4359 4360 :term:`LOG_DIR` 4361 Specifies the directory to which the OpenEmbedded build system writes 4362 overall log files. The default directory is ``${TMPDIR}/log``. 4363 4364 For the directory containing logs specific to each task, see the 4365 :term:`T` variable. 4366 4367 :term:`MACHINE` 4368 Specifies the target device for which the image is built. You define 4369 ``MACHINE`` in the ``local.conf`` file found in the 4370 :term:`Build Directory`. By default, ``MACHINE`` is set to 4371 "qemux86", which is an x86-based architecture machine to be emulated 4372 using QEMU:: 4373 4374 MACHINE ?= "qemux86" 4375 4376 The variable corresponds to a machine configuration file of the same 4377 name, through which machine-specific configurations are set. Thus, 4378 when ``MACHINE`` is set to "qemux86", the corresponding 4379 ``qemux86.conf`` machine configuration file can be found in 4380 the :term:`Source Directory` in 4381 ``meta/conf/machine``. 4382 4383 The list of machines supported by the Yocto Project as shipped 4384 include the following:: 4385 4386 MACHINE ?= "qemuarm" 4387 MACHINE ?= "qemuarm64" 4388 MACHINE ?= "qemumips" 4389 MACHINE ?= "qemumips64" 4390 MACHINE ?= "qemuppc" 4391 MACHINE ?= "qemux86" 4392 MACHINE ?= "qemux86-64" 4393 MACHINE ?= "genericx86" 4394 MACHINE ?= "genericx86-64" 4395 MACHINE ?= "beaglebone" 4396 MACHINE ?= "edgerouter" 4397 4398 The last five are Yocto Project reference hardware 4399 boards, which are provided in the ``meta-yocto-bsp`` layer. 4400 4401 .. note:: 4402 4403 Adding additional Board Support Package (BSP) layers to your 4404 configuration adds new possible settings for ``MACHINE``. 4405 4406 :term:`MACHINE_ARCH` 4407 Specifies the name of the machine-specific architecture. This 4408 variable is set automatically from :term:`MACHINE` or 4409 :term:`TUNE_PKGARCH`. You should not hand-edit 4410 the ``MACHINE_ARCH`` variable. 4411 4412 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` 4413 A list of required machine-specific packages to install as part of 4414 the image being built. The build process depends on these packages 4415 being present. Furthermore, because this is a "machine-essential" 4416 variable, the list of packages are essential for the machine to boot. 4417 The impact of this variable affects images based on 4418 ``packagegroup-core-boot``, including the ``core-image-minimal`` 4419 image. 4420 4421 This variable is similar to the 4422 ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` variable with the exception 4423 that the image being built has a build dependency on the variable's 4424 list of packages. In other words, the image will not build if a file 4425 in this list is not found. 4426 4427 As an example, suppose the machine for which you are building 4428 requires ``example-init`` to be run during boot to initialize the 4429 hardware. In this case, you would use the following in the machine's 4430 ``.conf`` configuration file:: 4431 4432 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" 4433 4434 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` 4435 A list of recommended machine-specific packages to install as part of 4436 the image being built. The build process does not depend on these 4437 packages being present. However, because this is a 4438 "machine-essential" variable, the list of packages are essential for 4439 the machine to boot. The impact of this variable affects images based 4440 on ``packagegroup-core-boot``, including the ``core-image-minimal`` 4441 image. 4442 4443 This variable is similar to the ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS`` 4444 variable with the exception that the image being built does not have 4445 a build dependency on the variable's list of packages. In other 4446 words, the image will still build if a package in this list is not 4447 found. Typically, this variable is used to handle essential kernel 4448 modules, whose functionality may be selected to be built into the 4449 kernel rather than as a module, in which case a package will not be 4450 produced. 4451 4452 Consider an example where you have a custom kernel where a specific 4453 touchscreen driver is required for the machine to be usable. However, 4454 the driver can be built as a module or into the kernel depending on 4455 the kernel configuration. If the driver is built as a module, you 4456 want it to be installed. But, when the driver is built into the 4457 kernel, you still want the build to succeed. This variable sets up a 4458 "recommends" relationship so that in the latter case, the build will 4459 not fail due to the missing package. To accomplish this, assuming the 4460 package for the module was called ``kernel-module-ab123``, you would 4461 use the following in the machine's ``.conf`` configuration file:: 4462 4463 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" 4464 4465 .. note:: 4466 4467 In this example, the ``kernel-module-ab123`` recipe needs to 4468 explicitly set its :term:`PACKAGES` variable to ensure that BitBake 4469 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to 4470 satisfy the dependency. 4471 4472 Some examples of these machine essentials are flash, screen, 4473 keyboard, mouse, or touchscreen drivers (depending on the machine). 4474 4475 :term:`MACHINE_EXTRA_RDEPENDS` 4476 A list of machine-specific packages to install as part of the image 4477 being built that are not essential for the machine to boot. However, 4478 the build process for more fully-featured images depends on the 4479 packages being present. 4480 4481 This variable affects all images based on ``packagegroup-base``, 4482 which does not include the ``core-image-minimal`` or 4483 ``core-image-full-cmdline`` images. 4484 4485 The variable is similar to the ``MACHINE_EXTRA_RRECOMMENDS`` variable 4486 with the exception that the image being built has a build dependency 4487 on the variable's list of packages. In other words, the image will 4488 not build if a file in this list is not found. 4489 4490 An example is a machine that has WiFi capability but is not essential 4491 for the machine to boot the image. However, if you are building a 4492 more fully-featured image, you want to enable the WiFi. The package 4493 containing the firmware for the WiFi hardware is always expected to 4494 exist, so it is acceptable for the build process to depend upon 4495 finding the package. In this case, assuming the package for the 4496 firmware was called ``wifidriver-firmware``, you would use the 4497 following in the ``.conf`` file for the machine:: 4498 4499 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" 4500 4501 :term:`MACHINE_EXTRA_RRECOMMENDS` 4502 A list of machine-specific packages to install as part of the image 4503 being built that are not essential for booting the machine. The image 4504 being built has no build dependency on this list of packages. 4505 4506 This variable affects only images based on ``packagegroup-base``, 4507 which does not include the ``core-image-minimal`` or 4508 ``core-image-full-cmdline`` images. 4509 4510 This variable is similar to the ``MACHINE_EXTRA_RDEPENDS`` variable 4511 with the exception that the image being built does not have a build 4512 dependency on the variable's list of packages. In other words, the 4513 image will build if a file in this list is not found. 4514 4515 An example is a machine that has WiFi capability but is not essential 4516 For the machine to boot the image. However, if you are building a 4517 more fully-featured image, you want to enable WiFi. In this case, the 4518 package containing the WiFi kernel module will not be produced if the 4519 WiFi driver is built into the kernel, in which case you still want 4520 the build to succeed instead of failing as a result of the package 4521 not being found. To accomplish this, assuming the package for the 4522 module was called ``kernel-module-examplewifi``, you would use the 4523 following in the ``.conf`` file for the machine:: 4524 4525 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" 4526 4527 :term:`MACHINE_FEATURES` 4528 Specifies the list of hardware features the 4529 :term:`MACHINE` is capable of supporting. For related 4530 information on enabling features, see the 4531 :term:`DISTRO_FEATURES`, 4532 :term:`COMBINED_FEATURES`, and 4533 :term:`IMAGE_FEATURES` variables. 4534 4535 For a list of hardware features supported by the Yocto Project as 4536 shipped, see the ":ref:`ref-features-machine`" section. 4537 4538 :term:`MACHINE_FEATURES_BACKFILL` 4539 Features to be added to ``MACHINE_FEATURES`` if not also present in 4540 ``MACHINE_FEATURES_BACKFILL_CONSIDERED``. 4541 4542 This variable is set in the ``meta/conf/bitbake.conf`` file. It is 4543 not intended to be user-configurable. It is best to just reference 4544 the variable to see which machine features are being backfilled for 4545 all machine configurations. See the ":ref:`ref-features-backfill`" 4546 section for more information. 4547 4548 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` 4549 Features from ``MACHINE_FEATURES_BACKFILL`` that should not be 4550 backfilled (i.e. added to ``MACHINE_FEATURES``) during the build. See 4551 the ":ref:`ref-features-backfill`" section for more information. 4552 4553 :term:`MACHINEOVERRIDES` 4554 A colon-separated list of overrides that apply to the current 4555 machine. By default, this list includes the value of 4556 :term:`MACHINE`. 4557 4558 You can extend ``MACHINEOVERRIDES`` to add extra overrides that 4559 should apply to a machine. For example, all machines emulated in QEMU 4560 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named 4561 ``meta/conf/machine/include/qemu.inc`` that prepends the following 4562 override to ``MACHINEOVERRIDES``:: 4563 4564 MACHINEOVERRIDES =. "qemuall:" 4565 4566 This 4567 override allows variables to be overridden for all machines emulated 4568 in QEMU, like in the following example from the ``connman-conf`` 4569 recipe:: 4570 4571 SRC_URI_append_qemuall = " file://wired.config \ 4572 file://wired-setup \ 4573 " 4574 4575 The underlying mechanism behind 4576 ``MACHINEOVERRIDES`` is simply that it is included in the default 4577 value of :term:`OVERRIDES`. 4578 4579 :term:`MAINTAINER` 4580 The email address of the distribution maintainer. 4581 4582 :term:`METADATA_BRANCH` 4583 The branch currently checked out for the OpenEmbedded-Core layer (path 4584 determined by :term:`COREBASE`). 4585 4586 :term:`METADATA_REVISION` 4587 The revision currently checked out for the OpenEmbedded-Core layer (path 4588 determined by :term:`COREBASE`). 4589 4590 :term:`MIRRORS` 4591 Specifies additional paths from which the OpenEmbedded build system 4592 gets source code. When the build system searches for source code, it 4593 first tries the local download directory. If that location fails, the 4594 build system tries locations defined by 4595 :term:`PREMIRRORS`, the upstream source, and then 4596 locations specified by ``MIRRORS`` in that order. 4597 4598 Assuming your distribution (:term:`DISTRO`) is "poky", 4599 the default value for ``MIRRORS`` is defined in the 4600 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. 4601 4602 :term:`MLPREFIX` 4603 Specifies a prefix has been added to :term:`PN` to create a 4604 special version of a recipe or package (i.e. a Multilib version). The 4605 variable is used in places where the prefix needs to be added to or 4606 removed from a the name (e.g. the :term:`BPN` variable). 4607 ``MLPREFIX`` gets set when a prefix has been added to ``PN``. 4608 4609 .. note:: 4610 4611 The "ML" in ``MLPREFIX`` stands for "MultiLib". This representation is 4612 historical and comes from a time when ``nativesdk`` was a suffix 4613 rather than a prefix on the recipe name. When ``nativesdk`` was turned 4614 into a prefix, it made sense to set ``MLPREFIX`` for it as well. 4615 4616 To help understand when ``MLPREFIX`` might be needed, consider when 4617 :term:`BBCLASSEXTEND` is used to provide a 4618 ``nativesdk`` version of a recipe in addition to the target version. 4619 If that recipe declares build-time dependencies on tasks in other 4620 recipes by using :term:`DEPENDS`, then a dependency on 4621 "foo" will automatically get rewritten to a dependency on 4622 "nativesdk-foo". However, dependencies like the following will not 4623 get rewritten automatically:: 4624 4625 do_foo[depends] += "recipe:do_foo" 4626 4627 If you want such a dependency to also get transformed, you can do the 4628 following:: 4629 4630 do_foo[depends] += "${MLPREFIX}recipe:do_foo" 4631 4632 module_autoload 4633 This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD`` 4634 variable. You should replace all occurrences of ``module_autoload`` 4635 with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:: 4636 4637 module_autoload_rfcomm = "rfcomm" 4638 4639 should now be replaced with:: 4640 4641 KERNEL_MODULE_AUTOLOAD += "rfcomm" 4642 4643 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. 4644 4645 module_conf 4646 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_ 4647 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` 4648 file. 4649 4650 You can use this variable anywhere that it can be recognized by the 4651 kernel recipe or out-of-tree kernel module recipe (e.g. a machine 4652 configuration file, a distribution configuration file, an append file 4653 for the recipe, or the recipe itself). If you use this variable, you 4654 must also be sure to list the module name in the 4655 :term:`KERNEL_MODULE_AUTOLOAD` 4656 variable. 4657 4658 Here is the general syntax:: 4659 4660 module_conf_module_name = "modprobe.d-syntax" 4661 4662 You must use the kernel module name override. 4663 4664 Run ``man modprobe.d`` in the shell to find out more information on 4665 the exact syntax you want to provide with ``module_conf``. 4666 4667 Including ``module_conf`` causes the OpenEmbedded build system to 4668 populate the ``/etc/modprobe.d/modname.conf`` file with 4669 ``modprobe.d`` syntax lines. Here is an example that adds the options 4670 ``arg1`` and ``arg2`` to a module named ``mymodule``:: 4671 4672 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" 4673 4674 For information on how to specify kernel modules to auto-load on 4675 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. 4676 4677 :term:`MODULE_TARBALL_DEPLOY` 4678 Controls creation of the ``modules-*.tgz`` file. Set this variable to 4679 "0" to disable creation of this file, which contains all of the 4680 kernel modules resulting from a kernel build. 4681 4682 :term:`MODULE_TARBALL_LINK_NAME` 4683 The link name of the kernel module tarball. This variable is set in 4684 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: 4685 4686 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 4687 4688 The value 4689 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the 4690 same file, has the following value:: 4691 4692 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 4693 4694 See the :term:`MACHINE` variable for additional information. 4695 4696 :term:`MODULE_TARBALL_NAME` 4697 The base name of the kernel module tarball. This variable is set in 4698 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: 4699 4700 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" 4701 4702 The value of the :term:`KERNEL_ARTIFACT_NAME` variable, 4703 which is set in the same file, has the following value:: 4704 4705 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 4706 4707 :term:`MULTIMACH_TARGET_SYS` 4708 Uniquely identifies the type of the target system for which packages 4709 are being built. This variable allows output for different types of 4710 target systems to be put into different subdirectories of the same 4711 output directory. 4712 4713 The default value of this variable is:: 4714 4715 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} 4716 4717 Some classes (e.g. 4718 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the 4719 ``MULTIMACH_TARGET_SYS`` value. 4720 4721 See the :term:`STAMP` variable for an example. See the 4722 :term:`STAGING_DIR_TARGET` variable for more information. 4723 4724 :term:`NATIVELSBSTRING` 4725 A string identifying the host distribution. Strings consist of the 4726 host distributor ID followed by the release, as reported by the 4727 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For 4728 example, when running a build on Ubuntu 12.10, the value is 4729 "Ubuntu-12.10". If this information is unable to be determined, the 4730 value resolves to "Unknown". 4731 4732 This variable is used by default to isolate native shared state 4733 packages for different distributions (e.g. to avoid problems with 4734 ``glibc`` version incompatibilities). Additionally, the variable is 4735 checked against 4736 :term:`SANITY_TESTED_DISTROS` if that 4737 variable is set. 4738 4739 :term:`NM` 4740 The minimal command and arguments to run ``nm``. 4741 4742 :term:`NO_GENERIC_LICENSE` 4743 Avoids QA errors when you use a non-common, non-CLOSED license in a 4744 recipe. There are packages, such as the linux-firmware package, with many 4745 licenses that are not in any way common. Also, new licenses are added 4746 occasionally to avoid introducing a lot of common license files, 4747 which are only applicable to a specific package. 4748 ``NO_GENERIC_LICENSE`` is used to allow copying a license that does 4749 not exist in common licenses. 4750 4751 The following example shows how to add ``NO_GENERIC_LICENSE`` to a 4752 recipe:: 4753 4754 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" 4755 4756 Here is an example that 4757 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched 4758 source:: 4759 4760 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" 4761 4762 :term:`NO_RECOMMENDATIONS` 4763 Prevents installation of all "recommended-only" packages. 4764 Recommended-only packages are packages installed only through the 4765 :term:`RRECOMMENDS` variable). Setting the 4766 ``NO_RECOMMENDATIONS`` variable to "1" turns this feature on:: 4767 4768 NO_RECOMMENDATIONS = "1" 4769 4770 You can set this variable globally in your ``local.conf`` file or you 4771 can attach it to a specific image recipe by using the recipe name 4772 override:: 4773 4774 NO_RECOMMENDATIONS_pn-target_image = "1" 4775 4776 It is important to realize that if you choose to not install packages 4777 using this variable and some other packages are dependent on them 4778 (i.e. listed in a recipe's :term:`RDEPENDS` 4779 variable), the OpenEmbedded build system ignores your request and 4780 will install the packages to avoid dependency errors. 4781 4782 .. note:: 4783 4784 Some recommended packages might be required for certain system 4785 functionality, such as kernel modules. It is up to you to add 4786 packages with the :term:`IMAGE_INSTALL` variable. 4787 4788 This variable is only supported when using the IPK and RPM 4789 packaging backends. DEB is not supported. 4790 4791 See the :term:`BAD_RECOMMENDATIONS` and 4792 the :term:`PACKAGE_EXCLUDE` variables for 4793 related information. 4794 4795 :term:`NOAUTOPACKAGEDEBUG` 4796 Disables auto package from splitting ``.debug`` files. If a recipe 4797 requires ``FILES_${PN}-dbg`` to be set manually, the 4798 ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the 4799 content of the debug package. For example:: 4800 4801 NOAUTOPACKAGEDEBUG = "1" 4802 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" 4803 FILES_${PN}-dbg = "/usr/src/debug/" 4804 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" 4805 4806 :term:`OBJCOPY` 4807 The minimal command and arguments to run ``objcopy``. 4808 4809 :term:`OBJDUMP` 4810 The minimal command and arguments to run ``objdump``. 4811 4812 :term:`OE_BINCONFIG_EXTRA_MANGLE` 4813 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class, 4814 this variable specifies additional arguments passed to the "sed" 4815 command. The sed command alters any paths in configuration scripts 4816 that have been set up during compilation. Inheriting this class 4817 results in all paths in these scripts being changed to point into the 4818 ``sysroots/`` directory so that all builds that use the script will 4819 use the correct directories for the cross compiling layout. 4820 4821 See the ``meta/classes/binconfig.bbclass`` in the 4822 :term:`Source Directory` for details on how this class 4823 applies these additional sed command arguments. For general 4824 information on the ``binconfig`` class, see the 4825 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section. 4826 4827 :term:`OE_IMPORTS` 4828 An internal variable used to tell the OpenEmbedded build system what 4829 Python modules to import for every Python function run by the system. 4830 4831 .. note:: 4832 4833 Do not set this variable. It is for internal use only. 4834 4835 :term:`OE_INIT_ENV_SCRIPT` 4836 The name of the build environment setup script for the purposes of 4837 setting up the environment within the extensible SDK. The default 4838 value is "oe-init-build-env". 4839 4840 If you use a custom script to set up your build environment, set the 4841 ``OE_INIT_ENV_SCRIPT`` variable to its name. 4842 4843 :term:`OE_TERMINAL` 4844 Controls how the OpenEmbedded build system spawns interactive 4845 terminals on the host development system (e.g. using the BitBake 4846 command with the ``-c devshell`` command-line option). For more 4847 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in 4848 the Yocto Project Development Tasks Manual. 4849 4850 You can use the following values for the ``OE_TERMINAL`` variable: 4851 4852 - auto 4853 - gnome 4854 - xfce 4855 - rxvt 4856 - screen 4857 - konsole 4858 - none 4859 4860 :term:`OEROOT` 4861 The directory from which the top-level build environment setup script 4862 is sourced. The Yocto Project provides a top-level build environment 4863 setup script: :ref:`structure-core-script`. When you run this 4864 script, the ``OEROOT`` variable resolves to the directory that 4865 contains the script. 4866 4867 For additional information on how this variable is used, see the 4868 initialization script. 4869 4870 :term:`OLDEST_KERNEL` 4871 Declares the oldest version of the Linux kernel that the produced 4872 binaries must support. This variable is passed into the build of the 4873 Embedded GNU C Library (``glibc``). 4874 4875 The default for this variable comes from the 4876 ``meta/conf/bitbake.conf`` configuration file. You can override this 4877 default by setting the variable in a custom distribution 4878 configuration file. 4879 4880 :term:`OVERRIDES` 4881 A colon-separated list of overrides that currently apply. Overrides 4882 are a BitBake mechanism that allows variables to be selectively 4883 overridden at the end of parsing. The set of overrides in 4884 ``OVERRIDES`` represents the "state" during building, which includes 4885 the current recipe being built, the machine for which it is being 4886 built, and so forth. 4887 4888 As an example, if the string "an-override" appears as an element in 4889 the colon-separated list in ``OVERRIDES``, then the following 4890 assignment will override ``FOO`` with the value "overridden" at the 4891 end of parsing:: 4892 4893 FOO_an-override = "overridden" 4894 4895 See the 4896 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" 4897 section in the BitBake User Manual for more information on the 4898 overrides mechanism. 4899 4900 The default value of ``OVERRIDES`` includes the values of the 4901 :term:`CLASSOVERRIDE`, 4902 :term:`MACHINEOVERRIDES`, and 4903 :term:`DISTROOVERRIDES` variables. Another 4904 important override included by default is ``pn-${PN}``. This override 4905 allows variables to be set for a single recipe within configuration 4906 (``.conf``) files. Here is an example:: 4907 4908 FOO_pn-myrecipe = "myrecipe-specific value" 4909 4910 .. note:: 4911 4912 An easy way to see what overrides apply is to search for ``OVERRIDES`` 4913 in the output of the ``bitbake -e`` command. See the 4914 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto 4915 Project Development Tasks Manual for more information. 4916 4917 :term:`P` 4918 The recipe name and version. ``P`` is comprised of the following:: 4919 4920 ${PN}-${PV} 4921 4922 :term:`PACKAGE_ADD_METADATA` 4923 This variable defines additional metadata to add to packages. 4924 4925 You may find you need to inject additional metadata into packages. 4926 This variable allows you to do that by setting the injected data as 4927 the value. Multiple fields can be added by splitting the content with 4928 the literal separator "\n". 4929 4930 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable 4931 to do package type specific settings. It can also be made package 4932 specific by using the package name as a suffix. 4933 4934 You can find out more about applying this variable in the 4935 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`" 4936 section in the Yocto Project Development Tasks Manual. 4937 4938 :term:`PACKAGE_ARCH` 4939 The architecture of the resulting package or packages. 4940 4941 By default, the value of this variable is set to 4942 :term:`TUNE_PKGARCH` when building for the 4943 target, :term:`BUILD_ARCH` when building for the 4944 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the 4945 SDK. 4946 4947 .. note:: 4948 4949 See :term:`SDK_ARCH` for more information. 4950 4951 However, if your recipe's output packages are built specific to the 4952 target machine rather than generally for the architecture of the 4953 machine, you should set ``PACKAGE_ARCH`` to the value of 4954 :term:`MACHINE_ARCH` in the recipe as follows:: 4955 4956 PACKAGE_ARCH = "${MACHINE_ARCH}" 4957 4958 :term:`PACKAGE_ARCHS` 4959 Specifies a list of architectures compatible with the target machine. 4960 This variable is set automatically and should not normally be 4961 hand-edited. Entries are separated using spaces and listed in order 4962 of priority. The default value for ``PACKAGE_ARCHS`` is "all any 4963 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". 4964 4965 :term:`PACKAGE_BEFORE_PN` 4966 Enables easily adding packages to ``PACKAGES`` before ``${PN}`` so 4967 that those added packages can pick up files that would normally be 4968 included in the default package. 4969 4970 :term:`PACKAGE_CLASSES` 4971 This variable, which is set in the ``local.conf`` configuration file 4972 found in the ``conf`` folder of the 4973 :term:`Build Directory`, specifies the package manager the 4974 OpenEmbedded build system uses when packaging data. 4975 4976 You can provide one or more of the following arguments for the 4977 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk 4978 package_tar" 4979 4980 .. note:: 4981 4982 While it is a legal option, the ``package_tar`` 4983 class has limited functionality due to no support for package 4984 dependencies by that backend. Therefore, it is recommended that 4985 you do not use it. 4986 4987 The build system uses only the first argument in the list as the 4988 package manager when creating your image or SDK. However, packages 4989 will be created using any additional packaging classes you specify. 4990 For example, if you use the following in your ``local.conf`` file:: 4991 4992 PACKAGE_CLASSES ?= "package_ipk" 4993 4994 The OpenEmbedded build system uses 4995 the IPK package manager to create your image or SDK. 4996 4997 For information on packaging and build performance effects as a 4998 result of the package manager in use, see the 4999 ":ref:`package.bbclass <ref-classes-package>`" section. 5000 5001 :term:`PACKAGE_DEBUG_SPLIT_STYLE` 5002 Determines how to split up the binary and debug information when 5003 creating ``*-dbg`` packages to be used with the GNU Project Debugger 5004 (GDB). 5005 5006 With the ``PACKAGE_DEBUG_SPLIT_STYLE`` variable, you can control 5007 where debug information, which can include or exclude source files, 5008 is stored: 5009 5010 - ".debug": Debug symbol files are placed next to the binary in a 5011 ``.debug`` directory on the target. For example, if a binary is 5012 installed into ``/bin``, the corresponding debug symbol files are 5013 installed in ``/bin/.debug``. Source files are placed in 5014 ``/usr/src/debug``. 5015 5016 - "debug-file-directory": Debug symbol files are placed under 5017 ``/usr/lib/debug`` on the target, and separated by the path from 5018 where the binary is installed. For example, if a binary is 5019 installed in ``/bin``, the corresponding debug symbols are 5020 installed in ``/usr/lib/debug/bin``. Source files are placed in 5021 ``/usr/src/debug``. 5022 5023 - "debug-without-src": The same behavior as ".debug" previously 5024 described with the exception that no source files are installed. 5025 5026 - "debug-with-srcpkg": The same behavior as ".debug" previously 5027 described with the exception that all source files are placed in a 5028 separate ``*-src`` pkg. This is the default behavior. 5029 5030 You can find out more about debugging using GDB by reading the 5031 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section 5032 in the Yocto Project Development Tasks Manual. 5033 5034 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` 5035 Prevents specific packages from being installed when you are 5036 installing complementary packages. 5037 5038 You might find that you want to prevent installing certain packages 5039 when you are installing complementary packages. For example, if you 5040 are using :term:`IMAGE_FEATURES` to install 5041 ``dev-pkgs``, you might not want to install all packages from a 5042 particular multilib. If you find yourself in this situation, you can 5043 use the ``PACKAGE_EXCLUDE_COMPLEMENTARY`` variable to specify regular 5044 expressions to match the packages you want to exclude. 5045 5046 :term:`PACKAGE_EXCLUDE` 5047 Lists packages that should not be installed into an image. For 5048 example:: 5049 5050 PACKAGE_EXCLUDE = "package_name package_name package_name ..." 5051 5052 You can set this variable globally in your ``local.conf`` file or you 5053 can attach it to a specific image recipe by using the recipe name 5054 override:: 5055 5056 PACKAGE_EXCLUDE_pn-target_image = "package_name" 5057 5058 If you choose to not install a package using this variable and some 5059 other package is dependent on it (i.e. listed in a recipe's 5060 :term:`RDEPENDS` variable), the OpenEmbedded build 5061 system generates a fatal installation error. Because the build system 5062 halts the process with a fatal error, you can use the variable with 5063 an iterative development process to remove specific components from a 5064 system. 5065 5066 This variable is supported only when using the IPK and RPM 5067 packaging backends. DEB is not supported. 5068 5069 See the :term:`NO_RECOMMENDATIONS` and the 5070 :term:`BAD_RECOMMENDATIONS` variables for 5071 related information. 5072 5073 :term:`PACKAGE_EXTRA_ARCHS` 5074 Specifies the list of architectures compatible with the device CPU. 5075 This variable is useful when you build for several different devices 5076 that use miscellaneous processors such as XScale and ARM926-EJS. 5077 5078 :term:`PACKAGE_FEED_ARCHS` 5079 Optionally specifies the package architectures used as part of the 5080 package feed URIs during the build. When used, the 5081 ``PACKAGE_FEED_ARCHS`` variable is appended to the final package feed 5082 URI, which is constructed using the 5083 :term:`PACKAGE_FEED_URIS` and 5084 :term:`PACKAGE_FEED_BASE_PATHS` 5085 variables. 5086 5087 .. note:: 5088 5089 You can use the ``PACKAGE_FEED_ARCHS`` 5090 variable to whitelist specific package architectures. If you do 5091 not need to whitelist specific architectures, which is a common 5092 case, you can omit this variable. Omitting the variable results in 5093 all available architectures for the current machine being included 5094 into remote package feeds. 5095 5096 Consider the following example where the ``PACKAGE_FEED_URIS``, 5097 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are 5098 defined in your ``local.conf`` file:: 5099 5100 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 5101 https://example.com/packagerepos/updates" 5102 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 5103 PACKAGE_FEED_ARCHS = "all core2-64" 5104 5105 Given these settings, the resulting package feeds are as follows: 5106 5107 .. code-block:: none 5108 5109 https://example.com/packagerepos/release/rpm/all 5110 https://example.com/packagerepos/release/rpm/core2-64 5111 https://example.com/packagerepos/release/rpm-dev/all 5112 https://example.com/packagerepos/release/rpm-dev/core2-64 5113 https://example.com/packagerepos/updates/rpm/all 5114 https://example.com/packagerepos/updates/rpm/core2-64 5115 https://example.com/packagerepos/updates/rpm-dev/all 5116 https://example.com/packagerepos/updates/rpm-dev/core2-64 5117 5118 :term:`PACKAGE_FEED_BASE_PATHS` 5119 Specifies the base path used when constructing package feed URIs. The 5120 ``PACKAGE_FEED_BASE_PATHS`` variable makes up the middle portion of a 5121 package feed URI used by the OpenEmbedded build system. The base path 5122 lies between the :term:`PACKAGE_FEED_URIS` 5123 and :term:`PACKAGE_FEED_ARCHS` variables. 5124 5125 Consider the following example where the ``PACKAGE_FEED_URIS``, 5126 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are 5127 defined in your ``local.conf`` file:: 5128 5129 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 5130 https://example.com/packagerepos/updates" 5131 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 5132 PACKAGE_FEED_ARCHS = "all core2-64" 5133 5134 Given these settings, the resulting package feeds are as follows: 5135 5136 .. code-block:: none 5137 5138 https://example.com/packagerepos/release/rpm/all 5139 https://example.com/packagerepos/release/rpm/core2-64 5140 https://example.com/packagerepos/release/rpm-dev/all 5141 https://example.com/packagerepos/release/rpm-dev/core2-64 5142 https://example.com/packagerepos/updates/rpm/all 5143 https://example.com/packagerepos/updates/rpm/core2-64 5144 https://example.com/packagerepos/updates/rpm-dev/all 5145 https://example.com/packagerepos/updates/rpm-dev/core2-64 5146 5147 :term:`PACKAGE_FEED_URIS` 5148 Specifies the front portion of the package feed URI used by the 5149 OpenEmbedded build system. Each final package feed URI is comprised 5150 of ``PACKAGE_FEED_URIS``, 5151 :term:`PACKAGE_FEED_BASE_PATHS`, and 5152 :term:`PACKAGE_FEED_ARCHS` variables. 5153 5154 Consider the following example where the ``PACKAGE_FEED_URIS``, 5155 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are 5156 defined in your ``local.conf`` file:: 5157 5158 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 5159 https://example.com/packagerepos/updates" 5160 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 5161 PACKAGE_FEED_ARCHS = "all core2-64" 5162 5163 Given these settings, the resulting package feeds are as follows: 5164 5165 .. code-block:: none 5166 5167 https://example.com/packagerepos/release/rpm/all 5168 https://example.com/packagerepos/release/rpm/core2-64 5169 https://example.com/packagerepos/release/rpm-dev/all 5170 https://example.com/packagerepos/release/rpm-dev/core2-64 5171 https://example.com/packagerepos/updates/rpm/all 5172 https://example.com/packagerepos/updates/rpm/core2-64 5173 https://example.com/packagerepos/updates/rpm-dev/all 5174 https://example.com/packagerepos/updates/rpm-dev/core2-64 5175 5176 :term:`PACKAGE_INSTALL` 5177 The final list of packages passed to the package manager for 5178 installation into the image. 5179 5180 Because the package manager controls actual installation of all 5181 packages, the list of packages passed using ``PACKAGE_INSTALL`` is 5182 not the final list of packages that are actually installed. This 5183 variable is internal to the image construction code. Consequently, in 5184 general, you should use the 5185 :term:`IMAGE_INSTALL` variable to specify 5186 packages for installation. The exception to this is when working with 5187 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` 5188 image. When working with an initial RAM filesystem (initramfs) image, 5189 use the ``PACKAGE_INSTALL`` variable. For information on creating an 5190 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section 5191 in the Yocto Project Development Tasks Manual. 5192 5193 :term:`PACKAGE_INSTALL_ATTEMPTONLY` 5194 Specifies a list of packages the OpenEmbedded build system attempts 5195 to install when creating an image. If a listed package fails to 5196 install, the build system does not generate an error. This variable 5197 is generally not user-defined. 5198 5199 :term:`PACKAGE_PREPROCESS_FUNCS` 5200 Specifies a list of functions run to pre-process the 5201 :term:`PKGD` directory prior to splitting the files out 5202 to individual packages. 5203 5204 :term:`PACKAGE_WRITE_DEPS` 5205 Specifies a list of dependencies for post-installation and 5206 pre-installation scripts on native/cross tools. If your 5207 post-installation or pre-installation script can execute at rootfs 5208 creation time rather than on the target but depends on a native tool 5209 in order to execute, you need to list the tools in 5210 ``PACKAGE_WRITE_DEPS``. 5211 5212 For information on running post-installation scripts, see the 5213 ":ref:`dev-manual/common-tasks:post-installation scripts`" 5214 section in the Yocto Project Development Tasks Manual. 5215 5216 :term:`PACKAGECONFIG` 5217 This variable provides a means of enabling or disabling features of a 5218 recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in 5219 recipes when you specify features and then arguments that define 5220 feature behaviors. Here is the basic block structure (broken over 5221 multiple lines for readability):: 5222 5223 PACKAGECONFIG ??= "f1 f2 f3 ..." 5224 PACKAGECONFIG[f1] = "\ 5225 --with-f1, \ 5226 --without-f1, \ 5227 build-deps-for-f1, \ 5228 runtime-deps-for-f1, \ 5229 runtime-recommends-for-f1, \ 5230 packageconfig-conflicts-for-f1" 5231 PACKAGECONFIG[f2] = "\ 5232 ... and so on and so on ... 5233 5234 The ``PACKAGECONFIG`` variable itself specifies a space-separated 5235 list of the features to enable. Following the features, you can 5236 determine the behavior of each feature by providing up to six 5237 order-dependent arguments, which are separated by commas. You can 5238 omit any argument you like but must retain the separating commas. The 5239 order is important and specifies the following: 5240 5241 1. Extra arguments that should be added to the configure script 5242 argument list (:term:`EXTRA_OECONF` or 5243 :term:`PACKAGECONFIG_CONFARGS`) if 5244 the feature is enabled. 5245 5246 2. Extra arguments that should be added to ``EXTRA_OECONF`` or 5247 ``PACKAGECONFIG_CONFARGS`` if the feature is disabled. 5248 5249 3. Additional build dependencies (:term:`DEPENDS`) 5250 that should be added if the feature is enabled. 5251 5252 4. Additional runtime dependencies (:term:`RDEPENDS`) 5253 that should be added if the feature is enabled. 5254 5255 5. Additional runtime recommendations 5256 (:term:`RRECOMMENDS`) that should be added if 5257 the feature is enabled. 5258 5259 6. Any conflicting (that is, mutually exclusive) ``PACKAGECONFIG`` 5260 settings for this feature. 5261 5262 Consider the following ``PACKAGECONFIG`` block taken from the 5263 ``librsvg`` recipe. In this example the feature is ``gtk``, which has 5264 three arguments that determine the feature's behavior. 5265 :: 5266 5267 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" 5268 5269 The 5270 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is 5271 enabled. In this case, ``--with-gtk3`` is added to the configure 5272 script argument list and ``gtk+3`` is added to ``DEPENDS``. On the 5273 other hand, if the feature is disabled say through a ``.bbappend`` 5274 file in another layer, then the second argument ``--without-gtk3`` is 5275 added to the configure script instead. 5276 5277 The basic ``PACKAGECONFIG`` structure previously described holds true 5278 regardless of whether you are creating a block or changing a block. 5279 When creating a block, use the structure inside your recipe. 5280 5281 If you want to change an existing ``PACKAGECONFIG`` block, you can do 5282 so one of two ways: 5283 5284 - *Append file:* Create an append file named 5285 recipename\ ``.bbappend`` in your layer and override the value of 5286 ``PACKAGECONFIG``. You can either completely override the 5287 variable:: 5288 5289 PACKAGECONFIG = "f4 f5" 5290 5291 Or, you can just append the variable:: 5292 5293 PACKAGECONFIG_append = " f4" 5294 5295 - *Configuration file:* This method is identical to changing the 5296 block through an append file except you edit your ``local.conf`` 5297 or ``mydistro.conf`` file. As with append files previously 5298 described, you can either completely override the variable:: 5299 5300 PACKAGECONFIG_pn-recipename = "f4 f5" 5301 5302 Or, you can just amend the variable:: 5303 5304 PACKAGECONFIG_append_pn-recipename = " f4" 5305 5306 :term:`PACKAGECONFIG_CONFARGS` 5307 A space-separated list of configuration options generated from the 5308 :term:`PACKAGECONFIG` setting. 5309 5310 Classes such as :ref:`autotools <ref-classes-autotools>` and 5311 :ref:`cmake <ref-classes-cmake>` use ``PACKAGECONFIG_CONFARGS`` to 5312 pass ``PACKAGECONFIG`` options to ``configure`` and ``cmake``, 5313 respectively. If you are using ``PACKAGECONFIG`` but not a class that 5314 handles the ``do_configure`` task, then you need to use 5315 ``PACKAGECONFIG_CONFARGS`` appropriately. 5316 5317 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` 5318 For recipes inheriting the 5319 :ref:`packagegroup <ref-classes-packagegroup>` class, setting 5320 ``PACKAGEGROUP_DISABLE_COMPLEMENTARY`` to "1" specifies that the 5321 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) 5322 should not be automatically created by the ``packagegroup`` recipe, 5323 which is the default behavior. 5324 5325 :term:`PACKAGES` 5326 The list of packages the recipe creates. The default value is the 5327 following:: 5328 5329 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} 5330 5331 During packaging, the :ref:`ref-tasks-package` task 5332 goes through ``PACKAGES`` and uses the :term:`FILES` 5333 variable corresponding to each package to assign files to the 5334 package. If a file matches the ``FILES`` variable for more than one 5335 package in ``PACKAGES``, it will be assigned to the earliest 5336 (leftmost) package. 5337 5338 Packages in the variable's list that are empty (i.e. where none of 5339 the patterns in ``FILES_``\ pkg match any files installed by the 5340 :ref:`ref-tasks-install` task) are not generated, 5341 unless generation is forced through the 5342 :term:`ALLOW_EMPTY` variable. 5343 5344 :term:`PACKAGES_DYNAMIC` 5345 A promise that your recipe satisfies runtime dependencies for 5346 optional modules that are found in other recipes. 5347 ``PACKAGES_DYNAMIC`` does not actually satisfy the dependencies, it 5348 only states that they should be satisfied. For example, if a hard, 5349 runtime dependency (:term:`RDEPENDS`) of another 5350 package is satisfied at build time through the ``PACKAGES_DYNAMIC`` 5351 variable, but a package with the module name is never actually 5352 produced, then the other package will be broken. Thus, if you attempt 5353 to include that package in an image, you will get a dependency 5354 failure from the packaging system during the 5355 :ref:`ref-tasks-rootfs` task. 5356 5357 Typically, if there is a chance that such a situation can occur and 5358 the package that is not created is valid without the dependency being 5359 satisfied, then you should use :term:`RRECOMMENDS` 5360 (a soft runtime dependency) instead of ``RDEPENDS``. 5361 5362 For an example of how to use the ``PACKAGES_DYNAMIC`` variable when 5363 you are splitting packages, see the 5364 ":ref:`dev-manual/common-tasks:handling optional module packaging`" 5365 section in the Yocto Project Development Tasks Manual. 5366 5367 :term:`PACKAGESPLITFUNCS` 5368 Specifies a list of functions run to perform additional splitting of 5369 files into individual packages. Recipes can either prepend to this 5370 variable or prepend to the ``populate_packages`` function in order to 5371 perform additional package splitting. In either case, the function 5372 should set :term:`PACKAGES`, 5373 :term:`FILES`, :term:`RDEPENDS` and 5374 other packaging variables appropriately in order to perform the 5375 desired splitting. 5376 5377 :term:`PARALLEL_MAKE` 5378 Extra options passed to the ``make`` command during the 5379 :ref:`ref-tasks-compile` task in order to specify 5380 parallel compilation on the local build host. This variable is 5381 usually in the form "-j x", where x represents the maximum number of 5382 parallel threads ``make`` can run. 5383 5384 .. note:: 5385 5386 In order for ``PARALLEL_MAKE`` to be effective, ``make`` must be 5387 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure 5388 this is to use the ``oe_runmake`` function. 5389 5390 By default, the OpenEmbedded build system automatically sets this 5391 variable to be equal to the number of cores the build system uses. 5392 5393 .. note:: 5394 5395 If the software being built experiences dependency issues during 5396 the ``do_compile`` task that result in race conditions, you can clear 5397 the ``PARALLEL_MAKE`` variable within the recipe as a workaround. For 5398 information on addressing race conditions, see the 5399 ":ref:`dev-manual/common-tasks:debugging parallel make races`" 5400 section in the Yocto Project Development Tasks Manual. 5401 5402 For single socket systems (i.e. one CPU), you should not have to 5403 override this variable to gain optimal parallelism during builds. 5404 However, if you have very large systems that employ multiple physical 5405 CPUs, you might want to make sure the ``PARALLEL_MAKE`` variable is 5406 not set higher than "-j 20". 5407 5408 For more information on speeding up builds, see the 5409 ":ref:`dev-manual/common-tasks:speeding up a build`" 5410 section in the Yocto Project Development Tasks Manual. 5411 5412 :term:`PARALLEL_MAKEINST` 5413 Extra options passed to the ``make install`` command during the 5414 :ref:`ref-tasks-install` task in order to specify 5415 parallel installation. This variable defaults to the value of 5416 :term:`PARALLEL_MAKE`. 5417 5418 .. note:: 5419 5420 In order for ``PARALLEL_MAKEINST`` to be effective, ``make`` must 5421 be called with 5422 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy 5423 way to ensure this is to use the ``oe_runmake`` function. 5424 5425 If the software being built experiences dependency issues during 5426 the ``do_install`` task that result in race conditions, you can 5427 clear the ``PARALLEL_MAKEINST`` variable within the recipe as a 5428 workaround. For information on addressing race conditions, see the 5429 ":ref:`dev-manual/common-tasks:debugging parallel make races`" 5430 section in the Yocto Project Development Tasks Manual. 5431 5432 :term:`PATCHRESOLVE` 5433 Determines the action to take when a patch fails. You can set this 5434 variable to one of two values: "noop" and "user". 5435 5436 The default value of "noop" causes the build to simply fail when the 5437 OpenEmbedded build system cannot successfully apply a patch. Setting 5438 the value to "user" causes the build system to launch a shell and 5439 places you in the right location so that you can manually resolve the 5440 conflicts. 5441 5442 Set this variable in your ``local.conf`` file. 5443 5444 :term:`PATCHTOOL` 5445 Specifies the utility used to apply patches for a recipe during the 5446 :ref:`ref-tasks-patch` task. You can specify one of 5447 three utilities: "patch", "quilt", or "git". The default utility used 5448 is "quilt" except for the quilt-native recipe itself. Because the 5449 quilt tool is not available at the time quilt-native is being 5450 patched, it uses "patch". 5451 5452 If you wish to use an alternative patching tool, set the variable in 5453 the recipe using one of the following:: 5454 5455 PATCHTOOL = "patch" 5456 PATCHTOOL = "quilt" 5457 PATCHTOOL = "git" 5458 5459 :term:`PE` 5460 The epoch of the recipe. By default, this variable is unset. The 5461 variable is used to make upgrades possible when the versioning scheme 5462 changes in some backwards incompatible way. 5463 5464 ``PE`` is the default value of the :term:`PKGE` variable. 5465 5466 :term:`PF` 5467 Specifies the recipe or package name and includes all version and 5468 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and 5469 ``bash-4.2-r1/``). This variable is comprised of the following: 5470 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} 5471 5472 :term:`PIXBUF_PACKAGES` 5473 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` 5474 class, this variable identifies packages that contain the pixbuf 5475 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache`` 5476 class assumes that the loaders are in the recipe's main package (i.e. 5477 ``${``\ :term:`PN`\ ``}``). Use this variable if the 5478 loaders you need are in a package other than that main package. 5479 5480 :term:`PKG` 5481 The name of the resulting package created by the OpenEmbedded build 5482 system. 5483 5484 .. note:: 5485 5486 When using the ``PKG`` variable, you must use a package name override. 5487 5488 For example, when the :ref:`debian <ref-classes-debian>` class 5489 renames the output package, it does so by setting 5490 ``PKG_packagename``. 5491 5492 :term:`PKG_CONFIG_PATH` 5493 The path to ``pkg-config`` files for the current build context. 5494 ``pkg-config`` reads this variable from the environment. 5495 5496 :term:`PKGD` 5497 Points to the destination directory for files to be packaged before 5498 they are split into individual packages. This directory defaults to 5499 the following:: 5500 5501 ${WORKDIR}/package 5502 5503 Do not change this default. 5504 5505 :term:`PKGDATA_DIR` 5506 Points to a shared, global-state directory that holds data generated 5507 during the packaging process. During the packaging process, the 5508 :ref:`ref-tasks-packagedata` task packages data 5509 for each recipe and installs it into this temporary, shared area. 5510 This directory defaults to the following, which you should not 5511 change:: 5512 5513 ${STAGING_DIR_HOST}/pkgdata 5514 5515 For examples of how this data is used, see the 5516 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 5517 section in the Yocto Project Overview and Concepts Manual and the 5518 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``" 5519 section in the Yocto Project Development Tasks Manual. For more 5520 information on the shared, global-state directory, see 5521 :term:`STAGING_DIR_HOST`. 5522 5523 :term:`PKGDEST` 5524 Points to the parent directory for files to be packaged after they 5525 have been split into individual packages. This directory defaults to 5526 the following:: 5527 5528 ${WORKDIR}/packages-split 5529 5530 Under this directory, the build system creates directories for each 5531 package specified in :term:`PACKAGES`. Do not change 5532 this default. 5533 5534 :term:`PKGDESTWORK` 5535 Points to a temporary work area where the 5536 :ref:`ref-tasks-package` task saves package metadata. 5537 The ``PKGDESTWORK`` location defaults to the following:: 5538 5539 ${WORKDIR}/pkgdata 5540 5541 Do not change this default. 5542 5543 The :ref:`ref-tasks-packagedata` task copies the 5544 package metadata from ``PKGDESTWORK`` to 5545 :term:`PKGDATA_DIR` to make it available globally. 5546 5547 :term:`PKGE` 5548 The epoch of the package(s) built by the recipe. By default, ``PKGE`` 5549 is set to :term:`PE`. 5550 5551 :term:`PKGR` 5552 The revision of the package(s) built by the recipe. By default, 5553 ``PKGR`` is set to :term:`PR`. 5554 5555 :term:`PKGV` 5556 The version of the package(s) built by the recipe. By default, 5557 ``PKGV`` is set to :term:`PV`. 5558 5559 :term:`PN` 5560 This variable can have two separate functions depending on the 5561 context: a recipe name or a resulting package name. 5562 5563 ``PN`` refers to a recipe name in the context of a file used by the 5564 OpenEmbedded build system as input to create a package. The name is 5565 normally extracted from the recipe file name. For example, if the 5566 recipe is named ``expat_2.0.1.bb``, then the default value of ``PN`` 5567 will be "expat". 5568 5569 The variable refers to a package name in the context of a file 5570 created or produced by the OpenEmbedded build system. 5571 5572 If applicable, the ``PN`` variable also contains any special suffix 5573 or prefix. For example, using ``bash`` to build packages for the 5574 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build 5575 packages for the target and for Multilib, ``PN`` would be ``bash`` 5576 and ``lib64-bash``, respectively. 5577 5578 :term:`PNBLACKLIST` 5579 Lists recipes you do not want the OpenEmbedded build system to build. 5580 This variable works in conjunction with the 5581 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited 5582 globally. 5583 5584 To prevent a recipe from being built, use the ``PNBLACKLIST`` 5585 variable in your ``local.conf`` file. Here is an example that 5586 prevents ``myrecipe`` from being built:: 5587 5588 PNBLACKLIST[myrecipe] = "Not supported by our organization." 5589 5590 :term:`POPULATE_SDK_POST_HOST_COMMAND` 5591 Specifies a list of functions to call once the OpenEmbedded build 5592 system has created the host part of the SDK. You can specify 5593 functions separated by semicolons:: 5594 5595 POPULATE_SDK_POST_HOST_COMMAND += "function; ... " 5596 5597 If you need to pass the SDK path to a command within a function, you 5598 can use ``${SDK_DIR}``, which points to the parent directory used by 5599 the OpenEmbedded build system when creating SDK output. See the 5600 :term:`SDK_DIR` variable for more information. 5601 5602 :term:`POPULATE_SDK_POST_TARGET_COMMAND` 5603 Specifies a list of functions to call once the OpenEmbedded build 5604 system has created the target part of the SDK. You can specify 5605 functions separated by semicolons:: 5606 5607 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " 5608 5609 If you need to pass the SDK path to a command within a function, you 5610 can use ``${SDK_DIR}``, which points to the parent directory used by 5611 the OpenEmbedded build system when creating SDK output. See the 5612 :term:`SDK_DIR` variable for more information. 5613 5614 :term:`PR` 5615 The revision of the recipe. The default value for this variable is 5616 "r0". Subsequent revisions of the recipe conventionally have the 5617 values "r1", "r2", and so forth. When :term:`PV` increases, 5618 ``PR`` is conventionally reset to "r0". 5619 5620 .. note:: 5621 5622 The OpenEmbedded build system does not need the aid of ``PR`` 5623 to know when to rebuild a recipe. The build system uses the task 5624 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the 5625 :ref:`stamp <structure-build-tmp-stamps>` and 5626 :ref:`overview-manual/concepts:shared state cache` 5627 mechanisms. 5628 5629 The ``PR`` variable primarily becomes significant when a package 5630 manager dynamically installs packages on an already built image. In 5631 this case, ``PR``, which is the default value of 5632 :term:`PKGR`, helps the package manager distinguish which 5633 package is the most recent one in cases where many packages have the 5634 same ``PV`` (i.e. ``PKGV``). A component having many packages with 5635 the same ``PV`` usually means that the packages all install the same 5636 upstream version, but with later (``PR``) version packages including 5637 packaging fixes. 5638 5639 .. note:: 5640 5641 ``PR`` does not need to be increased for changes that do not change the 5642 package contents or metadata. 5643 5644 Because manually managing ``PR`` can be cumbersome and error-prone, 5645 an automated solution exists. See the 5646 ":ref:`dev-manual/common-tasks:working with a pr service`" section 5647 in the Yocto Project Development Tasks Manual for more information. 5648 5649 :term:`PREFERRED_PROVIDER` 5650 If multiple recipes provide the same item, this variable determines 5651 which recipe is preferred and thus provides the item (i.e. the 5652 preferred provider). You should always suffix this variable with the 5653 name of the provided item. And, you should define the variable using 5654 the preferred recipe's name (:term:`PN`). Here is a common 5655 example:: 5656 5657 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 5658 5659 In the previous example, multiple recipes are providing "virtual/kernel". 5660 The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of 5661 the recipe you prefer to provide "virtual/kernel". 5662 5663 Following are more examples:: 5664 5665 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" 5666 PREFERRED_PROVIDER_virtual/libgl ?= "mesa" 5667 5668 For more 5669 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`" 5670 section in the Yocto Project Development Tasks Manual. 5671 5672 .. note:: 5673 5674 If you use a ``virtual/\*`` item with ``PREFERRED_PROVIDER``, then any 5675 recipe that :term:`PROVIDES` that item but is not selected (defined) 5676 by ``PREFERRED_PROVIDER`` is prevented from building, which is usually 5677 desirable since this mechanism is designed to select between mutually 5678 exclusive alternative providers. 5679 5680 :term:`PREFERRED_VERSION` 5681 If there are multiple versions of a recipe available, this variable 5682 determines which version should be given preference. You must always 5683 suffix the variable with the :term:`PN` you want to select (`python` in 5684 the first example below), and you should specify the :term:`PV` 5685 accordingly (`3.4.0` in the example). 5686 5687 The ``PREFERRED_VERSION`` variable supports limited wildcard use 5688 through the "``%``" character. You can use the character to match any 5689 number of characters, which can be useful when specifying versions 5690 that contain long revision numbers that potentially change. Here are 5691 two examples:: 5692 5693 PREFERRED_VERSION_python = "3.4.0" 5694 PREFERRED_VERSION_linux-yocto = "5.0%" 5695 5696 .. note:: 5697 5698 The use of the "%" character is limited in that it only works at the end of the 5699 string. You cannot use the wildcard character in any other 5700 location of the string. 5701 5702 The specified version is matched against :term:`PV`, which 5703 does not necessarily match the version part of the recipe's filename. 5704 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` 5705 where ``foo_git.bb`` contains the following assignment:: 5706 5707 PV = "1.1+git${SRCPV}" 5708 5709 In this case, the correct way to select 5710 ``foo_git.bb`` is by using an assignment such as the following:: 5711 5712 PREFERRED_VERSION_foo = "1.1+git%" 5713 5714 Compare that previous example 5715 against the following incorrect example, which does not work:: 5716 5717 PREFERRED_VERSION_foo = "git" 5718 5719 Sometimes the ``PREFERRED_VERSION`` variable can be set by 5720 configuration files in a way that is hard to change. You can use 5721 :term:`OVERRIDES` to set a machine-specific 5722 override. Here is an example:: 5723 5724 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%" 5725 5726 Although not recommended, worst case, you can also use the 5727 "forcevariable" override, which is the strongest override possible. 5728 Here is an example:: 5729 5730 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%" 5731 5732 .. note:: 5733 5734 The ``\_forcevariable`` override is not handled specially. This override 5735 only works because the default value of ``OVERRIDES`` includes "forcevariable". 5736 5737 If a recipe with the specified version is not available, a warning 5738 message will be shown. See :term:`REQUIRED_VERSION` if you want this 5739 to be an error instead. 5740 5741 :term:`PREMIRRORS` 5742 Specifies additional paths from which the OpenEmbedded build system 5743 gets source code. When the build system searches for source code, it 5744 first tries the local download directory. If that location fails, the 5745 build system tries locations defined by ``PREMIRRORS``, the upstream 5746 source, and then locations specified by 5747 :term:`MIRRORS` in that order. 5748 5749 Assuming your distribution (:term:`DISTRO`) is "poky", 5750 the default value for ``PREMIRRORS`` is defined in the 5751 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository. 5752 5753 Typically, you could add a specific server for the build system to 5754 attempt before any others by adding something like the following to 5755 the ``local.conf`` configuration file in the 5756 :term:`Build Directory`:: 5757 5758 PREMIRRORS_prepend = "\ 5759 git://.*/.* http://www.yoctoproject.org/sources/ \n \ 5760 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \ 5761 http://.*/.* http://www.yoctoproject.org/sources/ \n \ 5762 https://.*/.* http://www.yoctoproject.org/sources/ \n" 5763 5764 These changes cause the 5765 build system to intercept Git, FTP, HTTP, and HTTPS requests and 5766 direct them to the ``http://`` sources mirror. You can use 5767 ``file://`` URLs to point to local directories or network shares as 5768 well. 5769 5770 :term:`PRIORITY` 5771 Indicates the importance of a package. 5772 5773 ``PRIORITY`` is considered to be part of the distribution policy 5774 because the importance of any given recipe depends on the purpose for 5775 which the distribution is being produced. Thus, ``PRIORITY`` is not 5776 normally set within recipes. 5777 5778 You can set ``PRIORITY`` to "required", "standard", "extra", and 5779 "optional", which is the default. 5780 5781 :term:`PRIVATE_LIBS` 5782 Specifies libraries installed within a recipe that should be ignored 5783 by the OpenEmbedded build system's shared library resolver. This 5784 variable is typically used when software being built by a recipe has 5785 its own private versions of a library normally provided by another 5786 recipe. In this case, you would not want the package containing the 5787 private libraries to be set as a dependency on other unrelated 5788 packages that should instead depend on the package providing the 5789 standard version of the library. 5790 5791 Libraries specified in this variable should be specified by their 5792 file name. For example, from the Firefox recipe in meta-browser:: 5793 5794 PRIVATE_LIBS = "libmozjs.so \ 5795 libxpcom.so \ 5796 libnspr4.so \ 5797 libxul.so \ 5798 libmozalloc.so \ 5799 libplc4.so \ 5800 libplds4.so" 5801 5802 For more information, see the 5803 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 5804 section in the Yocto Project Overview and Concepts Manual. 5805 5806 :term:`PROVIDES` 5807 A list of aliases by which a particular recipe can be known. By 5808 default, a recipe's own ``PN`` is implicitly already in its 5809 ``PROVIDES`` list and therefore does not need to mention that it 5810 provides itself. If a recipe uses ``PROVIDES``, the additional 5811 aliases are synonyms for the recipe and can be useful for satisfying 5812 dependencies of other recipes during the build as specified by 5813 ``DEPENDS``. 5814 5815 Consider the following example ``PROVIDES`` statement from the recipe 5816 file ``eudev_3.2.9.bb``:: 5817 5818 PROVIDES += "udev" 5819 5820 The ``PROVIDES`` statement 5821 results in the "eudev" recipe also being available as simply "udev". 5822 5823 .. note:: 5824 5825 A recipe's own recipe name (:term:`PN`) is always implicitly prepended 5826 to `PROVIDES`, so while using "+=" in the above example may not be 5827 strictly necessary it is recommended to avoid confusion. 5828 5829 In addition to providing recipes under alternate names, the 5830 ``PROVIDES`` mechanism is also used to implement virtual targets. A 5831 virtual target is a name that corresponds to some particular 5832 functionality (e.g. a Linux kernel). Recipes that provide the 5833 functionality in question list the virtual target in ``PROVIDES``. 5834 Recipes that depend on the functionality in question can include the 5835 virtual target in ``DEPENDS`` to leave the choice of provider open. 5836 5837 Conventionally, virtual targets have names on the form 5838 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part 5839 of the name and has no syntactical significance. 5840 5841 The :term:`PREFERRED_PROVIDER` variable is 5842 used to select which particular recipe provides a virtual target. 5843 5844 .. note:: 5845 5846 A corresponding mechanism for virtual runtime dependencies 5847 (packages) exists. However, the mechanism does not depend on any 5848 special functionality beyond ordinary variable assignments. For 5849 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of 5850 the component that manages the ``/dev`` directory. 5851 5852 Setting the "preferred provider" for runtime dependencies is as 5853 simple as using the following assignment in a configuration file:: 5854 5855 VIRTUAL-RUNTIME_dev_manager = "udev" 5856 5857 5858 :term:`PRSERV_HOST` 5859 The network based :term:`PR` service host and port. 5860 5861 The ``conf/local.conf.sample.extended`` configuration file in the 5862 :term:`Source Directory` shows how the 5863 ``PRSERV_HOST`` variable is set:: 5864 5865 PRSERV_HOST = "localhost:0" 5866 5867 You must 5868 set the variable if you want to automatically start a local :ref:`PR 5869 service <dev-manual/common-tasks:working with a pr service>`. You can 5870 set ``PRSERV_HOST`` to other values to use a remote PR service. 5871 5872 5873 :term:`PSEUDO_IGNORE_PATHS` 5874 A comma-separated (without spaces) list of path prefixes that should be ignored 5875 by pseudo when monitoring and recording file operations, in order to avoid 5876 problems with files being written to outside of the pseudo context and 5877 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list 5878 and can include partial directory (or file) names. 5879 5880 5881 :term:`PTEST_ENABLED` 5882 Specifies whether or not :ref:`Package 5883 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest) 5884 functionality is enabled when building a recipe. You should not set 5885 this variable directly. Enabling and disabling building Package Tests 5886 at build time should be done by adding "ptest" to (or removing it 5887 from) :term:`DISTRO_FEATURES`. 5888 5889 :term:`PV` 5890 The version of the recipe. The version is normally extracted from the 5891 recipe filename. For example, if the recipe is named 5892 ``expat_2.0.1.bb``, then the default value of ``PV`` will be "2.0.1". 5893 ``PV`` is generally not overridden within a recipe unless it is 5894 building an unstable (i.e. development) version from a source code 5895 repository (e.g. Git or Subversion). 5896 5897 ``PV`` is the default value of the :term:`PKGV` variable. 5898 5899 :term:`PYTHON_ABI` 5900 When used by recipes that inherit the 5901 :ref:`distutils3 <ref-classes-distutils3>`, 5902 :ref:`setuptools3 <ref-classes-setuptools3>` classes, denotes the 5903 Application Binary Interface (ABI) currently in use for Python. By 5904 default, the ABI is "m". You do not have to set this variable as the 5905 OpenEmbedded build system sets it for you. 5906 5907 The OpenEmbedded build system uses the ABI to construct directory 5908 names used when installing the Python headers and libraries in 5909 sysroot (e.g. ``.../python3.3m/...``). 5910 5911 Recipes that inherit the ``distutils3`` class during cross-builds also 5912 use this variable to locate the headers and libraries of the 5913 appropriate Python that the extension is targeting. 5914 5915 :term:`PYTHON_PN` 5916 When used by recipes that inherit the 5917 `distutils3 <ref-classes-distutils3>`, 5918 :ref:`setuptools3 <ref-classes-setuptools3>` classes, specifies the 5919 major Python version being built. For Python 3.x, ``PYTHON_PN`` would 5920 be "python3". You do not have to set this variable as the 5921 OpenEmbedded build system automatically sets it for you. 5922 5923 The variable allows recipes to use common infrastructure such as the 5924 following:: 5925 5926 DEPENDS += "${PYTHON_PN}-native" 5927 5928 In the previous example, 5929 the version of the dependency is ``PYTHON_PN``. 5930 5931 :term:`RANLIB` 5932 The minimal command and arguments to run ``ranlib``. 5933 5934 :term:`RCONFLICTS` 5935 The list of packages that conflict with packages. Note that packages 5936 will not be installed if conflicting packages are not first removed. 5937 5938 Like all package-controlling variables, you must always use them in 5939 conjunction with a package name override. Here is an example:: 5940 5941 RCONFLICTS_${PN} = "another_conflicting_package_name" 5942 5943 BitBake, which the OpenEmbedded build system uses, supports 5944 specifying versioned dependencies. Although the syntax varies 5945 depending on the packaging format, BitBake hides these differences 5946 from you. Here is the general syntax to specify versions with the 5947 ``RCONFLICTS`` variable:: 5948 5949 RCONFLICTS_${PN} = "package (operator version)" 5950 5951 For ``operator``, you can specify the following: 5952 5953 - = 5954 - < 5955 - > 5956 - <= 5957 - >= 5958 5959 For example, the following sets up a dependency on version 1.2 or 5960 greater of the package ``foo``:: 5961 5962 RCONFLICTS_${PN} = "foo (>= 1.2)" 5963 5964 :term:`RDEPENDS` 5965 Lists runtime dependencies of a package. These dependencies are other 5966 packages that must be installed in order for the package to function 5967 correctly. As an example, the following assignment declares that the 5968 package ``foo`` needs the packages ``bar`` and ``baz`` to be 5969 installed:: 5970 5971 RDEPENDS_foo = "bar baz" 5972 5973 The most common types of package 5974 runtime dependencies are automatically detected and added. Therefore, 5975 most recipes do not need to set ``RDEPENDS``. For more information, 5976 see the 5977 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 5978 section in the Yocto Project Overview and Concepts Manual. 5979 5980 The practical effect of the above ``RDEPENDS`` assignment is that 5981 ``bar`` and ``baz`` will be declared as dependencies inside the 5982 package ``foo`` when it is written out by one of the 5983 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks. 5984 Exactly how this is done depends on which package format is used, 5985 which is determined by 5986 :term:`PACKAGE_CLASSES`. When the 5987 corresponding package manager installs the package, it will know to 5988 also install the packages on which it depends. 5989 5990 To ensure that the packages ``bar`` and ``baz`` get built, the 5991 previous ``RDEPENDS`` assignment also causes a task dependency to be 5992 added. This dependency is from the recipe's 5993 :ref:`ref-tasks-build` (not to be confused with 5994 :ref:`ref-tasks-compile`) task to the 5995 ``do_package_write_*`` task of the recipes that build ``bar`` and 5996 ``baz``. 5997 5998 The names of the packages you list within ``RDEPENDS`` must be the 5999 names of other packages - they cannot be recipe names. Although 6000 package names and recipe names usually match, the important point 6001 here is that you are providing package names within the ``RDEPENDS`` 6002 variable. For an example of the default list of packages created from 6003 a recipe, see the :term:`PACKAGES` variable. 6004 6005 Because the ``RDEPENDS`` variable applies to packages being built, 6006 you should always use the variable in a form with an attached package 6007 name (remember that a single recipe can build multiple packages). For 6008 example, suppose you are building a development package that depends 6009 on the ``perl`` package. In this case, you would use the following 6010 ``RDEPENDS`` statement:: 6011 6012 RDEPENDS_${PN}-dev += "perl" 6013 6014 In the example, 6015 the development package depends on the ``perl`` package. Thus, the 6016 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of 6017 the variable. 6018 6019 .. note:: 6020 6021 ``RDEPENDS_${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` 6022 by default. This default is set in the BitBake configuration file 6023 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove 6024 ``${PN}`` when modifying ``RDEPENDS_${PN}-dev``. Use the "+=" operator 6025 rather than the "=" operator. 6026 6027 The package names you use with ``RDEPENDS`` must appear as they would 6028 in the ``PACKAGES`` variable. The :term:`PKG` variable 6029 allows a different name to be used for the final package (e.g. the 6030 :ref:`debian <ref-classes-debian>` class uses this to rename 6031 packages), but this final package name cannot be used with 6032 ``RDEPENDS``, which makes sense as ``RDEPENDS`` is meant to be 6033 independent of the package format used. 6034 6035 BitBake, which the OpenEmbedded build system uses, supports 6036 specifying versioned dependencies. Although the syntax varies 6037 depending on the packaging format, BitBake hides these differences 6038 from you. Here is the general syntax to specify versions with the 6039 ``RDEPENDS`` variable:: 6040 6041 RDEPENDS_${PN} = "package (operator version)" 6042 6043 For ``operator``, you can specify the following: 6044 6045 - = 6046 - < 6047 - > 6048 - <= 6049 - >= 6050 6051 For version, provide the version number. 6052 6053 .. note:: 6054 6055 You can use ``EXTENDPKGV`` to provide a full package version 6056 specification. 6057 6058 For example, the following sets up a dependency on version 1.2 or 6059 greater of the package ``foo``:: 6060 6061 RDEPENDS_${PN} = "foo (>= 1.2)" 6062 6063 For information on build-time dependencies, see the 6064 :term:`DEPENDS` variable. You can also see the 6065 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and 6066 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the 6067 BitBake User Manual for additional information on tasks and 6068 dependencies. 6069 6070 :term:`REQUIRED_DISTRO_FEATURES` 6071 When inheriting the 6072 :ref:`features_check <ref-classes-features_check>` 6073 class, this variable identifies distribution features that must exist 6074 in the current configuration in order for the OpenEmbedded build 6075 system to build the recipe. In other words, if the 6076 ``REQUIRED_DISTRO_FEATURES`` variable lists a feature that does not 6077 appear in ``DISTRO_FEATURES`` within the current configuration, then 6078 the recipe will be skipped, and if the build system attempts to build 6079 the recipe then an error will be triggered. 6080 6081 :term:`REQUIRED_VERSION` 6082 If there are multiple versions of a recipe available, this variable 6083 determines which version should be given preference. 6084 :term:`REQUIRED_VERSION` works in exactly the same manner as 6085 :term:`PREFERRED_VERSION`, except that if the specified version is not 6086 available then an error message is shown and the build fails 6087 immediately. 6088 6089 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set 6090 for the same recipe, the :term:`REQUIRED_VERSION` value applies. 6091 6092 :term:`RM_WORK_EXCLUDE` 6093 With ``rm_work`` enabled, this variable specifies a list of recipes 6094 whose work directories should not be removed. See the 6095 ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more 6096 details. 6097 6098 :term:`ROOT_HOME` 6099 Defines the root home directory. By default, this directory is set as 6100 follows in the BitBake configuration file:: 6101 6102 ROOT_HOME ??= "/home/root" 6103 6104 .. note:: 6105 6106 This default value is likely used because some embedded solutions 6107 prefer to have a read-only root filesystem and prefer to keep 6108 writeable data in one place. 6109 6110 You can override the default by setting the variable in any layer or 6111 in the ``local.conf`` file. Because the default is set using a "weak" 6112 assignment (i.e. "??="), you can use either of the following forms to 6113 define your override:: 6114 6115 ROOT_HOME = "/root" 6116 ROOT_HOME ?= "/root" 6117 6118 These 6119 override examples use ``/root``, which is probably the most commonly 6120 used override. 6121 6122 :term:`ROOTFS` 6123 Indicates a filesystem image to include as the root filesystem. 6124 6125 The ``ROOTFS`` variable is an optional variable used with the 6126 :ref:`image-live <ref-classes-image-live>` class. 6127 6128 :term:`ROOTFS_POSTINSTALL_COMMAND` 6129 Specifies a list of functions to call after the OpenEmbedded build 6130 system has installed packages. You can specify functions separated by 6131 semicolons:: 6132 6133 ROOTFS_POSTINSTALL_COMMAND += "function; ... " 6134 6135 If you need to pass the root filesystem path to a command within a 6136 function, you can use ``${IMAGE_ROOTFS}``, which points to the 6137 directory that becomes the root filesystem image. See the 6138 :term:`IMAGE_ROOTFS` variable for more 6139 information. 6140 6141 :term:`ROOTFS_POSTPROCESS_COMMAND` 6142 Specifies a list of functions to call once the OpenEmbedded build 6143 system has created the root filesystem. You can specify functions 6144 separated by semicolons:: 6145 6146 ROOTFS_POSTPROCESS_COMMAND += "function; ... " 6147 6148 If you need to pass the root filesystem path to a command within a 6149 function, you can use ``${IMAGE_ROOTFS}``, which points to the 6150 directory that becomes the root filesystem image. See the 6151 :term:`IMAGE_ROOTFS` variable for more 6152 information. 6153 6154 :term:`ROOTFS_POSTUNINSTALL_COMMAND` 6155 Specifies a list of functions to call after the OpenEmbedded build 6156 system has removed unnecessary packages. When runtime package 6157 management is disabled in the image, several packages are removed 6158 including ``base-passwd``, ``shadow``, and ``update-alternatives``. 6159 You can specify functions separated by semicolons:: 6160 6161 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " 6162 6163 If you need to pass the root filesystem path to a command within a 6164 function, you can use ``${IMAGE_ROOTFS}``, which points to the 6165 directory that becomes the root filesystem image. See the 6166 :term:`IMAGE_ROOTFS` variable for more 6167 information. 6168 6169 :term:`ROOTFS_PREPROCESS_COMMAND` 6170 Specifies a list of functions to call before the OpenEmbedded build 6171 system has created the root filesystem. You can specify functions 6172 separated by semicolons:: 6173 6174 ROOTFS_PREPROCESS_COMMAND += "function; ... " 6175 6176 If you need to pass the root filesystem path to a command within a 6177 function, you can use ``${IMAGE_ROOTFS}``, which points to the 6178 directory that becomes the root filesystem image. See the 6179 :term:`IMAGE_ROOTFS` variable for more 6180 information. 6181 6182 :term:`RPROVIDES` 6183 A list of package name aliases that a package also provides. These 6184 aliases are useful for satisfying runtime dependencies of other 6185 packages both during the build and on the target (as specified by 6186 ``RDEPENDS``). 6187 6188 .. note:: 6189 6190 A package's own name is implicitly already in its ``RPROVIDES`` list. 6191 6192 As with all package-controlling variables, you must always use the 6193 variable in conjunction with a package name override. Here is an 6194 example:: 6195 6196 RPROVIDES_${PN} = "widget-abi-2" 6197 6198 :term:`RRECOMMENDS` 6199 A list of packages that extends the usability of a package being 6200 built. The package being built does not depend on this list of 6201 packages in order to successfully build, but rather uses them for 6202 extended usability. To specify runtime dependencies for packages, see 6203 the ``RDEPENDS`` variable. 6204 6205 The package manager will automatically install the ``RRECOMMENDS`` 6206 list of packages when installing the built package. However, you can 6207 prevent listed packages from being installed by using the 6208 :term:`BAD_RECOMMENDATIONS`, 6209 :term:`NO_RECOMMENDATIONS`, and 6210 :term:`PACKAGE_EXCLUDE` variables. 6211 6212 Packages specified in ``RRECOMMENDS`` need not actually be produced. 6213 However, there must be a recipe providing each package, either 6214 through the :term:`PACKAGES` or 6215 :term:`PACKAGES_DYNAMIC` variables or the 6216 :term:`RPROVIDES` variable, or an error will occur 6217 during the build. If such a recipe does exist and the package is not 6218 produced, the build continues without error. 6219 6220 Because the ``RRECOMMENDS`` variable applies to packages being built, 6221 you should always attach an override to the variable to specify the 6222 particular package whose usability is being extended. For example, 6223 suppose you are building a development package that is extended to 6224 support wireless functionality. In this case, you would use the 6225 following:: 6226 6227 RRECOMMENDS_${PN}-dev += "wireless_package_name" 6228 6229 In the 6230 example, the package name (``${PN}-dev``) must appear as it would in 6231 the ``PACKAGES`` namespace before any renaming of the output package 6232 by classes such as ``debian.bbclass``. 6233 6234 BitBake, which the OpenEmbedded build system uses, supports 6235 specifying versioned recommends. Although the syntax varies depending 6236 on the packaging format, BitBake hides these differences from you. 6237 Here is the general syntax to specify versions with the 6238 ``RRECOMMENDS`` variable:: 6239 6240 RRECOMMENDS_${PN} = "package (operator version)" 6241 6242 For ``operator``, you can specify the following: 6243 6244 - = 6245 - < 6246 - > 6247 - <= 6248 - >= 6249 6250 For example, the following sets up a recommend on version 1.2 or 6251 greater of the package ``foo``:: 6252 6253 RRECOMMENDS_${PN} = "foo (>= 1.2)" 6254 6255 :term:`RREPLACES` 6256 A list of packages replaced by a package. The package manager uses 6257 this variable to determine which package should be installed to 6258 replace other package(s) during an upgrade. In order to also have the 6259 other package(s) removed at the same time, you must add the name of 6260 the other package to the ``RCONFLICTS`` variable. 6261 6262 As with all package-controlling variables, you must use this variable 6263 in conjunction with a package name override. Here is an example:: 6264 6265 RREPLACES_${PN} = "other_package_being_replaced" 6266 6267 BitBake, which the OpenEmbedded build system uses, supports 6268 specifying versioned replacements. Although the syntax varies 6269 depending on the packaging format, BitBake hides these differences 6270 from you. Here is the general syntax to specify versions with the 6271 ``RREPLACES`` variable:: 6272 6273 RREPLACES_${PN} = "package (operator version)" 6274 6275 For ``operator``, you can specify the following: 6276 6277 - = 6278 - < 6279 - > 6280 - <= 6281 - >= 6282 6283 For example, the following sets up a replacement using version 1.2 6284 or greater of the package ``foo``:: 6285 6286 RREPLACES_${PN} = "foo (>= 1.2)" 6287 6288 :term:`RSUGGESTS` 6289 A list of additional packages that you can suggest for installation 6290 by the package manager at the time a package is installed. Not all 6291 package managers support this functionality. 6292 6293 As with all package-controlling variables, you must always use this 6294 variable in conjunction with a package name override. Here is an 6295 example:: 6296 6297 RSUGGESTS_${PN} = "useful_package another_package" 6298 6299 :term:`S` 6300 The location in the :term:`Build Directory` where 6301 unpacked recipe source code resides. By default, this directory is 6302 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, 6303 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe 6304 version. If the source tarball extracts the code to a directory named 6305 anything other than ``${BPN}-${PV}``, or if the source code is 6306 fetched from an SCM such as Git or Subversion, then you must set 6307 ``S`` in the recipe so that the OpenEmbedded build system knows where 6308 to find the unpacked source. 6309 6310 As an example, assume a :term:`Source Directory` 6311 top-level folder named ``poky`` and a default Build Directory at 6312 ``poky/build``. In this case, the work directory the build system 6313 uses to keep the unpacked recipe for ``db`` is the following:: 6314 6315 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 6316 6317 The unpacked source code resides in the ``db-5.1.19`` folder. 6318 6319 This next example assumes a Git repository. By default, Git 6320 repositories are cloned to ``${WORKDIR}/git`` during 6321 :ref:`ref-tasks-fetch`. Since this path is different 6322 from the default value of ``S``, you must set it specifically so the 6323 source can be located:: 6324 6325 SRC_URI = "git://path/to/repo.git" 6326 S = "${WORKDIR}/git" 6327 6328 :term:`SANITY_REQUIRED_UTILITIES` 6329 Specifies a list of command-line utilities that should be checked for 6330 during the initial sanity checking process when running BitBake. If 6331 any of the utilities are not installed on the build host, then 6332 BitBake immediately exits with an error. 6333 6334 :term:`SANITY_TESTED_DISTROS` 6335 A list of the host distribution identifiers that the build system has 6336 been tested against. Identifiers consist of the host distributor ID 6337 followed by the release, as reported by the ``lsb_release`` tool or 6338 as read from ``/etc/lsb-release``. Separate the list items with 6339 explicit newline characters (``\n``). If ``SANITY_TESTED_DISTROS`` is 6340 not empty and the current value of 6341 :term:`NATIVELSBSTRING` does not appear in the 6342 list, then the build system reports a warning that indicates the 6343 current host distribution has not been tested as a build host. 6344 6345 :term:`SDK_ARCH` 6346 The target architecture for the SDK. Typically, you do not directly 6347 set this variable. Instead, use :term:`SDKMACHINE`. 6348 6349 :term:`SDK_CUSTOM_TEMPLATECONF` 6350 When building the extensible SDK, if ``SDK_CUSTOM_TEMPLATECONF`` is set to 6351 "1" and a ``conf/templateconf.conf`` file exists in the build directory 6352 (:term:`TOPDIR`) then this will be copied into the SDK. 6353 6354 :term:`SDK_DEPLOY` 6355 The directory set up and used by the 6356 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which 6357 the SDK is deployed. The ``populate_sdk_base`` class defines 6358 ``SDK_DEPLOY`` as follows:: 6359 6360 SDK_DEPLOY = "${TMPDIR}/deploy/sdk" 6361 6362 :term:`SDK_DIR` 6363 The parent directory used by the OpenEmbedded build system when 6364 creating SDK output. The 6365 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines 6366 the variable as follows:: 6367 6368 SDK_DIR = "${WORKDIR}/sdk" 6369 6370 .. note:: 6371 6372 The ``SDK_DIR`` directory is a temporary directory as it is part of 6373 ``WORKDIR``. The final output directory is :term:`SDK_DEPLOY`. 6374 6375 :term:`SDK_EXT_TYPE` 6376 Controls whether or not shared state artifacts are copied into the 6377 extensible SDK. The default value of "full" copies all of the 6378 required shared state artifacts into the extensible SDK. The value 6379 "minimal" leaves these artifacts out of the SDK. 6380 6381 .. note:: 6382 6383 If you set the variable to "minimal", you need to ensure 6384 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the 6385 artifacts to be fetched as needed. 6386 6387 :term:`SDK_HOST_MANIFEST` 6388 The manifest file for the host part of the SDK. This file lists all 6389 the installed packages that make up the host part of the SDK. The 6390 file contains package information on a line-per-package basis as 6391 follows:: 6392 6393 packagename packagearch version 6394 6395 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class 6396 defines the manifest file as follows:: 6397 6398 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" 6399 6400 The location is derived using the :term:`SDK_DEPLOY` and 6401 :term:`TOOLCHAIN_OUTPUTNAME` variables. 6402 6403 :term:`SDK_INCLUDE_PKGDATA` 6404 When set to "1", specifies to include the packagedata for all recipes 6405 in the "world" target in the extensible SDK. Including this data 6406 allows the ``devtool search`` command to find these recipes in search 6407 results, as well as allows the ``devtool add`` command to map 6408 dependencies more effectively. 6409 6410 .. note:: 6411 6412 Enabling the ``SDK_INCLUDE_PKGDATA`` 6413 variable significantly increases build time because all of world 6414 needs to be built. Enabling the variable also slightly increases 6415 the size of the extensible SDK. 6416 6417 :term:`SDK_INCLUDE_TOOLCHAIN` 6418 When set to "1", specifies to include the toolchain in the extensible 6419 SDK. Including the toolchain is useful particularly when 6420 :term:`SDK_EXT_TYPE` is set to "minimal" to keep 6421 the SDK reasonably small but you still want to provide a usable 6422 toolchain. For example, suppose you want to use the toolchain from an 6423 IDE or from other tools and you do not want to perform additional 6424 steps to install the toolchain. 6425 6426 The ``SDK_INCLUDE_TOOLCHAIN`` variable defaults to "0" if 6427 ``SDK_EXT_TYPE`` is set to "minimal", and defaults to "1" if 6428 ``SDK_EXT_TYPE`` is set to "full". 6429 6430 :term:`SDK_INHERIT_BLACKLIST` 6431 A list of classes to remove from the :term:`INHERIT` 6432 value globally within the extensible SDK configuration. The 6433 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the 6434 default value:: 6435 6436 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" 6437 6438 Some classes are not generally applicable within the extensible SDK 6439 context. You can use this variable to disable those classes. 6440 6441 For additional information on how to customize the extensible SDK's 6442 configuration, see the 6443 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 6444 section in the Yocto Project Application Development and the 6445 Extensible Software Development Kit (eSDK) manual. 6446 6447 :term:`SDK_LOCAL_CONF_BLACKLIST` 6448 A list of variables not allowed through from the OpenEmbedded build 6449 system configuration into the extensible SDK configuration. Usually, 6450 these are variables that are specific to the machine on which the 6451 build system is running and thus would be potentially problematic 6452 within the extensible SDK. 6453 6454 By default, ``SDK_LOCAL_CONF_BLACKLIST`` is set in the 6455 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and 6456 excludes the following variables: 6457 6458 - :term:`CONF_VERSION` 6459 - :term:`BB_NUMBER_THREADS` 6460 - :term:`bitbake:BB_NUMBER_PARSE_THREADS` 6461 - :term:`PARALLEL_MAKE` 6462 - :term:`PRSERV_HOST` 6463 - :term:`SSTATE_MIRRORS` :term:`DL_DIR` 6464 - :term:`SSTATE_DIR` :term:`TMPDIR` 6465 - :term:`BB_SERVER_TIMEOUT` 6466 6467 For additional information on how to customize the extensible SDK's 6468 configuration, see the 6469 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 6470 section in the Yocto Project Application Development and the 6471 Extensible Software Development Kit (eSDK) manual. 6472 6473 :term:`SDK_LOCAL_CONF_WHITELIST` 6474 A list of variables allowed through from the OpenEmbedded build 6475 system configuration into the extensible SDK configuration. By 6476 default, the list of variables is empty and is set in the 6477 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. 6478 6479 This list overrides the variables specified using the 6480 :term:`SDK_LOCAL_CONF_BLACKLIST` 6481 variable as well as any variables identified by automatic 6482 blacklisting due to the "/" character being found at the start of the 6483 value, which is usually indicative of being a path and thus might not 6484 be valid on the system where the SDK is installed. 6485 6486 For additional information on how to customize the extensible SDK's 6487 configuration, see the 6488 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 6489 section in the Yocto Project Application Development and the 6490 Extensible Software Development Kit (eSDK) manual. 6491 6492 :term:`SDK_NAME` 6493 The base name for SDK output files. The name is derived from the 6494 :term:`DISTRO`, :term:`TCLIBC`, 6495 :term:`SDK_ARCH`, 6496 :term:`IMAGE_BASENAME`, and 6497 :term:`TUNE_PKGARCH` variables:: 6498 6499 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" 6500 6501 :term:`SDK_OS` 6502 Specifies the operating system for which the SDK will be built. The 6503 default value is the value of :term:`BUILD_OS`. 6504 6505 :term:`SDK_OUTPUT` 6506 The location used by the OpenEmbedded build system when creating SDK 6507 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` 6508 class defines the variable as follows:: 6509 6510 SDK_DIR = "${WORKDIR}/sdk" 6511 SDK_OUTPUT = "${SDK_DIR}/image" 6512 SDK_DEPLOY = "${DEPLOY_DIR}/sdk" 6513 6514 .. note:: 6515 6516 The ``SDK_OUTPUT`` directory is a temporary directory as it is part of 6517 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is 6518 :term:`SDK_DEPLOY`. 6519 6520 :term:`SDK_PACKAGE_ARCHS` 6521 Specifies a list of architectures compatible with the SDK machine. 6522 This variable is set automatically and should not normally be 6523 hand-edited. Entries are separated using spaces and listed in order 6524 of priority. The default value for ``SDK_PACKAGE_ARCHS`` is "all any 6525 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". 6526 6527 :term:`SDK_POSTPROCESS_COMMAND` 6528 Specifies a list of functions to call once the OpenEmbedded build 6529 system creates the SDK. You can specify functions separated by 6530 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... " 6531 6532 If you need to pass an SDK path to a command within a function, you 6533 can use ``${SDK_DIR}``, which points to the parent directory used by 6534 the OpenEmbedded build system when creating SDK output. See the 6535 :term:`SDK_DIR` variable for more information. 6536 6537 :term:`SDK_PREFIX` 6538 The toolchain binary prefix used for ``nativesdk`` recipes. The 6539 OpenEmbedded build system uses the ``SDK_PREFIX`` value to set the 6540 :term:`TARGET_PREFIX` when building 6541 ``nativesdk`` recipes. The default value is "${SDK_SYS}-". 6542 6543 :term:`SDK_RECRDEP_TASKS` 6544 A list of shared state tasks added to the extensible SDK. By default, 6545 the following tasks are added: 6546 6547 - do_populate_lic 6548 - do_package_qa 6549 - do_populate_sysroot 6550 - do_deploy 6551 6552 Despite the default value of "" for the 6553 ``SDK_RECRDEP_TASKS`` variable, the above four tasks are always added 6554 to the SDK. To specify tasks beyond these four, you need to use the 6555 ``SDK_RECRDEP_TASKS`` variable (e.g. you are defining additional 6556 tasks that are needed in order to build 6557 :term:`SDK_TARGETS`). 6558 6559 :term:`SDK_SYS` 6560 Specifies the system, including the architecture and the operating 6561 system, for which the SDK will be built. 6562 6563 The OpenEmbedded build system automatically sets this variable based 6564 on :term:`SDK_ARCH`, 6565 :term:`SDK_VENDOR`, and 6566 :term:`SDK_OS`. You do not need to set the ``SDK_SYS`` 6567 variable yourself. 6568 6569 :term:`SDK_TARGET_MANIFEST` 6570 The manifest file for the target part of the SDK. This file lists all 6571 the installed packages that make up the target part of the SDK. The 6572 file contains package information on a line-per-package basis as 6573 follows:: 6574 6575 packagename packagearch version 6576 6577 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class 6578 defines the manifest file as follows:: 6579 6580 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" 6581 6582 The location is derived using the :term:`SDK_DEPLOY` and 6583 :term:`TOOLCHAIN_OUTPUTNAME` variables. 6584 6585 :term:`SDK_TARGETS` 6586 A list of targets to install from shared state as part of the 6587 standard or extensible SDK installation. The default value is "${PN}" 6588 (i.e. the image from which the SDK is built). 6589 6590 The ``SDK_TARGETS`` variable is an internal variable and typically 6591 would not be changed. 6592 6593 :term:`SDK_TITLE` 6594 The title to be printed when running the SDK installer. By default, 6595 this title is based on the :term:`DISTRO_NAME` or 6596 :term:`DISTRO` variable and is set in the 6597 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as 6598 follows:: 6599 6600 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" 6601 6602 For the default distribution "poky", 6603 ``SDK_TITLE`` is set to "Poky (Yocto Project Reference Distro)". 6604 6605 For information on how to change this default title, see the 6606 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" 6607 section in the Yocto Project Application Development and the 6608 Extensible Software Development Kit (eSDK) manual. 6609 6610 :term:`SDK_UPDATE_URL` 6611 An optional URL for an update server for the extensible SDK. If set, 6612 the value is used as the default update server when running 6613 ``devtool sdk-update`` within the extensible SDK. 6614 6615 :term:`SDK_VENDOR` 6616 Specifies the name of the SDK vendor. 6617 6618 :term:`SDK_VERSION` 6619 Specifies the version of the SDK. The Poky distribution configuration file 6620 (``/meta-poky/conf/distro/poky.conf``) sets the default 6621 ``SDK_VERSION`` as follows:: 6622 6623 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" 6624 6625 For additional information, see the 6626 :term:`DISTRO_VERSION` and 6627 :term:`METADATA_REVISION` variables. 6628 6629 :term:`SDKEXTPATH` 6630 The default installation directory for the Extensible SDK. By 6631 default, this directory is based on the :term:`DISTRO` 6632 variable and is set in the 6633 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as 6634 follows:: 6635 6636 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" 6637 6638 For the 6639 default distribution "poky", the ``SDKEXTPATH`` is set to "poky_sdk". 6640 6641 For information on how to change this default directory, see the 6642 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" 6643 section in the Yocto Project Application Development and the 6644 Extensible Software Development Kit (eSDK) manual. 6645 6646 :term:`SDKIMAGE_FEATURES` 6647 Equivalent to ``IMAGE_FEATURES``. However, this variable applies to 6648 the SDK generated from an image using the following command:: 6649 6650 $ bitbake -c populate_sdk imagename 6651 6652 :term:`SDKMACHINE` 6653 The machine for which the SDK is built. In other words, the SDK is 6654 built such that it runs on the target you specify with the 6655 ``SDKMACHINE`` value. The value points to a corresponding ``.conf`` 6656 file under ``conf/machine-sdk/``. 6657 6658 You can use "i686" and "x86_64" as possible values for this variable. 6659 The variable defaults to "i686" and is set in the local.conf file in 6660 the Build Directory. 6661 :: 6662 6663 SDKMACHINE ?= "i686" 6664 6665 .. note:: 6666 6667 You cannot set the ``SDKMACHINE`` 6668 variable in your distribution configuration file. If you do, the 6669 configuration will not take affect. 6670 6671 :term:`SDKPATH` 6672 Defines the path offered to the user for installation of the SDK that 6673 is generated by the OpenEmbedded build system. The path appears as 6674 the default location for installing the SDK when you run the SDK's 6675 installation script. You can override the offered path when you run 6676 the script. 6677 6678 :term:`SDKTARGETSYSROOT` 6679 The full path to the sysroot used for cross-compilation within an SDK 6680 as it will be when installed into the default 6681 :term:`SDKPATH`. 6682 6683 :term:`SECTION` 6684 The section in which packages should be categorized. Package 6685 management utilities can make use of this variable. 6686 6687 :term:`SELECTED_OPTIMIZATION` 6688 Specifies the optimization flags passed to the C compiler when 6689 building for the target. The flags are passed through the default 6690 value of the :term:`TARGET_CFLAGS` variable. 6691 6692 The ``SELECTED_OPTIMIZATION`` variable takes the value of 6693 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which 6694 case the value of :term:`DEBUG_OPTIMIZATION` is used. 6695 6696 :term:`SERIAL_CONSOLE` 6697 Defines a serial console (TTY) to enable using 6698 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a 6699 value that specifies the baud rate followed by the TTY device name 6700 separated by a space. You cannot specify more than one TTY device:: 6701 6702 SERIAL_CONSOLE = "115200 ttyS0" 6703 6704 .. note:: 6705 6706 The ``SERIAL_CONSOLE`` variable is deprecated. Please use the 6707 :term:`SERIAL_CONSOLES` variable. 6708 6709 :term:`SERIAL_CONSOLES` 6710 Defines a serial console (TTY) to enable using 6711 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a 6712 value that specifies the baud rate followed by the TTY device name 6713 separated by a semicolon. Use spaces to separate multiple devices:: 6714 6715 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" 6716 6717 :term:`SERIAL_CONSOLES_CHECK` 6718 Specifies serial consoles, which must be listed in 6719 :term:`SERIAL_CONSOLES`, to check against 6720 ``/proc/console`` before enabling them using getty. This variable 6721 allows aliasing in the format: <device>:<alias>. If a device was 6722 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in 6723 ``/proc/console``, you would do the following:: 6724 6725 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0" 6726 6727 This variable is currently only supported with SysVinit (i.e. not 6728 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires 6729 ``/etc/inittab`` to be writable when used with SysVinit. This makes it 6730 incompatible with customizations such as the following:: 6731 6732 EXTRA_IMAGE_FEATURES += "read-only-rootfs" 6733 6734 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` 6735 A list of recipe dependencies that should not be used to determine 6736 signatures of tasks from one recipe when they depend on tasks from 6737 another recipe. For example:: 6738 6739 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" 6740 6741 In the previous example, ``intone`` depends on ``mplayer2``. 6742 6743 You can use the special token ``"*"`` on the left-hand side of the 6744 dependency to match all recipes except the one on the right-hand 6745 side. Here is an example:: 6746 6747 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" 6748 6749 In the previous example, all recipes except ``quilt-native`` ignore 6750 task signatures from the ``quilt-native`` recipe when determining 6751 their task signatures. 6752 6753 Use of this variable is one mechanism to remove dependencies that 6754 affect task signatures and thus force rebuilds when a recipe changes. 6755 6756 .. note:: 6757 6758 If you add an inappropriate dependency for a recipe relationship, 6759 the software might break during runtime if the interface of the 6760 second recipe was changed after the first recipe had been built. 6761 6762 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` 6763 A list of recipes that are completely stable and will never change. 6764 The ABI for the recipes in the list are presented by output from the 6765 tasks run to build the recipe. Use of this variable is one way to 6766 remove dependencies from one recipe on another that affect task 6767 signatures and thus force rebuilds when the recipe changes. 6768 6769 .. note:: 6770 6771 If you add an inappropriate variable to this list, the software 6772 might break at runtime if the interface of the recipe was changed 6773 after the other had been built. 6774 6775 :term:`SITEINFO_BITS` 6776 Specifies the number of bits for the target system CPU. The value 6777 should be either "32" or "64". 6778 6779 :term:`SITEINFO_ENDIANNESS` 6780 Specifies the endian byte order of the target system. The value 6781 should be either "le" for little-endian or "be" for big-endian. 6782 6783 :term:`SKIP_FILEDEPS` 6784 Enables removal of all files from the "Provides" section of an RPM 6785 package. Removal of these files is required for packages containing 6786 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. 6787 6788 To enable file removal, set the variable to "1" in your 6789 ``conf/local.conf`` configuration file in your: 6790 :term:`Build Directory`. 6791 :: 6792 6793 SKIP_FILEDEPS = "1" 6794 6795 :term:`SOC_FAMILY` 6796 Groups together machines based upon the same family of SOC (System On 6797 Chip). You typically set this variable in a common ``.inc`` file that 6798 you include in the configuration files of all the machines. 6799 6800 .. note:: 6801 6802 You must include ``conf/machine/include/soc-family.inc`` for this 6803 variable to appear in :term:`MACHINEOVERRIDES`. 6804 6805 :term:`SOLIBS` 6806 Defines the suffix for shared libraries used on the target platform. 6807 By default, this suffix is ".so.*" for all Linux-based systems and is 6808 defined in the ``meta/conf/bitbake.conf`` configuration file. 6809 6810 You will see this variable referenced in the default values of 6811 ``FILES_${PN}``. 6812 6813 :term:`SOLIBSDEV` 6814 Defines the suffix for the development symbolic link (symlink) for 6815 shared libraries on the target platform. By default, this suffix is 6816 ".so" for Linux-based systems and is defined in the 6817 ``meta/conf/bitbake.conf`` configuration file. 6818 6819 You will see this variable referenced in the default values of 6820 ``FILES_${PN}-dev``. 6821 6822 :term:`SOURCE_MIRROR_FETCH` 6823 When you are fetching files to create a mirror of sources (i.e. 6824 creating a source mirror), setting ``SOURCE_MIRROR_FETCH`` to "1" in 6825 your ``local.conf`` configuration file ensures the source for all 6826 recipes are fetched regardless of whether or not a recipe is 6827 compatible with the configuration. A recipe is considered 6828 incompatible with the currently configured machine when either or 6829 both the :term:`COMPATIBLE_MACHINE` 6830 variable and :term:`COMPATIBLE_HOST` variables 6831 specify compatibility with a machine other than that of the current 6832 machine or host. 6833 6834 .. note:: 6835 6836 Do not set the ``SOURCE_MIRROR_FETCH`` 6837 variable unless you are creating a source mirror. In other words, 6838 do not set the variable during a normal build. 6839 6840 :term:`SOURCE_MIRROR_URL` 6841 Defines your own :term:`PREMIRRORS` from which to 6842 first fetch source before attempting to fetch from the upstream 6843 specified in :term:`SRC_URI`. 6844 6845 To use this variable, you must globally inherit the 6846 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide 6847 the URL to your mirrors. Here is the general syntax:: 6848 6849 INHERIT += "own-mirrors" 6850 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" 6851 6852 .. note:: 6853 6854 You can specify only a single URL in ``SOURCE_MIRROR_URL``. 6855 6856 :term:`SPDXLICENSEMAP` 6857 Maps commonly used license names to their SPDX counterparts found in 6858 ``meta/files/common-licenses/``. For the default ``SPDXLICENSEMAP`` 6859 mappings, see the ``meta/conf/licenses.conf`` file. 6860 6861 For additional information, see the :term:`LICENSE` 6862 variable. 6863 6864 :term:`SPECIAL_PKGSUFFIX` 6865 A list of prefixes for :term:`PN` used by the OpenEmbedded 6866 build system to create variants of recipes or packages. The list 6867 specifies the prefixes to strip off during certain circumstances such 6868 as the generation of the :term:`BPN` variable. 6869 6870 :term:`SPL_BINARY` 6871 The file type for the Secondary Program Loader (SPL). Some devices 6872 use an SPL from which to boot (e.g. the BeagleBone development 6873 board). For such cases, you can declare the file type of the SPL 6874 binary in the ``u-boot.inc`` include file, which is used in the 6875 U-Boot recipe. 6876 6877 The SPL file type is set to "null" by default in the ``u-boot.inc`` 6878 file as follows:: 6879 6880 # Some versions of u-boot build an SPL (Second Program Loader) image that 6881 # should be packaged along with the u-boot binary as well as placed in the 6882 # deploy directory. For those versions they can set the following variables 6883 # to allow packaging the SPL. 6884 SPL_BINARY ?= "" 6885 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" 6886 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" 6887 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" 6888 6889 The ``SPL_BINARY`` variable helps form 6890 various ``SPL_*`` variables used by the OpenEmbedded build system. 6891 6892 See the BeagleBone machine configuration example in the 6893 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`" 6894 section in the Yocto Project Board Support Package Developer's Guide 6895 for additional information. 6896 6897 :term:`SRC_URI` 6898 The list of source files - local or remote. This variable tells the 6899 OpenEmbedded build system which bits to pull in for the build and how 6900 to pull them in. For example, if the recipe or append file only needs 6901 to fetch a tarball from the Internet, the recipe or append file uses 6902 a single ``SRC_URI`` entry. On the other hand, if the recipe or 6903 append file needs to fetch a tarball, apply two patches, and include 6904 a custom file, the recipe or append file would include four instances 6905 of the variable. 6906 6907 The following list explains the available URI protocols. URI 6908 protocols are highly dependent on particular BitBake Fetcher 6909 submodules. Depending on the fetcher BitBake uses, various URL 6910 parameters are employed. For specifics on the supported Fetchers, see 6911 the ":ref:`Fetchers <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`" section in the 6912 BitBake User Manual. 6913 6914 - ``file://`` - Fetches files, which are usually files shipped 6915 with the :term:`Metadata`, from the local machine (e.g. 6916 :ref:`patch <overview-manual/concepts:patching>` files). 6917 The path is relative to the :term:`FILESPATH` 6918 variable. Thus, the build system searches, in order, from the 6919 following directories, which are assumed to be a subdirectories of 6920 the directory in which the recipe file (``.bb``) or append file 6921 (``.bbappend``) resides: 6922 6923 - ``${BPN}`` - The base recipe name without any special suffix 6924 or version numbers. 6925 6926 - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and 6927 version but without any special package name suffix. 6928 6929 - *files -* Files within a directory, which is named ``files`` 6930 and is also alongside the recipe or append file. 6931 6932 .. note:: 6933 6934 If you want the build system to pick up files specified through 6935 a 6936 SRC_URI 6937 statement from your append file, you need to be sure to extend 6938 the 6939 FILESPATH 6940 variable by also using the 6941 FILESEXTRAPATHS 6942 variable from within your append file. 6943 6944 - ``bzr://`` - Fetches files from a Bazaar revision control 6945 repository. 6946 6947 - ``git://`` - Fetches files from a Git revision control 6948 repository. 6949 6950 - ``osc://`` - Fetches files from an OSC (openSUSE Build service) 6951 revision control repository. 6952 6953 - ``repo://`` - Fetches files from a repo (Git) repository. 6954 6955 - ``ccrc://`` - Fetches files from a ClearCase repository. 6956 6957 - ``http://`` - Fetches files from the Internet using ``http``. 6958 6959 - ``https://`` - Fetches files from the Internet using ``https``. 6960 6961 - ``ftp://`` - Fetches files from the Internet using ``ftp``. 6962 6963 - ``cvs://`` - Fetches files from a CVS revision control 6964 repository. 6965 6966 - ``hg://`` - Fetches files from a Mercurial (``hg``) revision 6967 control repository. 6968 6969 - ``p4://`` - Fetches files from a Perforce (``p4``) revision 6970 control repository. 6971 6972 - ``ssh://`` - Fetches files from a secure shell. 6973 6974 - ``svn://`` - Fetches files from a Subversion (``svn``) revision 6975 control repository. 6976 6977 - ``npm://`` - Fetches JavaScript modules from a registry. 6978 6979 - ``az://`` - Fetches files from an Azure Storage account. 6980 6981 There are standard and recipe-specific options for ``SRC_URI``. Here are 6982 standard ones: 6983 6984 - ``apply`` - Whether to apply the patch or not. The default 6985 action is to apply the patch. 6986 6987 - ``striplevel`` - Which striplevel to use when applying the 6988 patch. The default level is 1. 6989 6990 - ``patchdir`` - Specifies the directory in which the patch should 6991 be applied. The default is ``${``\ :term:`S`\ ``}``. 6992 6993 Here are options specific to recipes building code from a revision 6994 control system: 6995 6996 - ``mindate`` - Apply the patch only if 6997 :term:`SRCDATE` is equal to or greater than 6998 ``mindate``. 6999 7000 - ``maxdate`` - Apply the patch only if ``SRCDATE`` is not later 7001 than ``maxdate``. 7002 7003 - ``minrev`` - Apply the patch only if ``SRCREV`` is equal to or 7004 greater than ``minrev``. 7005 7006 - ``maxrev`` - Apply the patch only if ``SRCREV`` is not later 7007 than ``maxrev``. 7008 7009 - ``rev`` - Apply the patch only if ``SRCREV`` is equal to 7010 ``rev``. 7011 7012 - ``notrev`` - Apply the patch only if ``SRCREV`` is not equal to 7013 ``rev``. 7014 7015 Here are some additional options worth mentioning: 7016 7017 - ``unpack`` - Controls whether or not to unpack the file if it is 7018 an archive. The default action is to unpack the file. 7019 7020 - ``destsuffix`` - Places the file (or extracts its contents) into 7021 the specified subdirectory of :term:`WORKDIR` when 7022 the Git fetcher is used. 7023 7024 - ``subdir`` - Places the file (or extracts its contents) into the 7025 specified subdirectory of ``WORKDIR`` when the local (``file://``) 7026 fetcher is used. 7027 7028 - ``localdir`` - Places the file (or extracts its contents) into 7029 the specified subdirectory of ``WORKDIR`` when the CVS fetcher is 7030 used. 7031 7032 - ``subpath`` - Limits the checkout to a specific subpath of the 7033 tree when using the Git fetcher is used. 7034 7035 - ``name`` - Specifies a name to be used for association with 7036 ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one 7037 file or git repository specified in ``SRC_URI``. For example:: 7038 7039 SRC_URI = "git://example.com/foo.git;name=first \ 7040 git://example.com/bar.git;name=second \ 7041 http://example.com/file.tar.gz;name=third" 7042 7043 SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15" 7044 SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f" 7045 SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de" 7046 7047 7048 - ``downloadfilename`` - Specifies the filename used when storing 7049 the downloaded file. 7050 7051 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` 7052 By default, the OpenEmbedded build system automatically detects 7053 whether ``SRC_URI`` contains files that are machine-specific. If so, 7054 the build system automatically changes ``PACKAGE_ARCH``. Setting this 7055 variable to "0" disables this behavior. 7056 7057 :term:`SRCDATE` 7058 The date of the source code used to build the package. This variable 7059 applies only if the source was fetched from a Source Code Manager 7060 (SCM). 7061 7062 :term:`SRCPV` 7063 Returns the version string of the current package. This string is 7064 used to help define the value of :term:`PV`. 7065 7066 The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf`` 7067 configuration file in the :term:`Source Directory` as 7068 follows:: 7069 7070 SRCPV = "${@bb.fetch2.get_srcrev(d)}" 7071 7072 Recipes that need to define ``PV`` do so with the help of the 7073 ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``) 7074 located in ``meta/recipes-connectivity`` in the Source Directory 7075 defines ``PV`` as follows:: 7076 7077 PV = "0.12-git${SRCPV}" 7078 7079 :term:`SRCREV` 7080 The revision of the source code used to build the package. This 7081 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note 7082 that if you want to build a fixed revision and you want to avoid 7083 performing a query on the remote repository every time BitBake parses 7084 your recipe, you should specify a ``SRCREV`` that is a full revision 7085 identifier and not just a tag. 7086 7087 .. note:: 7088 7089 For information on limitations when inheriting the latest revision 7090 of software using ``SRCREV``, see the :term:`AUTOREV` variable 7091 description and the 7092 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`" 7093 section, which is in the Yocto Project Development Tasks Manual. 7094 7095 :term:`SSTATE_DIR` 7096 The directory for the shared state cache. 7097 7098 :term:`SSTATE_MIRROR_ALLOW_NETWORK` 7099 If set to "1", allows fetches from mirrors that are specified in 7100 :term:`SSTATE_MIRRORS` to work even when 7101 fetching from the network is disabled by setting ``BB_NO_NETWORK`` to 7102 "1". Using the ``SSTATE_MIRROR_ALLOW_NETWORK`` variable is useful if 7103 you have set ``SSTATE_MIRRORS`` to point to an internal server for 7104 your shared state cache, but you want to disable any other fetching 7105 from the network. 7106 7107 :term:`SSTATE_MIRRORS` 7108 Configures the OpenEmbedded build system to search other mirror 7109 locations for prebuilt cache data objects before building out the 7110 data. This variable works like fetcher :term:`MIRRORS` 7111 and :term:`PREMIRRORS` and points to the cache 7112 locations to check for the shared state (sstate) objects. 7113 7114 You can specify a filesystem directory or a remote URL such as HTTP 7115 or FTP. The locations you specify need to contain the shared state 7116 cache (sstate-cache) results from previous builds. The sstate-cache 7117 you point to can also be from builds on other machines. 7118 7119 When pointing to sstate build artifacts on another machine that uses 7120 a different GCC version for native builds, you must configure 7121 ``SSTATE_MIRRORS`` with a regular expression that maps local search 7122 paths to server paths. The paths need to take into account 7123 :term:`NATIVELSBSTRING` set by the 7124 :ref:`uninative <ref-classes-uninative>` class. For example, the 7125 following maps the local search path ``universal-4.9`` to the 7126 server-provided path server_url_sstate_path:: 7127 7128 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n" 7129 7130 If a mirror uses the same structure as 7131 :term:`SSTATE_DIR`, you need to add "PATH" at the 7132 end as shown in the examples below. The build system substitutes the 7133 correct path within the directory structure. 7134 :: 7135 7136 SSTATE_MIRRORS ?= "\ 7137 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ 7138 file://.* file:///some-local-dir/sstate/PATH" 7139 7140 :term:`SSTATE_SCAN_FILES` 7141 Controls the list of files the OpenEmbedded build system scans for 7142 hardcoded installation paths. The variable uses a space-separated 7143 list of filenames (not paths) with standard wildcard characters 7144 allowed. 7145 7146 During a build, the OpenEmbedded build system creates a shared state 7147 (sstate) object during the first stage of preparing the sysroots. 7148 That object is scanned for hardcoded paths for original installation 7149 locations. The list of files that are scanned for paths is controlled 7150 by the ``SSTATE_SCAN_FILES`` variable. Typically, recipes add files 7151 they want to be scanned to the value of ``SSTATE_SCAN_FILES`` rather 7152 than the variable being comprehensively set. The 7153 :ref:`sstate <ref-classes-sstate>` class specifies the default list 7154 of files. 7155 7156 For details on the process, see the 7157 :ref:`staging <ref-classes-staging>` class. 7158 7159 :term:`STAGING_BASE_LIBDIR_NATIVE` 7160 Specifies the path to the ``/lib`` subdirectory of the sysroot 7161 directory for the build host. 7162 7163 :term:`STAGING_BASELIBDIR` 7164 Specifies the path to the ``/lib`` subdirectory of the sysroot 7165 directory for the target for which the current recipe is being built 7166 (:term:`STAGING_DIR_HOST`). 7167 7168 :term:`STAGING_BINDIR` 7169 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot 7170 directory for the target for which the current recipe is being built 7171 (:term:`STAGING_DIR_HOST`). 7172 7173 :term:`STAGING_BINDIR_CROSS` 7174 Specifies the path to the directory containing binary configuration 7175 scripts. These scripts provide configuration information for other 7176 software that wants to make use of libraries or include files 7177 provided by the software associated with the script. 7178 7179 .. note:: 7180 7181 This style of build configuration has been largely replaced by 7182 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the 7183 library to which you are linking, it is recommended you use 7184 ``pkg-config`` instead of a provided configuration script. 7185 7186 :term:`STAGING_BINDIR_NATIVE` 7187 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot 7188 directory for the build host. 7189 7190 :term:`STAGING_DATADIR` 7191 Specifies the path to the ``/usr/share`` subdirectory of the sysroot 7192 directory for the target for which the current recipe is being built 7193 (:term:`STAGING_DIR_HOST`). 7194 7195 :term:`STAGING_DATADIR_NATIVE` 7196 Specifies the path to the ``/usr/share`` subdirectory of the sysroot 7197 directory for the build host. 7198 7199 :term:`STAGING_DIR` 7200 Helps construct the ``recipe-sysroots`` directory, which is used 7201 during packaging. 7202 7203 For information on how staging for recipe-specific sysroots occurs, 7204 see the :ref:`ref-tasks-populate_sysroot` 7205 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" 7206 section in the Yocto Project Development Tasks Manual, the 7207 ":ref:`overview-manual/concepts:configuration, compilation, and staging`" 7208 section in the Yocto Project Overview and Concepts Manual, and the 7209 :term:`SYSROOT_DIRS` variable. 7210 7211 .. note:: 7212 7213 Recipes should never write files directly under the ``STAGING_DIR`` 7214 directory because the OpenEmbedded build system manages the 7215 directory automatically. Instead, files should be installed to 7216 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` 7217 task and then the OpenEmbedded build system will stage a subset of 7218 those files into the sysroot. 7219 7220 :term:`STAGING_DIR_HOST` 7221 Specifies the path to the sysroot directory for the system on which 7222 the component is built to run (the system that hosts the component). 7223 For most recipes, this sysroot is the one in which that recipe's 7224 :ref:`ref-tasks-populate_sysroot` task copies 7225 files. Exceptions include ``-native`` recipes, where the 7226 ``do_populate_sysroot`` task instead uses 7227 :term:`STAGING_DIR_NATIVE`. Depending on 7228 the type of recipe and the build target, ``STAGING_DIR_HOST`` can 7229 have the following values: 7230 7231 - For recipes building for the target machine, the value is 7232 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". 7233 7234 - For native recipes building for the build host, the value is empty 7235 given the assumption that when building for the build host, the 7236 build host's own directories should be used. 7237 7238 .. note:: 7239 7240 ``-native`` recipes are not installed into host paths like such 7241 as ``/usr``. Rather, these recipes are installed into 7242 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes, 7243 standard build environment variables such as 7244 :term:`CPPFLAGS` and 7245 :term:`CFLAGS` are set up so that both host paths 7246 and ``STAGING_DIR_NATIVE`` are searched for libraries and 7247 headers using, for example, GCC's ``-isystem`` option. 7248 7249 Thus, the emphasis is that the ``STAGING_DIR*`` variables 7250 should be viewed as input variables by tasks such as 7251 :ref:`ref-tasks-configure`, 7252 :ref:`ref-tasks-compile`, and 7253 :ref:`ref-tasks-install`. Having the real system 7254 root correspond to ``STAGING_DIR_HOST`` makes conceptual sense 7255 for ``-native`` recipes, as they make use of host headers and 7256 libraries. 7257 7258 :term:`STAGING_DIR_NATIVE` 7259 Specifies the path to the sysroot directory used when building 7260 components that run on the build host itself. 7261 7262 :term:`STAGING_DIR_TARGET` 7263 Specifies the path to the sysroot used for the system for which the 7264 component generates code. For components that do not generate code, 7265 which is the majority, ``STAGING_DIR_TARGET`` is set to match 7266 :term:`STAGING_DIR_HOST`. 7267 7268 Some recipes build binaries that can run on the target system but 7269 those binaries in turn generate code for another different system 7270 (e.g. cross-canadian recipes). Using terminology from GNU, the 7271 primary system is referred to as the "HOST" and the secondary, or 7272 different, system is referred to as the "TARGET". Thus, the binaries 7273 run on the "HOST" system and generate binaries for the "TARGET" 7274 system. The ``STAGING_DIR_HOST`` variable points to the sysroot used 7275 for the "HOST" system, while ``STAGING_DIR_TARGET`` points to the 7276 sysroot used for the "TARGET" system. 7277 7278 :term:`STAGING_ETCDIR_NATIVE` 7279 Specifies the path to the ``/etc`` subdirectory of the sysroot 7280 directory for the build host. 7281 7282 :term:`STAGING_EXECPREFIXDIR` 7283 Specifies the path to the ``/usr`` subdirectory of the sysroot 7284 directory for the target for which the current recipe is being built 7285 (:term:`STAGING_DIR_HOST`). 7286 7287 :term:`STAGING_INCDIR` 7288 Specifies the path to the ``/usr/include`` subdirectory of the 7289 sysroot directory for the target for which the current recipe being 7290 built (:term:`STAGING_DIR_HOST`). 7291 7292 :term:`STAGING_INCDIR_NATIVE` 7293 Specifies the path to the ``/usr/include`` subdirectory of the 7294 sysroot directory for the build host. 7295 7296 :term:`STAGING_KERNEL_BUILDDIR` 7297 Points to the directory containing the kernel build artifacts. 7298 Recipes building software that needs to access kernel build artifacts 7299 (e.g. ``systemtap-uprobes``) can look in the directory specified with 7300 the ``STAGING_KERNEL_BUILDDIR`` variable to find these artifacts 7301 after the kernel has been built. 7302 7303 :term:`STAGING_KERNEL_DIR` 7304 The directory with kernel headers that are required to build 7305 out-of-tree modules. 7306 7307 :term:`STAGING_LIBDIR` 7308 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot 7309 directory for the target for which the current recipe is being built 7310 (:term:`STAGING_DIR_HOST`). 7311 7312 :term:`STAGING_LIBDIR_NATIVE` 7313 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot 7314 directory for the build host. 7315 7316 :term:`STAMP` 7317 Specifies the base path used to create recipe stamp files. The path 7318 to an actual stamp file is constructed by evaluating this string and 7319 then appending additional information. Currently, the default 7320 assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf`` 7321 file is:: 7322 7323 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" 7324 7325 For information on how BitBake uses stamp files to determine if a 7326 task should be rerun, see the 7327 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" 7328 section in the Yocto Project Overview and Concepts Manual. 7329 7330 See :term:`STAMPS_DIR`, 7331 :term:`MULTIMACH_TARGET_SYS`, 7332 :term:`PN`, :term:`EXTENDPE`, 7333 :term:`PV`, and :term:`PR` for related variable 7334 information. 7335 7336 :term:`STAMPS_DIR` 7337 Specifies the base directory in which the OpenEmbedded build system 7338 places stamps. The default directory is ``${TMPDIR}/stamps``. 7339 7340 :term:`STRIP` 7341 The minimal command and arguments to run ``strip``, which is used to 7342 strip symbols. 7343 7344 :term:`SUMMARY` 7345 The short (72 characters or less) summary of the binary package for 7346 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, 7347 ``SUMMARY`` is used to define the 7348 :term:`DESCRIPTION` variable if ``DESCRIPTION`` is 7349 not set in the recipe. 7350 7351 :term:`SVNDIR` 7352 The directory in which files checked out of a Subversion system are 7353 stored. 7354 7355 :term:`SYSLINUX_DEFAULT_CONSOLE` 7356 Specifies the kernel boot default console. If you want to use a 7357 console other than the default, set this variable in your recipe as 7358 follows where "X" is the console number you want to use:: 7359 7360 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" 7361 7362 The :ref:`syslinux <ref-classes-syslinux>` class initially sets 7363 this variable to null but then checks for a value later. 7364 7365 :term:`SYSLINUX_OPTS` 7366 Lists additional options to add to the syslinux file. You need to set 7367 this variable in your recipe. If you want to list multiple options, 7368 separate the options with a semicolon character (``;``). 7369 7370 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable 7371 to create a set of options. 7372 7373 :term:`SYSLINUX_SERIAL` 7374 Specifies the alternate serial port or turns it off. To turn off 7375 serial, set this variable to an empty string in your recipe. The 7376 variable's default value is set in the 7377 :ref:`syslinux <ref-classes-syslinux>` class as follows:: 7378 7379 SYSLINUX_SERIAL ?= "0 115200" 7380 7381 The class checks for and uses the variable as needed. 7382 7383 :term:`SYSLINUX_SERIAL_TTY` 7384 Specifies the alternate console=tty... kernel boot argument. The 7385 variable's default value is set in the 7386 :ref:`syslinux <ref-classes-syslinux>` class as follows:: 7387 7388 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" 7389 7390 The class checks for and uses the variable as needed. 7391 7392 :term:`SYSLINUX_SPLASH` 7393 An ``.LSS`` file used as the background for the VGA boot menu when 7394 you use the boot menu. You need to set this variable in your recipe. 7395 7396 The :ref:`syslinux <ref-classes-syslinux>` class checks for this 7397 variable and if found, the OpenEmbedded build system installs the 7398 splash screen. 7399 7400 :term:`SYSROOT_DESTDIR` 7401 Points to the temporary directory under the work directory (default 7402 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") 7403 where the files populated into the sysroot are assembled during the 7404 :ref:`ref-tasks-populate_sysroot` task. 7405 7406 :term:`SYSROOT_DIRS` 7407 Directories that are staged into the sysroot by the 7408 :ref:`ref-tasks-populate_sysroot` task. By 7409 default, the following directories are staged:: 7410 7411 SYSROOT_DIRS = " \ 7412 ${includedir} \ 7413 ${libdir} \ 7414 ${base_libdir} \ 7415 ${nonarch_base_libdir} \ 7416 ${datadir} \ 7417 " 7418 7419 :term:`SYSROOT_DIRS_BLACKLIST` 7420 Directories that are not staged into the sysroot by the 7421 :ref:`ref-tasks-populate_sysroot` task. You 7422 can use this variable to exclude certain subdirectories of 7423 directories listed in :term:`SYSROOT_DIRS` from 7424 staging. By default, the following directories are not staged:: 7425 7426 SYSROOT_DIRS_BLACKLIST = " \ 7427 ${mandir} \ 7428 ${docdir} \ 7429 ${infodir} \ 7430 ${datadir}/locale \ 7431 ${datadir}/applications \ 7432 ${datadir}/fonts \ 7433 ${datadir}/pixmaps \ 7434 " 7435 7436 :term:`SYSROOT_DIRS_NATIVE` 7437 Extra directories staged into the sysroot by the 7438 :ref:`ref-tasks-populate_sysroot` task for 7439 ``-native`` recipes, in addition to those specified in 7440 :term:`SYSROOT_DIRS`. By default, the following 7441 extra directories are staged:: 7442 7443 SYSROOT_DIRS_NATIVE = " \ 7444 ${bindir} \ 7445 ${sbindir} \ 7446 ${base_bindir} \ 7447 ${base_sbindir} \ 7448 ${libexecdir} \ 7449 ${sysconfdir} \ 7450 ${localstatedir} \ 7451 " 7452 7453 .. note:: 7454 7455 Programs built by ``-native`` recipes run directly from the sysroot 7456 (:term:`STAGING_DIR_NATIVE`), which is why additional directories 7457 containing program executables and supporting files need to be staged. 7458 7459 :term:`SYSROOT_PREPROCESS_FUNCS` 7460 A list of functions to execute after files are staged into the 7461 sysroot. These functions are usually used to apply additional 7462 processing on the staged files, or to stage additional files. 7463 7464 :term:`SYSTEMD_AUTO_ENABLE` 7465 When inheriting the :ref:`systemd <ref-classes-systemd>` class, 7466 this variable specifies whether the specified service in 7467 :term:`SYSTEMD_SERVICE` should start 7468 automatically or not. By default, the service is enabled to 7469 automatically start at boot time. The default setting is in the 7470 :ref:`systemd <ref-classes-systemd>` class as follows:: 7471 7472 SYSTEMD_AUTO_ENABLE ??= "enable" 7473 7474 You can disable the service by setting the variable to "disable". 7475 7476 :term:`SYSTEMD_BOOT_CFG` 7477 When :term:`EFI_PROVIDER` is set to 7478 "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the 7479 configuration file that should be used. By default, the 7480 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the 7481 ``SYSTEMD_BOOT_CFG`` as follows:: 7482 7483 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" 7484 7485 For information on Systemd-boot, see the `Systemd-boot 7486 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 7487 7488 :term:`SYSTEMD_BOOT_ENTRIES` 7489 When :term:`EFI_PROVIDER` is set to 7490 "systemd-boot", the ``SYSTEMD_BOOT_ENTRIES`` variable specifies a 7491 list of entry files (``*.conf``) to install that contain one boot 7492 entry per file. By default, the 7493 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the 7494 ``SYSTEMD_BOOT_ENTRIES`` as follows:: 7495 7496 SYSTEMD_BOOT_ENTRIES ?= "" 7497 7498 For information on Systemd-boot, see the `Systemd-boot 7499 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 7500 7501 :term:`SYSTEMD_BOOT_TIMEOUT` 7502 When :term:`EFI_PROVIDER` is set to 7503 "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the 7504 boot menu timeout in seconds. By default, the 7505 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the 7506 ``SYSTEMD_BOOT_TIMEOUT`` as follows:: 7507 7508 SYSTEMD_BOOT_TIMEOUT ?= "10" 7509 7510 For information on Systemd-boot, see the `Systemd-boot 7511 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 7512 7513 :term:`SYSTEMD_PACKAGES` 7514 When inheriting the :ref:`systemd <ref-classes-systemd>` class, 7515 this variable locates the systemd unit files when they are not found 7516 in the main recipe's package. By default, the ``SYSTEMD_PACKAGES`` 7517 variable is set such that the systemd unit files are assumed to 7518 reside in the recipes main package:: 7519 7520 SYSTEMD_PACKAGES ?= "${PN}" 7521 7522 If these unit files are not in this recipe's main package, you need 7523 to use ``SYSTEMD_PACKAGES`` to list the package or packages in which 7524 the build system can find the systemd unit files. 7525 7526 :term:`SYSTEMD_SERVICE` 7527 When inheriting the :ref:`systemd <ref-classes-systemd>` class, 7528 this variable specifies the systemd service name for a package. 7529 7530 When you specify this file in your recipe, use a package name 7531 override to indicate the package to which the value applies. Here is 7532 an example from the connman recipe:: 7533 7534 SYSTEMD_SERVICE_${PN} = "connman.service" 7535 7536 :term:`SYSVINIT_ENABLED_GETTYS` 7537 When using 7538 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, 7539 specifies a space-separated list of the virtual terminals that should 7540 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ 7541 (allowing login), assuming :term:`USE_VT` is not set to 7542 "0". 7543 7544 The default value for ``SYSVINIT_ENABLED_GETTYS`` is "1" (i.e. only 7545 run a getty on the first virtual terminal). 7546 7547 :term:`T` 7548 This variable points to a directory were BitBake places temporary 7549 files, which consist mostly of task logs and scripts, when building a 7550 particular recipe. The variable is typically set as follows:: 7551 7552 T = "${WORKDIR}/temp" 7553 7554 The :term:`WORKDIR` is the directory into which 7555 BitBake unpacks and builds the recipe. The default ``bitbake.conf`` 7556 file sets this variable. 7557 7558 The ``T`` variable is not to be confused with the 7559 :term:`TMPDIR` variable, which points to the root of 7560 the directory tree where BitBake places the output of an entire 7561 build. 7562 7563 :term:`TARGET_ARCH` 7564 The target machine's architecture. The OpenEmbedded build system 7565 supports many architectures. Here is an example list of architectures 7566 supported. This list is by no means complete as the architecture is 7567 configurable: 7568 7569 - arm 7570 - i586 7571 - x86_64 7572 - powerpc 7573 - powerpc64 7574 - mips 7575 - mipsel 7576 7577 For additional information on machine architectures, see the 7578 :term:`TUNE_ARCH` variable. 7579 7580 :term:`TARGET_AS_ARCH` 7581 Specifies architecture-specific assembler flags for the target 7582 system. ``TARGET_AS_ARCH`` is initialized from 7583 :term:`TUNE_ASARGS` by default in the BitBake 7584 configuration file (``meta/conf/bitbake.conf``):: 7585 7586 TARGET_AS_ARCH = "${TUNE_ASARGS}" 7587 7588 :term:`TARGET_CC_ARCH` 7589 Specifies architecture-specific C compiler flags for the target 7590 system. ``TARGET_CC_ARCH`` is initialized from 7591 :term:`TUNE_CCARGS` by default. 7592 7593 .. note:: 7594 7595 It is a common workaround to append :term:`LDFLAGS` to 7596 ``TARGET_CC_ARCH`` in recipes that build software for the target that 7597 would not otherwise respect the exported ``LDFLAGS`` variable. 7598 7599 :term:`TARGET_CC_KERNEL_ARCH` 7600 This is a specific kernel compiler flag for a CPU or Application 7601 Binary Interface (ABI) tune. The flag is used rarely and only for 7602 cases where a userspace :term:`TUNE_CCARGS` is not 7603 compatible with the kernel compilation. The ``TARGET_CC_KERNEL_ARCH`` 7604 variable allows the kernel (and associated modules) to use a 7605 different configuration. See the 7606 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the 7607 :term:`Source Directory` for an example. 7608 7609 :term:`TARGET_CFLAGS` 7610 Specifies the flags to pass to the C compiler when building for the 7611 target. When building in the target context, 7612 :term:`CFLAGS` is set to the value of this variable by 7613 default. 7614 7615 Additionally, the SDK's environment setup script sets the ``CFLAGS`` 7616 variable in the environment to the ``TARGET_CFLAGS`` value so that 7617 executables built using the SDK also have the flags applied. 7618 7619 :term:`TARGET_CPPFLAGS` 7620 Specifies the flags to pass to the C pre-processor (i.e. to both the 7621 C and the C++ compilers) when building for the target. When building 7622 in the target context, :term:`CPPFLAGS` is set to the 7623 value of this variable by default. 7624 7625 Additionally, the SDK's environment setup script sets the 7626 ``CPPFLAGS`` variable in the environment to the ``TARGET_CPPFLAGS`` 7627 value so that executables built using the SDK also have the flags 7628 applied. 7629 7630 :term:`TARGET_CXXFLAGS` 7631 Specifies the flags to pass to the C++ compiler when building for the 7632 target. When building in the target context, 7633 :term:`CXXFLAGS` is set to the value of this variable 7634 by default. 7635 7636 Additionally, the SDK's environment setup script sets the 7637 ``CXXFLAGS`` variable in the environment to the ``TARGET_CXXFLAGS`` 7638 value so that executables built using the SDK also have the flags 7639 applied. 7640 7641 :term:`TARGET_FPU` 7642 Specifies the method for handling FPU code. For FPU-less targets, 7643 which include most ARM CPUs, the variable must be set to "soft". If 7644 not, the kernel emulation gets used, which results in a performance 7645 penalty. 7646 7647 :term:`TARGET_LD_ARCH` 7648 Specifies architecture-specific linker flags for the target system. 7649 ``TARGET_LD_ARCH`` is initialized from 7650 :term:`TUNE_LDARGS` by default in the BitBake 7651 configuration file (``meta/conf/bitbake.conf``):: 7652 7653 TARGET_LD_ARCH = "${TUNE_LDARGS}" 7654 7655 :term:`TARGET_LDFLAGS` 7656 Specifies the flags to pass to the linker when building for the 7657 target. When building in the target context, 7658 :term:`LDFLAGS` is set to the value of this variable 7659 by default. 7660 7661 Additionally, the SDK's environment setup script sets the 7662 :term:`LDFLAGS` variable in the environment to the 7663 ``TARGET_LDFLAGS`` value so that executables built using the SDK also 7664 have the flags applied. 7665 7666 :term:`TARGET_OS` 7667 Specifies the target's operating system. The variable can be set to 7668 "linux" for glibc-based systems (GNU C Library) and to "linux-musl" 7669 for musl libc. For ARM/EABI targets, the possible values are 7670 "linux-gnueabi" and "linux-musleabi". 7671 7672 :term:`TARGET_PREFIX` 7673 Specifies the prefix used for the toolchain binary target tools. 7674 7675 Depending on the type of recipe and the build target, 7676 ``TARGET_PREFIX`` is set as follows: 7677 7678 - For recipes building for the target machine, the value is 7679 "${:term:`TARGET_SYS`}-". 7680 7681 - For native recipes, the build system sets the variable to the 7682 value of ``BUILD_PREFIX``. 7683 7684 - For native SDK recipes (``nativesdk``), the build system sets the 7685 variable to the value of ``SDK_PREFIX``. 7686 7687 :term:`TARGET_SYS` 7688 Specifies the system, including the architecture and the operating 7689 system, for which the build is occurring in the context of the 7690 current recipe. 7691 7692 The OpenEmbedded build system automatically sets this variable based 7693 on :term:`TARGET_ARCH`, 7694 :term:`TARGET_VENDOR`, and 7695 :term:`TARGET_OS` variables. 7696 7697 .. note:: 7698 7699 You do not need to set the ``TARGET_SYS`` variable yourself. 7700 7701 Consider these two examples: 7702 7703 - Given a native recipe on a 32-bit, x86 machine running Linux, the 7704 value is "i686-linux". 7705 7706 - Given a recipe being built for a little-endian, MIPS target 7707 running Linux, the value might be "mipsel-linux". 7708 7709 :term:`TARGET_VENDOR` 7710 Specifies the name of the target vendor. 7711 7712 :term:`TCLIBC` 7713 Specifies the GNU standard C library (``libc``) variant to use during 7714 the build process. This variable replaces ``POKYLIBC``, which is no 7715 longer supported. 7716 7717 You can select "glibc", "musl", "newlib", or "baremetal" 7718 7719 :term:`TCLIBCAPPEND` 7720 Specifies a suffix to be appended onto the 7721 :term:`TMPDIR` value. The suffix identifies the 7722 ``libc`` variant for building. When you are building for multiple 7723 variants with the same :term:`Build Directory`, this 7724 mechanism ensures that output for different ``libc`` variants is kept 7725 separate to avoid potential conflicts. 7726 7727 In the ``defaultsetup.conf`` file, the default value of 7728 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky, 7729 which normally only support one ``libc`` variant, set 7730 ``TCLIBCAPPEND`` to "" in their distro configuration file resulting 7731 in no suffix being applied. 7732 7733 :term:`TCMODE` 7734 Specifies the toolchain selector. ``TCMODE`` controls the 7735 characteristics of the generated packages and images by telling the 7736 OpenEmbedded build system which toolchain profile to use. By default, 7737 the OpenEmbedded build system builds its own internal toolchain. The 7738 variable's default value is "default", which uses that internal 7739 toolchain. 7740 7741 .. note:: 7742 7743 If ``TCMODE`` is set to a value other than "default", then it is your 7744 responsibility to ensure that the toolchain is compatible with the 7745 default toolchain. Using older or newer versions of these 7746 components might cause build problems. See the Release Notes for 7747 the Yocto Project release for the specific components with which 7748 the toolchain must be compatible. To access the Release Notes, go 7749 to the :yocto_home:`Downloads </software-overview/downloads>` 7750 page on the Yocto Project website and click on the "RELEASE 7751 INFORMATION" link for the appropriate release. 7752 7753 The ``TCMODE`` variable is similar to :term:`TCLIBC`, 7754 which controls the variant of the GNU standard C library (``libc``) 7755 used during the build process: ``glibc`` or ``musl``. 7756 7757 With additional layers, it is possible to use a pre-compiled external 7758 toolchain. One example is the Sourcery G++ Toolchain. The support for 7759 this toolchain resides in the separate Mentor Graphics 7760 ``meta-sourcery`` layer at 7761 https://github.com/MentorEmbedded/meta-sourcery/. 7762 7763 The layer's ``README`` file contains information on how to use the 7764 Sourcery G++ Toolchain as an external toolchain. In summary, you must 7765 be sure to add the layer to your ``bblayers.conf`` file in front of 7766 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable 7767 in your ``local.conf`` file to the location in which you installed 7768 the toolchain. 7769 7770 The fundamentals used for this example apply to any external 7771 toolchain. You can use ``meta-sourcery`` as a template for adding 7772 support for other external toolchains. 7773 7774 :term:`TEST_EXPORT_DIR` 7775 The location the OpenEmbedded build system uses to export tests when 7776 the :term:`TEST_EXPORT_ONLY` variable is set 7777 to "1". 7778 7779 The ``TEST_EXPORT_DIR`` variable defaults to 7780 ``"${TMPDIR}/testimage/${PN}"``. 7781 7782 :term:`TEST_EXPORT_ONLY` 7783 Specifies to export the tests only. Set this variable to "1" if you 7784 do not want to run the tests but you want them to be exported in a 7785 manner that you to run them outside of the build system. 7786 7787 :term:`TEST_LOG_DIR` 7788 Holds the SSH log and the boot log for QEMU machines. The 7789 ``TEST_LOG_DIR`` variable defaults to ``"${WORKDIR}/testimage"``. 7790 7791 .. note:: 7792 7793 Actual test results reside in the task log (``log.do_testimage``), 7794 which is in the ``${WORKDIR}/temp/`` directory. 7795 7796 :term:`TEST_POWERCONTROL_CMD` 7797 For automated hardware testing, specifies the command to use to 7798 control the power of the target machine under test. Typically, this 7799 command would point to a script that performs the appropriate action 7800 (e.g. interacting with a web-enabled power strip). The specified 7801 command should expect to receive as the last argument "off", "on" or 7802 "cycle" specifying to power off, on, or cycle (power off and then 7803 power on) the device, respectively. 7804 7805 :term:`TEST_POWERCONTROL_EXTRA_ARGS` 7806 For automated hardware testing, specifies additional arguments to 7807 pass through to the command specified in 7808 :term:`TEST_POWERCONTROL_CMD`. Setting 7809 ``TEST_POWERCONTROL_EXTRA_ARGS`` is optional. You can use it if you 7810 wish, for example, to separate the machine-specific and 7811 non-machine-specific parts of the arguments. 7812 7813 :term:`TEST_QEMUBOOT_TIMEOUT` 7814 The time in seconds allowed for an image to boot before automated 7815 runtime tests begin to run against an image. The default timeout 7816 period to allow the boot process to reach the login prompt is 500 7817 seconds. You can specify a different value in the ``local.conf`` 7818 file. 7819 7820 For more information on testing images, see the 7821 ":ref:`dev-manual/common-tasks:performing automated runtime testing`" 7822 section in the Yocto Project Development Tasks Manual. 7823 7824 :term:`TEST_SERIALCONTROL_CMD` 7825 For automated hardware testing, specifies the command to use to 7826 connect to the serial console of the target machine under test. This 7827 command simply needs to connect to the serial console and forward 7828 that connection to standard input and output as any normal terminal 7829 program does. 7830 7831 For example, to use the Picocom terminal program on serial device 7832 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: 7833 7834 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" 7835 7836 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` 7837 For automated hardware testing, specifies additional arguments to 7838 pass through to the command specified in 7839 :term:`TEST_SERIALCONTROL_CMD`. Setting 7840 ``TEST_SERIALCONTROL_EXTRA_ARGS`` is optional. You can use it if you 7841 wish, for example, to separate the machine-specific and 7842 non-machine-specific parts of the command. 7843 7844 :term:`TEST_SERVER_IP` 7845 The IP address of the build machine (host machine). This IP address 7846 is usually automatically detected. However, if detection fails, this 7847 variable needs to be set to the IP address of the build machine (i.e. 7848 where the build is taking place). 7849 7850 .. note:: 7851 7852 The ``TEST_SERVER_IP`` variable is only used for a small number of 7853 tests such as the "dnf" test suite, which needs to download packages 7854 from ``WORKDIR/oe-rootfs-repo``. 7855 7856 :term:`TEST_SUITES` 7857 An ordered list of tests (modules) to run against an image when 7858 performing automated runtime testing. 7859 7860 The OpenEmbedded build system provides a core set of tests that can 7861 be used against images. 7862 7863 .. note:: 7864 7865 Currently, there is only support for running these tests under 7866 QEMU. 7867 7868 Tests include ``ping``, ``ssh``, ``df`` among others. You can add 7869 your own tests to the list of tests by appending ``TEST_SUITES`` as 7870 follows:: 7871 7872 TEST_SUITES_append = " mytest" 7873 7874 Alternatively, you can 7875 provide the "auto" option to have all applicable tests run against 7876 the image. 7877 :: 7878 7879 TEST_SUITES_append = " auto" 7880 7881 Using this option causes the 7882 build system to automatically run tests that are applicable to the 7883 image. Tests that are not applicable are skipped. 7884 7885 The order in which tests are run is important. Tests that depend on 7886 another test must appear later in the list than the test on which 7887 they depend. For example, if you append the list of tests with two 7888 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on 7889 ``test_A``, then you must order the tests as follows:: 7890 7891 TEST_SUITES = "test_A test_B" 7892 7893 For more information on testing images, see the 7894 ":ref:`dev-manual/common-tasks:performing automated runtime testing`" 7895 section in the Yocto Project Development Tasks Manual. 7896 7897 :term:`TEST_TARGET` 7898 Specifies the target controller to use when running tests against a 7899 test image. The default controller to use is "qemu":: 7900 7901 TEST_TARGET = "qemu" 7902 7903 A target controller is a class that defines how an image gets 7904 deployed on a target and how a target is started. A layer can extend 7905 the controllers by adding a module in the layer's 7906 ``/lib/oeqa/controllers`` directory and by inheriting the 7907 ``BaseTarget`` class, which is an abstract class that cannot be used 7908 as a value of ``TEST_TARGET``. 7909 7910 You can provide the following arguments with ``TEST_TARGET``: 7911 7912 - *"qemu":* Boots a QEMU image and runs the tests. See the 7913 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section 7914 in the Yocto Project Development Tasks Manual for more 7915 information. 7916 7917 - *"simpleremote":* Runs the tests on target hardware that is 7918 already up and running. The hardware can be on the network or it 7919 can be a device running an image on QEMU. You must also set 7920 :term:`TEST_TARGET_IP` when you use 7921 "simpleremote". 7922 7923 .. note:: 7924 7925 This argument is defined in 7926 ``meta/lib/oeqa/controllers/simpleremote.py``. 7927 7928 For information on running tests on hardware, see the 7929 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`" 7930 section in the Yocto Project Development Tasks Manual. 7931 7932 :term:`TEST_TARGET_IP` 7933 The IP address of your hardware under test. The ``TEST_TARGET_IP`` 7934 variable has no effect when :term:`TEST_TARGET` is 7935 set to "qemu". 7936 7937 When you specify the IP address, you can also include a port. Here is 7938 an example:: 7939 7940 TEST_TARGET_IP = "192.168.1.4:2201" 7941 7942 Specifying a port is 7943 useful when SSH is started on a non-standard port or in cases when 7944 your hardware under test is behind a firewall or network that is not 7945 directly accessible from your host and you need to do port address 7946 translation. 7947 7948 :term:`TESTIMAGE_AUTO` 7949 Automatically runs the series of automated tests for images when an 7950 image is successfully built. Setting ``TESTIMAGE_AUTO`` to "1" causes 7951 any image that successfully builds to automatically boot under QEMU. 7952 Using the variable also adds in dependencies so that any SDK for 7953 which testing is requested is automatically built first. 7954 7955 These tests are written in Python making use of the ``unittest`` 7956 module, and the majority of them run commands on the target system 7957 over ``ssh``. You can set this variable to "1" in your ``local.conf`` 7958 file in the :term:`Build Directory` to have the 7959 OpenEmbedded build system automatically run these tests after an 7960 image successfully builds: 7961 7962 TESTIMAGE_AUTO = "1" 7963 7964 For more information 7965 on enabling, running, and writing these tests, see the 7966 ":ref:`dev-manual/common-tasks:performing automated runtime testing`" 7967 section in the Yocto Project Development Tasks Manual and the 7968 ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section. 7969 7970 :term:`THISDIR` 7971 The directory in which the file BitBake is currently parsing is 7972 located. Do not manually set this variable. 7973 7974 :term:`TIME` 7975 The time the build was started. Times appear using the hour, minute, 7976 and second (HMS) format (e.g. "140159" for one minute and fifty-nine 7977 seconds past 1400 hours). 7978 7979 :term:`TMPDIR` 7980 This variable is the base directory the OpenEmbedded build system 7981 uses for all build output and intermediate files (other than the 7982 shared state cache). By default, the ``TMPDIR`` variable points to 7983 ``tmp`` within the :term:`Build Directory`. 7984 7985 If you want to establish this directory in a location other than the 7986 default, you can uncomment and edit the following statement in the 7987 ``conf/local.conf`` file in the :term:`Source Directory`:: 7988 7989 #TMPDIR = "${TOPDIR}/tmp" 7990 7991 An example use for this scenario is to set ``TMPDIR`` to a local disk, 7992 which does not use NFS, while having the Build Directory use NFS. 7993 7994 The filesystem used by ``TMPDIR`` must have standard filesystem 7995 semantics (i.e. mixed-case files are unique, POSIX file locking, and 7996 persistent inodes). Due to various issues with NFS and bugs in some 7997 implementations, NFS does not meet this minimum requirement. 7998 Consequently, ``TMPDIR`` cannot be on NFS. 7999 8000 :term:`TOOLCHAIN_HOST_TASK` 8001 This variable lists packages the OpenEmbedded build system uses when 8002 building an SDK, which contains a cross-development environment. The 8003 packages specified by this variable are part of the toolchain set 8004 that runs on the :term:`SDKMACHINE`, and each 8005 package should usually have the prefix ``nativesdk-``. For example, 8006 consider the following command when building an SDK:: 8007 8008 $ bitbake -c populate_sdk imagename 8009 8010 In this case, a default list of packages is 8011 set in this variable, but you can add additional packages to the 8012 list. See the 8013 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section 8014 in the Yocto Project Application Development and the Extensible 8015 Software Development Kit (eSDK) manual for more information. 8016 8017 For background information on cross-development toolchains in the 8018 Yocto Project development environment, see the 8019 ":ref:`sdk-manual/intro:the cross-development toolchain`" 8020 section in the Yocto Project Overview and Concepts Manual. For 8021 information on setting up a cross-development environment, see the 8022 :doc:`/sdk-manual/index` manual. 8023 8024 :term:`TOOLCHAIN_OUTPUTNAME` 8025 This variable defines the name used for the toolchain output. The 8026 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets 8027 the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:: 8028 8029 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" 8030 8031 See 8032 the :term:`SDK_NAME` and 8033 :term:`SDK_VERSION` variables for additional 8034 information. 8035 8036 :term:`TOOLCHAIN_TARGET_TASK` 8037 This variable lists packages the OpenEmbedded build system uses when 8038 it creates the target part of an SDK (i.e. the part built for the 8039 target hardware), which includes libraries and headers. Use this 8040 variable to add individual packages to the part of the SDK that runs 8041 on the target. See the 8042 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section 8043 in the Yocto Project Application Development and the Extensible 8044 Software Development Kit (eSDK) manual for more information. 8045 8046 For background information on cross-development toolchains in the 8047 Yocto Project development environment, see the 8048 ":ref:`sdk-manual/intro:the cross-development toolchain`" 8049 section in the Yocto Project Overview and Concepts Manual. For 8050 information on setting up a cross-development environment, see the 8051 :doc:`/sdk-manual/index` manual. 8052 8053 :term:`TOPDIR` 8054 The top-level :term:`Build Directory`. BitBake 8055 automatically sets this variable when you initialize your build 8056 environment using :ref:`structure-core-script`. 8057 8058 :term:`TRANSLATED_TARGET_ARCH` 8059 A sanitized version of :term:`TARGET_ARCH`. This 8060 variable is used where the architecture is needed in a value where 8061 underscores are not allowed, for example within package filenames. In 8062 this case, dash characters replace any underscore characters used in 8063 ``TARGET_ARCH``. 8064 8065 Do not edit this variable. 8066 8067 :term:`TUNE_ARCH` 8068 The GNU canonical architecture for a specific architecture (i.e. 8069 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses 8070 this value to setup configuration. 8071 8072 ``TUNE_ARCH`` definitions are specific to a given architecture. The 8073 definitions can be a single static definition, or can be dynamically 8074 adjusted. You can see details for a given CPU family by looking at 8075 the architecture's ``README`` file. For example, the 8076 ``meta/conf/machine/include/mips/README`` file in the 8077 :term:`Source Directory` provides information for 8078 ``TUNE_ARCH`` specific to the ``mips`` architecture. 8079 8080 ``TUNE_ARCH`` is tied closely to 8081 :term:`TARGET_ARCH`, which defines the target 8082 machine's architecture. The BitBake configuration file 8083 (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:: 8084 8085 TARGET_ARCH = "${TUNE_ARCH}" 8086 8087 The following list, which is by no means complete since architectures 8088 are configurable, shows supported machine architectures: 8089 8090 - arm 8091 - i586 8092 - x86_64 8093 - powerpc 8094 - powerpc64 8095 - mips 8096 - mipsel 8097 8098 :term:`TUNE_ASARGS` 8099 Specifies architecture-specific assembler flags for the target 8100 system. The set of flags is based on the selected tune features. 8101 ``TUNE_ASARGS`` is set using the tune include files, which are 8102 typically under ``meta/conf/machine/include/`` and are influenced 8103 through :term:`TUNE_FEATURES`. For example, the 8104 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags 8105 for the x86 architecture as follows:: 8106 8107 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" 8108 8109 .. note:: 8110 8111 Board Support Packages (BSPs) select the tune. The selected tune, 8112 in turn, affects the tune variables themselves (i.e. the tune can 8113 supply its own set of flags). 8114 8115 :term:`TUNE_CCARGS` 8116 Specifies architecture-specific C compiler flags for the target 8117 system. The set of flags is based on the selected tune features. 8118 ``TUNE_CCARGS`` is set using the tune include files, which are 8119 typically under ``meta/conf/machine/include/`` and are influenced 8120 through :term:`TUNE_FEATURES`. 8121 8122 .. note:: 8123 8124 Board Support Packages (BSPs) select the tune. The selected tune, 8125 in turn, affects the tune variables themselves (i.e. the tune can 8126 supply its own set of flags). 8127 8128 :term:`TUNE_FEATURES` 8129 Features used to "tune" a compiler for optimal use given a specific 8130 processor. The features are defined within the tune files and allow 8131 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on 8132 the features. 8133 8134 The OpenEmbedded build system verifies the features to be sure they 8135 are not conflicting and that they are supported. 8136 8137 The BitBake configuration file (``meta/conf/bitbake.conf``) defines 8138 ``TUNE_FEATURES`` as follows:: 8139 8140 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" 8141 8142 See the :term:`DEFAULTTUNE` variable for more information. 8143 8144 :term:`TUNE_LDARGS` 8145 Specifies architecture-specific linker flags for the target system. 8146 The set of flags is based on the selected tune features. 8147 ``TUNE_LDARGS`` is set using the tune include files, which are 8148 typically under ``meta/conf/machine/include/`` and are influenced 8149 through :term:`TUNE_FEATURES`. For example, the 8150 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags 8151 for the x86 architecture as follows:: 8152 8153 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" 8154 8155 .. note:: 8156 8157 Board Support Packages (BSPs) select the tune. The selected tune, 8158 in turn, affects the tune variables themselves (i.e. the tune can 8159 supply its own set of flags). 8160 8161 :term:`TUNE_PKGARCH` 8162 The package architecture understood by the packaging system to define 8163 the architecture, ABI, and tuning of output packages. The specific 8164 tune is defined using the "_tune" override as follows:: 8165 8166 TUNE_PKGARCH_tune-tune = "tune" 8167 8168 These tune-specific package architectures are defined in the machine 8169 include files. Here is an example of the "core2-32" tuning as used in 8170 the ``meta/conf/machine/include/tune-core2.inc`` file:: 8171 8172 TUNE_PKGARCH_tune-core2-32 = "core2-32" 8173 8174 :term:`TUNEABI` 8175 An underlying Application Binary Interface (ABI) used by a particular 8176 tuning in a given toolchain layer. Providers that use prebuilt 8177 libraries can use the ``TUNEABI``, 8178 :term:`TUNEABI_OVERRIDE`, and 8179 :term:`TUNEABI_WHITELIST` variables to check 8180 compatibility of tunings against their selection of libraries. 8181 8182 If ``TUNEABI`` is undefined, then every tuning is allowed. See the 8183 :ref:`sanity <ref-classes-sanity>` class to see how the variable is 8184 used. 8185 8186 :term:`TUNEABI_OVERRIDE` 8187 If set, the OpenEmbedded system ignores the 8188 :term:`TUNEABI_WHITELIST` variable. 8189 Providers that use prebuilt libraries can use the 8190 ``TUNEABI_OVERRIDE``, ``TUNEABI_WHITELIST``, and 8191 :term:`TUNEABI` variables to check compatibility of a 8192 tuning against their selection of libraries. 8193 8194 See the :ref:`sanity <ref-classes-sanity>` class to see how the 8195 variable is used. 8196 8197 :term:`TUNEABI_WHITELIST` 8198 A whitelist of permissible :term:`TUNEABI` values. If 8199 ``TUNEABI_WHITELIST`` is not set, all tunes are allowed. Providers 8200 that use prebuilt libraries can use the ``TUNEABI_WHITELIST``, 8201 :term:`TUNEABI_OVERRIDE`, and ``TUNEABI`` 8202 variables to check compatibility of a tuning against their selection 8203 of libraries. 8204 8205 See the :ref:`sanity <ref-classes-sanity>` class to see how the 8206 variable is used. 8207 8208 :term:`TUNECONFLICTS[feature]` 8209 Specifies CPU or Application Binary Interface (ABI) tuning features 8210 that conflict with feature. 8211 8212 Known tuning conflicts are specified in the machine include files in 8213 the :term:`Source Directory`. Here is an example from 8214 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file 8215 that lists the "o32" and "n64" features as conflicting with the "n32" 8216 feature:: 8217 8218 TUNECONFLICTS[n32] = "o32 n64" 8219 8220 :term:`TUNEVALID[feature]` 8221 Specifies a valid CPU or Application Binary Interface (ABI) tuning 8222 feature. The specified feature is stored as a flag. Valid features 8223 are specified in the machine include files (e.g. 8224 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example 8225 from that file:: 8226 8227 TUNEVALID[bigendian] = "Enable big-endian mode." 8228 8229 See the machine include files in the :term:`Source Directory` 8230 for these features. 8231 8232 :term:`UBOOT_CONFIG` 8233 Configures the :term:`UBOOT_MACHINE` and can 8234 also define :term:`IMAGE_FSTYPES` for individual 8235 cases. 8236 8237 Following is an example from the ``meta-fsl-arm`` layer. :: 8238 8239 UBOOT_CONFIG ??= "sd" 8240 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard" 8241 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config" 8242 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs" 8243 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" 8244 8245 In this example, "sd" is selected as the configuration of the possible four for the 8246 ``UBOOT_MACHINE``. The "sd" configuration defines 8247 "mx6qsabreauto_config" as the value for ``UBOOT_MACHINE``, while the 8248 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-Boot image. 8249 8250 For more information on how the ``UBOOT_CONFIG`` is handled, see the 8251 :ref:`uboot-config <ref-classes-uboot-config>` 8252 class. 8253 8254 :term:`UBOOT_DTB_LOADADDRESS` 8255 Specifies the load address for the dtb image used by U-Boot. During FIT 8256 image creation, the ``UBOOT_DTB_LOADADDRESS`` variable is used in 8257 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify 8258 the load address to be used in 8259 creating the dtb sections of Image Tree Source for the FIT image. 8260 8261 :term:`UBOOT_DTBO_LOADADDRESS` 8262 Specifies the load address for the dtbo image used by U-Boot. During FIT 8263 image creation, the ``UBOOT_DTBO_LOADADDRESS`` variable is used in 8264 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in 8265 creating the dtbo sections of Image Tree Source for the FIT image. 8266 8267 :term:`UBOOT_ENTRYPOINT` 8268 Specifies the entry point for the U-Boot image. During U-Boot image 8269 creation, the ``UBOOT_ENTRYPOINT`` variable is passed as a 8270 command-line parameter to the ``uboot-mkimage`` utility. 8271 8272 :term:`UBOOT_LOADADDRESS` 8273 Specifies the load address for the U-Boot image. During U-Boot image 8274 creation, the ``UBOOT_LOADADDRESS`` variable is passed as a 8275 command-line parameter to the ``uboot-mkimage`` utility. 8276 8277 :term:`UBOOT_LOCALVERSION` 8278 Appends a string to the name of the local version of the U-Boot 8279 image. For example, assuming the version of the U-Boot image built 8280 was "2013.10", the full version string reported by U-Boot would be 8281 "2013.10-yocto" given the following statement:: 8282 8283 UBOOT_LOCALVERSION = "-yocto" 8284 8285 :term:`UBOOT_MACHINE` 8286 Specifies the value passed on the ``make`` command line when building 8287 a U-Boot image. The value indicates the target platform 8288 configuration. You typically set this variable from the machine 8289 configuration file (i.e. ``conf/machine/machine_name.conf``). 8290 8291 Please see the "Selection of Processor Architecture and Board Type" 8292 section in the U-Boot README for valid values for this variable. 8293 8294 :term:`UBOOT_MAKE_TARGET` 8295 Specifies the target called in the ``Makefile``. The default target 8296 is "all". 8297 8298 :term:`UBOOT_MKIMAGE` 8299 Specifies the name of the mkimage command as used by the 8300 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble 8301 the FIT image. This can be used to substitute an alternative command, wrapper 8302 script or function if desired. The default is "uboot-mkimage". 8303 8304 :term:`UBOOT_MKIMAGE_DTCOPTS` 8305 Options for the device tree compiler passed to mkimage '-D' 8306 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class. 8307 If ``UBOOT_MKIMAGE_DTCOPTS`` is not set then kernel-fitimage will not 8308 pass the ``-D`` option to mkimage. 8309 8310 :term:`UBOOT_MKIMAGE_SIGN` 8311 Specifies the name of the mkimage command as used by the 8312 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign 8313 the FIT image after it has been assembled (if enabled). This can be used 8314 to substitute an alternative command, wrapper script or function if 8315 desired. The default is "${:term:`UBOOT_MKIMAGE`}". 8316 8317 :term:`UBOOT_MKIMAGE_SIGN_ARGS` 8318 Optionally specifies additional arguments for the 8319 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the 8320 mkimage command when signing the FIT image. 8321 8322 :term:`UBOOT_RD_ENTRYPOINT` 8323 Specifies the entrypoint for the RAM disk image. 8324 During FIT image creation, the 8325 ``UBOOT_RD_ENTRYPOINT`` variable is used 8326 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the 8327 entrypoint to be used in creating the Image Tree Source for 8328 the FIT image. 8329 8330 :term:`UBOOT_RD_LOADADDRESS` 8331 Specifies the load address for the RAM disk image. 8332 During FIT image creation, the 8333 ``UBOOT_RD_LOADADDRESS`` variable is used 8334 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the 8335 load address to be used in creating the Image Tree Source for 8336 the FIT image. 8337 8338 :term:`UBOOT_SIGN_ENABLE` 8339 Enable signing of FIT image. The default value is "0". 8340 8341 :term:`UBOOT_SIGN_KEYDIR` 8342 Location of the directory containing the RSA key and 8343 certificate used for signing FIT image. 8344 8345 :term:`UBOOT_SIGN_KEYNAME` 8346 The name of keys used for signing U-Boot FIT image stored in 8347 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt 8348 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have 8349 :term:`UBOOT_SIGN_KEYNAME` set to "dev". 8350 8351 :term:`UBOOT_SUFFIX` 8352 Points to the generated U-Boot extension. For example, ``u-boot.sb`` 8353 has a ``.sb`` extension. 8354 8355 The default U-Boot extension is ``.bin`` 8356 8357 :term:`UBOOT_TARGET` 8358 Specifies the target used for building U-Boot. The target is passed 8359 directly as part of the "make" command (e.g. SPL and AIS). If you do 8360 not specifically set this variable, the OpenEmbedded build process 8361 passes and uses "all" for the target during the U-Boot building 8362 process. 8363 8364 :term:`UNKNOWN_CONFIGURE_WHITELIST` 8365 Specifies a list of options that, if reported by the configure script 8366 as being invalid, should not generate a warning during the 8367 :ref:`ref-tasks-configure` task. Normally, invalid 8368 configure options are simply not passed to the configure script (e.g. 8369 should be removed from :term:`EXTRA_OECONF` or 8370 :term:`PACKAGECONFIG_CONFARGS`). 8371 However, there are common options that are passed to all 8372 configure scripts at a class level, but might not be valid for some 8373 configure scripts. Therefore warnings about these options are useless. 8374 For these cases, the options are added to ``UNKNOWN_CONFIGURE_WHITELIST``. 8375 8376 The configure arguments check that uses 8377 ``UNKNOWN_CONFIGURE_WHITELIST`` is part of the 8378 :ref:`insane <ref-classes-insane>` class and is only enabled if the 8379 recipe inherits the :ref:`autotools <ref-classes-autotools>` class. 8380 8381 :term:`UPDATERCPN` 8382 For recipes inheriting the 8383 :ref:`update-rc.d <ref-classes-update-rc.d>` class, ``UPDATERCPN`` 8384 specifies the package that contains the initscript that is enabled. 8385 8386 The default value is "${PN}". Given that almost all recipes that 8387 install initscripts package them in the main package for the recipe, 8388 you rarely need to set this variable in individual recipes. 8389 8390 :term:`UPSTREAM_CHECK_GITTAGREGEX` 8391 You can perform a per-recipe check for what the latest upstream 8392 source code version is by calling ``bitbake -c checkpkg`` recipe. If 8393 the recipe source code is provided from Git repositories, the 8394 OpenEmbedded build system determines the latest upstream version by 8395 picking the latest tag from the list of all repository tags. 8396 8397 You can use the ``UPSTREAM_CHECK_GITTAGREGEX`` variable to provide a 8398 regular expression to filter only the relevant tags should the 8399 default filter not work correctly. 8400 :: 8401 8402 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" 8403 8404 :term:`UPSTREAM_CHECK_REGEX` 8405 Use the ``UPSTREAM_CHECK_REGEX`` variable to specify a different 8406 regular expression instead of the default one when the package 8407 checking system is parsing the page found using 8408 :term:`UPSTREAM_CHECK_URI`. 8409 :: 8410 8411 UPSTREAM_CHECK_REGEX = "package_regex" 8412 8413 :term:`UPSTREAM_CHECK_URI` 8414 You can perform a per-recipe check for what the latest upstream 8415 source code version is by calling ``bitbake -c checkpkg`` recipe. If 8416 the source code is provided from tarballs, the latest version is 8417 determined by fetching the directory listing where the tarball is and 8418 attempting to find a later tarball. When this approach does not work, 8419 you can use ``UPSTREAM_CHECK_URI`` to provide a different URI that 8420 contains the link to the latest tarball. 8421 :: 8422 8423 UPSTREAM_CHECK_URI = "recipe_url" 8424 8425 :term:`USE_DEVFS` 8426 Determines if ``devtmpfs`` is used for ``/dev`` population. The 8427 default value used for ``USE_DEVFS`` is "1" when no value is 8428 specifically set. Typically, you would set ``USE_DEVFS`` to "0" for a 8429 statically populated ``/dev`` directory. 8430 8431 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in 8432 the Yocto Project Development Tasks Manual for information on how to 8433 use this variable. 8434 8435 :term:`USE_VT` 8436 When using 8437 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`, 8438 determines whether or not to run a 8439 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any 8440 virtual terminals in order to enable logging in through those 8441 terminals. 8442 8443 The default value used for ``USE_VT`` is "1" when no default value is 8444 specifically set. Typically, you would set ``USE_VT`` to "0" in the 8445 machine configuration file for machines that do not have a graphical 8446 display attached and therefore do not need virtual terminal 8447 functionality. 8448 8449 :term:`USER_CLASSES` 8450 A list of classes to globally inherit. These classes are used by the 8451 OpenEmbedded build system to enable extra features (e.g. 8452 ``buildstats``, ``image-mklibs``, and so forth). 8453 8454 The default list is set in your ``local.conf`` file:: 8455 8456 USER_CLASSES ?= "buildstats image-mklibs image-prelink" 8457 8458 For more information, see 8459 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`. 8460 8461 :term:`USERADD_ERROR_DYNAMIC` 8462 If set to ``error``, forces the OpenEmbedded build system to produce 8463 an error if the user identification (``uid``) and group 8464 identification (``gid``) values are not defined in any of the files 8465 listed in :term:`USERADD_UID_TABLES` and 8466 :term:`USERADD_GID_TABLES`. If set to 8467 ``warn``, a warning will be issued instead. 8468 8469 The default behavior for the build system is to dynamically apply 8470 ``uid`` and ``gid`` values. Consequently, the 8471 ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan 8472 on using statically assigned ``gid`` and ``uid`` values, you should 8473 set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf`` 8474 file as follows:: 8475 8476 USERADD_ERROR_DYNAMIC = "error" 8477 8478 Overriding the 8479 default behavior implies you are going to also take steps to set 8480 static ``uid`` and ``gid`` values through use of the 8481 :term:`USERADDEXTENSION`, 8482 :term:`USERADD_UID_TABLES`, and 8483 :term:`USERADD_GID_TABLES` variables. 8484 8485 .. note:: 8486 8487 There is a difference in behavior between setting 8488 ``USERADD_ERROR_DYNAMIC`` to ``error`` and setting it to ``warn``. 8489 When it is set to ``warn``, the build system will report a warning for 8490 every undefined ``uid`` and ``gid`` in any recipe. But when it is set 8491 to ``error``, it will only report errors for recipes that are actually 8492 built. 8493 This saves you from having to add static IDs for recipes that you 8494 know will never be built. 8495 8496 :term:`USERADD_GID_TABLES` 8497 Specifies a password file to use for obtaining static group 8498 identification (``gid``) values when the OpenEmbedded build system 8499 adds a group to the system during package installation. 8500 8501 When applying static group identification (``gid``) values, the 8502 OpenEmbedded build system looks in :term:`BBPATH` for a 8503 ``files/group`` file and then applies those ``uid`` values. Set the 8504 variable as follows in your ``local.conf`` file:: 8505 8506 8507 USERADD_GID_TABLES = "files/group" 8508 8509 .. note:: 8510 8511 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" 8512 causes the build system to use static ``gid`` values. 8513 8514 :term:`USERADD_PACKAGES` 8515 When inheriting the :ref:`useradd <ref-classes-useradd>` class, 8516 this variable specifies the individual packages within the recipe 8517 that require users and/or groups to be added. 8518 8519 You must set this variable if the recipe inherits the class. For 8520 example, the following enables adding a user for the main package in 8521 a recipe:: 8522 8523 USERADD_PACKAGES = "${PN}" 8524 8525 .. note:: 8526 8527 It follows that if you are going to use the ``USERADD_PACKAGES`` 8528 variable, you need to set one or more of the :term:`USERADD_PARAM`, 8529 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. 8530 8531 :term:`USERADD_PARAM` 8532 When inheriting the :ref:`useradd <ref-classes-useradd>` class, 8533 this variable specifies for a package what parameters should pass to 8534 the ``useradd`` command if you add a user to the system when the 8535 package is installed. 8536 8537 Here is an example from the ``dbus`` recipe:: 8538 8539 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ 8540 --no-create-home --shell /bin/false \ 8541 --user-group messagebus" 8542 8543 For information on the 8544 standard Linux shell command ``useradd``, see 8545 https://linux.die.net/man/8/useradd. 8546 8547 :term:`USERADD_UID_TABLES` 8548 Specifies a password file to use for obtaining static user 8549 identification (``uid``) values when the OpenEmbedded build system 8550 adds a user to the system during package installation. 8551 8552 When applying static user identification (``uid``) values, the 8553 OpenEmbedded build system looks in :term:`BBPATH` for a 8554 ``files/passwd`` file and then applies those ``uid`` values. Set the 8555 variable as follows in your ``local.conf`` file:: 8556 8557 USERADD_UID_TABLES = "files/passwd" 8558 8559 .. note:: 8560 8561 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" 8562 causes the build system to use static ``uid`` values. 8563 8564 :term:`USERADDEXTENSION` 8565 When set to "useradd-staticids", causes the OpenEmbedded build system 8566 to base all user and group additions on a static ``passwd`` and 8567 ``group`` files found in :term:`BBPATH`. 8568 8569 To use static user identification (``uid``) and group identification 8570 (``gid``) values, set the variable as follows in your ``local.conf`` 8571 file: USERADDEXTENSION = "useradd-staticids" 8572 8573 .. note:: 8574 8575 Setting this variable to use static ``uid`` and ``gid`` 8576 values causes the OpenEmbedded build system to employ the 8577 :ref:`ref-classes-useradd` class. 8578 8579 If you use static ``uid`` and ``gid`` information, you must also 8580 specify the ``files/passwd`` and ``files/group`` files by setting the 8581 :term:`USERADD_UID_TABLES` and 8582 :term:`USERADD_GID_TABLES` variables. 8583 Additionally, you should also set the 8584 :term:`USERADD_ERROR_DYNAMIC` variable. 8585 8586 :term:`VOLATILE_LOG_DIR` 8587 Specifies the persistence of the target's ``/var/log`` directory, 8588 which is used to house postinstall target log files. 8589 8590 By default, ``VOLATILE_LOG_DIR`` is set to "yes", which means the 8591 file is not persistent. You can override this setting by setting the 8592 variable to "no" to make the log directory persistent. 8593 8594 :term:`WARN_QA` 8595 Specifies the quality assurance checks whose failures are reported as 8596 warnings by the OpenEmbedded build system. You set this variable in 8597 your distribution configuration file. For a list of the checks you 8598 can control with this variable, see the 8599 ":ref:`insane.bbclass <ref-classes-insane>`" section. 8600 8601 :term:`WKS_FILE` 8602 Specifies the location of the Wic kickstart file that is used by the 8603 OpenEmbedded build system to create a partitioned image 8604 (image\ ``.wic``). For information on how to create a partitioned 8605 image, see the 8606 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`" 8607 section in the Yocto Project Development Tasks Manual. For details on 8608 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. 8609 8610 :term:`WKS_FILE_DEPENDS` 8611 When placed in the recipe that builds your image, this variable lists 8612 build-time dependencies. The ``WKS_FILE_DEPENDS`` variable is only 8613 applicable when Wic images are active (i.e. when 8614 :term:`IMAGE_FSTYPES` contains entries related 8615 to Wic). If your recipe does not create Wic images, the variable has 8616 no effect. 8617 8618 The ``WKS_FILE_DEPENDS`` variable is similar to the 8619 :term:`DEPENDS` variable. When you use the variable in 8620 your recipe that builds the Wic image, dependencies you list in the 8621 ``WKS_FILE_DEPENDS`` variable are added to the ``DEPENDS`` variable. 8622 8623 With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to 8624 specify a list of additional dependencies (e.g. native tools, 8625 bootloaders, and so forth), that are required to build Wic images. 8626 Following is an example:: 8627 8628 WKS_FILE_DEPENDS = "some-native-tool" 8629 8630 In the 8631 previous example, some-native-tool would be replaced with an actual 8632 native tool on which the build would depend. 8633 8634 :term:`WORKDIR` 8635 The pathname of the work directory in which the OpenEmbedded build 8636 system builds a recipe. This directory is located within the 8637 :term:`TMPDIR` directory structure and is specific to 8638 the recipe being built and the system for which it is being built. 8639 8640 The ``WORKDIR`` directory is defined as follows:: 8641 8642 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} 8643 8644 The actual directory depends on several things: 8645 8646 - :term:`TMPDIR`: The top-level build output directory 8647 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier 8648 - :term:`PN`: The recipe name 8649 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which 8650 is usually the case for most recipes, then `EXTENDPE` is blank) 8651 - :term:`PV`: The recipe version 8652 - :term:`PR`: The recipe revision 8653 8654 As an example, assume a Source Directory top-level folder name 8655 ``poky``, a default Build Directory at ``poky/build``, and a 8656 ``qemux86-poky-linux`` machine target system. Furthermore, suppose 8657 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work 8658 directory the build system uses to build the package would be as 8659 follows:: 8660 8661 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 8662 8663 :term:`XSERVER` 8664 Specifies the packages that should be installed to provide an X 8665 server and drivers for the current machine, assuming your image 8666 directly includes ``packagegroup-core-x11-xserver`` or, perhaps 8667 indirectly, includes "x11-base" in 8668 :term:`IMAGE_FEATURES`. 8669 8670 The default value of ``XSERVER``, if not specified in the machine 8671 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". 8672 8673