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