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