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