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 :sorted: 21 22 :term:`ABIEXTENSION` 23 Extension to the Application Binary Interface (ABI) field of the GNU 24 canonical architecture name (e.g. "eabi"). 25 26 ABI extensions are set in the machine include files. For example, the 27 ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the 28 following extension:: 29 30 ABIEXTENSION = "eabi" 31 32 :term:`ALLOW_EMPTY` 33 Specifies whether to produce an output package even if it is empty. 34 By default, BitBake does not produce empty packages. This default 35 behavior can cause issues when there is an 36 :term:`RDEPENDS` or some other hard runtime 37 requirement on the existence of the package. 38 39 Like all package-controlling variables, you must always use them in 40 conjunction with a package name override, as in:: 41 42 ALLOW_EMPTY:${PN} = "1" 43 ALLOW_EMPTY:${PN}-dev = "1" 44 ALLOW_EMPTY:${PN}-staticdev = "1" 45 46 :term:`ALTERNATIVE` 47 Lists commands in a package that need an alternative binary naming 48 scheme. Sometimes the same command is provided in multiple packages. 49 When this occurs, the OpenEmbedded build system needs to use the 50 alternatives system to create a different binary naming scheme so the 51 commands can co-exist. 52 53 To use the variable, list out the package's commands that are also 54 provided by another package. For example, if the ``busybox`` package 55 has four such commands, you identify them as follows:: 56 57 ALTERNATIVE:busybox = "sh sed test bracket" 58 59 For more information on the alternatives system, see the 60 ":ref:`ref-classes-update-alternatives`" 61 section. 62 63 :term:`ALTERNATIVE_LINK_NAME` 64 Used by the alternatives system to map duplicated commands to actual 65 locations. For example, if the ``bracket`` command provided by the 66 ``busybox`` package is duplicated through another package, you must 67 use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual 68 location:: 69 70 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" 71 72 In this example, the binary for the ``bracket`` command (i.e. ``[``) 73 from the ``busybox`` package resides in ``/usr/bin/``. 74 75 .. note:: 76 77 If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``. 78 79 For more information on the alternatives system, see the 80 ":ref:`ref-classes-update-alternatives`" 81 section. 82 83 :term:`ALTERNATIVE_PRIORITY` 84 Used by the alternatives system to create default priorities for 85 duplicated commands. You can use the variable to create a single 86 default regardless of the command name or package, a default for 87 specific duplicated commands regardless of the package, or a default 88 for specific commands tied to particular packages. Here are the 89 available syntax forms:: 90 91 ALTERNATIVE_PRIORITY = "priority" 92 ALTERNATIVE_PRIORITY[name] = "priority" 93 ALTERNATIVE_PRIORITY_pkg[name] = "priority" 94 95 For more information on the alternatives system, see the 96 ":ref:`ref-classes-update-alternatives`" 97 section. 98 99 :term:`ALTERNATIVE_TARGET` 100 Used by the alternatives system to create default link locations for 101 duplicated commands. You can use the variable to create a single 102 default location for all duplicated commands regardless of the 103 command name or package, a default for specific duplicated commands 104 regardless of the package, or a default for specific commands tied to 105 particular packages. Here are the available syntax forms:: 106 107 ALTERNATIVE_TARGET = "target" 108 ALTERNATIVE_TARGET[name] = "target" 109 ALTERNATIVE_TARGET_pkg[name] = "target" 110 111 .. note:: 112 113 If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value 114 from the :term:`ALTERNATIVE_LINK_NAME` variable. 115 116 If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the 117 same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``" 118 appended to it. 119 120 Finally, if the file referenced has not been renamed, the 121 alternatives system will rename it to avoid the need to rename 122 alternative files in the :ref:`ref-tasks-install` 123 task while retaining support for the command if necessary. 124 125 For more information on the alternatives system, see the 126 ":ref:`ref-classes-update-alternatives`" section. 127 128 :term:`ANY_OF_DISTRO_FEATURES` 129 When inheriting the :ref:`ref-classes-features_check` 130 class, this variable identifies a list of distribution features where 131 at least one must be enabled in the current configuration in order 132 for the OpenEmbedded build system to build the recipe. In other words, 133 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES` 134 appear in :term:`DISTRO_FEATURES` within the current configuration, then 135 the recipe will be skipped, and if the build system attempts to build 136 the recipe then an error will be triggered. 137 138 :term:`APPEND` 139 An override list of append strings for each target specified with 140 :term:`LABELS`. 141 142 See the :ref:`ref-classes-grub-efi` class for more 143 information on how this variable is used. 144 145 :term:`AR` 146 The minimal command and arguments used to run ``ar``. 147 148 :term:`ARCHIVER_MODE` 149 When used with the :ref:`ref-classes-archiver` class, 150 determines the type of information used to create a released archive. 151 You can use this variable to create archives of patched source, 152 original source, configured source, and so forth by employing the 153 following variable flags (varflags):: 154 155 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. 156 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. 157 ARCHIVER_MODE[src] = "configured" # Uses configured source files. 158 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch. 159 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff. 160 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data. 161 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files. 162 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files. 163 164 For information on how the variable works, see the 165 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`. 166 167 :term:`AS` 168 Minimal command and arguments needed to run the assembler. 169 170 :term:`ASSUME_PROVIDED` 171 Lists recipe names (:term:`PN` values) BitBake does not 172 attempt to build. Instead, BitBake assumes these recipes have already 173 been built. 174 175 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native 176 tools that should not be built. An example is ``git-native``, which 177 when specified, allows for the Git binary from the host to be used 178 rather than building ``git-native``. 179 180 :term:`ASSUME_SHLIBS` 181 Provides additional ``shlibs`` provider mapping information, which 182 adds to or overwrites the information provided automatically by the 183 system. Separate multiple entries using spaces. 184 185 As an example, use the following form to add an ``shlib`` provider of 186 shlibname in packagename with the optional version:: 187 188 shlibname:packagename[_version] 189 190 Here is an example that adds a shared library named ``libEGL.so.1`` 191 as being provided by the ``libegl-implementation`` package:: 192 193 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" 194 195 :term:`AUTO_LIBNAME_PKGS` 196 When the :ref:`ref-classes-debian` class is inherited, 197 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which 198 packages should be checked for libraries and renamed according to 199 Debian library package naming. 200 201 The default value is "${PACKAGES}", which causes the 202 :ref:`ref-classes-debian` class to act on all packages that are 203 explicitly generated by the recipe. 204 205 :term:`AUTOREV` 206 When :term:`SRCREV` is set to the value of this variable, it specifies to 207 use the latest source revision in the repository. Here is an example:: 208 209 SRCREV = "${AUTOREV}" 210 211 If you use the previous statement to retrieve the latest version of 212 software, you need to be sure :term:`PV` contains 213 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel 214 recipe that inherits the :ref:`ref-classes-kernel` class and you 215 use the previous statement. In this example, ``${SRCPV}`` does not 216 automatically get into :term:`PV`. Consequently, you need to change 217 :term:`PV` in your recipe so that it does contain ``${SRCPV}``. 218 219 For more information see the 220 ":ref:`dev-manual/packages:automatically incrementing a package version number`" 221 section in the Yocto Project Development Tasks Manual. 222 223 :term:`AUTO_SYSLINUXMENU` 224 Enables creating an automatic menu for the syslinux bootloader. You 225 must set this variable in your recipe. The 226 :ref:`ref-classes-syslinux` class checks this variable. 227 228 :term:`AVAILTUNES` 229 The list of defined CPU and Application Binary Interface (ABI) 230 tunings (i.e. "tunes") available for use by the OpenEmbedded build 231 system. 232 233 The list simply presents the tunes that are available. Not all tunes 234 may be compatible with a particular machine configuration, or with 235 each other in a 236 :ref:`Multilib <dev-manual/libraries:combining multiple versions of library files into one image>` 237 configuration. 238 239 To add a tune to the list, be sure to append it with spaces using the 240 "+=" BitBake operator. Do not simply replace the list by using the 241 "=" operator. See the 242 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake 243 User Manual for more information. 244 245 :term:`AZ_SAS` 246 Azure Storage Shared Access Signature, when using the 247 :ref:`Azure Storage fetcher (az://) <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>` 248 This variable can be defined to be used by the fetcher to authenticate 249 and gain access to non-public artifacts:: 250 251 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>"" 252 253 For more information see Microsoft's Azure Storage documentation at 254 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview 255 256 :term:`B` 257 The directory within the :term:`Build Directory` in which the 258 OpenEmbedded build system places generated objects during a recipe's 259 build process. By default, this directory is the same as the 260 :term:`S` directory, which is defined as:: 261 262 S = "${WORKDIR}/${BP}" 263 264 You can separate the (:term:`S`) directory and the directory pointed to 265 by the :term:`B` variable. Most Autotools-based recipes support 266 separating these directories. The build system defaults to using 267 separate directories for ``gcc`` and some kernel recipes. 268 269 :term:`BAD_RECOMMENDATIONS` 270 Lists "recommended-only" packages to not install. Recommended-only 271 packages are packages installed only through the 272 :term:`RRECOMMENDS` variable. You can prevent any 273 of these "recommended" packages from being installed by listing them 274 with the :term:`BAD_RECOMMENDATIONS` variable:: 275 276 BAD_RECOMMENDATIONS = "package_name package_name package_name ..." 277 278 You can set this variable globally in your ``local.conf`` file or you 279 can attach it to a specific image recipe by using the recipe name 280 override:: 281 282 BAD_RECOMMENDATIONS:pn-target_image = "package_name" 283 284 It is important to realize that if you choose to not install packages 285 using this variable and some other packages are dependent on them 286 (i.e. listed in a recipe's :term:`RDEPENDS` 287 variable), the OpenEmbedded build system ignores your request and 288 will install the packages to avoid dependency errors. 289 290 This variable is supported only when using the IPK and RPM 291 packaging backends. DEB is not supported. 292 293 See the :term:`NO_RECOMMENDATIONS` and the 294 :term:`PACKAGE_EXCLUDE` variables for related 295 information. 296 297 :term:`BASE_LIB` 298 The library directory name for the CPU or Application Binary 299 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib 300 context. See the ":ref:`dev-manual/libraries:combining multiple versions of library files into one image`" 301 section in the Yocto Project Development Tasks Manual for information 302 on Multilib. 303 304 The :term:`BASE_LIB` variable is defined in the machine include files in 305 the :term:`Source Directory`. If Multilib is not 306 being used, the value defaults to "lib". 307 308 :term:`BASE_WORKDIR` 309 Points to the base of the work directory for all recipes. The default 310 value is "${TMPDIR}/work". 311 312 :term:`BB_ALLOWED_NETWORKS` 313 Specifies a space-delimited list of hosts that the fetcher is allowed 314 to use to obtain the required source code. Following are 315 considerations surrounding this variable: 316 317 - This host list is only used if :term:`BB_NO_NETWORK` is either not set 318 or set to "0". 319 320 - There is limited support for wildcard matching against the beginning of 321 host names. For example, the following setting matches 322 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``:: 323 324 BB_ALLOWED_NETWORKS = "*.gnu.org" 325 326 .. note:: 327 328 The use of the "``*``" character only works at the beginning of 329 a host name and it must be isolated from the remainder of the 330 host name. You cannot use the wildcard character in any other 331 location of the name or combined with the front part of the 332 name. 333 334 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar`` 335 is not. 336 337 - Mirrors not in the host list are skipped and logged in debug. 338 339 - Attempts to access networks not in the host list cause a failure. 340 341 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with 342 :term:`PREMIRRORS` is very useful. Adding the host 343 you want to use to :term:`PREMIRRORS` results in the source code being 344 fetched from an allowed location and avoids raising an error when a 345 host that is not allowed is in a :term:`SRC_URI` 346 statement. This is because the fetcher does not attempt to use the 347 host listed in :term:`SRC_URI` after a successful fetch from the 348 :term:`PREMIRRORS` occurs. 349 350 :term:`BB_BASEHASH_IGNORE_VARS` 351 See :term:`bitbake:BB_BASEHASH_IGNORE_VARS` in the BitBake manual. 352 353 :term:`BB_CACHEDIR` 354 See :term:`bitbake:BB_CACHEDIR` in the BitBake manual. 355 356 :term:`BB_CHECK_SSL_CERTS` 357 See :term:`bitbake:BB_CHECK_SSL_CERTS` in the BitBake manual. 358 359 :term:`BB_CONSOLELOG` 360 See :term:`bitbake:BB_CONSOLELOG` in the BitBake manual. 361 362 :term:`BB_CURRENTTASK` 363 See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual. 364 365 :term:`BB_DANGLINGAPPENDS_WARNONLY` 366 Defines how BitBake handles situations where an append file 367 (``.bbappend``) has no corresponding recipe file (``.bb``). This 368 condition often occurs when layers get out of sync (e.g. ``oe-core`` 369 bumps a recipe version and the old recipe no longer exists and the 370 other layer has not been updated to the new version of the recipe 371 yet). 372 373 The default fatal behavior is safest because it is the sane reaction 374 given something is out of sync. It is important to realize when your 375 changes are no longer being applied. 376 377 You can change the default behavior by setting this variable to "1", 378 "yes", or "true" in your ``local.conf`` file, which is located in the 379 :term:`Build Directory`: Here is an example:: 380 381 BB_DANGLINGAPPENDS_WARNONLY = "1" 382 383 :term:`BB_DEFAULT_TASK` 384 See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual. 385 386 :term:`BB_DEFAULT_UMASK` 387 See :term:`bitbake:BB_DEFAULT_UMASK` in the BitBake manual. 388 389 :term:`BB_DISKMON_DIRS` 390 Monitors disk space and available inodes during the build and allows 391 you to control the build based on these parameters. 392 393 Disk space monitoring is disabled by default. To enable monitoring, 394 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file 395 found in the :term:`Build Directory`. Use the 396 following form: 397 398 .. code-block:: none 399 400 BB_DISKMON_DIRS = "action,dir,threshold [...]" 401 402 where: 403 404 action is: 405 ABORT: Immediately stop the build when 406 a threshold is broken. 407 STOPTASKS: Stop the build after the currently 408 executing tasks have finished when 409 a threshold is broken. 410 WARN: Issue a warning but continue the 411 build when a threshold is broken. 412 Subsequent warnings are issued as 413 defined by the BB_DISKMON_WARNINTERVAL 414 variable, which must be defined in 415 the conf/local.conf file. 416 417 dir is: 418 Any directory you choose. You can specify one or 419 more directories to monitor by separating the 420 groupings with a space. If two directories are 421 on the same device, only the first directory 422 is monitored. 423 424 threshold is: 425 Either the minimum available disk space, 426 the minimum number of free inodes, or 427 both. You must specify at least one. To 428 omit one or the other, simply omit the value. 429 Specify the threshold using G, M, K for Gbytes, 430 Mbytes, and Kbytes, respectively. If you do 431 not specify G, M, or K, Kbytes is assumed by 432 default. Do not use GB, MB, or KB. 433 434 Here are some examples:: 435 436 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" 437 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" 438 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K" 439 440 The first example works only if you also provide the 441 :term:`BB_DISKMON_WARNINTERVAL` 442 variable in the ``conf/local.conf``. This example causes the build 443 system to immediately stop when either the disk space in 444 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops 445 below 100 Kbytes. Because two directories are provided with the 446 variable, the build system also issue a warning when the disk space 447 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number 448 of free inodes drops below 100 Kbytes. Subsequent warnings are issued 449 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL` 450 variable. 451 452 The second example stops the build after all currently executing 453 tasks complete when the minimum disk space in the ``${TMPDIR}`` 454 directory drops below 1 Gbyte. No disk monitoring occurs for the free 455 inodes in this case. 456 457 The final example immediately stops the build when the number of 458 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No 459 disk space monitoring for the directory itself occurs in this case. 460 461 :term:`BB_DISKMON_WARNINTERVAL` 462 Defines the disk space and free inode warning intervals. To set these 463 intervals, define the variable in your ``conf/local.conf`` file in 464 the :term:`Build Directory`. 465 466 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you 467 must also use the :term:`BB_DISKMON_DIRS` 468 variable and define its action as "WARN". During the build, 469 subsequent warnings are issued each time disk space or number of free 470 inodes further reduces by the respective interval. 471 472 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you 473 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk 474 monitoring interval defaults to the following:: 475 476 BB_DISKMON_WARNINTERVAL = "50M,5K" 477 478 When specifying the variable in your configuration file, use the 479 following form: 480 481 .. code-block:: none 482 483 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval" 484 485 where: 486 487 disk_space_interval is: 488 An interval of memory expressed in either 489 G, M, or K for Gbytes, Mbytes, or Kbytes, 490 respectively. You cannot use GB, MB, or KB. 491 492 disk_inode_interval is: 493 An interval of free inodes expressed in either 494 G, M, or K for Gbytes, Mbytes, or Kbytes, 495 respectively. You cannot use GB, MB, or KB. 496 497 Here is an example:: 498 499 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" 500 BB_DISKMON_WARNINTERVAL = "50M,5K" 501 502 These variables cause the 503 OpenEmbedded build system to issue subsequent warnings each time the 504 available disk space further reduces by 50 Mbytes or the number of 505 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}`` 506 directory. Subsequent warnings based on the interval occur each time 507 a respective interval is reached beyond the initial warning (i.e. 1 508 Gbytes and 100 Kbytes). 509 510 :term:`BB_ENV_PASSTHROUGH` 511 See :term:`bitbake:BB_ENV_PASSTHROUGH` in the BitBake manual. 512 513 :term:`BB_ENV_PASSTHROUGH_ADDITIONS` 514 See :term:`bitbake:BB_ENV_PASSTHROUGH_ADDITIONS` in the BitBake manual. 515 516 :term:`BB_FETCH_PREMIRRORONLY` 517 See :term:`bitbake:BB_FETCH_PREMIRRORONLY` in the BitBake manual. 518 519 :term:`BB_FILENAME` 520 See :term:`bitbake:BB_FILENAME` in the BitBake manual. 521 522 :term:`BB_GENERATE_MIRROR_TARBALLS` 523 Causes tarballs of the source control repositories (e.g. Git 524 repositories), including metadata, to be placed in the 525 :term:`DL_DIR` directory. 526 527 For performance reasons, creating and placing tarballs of these 528 repositories is not the default action by the OpenEmbedded build 529 system:: 530 531 BB_GENERATE_MIRROR_TARBALLS = "1" 532 533 Set this variable in your 534 ``local.conf`` file in the :term:`Build Directory`. 535 536 Once you have the tarballs containing your source files, you can 537 clean up your :term:`DL_DIR` directory by deleting any Git or other 538 source control work directories. 539 540 :term:`BB_GENERATE_SHALLOW_TARBALLS` 541 See :term:`bitbake:BB_GENERATE_SHALLOW_TARBALLS` in the BitBake manual. 542 543 :term:`BB_GIT_SHALLOW` 544 See :term:`bitbake:BB_GIT_SHALLOW` in the BitBake manual. 545 546 :term:`BB_GIT_SHALLOW_DEPTH` 547 See :term:`bitbake:BB_GIT_SHALLOW_DEPTH` in the BitBake manual. 548 549 :term:`BB_HASHCHECK_FUNCTION` 550 See :term:`bitbake:BB_HASHCHECK_FUNCTION` in the BitBake manual. 551 552 :term:`BB_HASHCONFIG_IGNORE_VARS` 553 See :term:`bitbake:BB_HASHCONFIG_IGNORE_VARS` in the BitBake manual. 554 555 :term:`BB_HASHSERVE` 556 See :term:`bitbake:BB_HASHSERVE` in the BitBake manual. 557 558 :term:`BB_HASHSERVE_UPSTREAM` 559 See :term:`bitbake:BB_HASHSERVE_UPSTREAM` in the BitBake manual. 560 561 :term:`BB_INVALIDCONF` 562 See :term:`bitbake:BB_INVALIDCONF` in the BitBake manual. 563 564 :term:`BB_LOGCONFIG` 565 See :term:`bitbake:BB_LOGCONFIG` in the BitBake manual. 566 567 :term:`BB_LOGFMT` 568 See :term:`bitbake:BB_LOGFMT` in the BitBake manual. 569 570 :term:`BB_MULTI_PROVIDER_ALLOWED` 571 See :term:`bitbake:BB_MULTI_PROVIDER_ALLOWED` in the BitBake manual. 572 573 :term:`BB_NICE_LEVEL` 574 See :term:`bitbake:BB_NICE_LEVEL` in the BitBake manual. 575 576 :term:`BB_NO_NETWORK` 577 See :term:`bitbake:BB_NO_NETWORK` in the BitBake manual. 578 579 :term:`BB_NUMBER_PARSE_THREADS` 580 See :term:`bitbake:BB_NUMBER_PARSE_THREADS` in the BitBake manual. 581 582 :term:`BB_NUMBER_THREADS` 583 The maximum number of tasks BitBake should run in parallel at any one 584 time. The OpenEmbedded build system automatically configures this 585 variable to be equal to the number of cores on the build system. For 586 example, a system with a dual core processor that also uses 587 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default 588 to "4". 589 590 For single socket systems (i.e. one CPU), you should not have to 591 override this variable to gain optimal parallelism during builds. 592 However, if you have very large systems that employ multiple physical 593 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable 594 is not set higher than "20". 595 596 For more information on speeding up builds, see the 597 ":ref:`dev-manual/speeding-up-build:speeding up a build`" 598 section in the Yocto Project Development Tasks Manual. 599 600 On the other hand, if your goal is to limit the amount of system 601 resources consumed by BitBake tasks, setting :term:`BB_NUMBER_THREADS` 602 to a number lower than the number of CPU threads in your machine 603 won't be sufficient. That's because each package will still be built 604 and installed through a number of parallel jobs specified by the 605 :term:`PARALLEL_MAKE` variable, which is by default the number of CPU 606 threads in your system, and is not impacted by the 607 :term:`BB_NUMBER_THREADS` value. 608 609 So, if you set :term:`BB_NUMBER_THREADS` to "1" but don't set 610 :term:`PARALLEL_MAKE`, most of your system resources will be consumed 611 anyway. 612 613 Therefore, if you intend to reduce the load of your build system by 614 setting :term:`BB_NUMBER_THREADS` to a relatively low value compared 615 to the number of CPU threads on your system, you should also set 616 :term:`PARALLEL_MAKE` to a similarly low value. 617 618 An alternative to using :term:`BB_NUMBER_THREADS` to keep the usage 619 of build system resources under control is to use the smarter 620 :term:`BB_PRESSURE_MAX_CPU`, :term:`BB_PRESSURE_MAX_IO` or 621 :term:`BB_PRESSURE_MAX_MEMORY` controls. They will prevent BitBake 622 from starting new tasks as long as thresholds are exceeded. Anyway, 623 as with :term:`BB_NUMBER_THREADS`, such controls won't prevent the 624 tasks already being run from using all CPU threads on the system 625 if :term:`PARALLEL_MAKE` is not set to a low value. 626 627 :term:`BB_ORIGENV` 628 See :term:`bitbake:BB_ORIGENV` in the BitBake manual. 629 630 :term:`BB_PRESERVE_ENV` 631 See :term:`bitbake:BB_PRESERVE_ENV` in the BitBake manual. 632 633 :term:`BB_PRESSURE_MAX_CPU` 634 See :term:`bitbake:BB_PRESSURE_MAX_CPU` in the BitBake manual. 635 636 :term:`BB_PRESSURE_MAX_IO` 637 See :term:`bitbake:BB_PRESSURE_MAX_IO` in the BitBake manual. 638 639 :term:`BB_PRESSURE_MAX_MEMORY` 640 See :term:`bitbake:BB_PRESSURE_MAX_MEMORY` in the BitBake manual. 641 642 :term:`BB_RUNFMT` 643 See :term:`bitbake:BB_RUNFMT` in the BitBake manual. 644 645 :term:`BB_RUNTASK` 646 See :term:`bitbake:BB_RUNTASK` in the BitBake manual. 647 648 :term:`BB_SCHEDULER` 649 See :term:`bitbake:BB_SCHEDULER` in the BitBake manual. 650 651 :term:`BB_SCHEDULERS` 652 See :term:`bitbake:BB_SCHEDULERS` in the BitBake manual. 653 654 :term:`BB_SERVER_TIMEOUT` 655 Specifies the time (in seconds) after which to unload the BitBake 656 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how 657 long the BitBake server stays resident between invocations. 658 659 For example, the following statement in your ``local.conf`` file 660 instructs the server to be unloaded after 20 seconds of inactivity:: 661 662 BB_SERVER_TIMEOUT = "20" 663 664 If you want the server to never be unloaded, 665 set :term:`BB_SERVER_TIMEOUT` to "-1". 666 667 :term:`BB_SETSCENE_DEPVALID` 668 See :term:`bitbake:BB_SETSCENE_DEPVALID` in the BitBake manual. 669 670 :term:`BB_SIGNATURE_EXCLUDE_FLAGS` 671 See :term:`bitbake:BB_SIGNATURE_EXCLUDE_FLAGS` in the BitBake manual. 672 673 :term:`BB_SIGNATURE_HANDLER` 674 See :term:`bitbake:BB_SIGNATURE_HANDLER` in the BitBake manual. 675 676 :term:`BB_SRCREV_POLICY` 677 See :term:`bitbake:BB_SRCREV_POLICY` in the BitBake manual. 678 679 :term:`BB_STRICT_CHECKSUM` 680 See :term:`bitbake:BB_STRICT_CHECKSUM` in the BitBake manual. 681 682 :term:`BB_TASK_IONICE_LEVEL` 683 See :term:`bitbake:BB_TASK_IONICE_LEVEL` in the BitBake manual. 684 685 :term:`BB_TASK_NICE_LEVEL` 686 See :term:`bitbake:BB_TASK_NICE_LEVEL` in the BitBake manual. 687 688 :term:`BB_TASKHASH` 689 See :term:`bitbake:BB_TASKHASH` in the BitBake manual. 690 691 :term:`BB_VERBOSE_LOGS` 692 See :term:`bitbake:BB_VERBOSE_LOGS` in the BitBake manual. 693 694 :term:`BB_WORKERCONTEXT` 695 See :term:`bitbake:BB_WORKERCONTEXT` in the BitBake manual. 696 697 :term:`BBCLASSEXTEND` 698 Allows you to extend a recipe so that it builds variants of the 699 software. There are common variants for recipes as "natives" like 700 ``quilt-native``, which is a copy of Quilt built to run on the build 701 system; "crosses" such as ``gcc-cross``, which is a compiler built to 702 run on the build machine but produces binaries that run on the target 703 :term:`MACHINE`; ":ref:`ref-classes-nativesdk`", which 704 targets the SDK machine instead of :term:`MACHINE`; and "mulitlibs" in 705 the form "``multilib:``\ multilib_name". 706 707 To build a different variant of the recipe with a minimal amount of 708 code, it usually is as simple as adding the following to your recipe:: 709 710 BBCLASSEXTEND =+ "native nativesdk" 711 BBCLASSEXTEND =+ "multilib:multilib_name" 712 713 .. note:: 714 715 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe 716 variants by rewriting variable values and applying overrides such 717 as ``:class-native``. For example, to generate a native version of 718 a recipe, a :term:`DEPENDS` on "foo" is rewritten 719 to a :term:`DEPENDS` on "foo-native". 720 721 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once. 722 Parsing once adds some limitations. For example, it is not 723 possible to include a different file depending on the variant, 724 since ``include`` statements are processed when the recipe is 725 parsed. 726 727 :term:`BBDEBUG` 728 See :term:`bitbake:BBDEBUG` in the BitBake manual. 729 730 :term:`BBFILE_COLLECTIONS` 731 Lists the names of configured layers. These names are used to find 732 the other ``BBFILE_*`` variables. Typically, each layer will append 733 its name to this variable in its ``conf/layer.conf`` file. 734 735 :term:`BBFILE_PATTERN` 736 Variable that expands to match files from 737 :term:`BBFILES` in a particular layer. This variable 738 is used in the ``conf/layer.conf`` file and must be suffixed with the 739 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``). 740 741 :term:`BBFILE_PRIORITY` 742 Assigns the priority for recipe files in each layer. 743 744 This variable is useful in situations where the same recipe appears 745 in more than one layer. Setting this variable allows you to 746 prioritize a layer against other layers that contain the same recipe 747 --- effectively letting you control the precedence for the multiple 748 layers. The precedence established through this variable stands 749 regardless of a recipe's version (:term:`PV` variable). For 750 example, a layer that has a recipe with a higher :term:`PV` value but for 751 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still 752 has a lower precedence. 753 754 A larger value for the :term:`BBFILE_PRIORITY` variable results in a 755 higher precedence. For example, the value 6 has a higher precedence 756 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable 757 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable 758 for more information. The default priority, if unspecified for a 759 layer with no dependencies, is the lowest defined priority + 1 (or 1 760 if no priorities are defined). 761 762 .. tip:: 763 764 You can use the command ``bitbake-layers show-layers`` 765 to list all configured layers along with their priorities. 766 767 :term:`BBFILES` 768 A space-separated list of recipe files BitBake uses to build 769 software. 770 771 When specifying recipe files, you can pattern match using Python's 772 `glob <https://docs.python.org/3/library/glob.html>`__ syntax. 773 For details on the syntax, see the documentation by following the 774 previous link. 775 776 :term:`BBFILES_DYNAMIC` 777 Activates content when identified layers are present. You identify 778 the layers by the collections that the layers define. 779 780 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files 781 whose corresponding ``.bb`` file is in a layer that attempts to 782 modify other layers through ``.bbappend`` but does not want to 783 introduce a hard dependency on those other layers. 784 785 Use the following form for :term:`BBFILES_DYNAMIC`: 786 ``collection_name:filename_pattern``. 787 788 The following example identifies two collection names and two 789 filename patterns:: 790 791 BBFILES_DYNAMIC += " \ 792 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ 793 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \ 794 " 795 796 This next example shows an error message that occurs because invalid 797 entries are found, which cause parsing to fail: 798 799 .. code-block:: none 800 801 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not: 802 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend 803 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend 804 805 :term:`BBINCLUDED` 806 See :term:`bitbake:BBINCLUDED` in the BitBake manual. 807 808 :term:`BBINCLUDELOGS` 809 Variable that controls how BitBake displays logs on build failure. 810 811 :term:`BBINCLUDELOGS_LINES` 812 If :term:`BBINCLUDELOGS` is set, specifies the 813 maximum number of lines from the task log file to print when 814 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`, 815 the entire log is printed. 816 817 :term:`BBLAYERS` 818 Lists the layers to enable during the build. This variable is defined 819 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. 820 Here is an example:: 821 822 BBLAYERS = " \ 823 /home/scottrif/poky/meta \ 824 /home/scottrif/poky/meta-poky \ 825 /home/scottrif/poky/meta-yocto-bsp \ 826 /home/scottrif/poky/meta-mykernel \ 827 " 828 829 This example enables four layers, one of which is a custom, 830 user-defined layer named ``meta-mykernel``. 831 832 :term:`BBLAYERS_FETCH_DIR` 833 See :term:`bitbake:BBLAYERS_FETCH_DIR` in the BitBake manual. 834 835 :term:`BBMASK` 836 Prevents BitBake from processing recipes and recipe append files. 837 838 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and 839 ``.bbappend`` files. BitBake ignores any recipe or recipe append 840 files that match any of the expressions. It is as if BitBake does not 841 see them at all. Consequently, matching files are not parsed or 842 otherwise used by BitBake. 843 844 The values you provide are passed to Python's regular expression 845 compiler. Consequently, the syntax follows Python's Regular 846 Expression (re) syntax. The expressions are compared against the full 847 paths to the files. For complete syntax information, see Python's 848 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax. 849 850 The following example uses a complete regular expression to tell 851 BitBake to ignore all recipe and recipe append files in the 852 ``meta-ti/recipes-misc/`` directory:: 853 854 BBMASK = "meta-ti/recipes-misc/" 855 856 If you want to mask out multiple directories or recipes, you can 857 specify multiple regular expression fragments. This next example 858 masks out multiple directories and individual recipes:: 859 860 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" 861 BBMASK += "/meta-oe/recipes-support/" 862 BBMASK += "/meta-foo/.*/openldap" 863 BBMASK += "opencv.*\.bbappend" 864 BBMASK += "lzma" 865 866 .. note:: 867 868 When specifying a directory name, use the trailing slash character 869 to ensure you match just that directory name. 870 871 :term:`BBMULTICONFIG` 872 Specifies each additional separate configuration when you are 873 building targets with multiple configurations. Use this variable in 874 your ``conf/local.conf`` configuration file. Specify a 875 multiconfigname for each configuration file you are using. For 876 example, the following line specifies three configuration files:: 877 878 BBMULTICONFIG = "configA configB configC" 879 880 Each configuration file you use must reside in a ``multiconfig`` 881 subdirectory of a configuration directory within a layer, or 882 within the :term:`Build Directory` (e.g. 883 ``build_directory/conf/multiconfig/configA.conf`` or 884 ``mylayer/conf/multiconfig/configB.conf``). 885 886 For information on how to use :term:`BBMULTICONFIG` in an environment 887 that supports building targets with multiple configurations, see the 888 ":ref:`dev-manual/building:building images for multiple targets using multiple configurations`" 889 section in the Yocto Project Development Tasks Manual. 890 891 :term:`BBPATH` 892 See :term:`bitbake:BBPATH` in the BitBake manual. 893 894 :term:`BBSERVER` 895 If defined in the BitBake environment, :term:`BBSERVER` points to the 896 BitBake remote server. 897 898 Use the following format to export the variable to the BitBake 899 environment:: 900 901 export BBSERVER=localhost:$port 902 903 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`. 904 Consequently, :term:`BBSERVER` is excluded from checksum and dependency 905 data. 906 907 :term:`BBTARGETS` 908 See :term:`bitbake:BBTARGETS` in the BitBake manual. 909 910 :term:`BINCONFIG` 911 When inheriting the :ref:`ref-classes-binconfig-disabled` class, this 912 variable specifies binary configuration scripts to disable in favor of 913 using ``pkg-config`` to query the information. The 914 :ref:`ref-classes-binconfig-disabled` class will modify the specified 915 scripts to return an error so that calls to them can be easily found 916 and replaced. 917 918 To add multiple scripts, separate them by spaces. Here is an example 919 from the ``libpng`` recipe:: 920 921 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" 922 923 :term:`BINCONFIG_GLOB` 924 When inheriting the :ref:`ref-classes-binconfig` class, 925 this variable specifies a wildcard for configuration scripts that 926 need editing. The scripts are edited to correct any paths that have 927 been set up during compilation so that they are correct for use when 928 installed into the sysroot and called by the build processes of other 929 recipes. 930 931 .. note:: 932 933 The :term:`BINCONFIG_GLOB` variable uses 934 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__, 935 which is recognition and expansion of wildcards during pattern 936 matching. Shell globbing is very similar to 937 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__ 938 and `glob <https://docs.python.org/3/library/glob.html>`__. 939 940 For more information on how this variable works, see 941 ``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`. 942 You can also find general 943 information on the class in the 944 ":ref:`ref-classes-binconfig`" section. 945 946 :term:`BITBAKE_UI` 947 See :term:`bitbake:BITBAKE_UI` in the BitBake manual. 948 949 :term:`BP` 950 The base recipe name and version but without any special recipe name 951 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is 952 comprised of the following:: 953 954 ${BPN}-${PV} 955 956 :term:`BPN` 957 This variable is a version of the :term:`PN` variable with 958 common prefixes and suffixes removed, such as ``nativesdk-``, 959 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``. 960 The exact lists of prefixes and suffixes removed are specified by the 961 :term:`MLPREFIX` and 962 :term:`SPECIAL_PKGSUFFIX` variables, 963 respectively. 964 965 :term:`BUGTRACKER` 966 Specifies a URL for an upstream bug tracking website for a recipe. 967 The OpenEmbedded build system does not use this variable. Rather, the 968 variable is a useful pointer in case a bug in the software being 969 built needs to be manually reported. 970 971 :term:`BUILD_ARCH` 972 Specifies the architecture of the build host (e.g. ``i686``). The 973 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the 974 machine name reported by the ``uname`` command. 975 976 :term:`BUILD_AS_ARCH` 977 Specifies the architecture-specific assembler flags for the build 978 host. By default, the value of :term:`BUILD_AS_ARCH` is empty. 979 980 :term:`BUILD_CC_ARCH` 981 Specifies the architecture-specific C compiler flags for the build 982 host. By default, the value of :term:`BUILD_CC_ARCH` is empty. 983 984 :term:`BUILD_CCLD` 985 Specifies the linker command to be used for the build host when the C 986 compiler is being used as the linker. By default, :term:`BUILD_CCLD` 987 points to GCC and passes as arguments the value of 988 :term:`BUILD_CC_ARCH`, assuming 989 :term:`BUILD_CC_ARCH` is set. 990 991 :term:`BUILD_CFLAGS` 992 Specifies the flags to pass to the C compiler when building for the 993 build host. When building in the ``-native`` context, 994 :term:`CFLAGS` is set to the value of this variable by 995 default. 996 997 :term:`BUILD_CPPFLAGS` 998 Specifies the flags to pass to the C preprocessor (i.e. to both the C 999 and the C++ compilers) when building for the build host. When 1000 building in the ``-native`` context, :term:`CPPFLAGS` 1001 is set to the value of this variable by default. 1002 1003 :term:`BUILD_CXXFLAGS` 1004 Specifies the flags to pass to the C++ compiler when building for the 1005 build host. When building in the ``-native`` context, 1006 :term:`CXXFLAGS` is set to the value of this variable 1007 by default. 1008 1009 :term:`BUILD_FC` 1010 Specifies the Fortran compiler command for the build host. By 1011 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the 1012 value of :term:`BUILD_CC_ARCH`, assuming 1013 :term:`BUILD_CC_ARCH` is set. 1014 1015 :term:`BUILD_LD` 1016 Specifies the linker command for the build host. By default, 1017 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments 1018 the value of :term:`BUILD_LD_ARCH`, assuming 1019 :term:`BUILD_LD_ARCH` is set. 1020 1021 :term:`BUILD_LD_ARCH` 1022 Specifies architecture-specific linker flags for the build host. By 1023 default, the value of :term:`BUILD_LD_ARCH` is empty. 1024 1025 :term:`BUILD_LDFLAGS` 1026 Specifies the flags to pass to the linker when building for the build 1027 host. When building in the ``-native`` context, 1028 :term:`LDFLAGS` is set to the value of this variable 1029 by default. 1030 1031 :term:`BUILD_OPTIMIZATION` 1032 Specifies the optimization flags passed to the C compiler when 1033 building for the build host or the SDK. The flags are passed through 1034 the :term:`BUILD_CFLAGS` and 1035 :term:`BUILDSDK_CFLAGS` default values. 1036 1037 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2 1038 -pipe". 1039 1040 :term:`BUILD_OS` 1041 Specifies the operating system in use on the build host (e.g. 1042 "linux"). The OpenEmbedded build system sets the value of 1043 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the 1044 first word, converted to lower-case characters. 1045 1046 :term:`BUILD_PREFIX` 1047 The toolchain binary prefix used for native recipes. The OpenEmbedded 1048 build system uses the :term:`BUILD_PREFIX` value to set the 1049 :term:`TARGET_PREFIX` when building for :ref:`ref-classes-native` recipes. 1050 1051 :term:`BUILD_STRIP` 1052 Specifies the command to be used to strip debugging symbols from 1053 binaries produced for the build host. By default, :term:`BUILD_STRIP` 1054 points to 1055 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``. 1056 1057 :term:`BUILD_SYS` 1058 Specifies the system, including the architecture and the operating 1059 system, to use when building for the build host (i.e. when building 1060 :ref:`ref-classes-native` recipes). 1061 1062 The OpenEmbedded build system automatically sets this variable based 1063 on :term:`BUILD_ARCH`, 1064 :term:`BUILD_VENDOR`, and 1065 :term:`BUILD_OS`. You do not need to set the 1066 :term:`BUILD_SYS` variable yourself. 1067 1068 :term:`BUILD_VENDOR` 1069 Specifies the vendor name to use when building for the build host. 1070 The default value is an empty string (""). 1071 1072 :term:`BUILDDIR` 1073 Points to the location of the :term:`Build Directory`. You can define 1074 this directory indirectly through the :ref:`structure-core-script` script 1075 by passing in a :term:`Build Directory` path when you run the script. If 1076 you run the script and do not provide a :term:`Build Directory` path, the 1077 :term:`BUILDDIR` defaults to ``build`` in the current directory. 1078 1079 :term:`BUILDHISTORY_COMMIT` 1080 When inheriting the :ref:`ref-classes-buildhistory` class, this variable 1081 specifies whether or not to commit the build history output in a local 1082 Git repository. If set to "1", this local repository will be maintained 1083 automatically by the :ref:`ref-classes-buildhistory` class and a commit 1084 will be created on every build for changes to each top-level subdirectory 1085 of the build history output (images, packages, and sdk). If you want to 1086 track changes to build history over time, you should set this value to 1087 "1". 1088 1089 By default, the :ref:`ref-classes-buildhistory` class 1090 enables committing the buildhistory output in a local Git repository:: 1091 1092 BUILDHISTORY_COMMIT ?= "1" 1093 1094 :term:`BUILDHISTORY_COMMIT_AUTHOR` 1095 When inheriting the :ref:`ref-classes-buildhistory` 1096 class, this variable specifies the author to use for each Git commit. 1097 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the 1098 :term:`BUILDHISTORY_COMMIT` variable must 1099 be set to "1". 1100 1101 Git requires that the value you provide for the 1102 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name 1103 email@host". Providing an email address or host that is not valid 1104 does not produce an error. 1105 1106 By default, the :ref:`ref-classes-buildhistory` class sets the variable 1107 as follows:: 1108 1109 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" 1110 1111 :term:`BUILDHISTORY_DIR` 1112 When inheriting the :ref:`ref-classes-buildhistory` 1113 class, this variable specifies the directory in which build history 1114 information is kept. For more information on how the variable works, 1115 see the :ref:`ref-classes-buildhistory` class. 1116 1117 By default, the :ref:`ref-classes-buildhistory` class sets the directory 1118 as follows:: 1119 1120 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" 1121 1122 :term:`BUILDHISTORY_FEATURES` 1123 When inheriting the :ref:`ref-classes-buildhistory` 1124 class, this variable specifies the build history features to be 1125 enabled. For more information on how build history works, see the 1126 ":ref:`dev-manual/build-quality:maintaining build output quality`" 1127 section in the Yocto Project Development Tasks Manual. 1128 1129 You can specify these features in the form of a space-separated list: 1130 1131 - *image:* Analysis of the contents of images, which includes the 1132 list of installed packages among other things. 1133 1134 - *package:* Analysis of the contents of individual packages. 1135 1136 - *sdk:* Analysis of the contents of the software development kit 1137 (SDK). 1138 1139 - *task:* Save output file signatures for 1140 :ref:`shared state <overview-manual/concepts:shared state cache>` 1141 (sstate) tasks. 1142 This saves one file per task and lists the SHA-256 checksums for 1143 each file staged (i.e. the output of the task). 1144 1145 By default, the :ref:`ref-classes-buildhistory` class enables the 1146 following features:: 1147 1148 BUILDHISTORY_FEATURES ?= "image package sdk" 1149 1150 :term:`BUILDHISTORY_IMAGE_FILES` 1151 When inheriting the :ref:`ref-classes-buildhistory` 1152 class, this variable specifies a list of paths to files copied from 1153 the image contents into the build history directory under an 1154 "image-files" directory in the directory for the image, so that you 1155 can track the contents of each file. The default is to copy 1156 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for 1157 changes in user and group entries. You can modify the list to include 1158 any file. Specifying an invalid path does not produce an error. 1159 Consequently, you can include files that might not always be present. 1160 1161 By default, the :ref:`ref-classes-buildhistory` class provides paths to 1162 the following files:: 1163 1164 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" 1165 1166 :term:`BUILDHISTORY_PATH_PREFIX_STRIP` 1167 When inheriting the :ref:`ref-classes-buildhistory` 1168 class, this variable specifies a common path prefix that should be 1169 stripped off the beginning of paths in the task signature list when the 1170 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be 1171 useful when build history is populated from multiple sources that may not 1172 all use the same top level directory. 1173 1174 By default, the :ref:`ref-classes-buildhistory` class sets the variable 1175 as follows:: 1176 1177 BUILDHISTORY_PATH_PREFIX_STRIP ?= "" 1178 1179 In this case, no prefixes will be stripped. 1180 1181 :term:`BUILDHISTORY_PUSH_REPO` 1182 When inheriting the :ref:`ref-classes-buildhistory` class, this variable 1183 optionally specifies a remote repository to which build history pushes 1184 Git changes. In order for :term:`BUILDHISTORY_PUSH_REPO` to work, 1185 :term:`BUILDHISTORY_COMMIT` must be set to "1". 1186 1187 The repository should correspond to a remote address that specifies a 1188 repository as understood by Git, or alternatively to a remote name 1189 that you have set up manually using ``git remote`` within the local 1190 repository. 1191 1192 By default, the :ref:`ref-classes-buildhistory` class sets the variable 1193 as follows:: 1194 1195 BUILDHISTORY_PUSH_REPO ?= "" 1196 1197 :term:`BUILDNAME` 1198 See :term:`bitbake:BUILDNAME` in the BitBake manual. 1199 1200 :term:`BUILDSDK_CFLAGS` 1201 Specifies the flags to pass to the C compiler when building for the 1202 SDK. When building in the ``nativesdk-`` context, 1203 :term:`CFLAGS` is set to the value of this variable by 1204 default. 1205 1206 :term:`BUILDSDK_CPPFLAGS` 1207 Specifies the flags to pass to the C pre-processor (i.e. to both the 1208 C and the C++ compilers) when building for the SDK. When building in 1209 the ``nativesdk-`` context, :term:`CPPFLAGS` is set 1210 to the value of this variable by default. 1211 1212 :term:`BUILDSDK_CXXFLAGS` 1213 Specifies the flags to pass to the C++ compiler when building for the 1214 SDK. When building in the ``nativesdk-`` context, 1215 :term:`CXXFLAGS` is set to the value of this variable 1216 by default. 1217 1218 :term:`BUILDSDK_LDFLAGS` 1219 Specifies the flags to pass to the linker when building for the SDK. 1220 When building in the ``nativesdk-`` context, 1221 :term:`LDFLAGS` is set to the value of this variable 1222 by default. 1223 1224 :term:`BUILDSTATS_BASE` 1225 Points to the location of the directory that holds build statistics 1226 when you use and enable the :ref:`ref-classes-buildstats` class. The 1227 :term:`BUILDSTATS_BASE` directory defaults to 1228 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``. 1229 1230 :term:`BUSYBOX_SPLIT_SUID` 1231 For the BusyBox recipe, specifies whether to split the output 1232 executable file into two parts: one for features that require 1233 ``setuid root``, and one for the remaining features (i.e. those that 1234 do not require ``setuid root``). 1235 1236 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in 1237 splitting the output executable file. Set the variable to "0" to get 1238 a single output executable file. 1239 1240 :term:`BZRDIR` 1241 See :term:`bitbake:BZRDIR` in the BitBake manual. 1242 1243 :term:`CACHE` 1244 Specifies the directory BitBake uses to store a cache of the 1245 :term:`Metadata` so it does not need to be parsed every time 1246 BitBake is started. 1247 1248 :term:`CC` 1249 The minimal command and arguments used to run the C compiler. 1250 1251 :term:`CFLAGS` 1252 Specifies the flags to pass to the C compiler. This variable is 1253 exported to an environment variable and thus made visible to the 1254 software being built during the compilation step. 1255 1256 Default initialization for :term:`CFLAGS` varies depending on what is 1257 being built: 1258 1259 - :term:`TARGET_CFLAGS` when building for the 1260 target 1261 1262 - :term:`BUILD_CFLAGS` when building for the 1263 build host (i.e. ``-native``) 1264 1265 - :term:`BUILDSDK_CFLAGS` when building for 1266 an SDK (i.e. ``nativesdk-``) 1267 1268 :term:`CLASSOVERRIDE` 1269 An internal variable specifying the special class override that 1270 should currently apply (e.g. "class-target", "class-native", and so 1271 forth). The classes that use this variable (e.g. 1272 :ref:`ref-classes-native`, :ref:`ref-classes-nativesdk`, and so forth) 1273 set the variable to appropriate values. 1274 1275 .. note:: 1276 1277 :term:`CLASSOVERRIDE` gets its default "class-target" value from the 1278 ``bitbake.conf`` file. 1279 1280 As an example, the following override allows you to install extra 1281 files, but only when building for the target:: 1282 1283 do_install:append:class-target() { 1284 install my-extra-file ${D}${sysconfdir} 1285 } 1286 1287 Here is an example where ``FOO`` is set to 1288 "native" when building for the build host, and to "other" when not 1289 building for the build host:: 1290 1291 FOO:class-native = "native" 1292 FOO = "other" 1293 1294 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply 1295 that it is included in the default value of 1296 :term:`OVERRIDES`. 1297 1298 :term:`CLEANBROKEN` 1299 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the 1300 ``make clean`` command does not work for the software being built. 1301 Consequently, the OpenEmbedded build system will not try to run 1302 ``make clean`` during the :ref:`ref-tasks-configure` 1303 task, which is the default behavior. 1304 1305 :term:`COMBINED_FEATURES` 1306 Provides a list of hardware features that are enabled in both 1307 :term:`MACHINE_FEATURES` and 1308 :term:`DISTRO_FEATURES`. This select list of 1309 features contains features that make sense to be controlled both at 1310 the machine and distribution configuration level. For example, the 1311 "bluetooth" feature requires hardware support but should also be 1312 optional at the distribution level, in case the hardware supports 1313 Bluetooth but you do not ever intend to use it. 1314 1315 :term:`COMMERCIAL_AUDIO_PLUGINS` 1316 This variable is specific to the :yocto_git:`GStreamer recipes 1317 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. 1318 It allows to build the GStreamer `"ugly" 1319 <https://github.com/GStreamer/gst-plugins-ugly>`__ and 1320 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ audio plugins. 1321 1322 See the :ref:`dev-manual/licenses:other variables related to commercial licenses` 1323 section for usage details. 1324 1325 :term:`COMMERCIAL_VIDEO_PLUGINS` 1326 This variable is specific to the :yocto_git:`GStreamer recipes 1327 </poky/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb>`. 1328 It allows to build the GStreamer `"ugly" 1329 <https://github.com/GStreamer/gst-plugins-ugly>`__ and 1330 `"bad" <https://github.com/GStreamer/gst-plugins-bad>`__ video plugins. 1331 1332 See the :ref:`dev-manual/licenses:other variables related to commercial licenses` 1333 section for usage details. 1334 1335 :term:`COMMON_LICENSE_DIR` 1336 Points to ``meta/files/common-licenses`` in the 1337 :term:`Source Directory`, which is where generic license 1338 files reside. 1339 1340 :term:`COMPATIBLE_HOST` 1341 A regular expression that resolves to one or more hosts (when the 1342 recipe is native) or one or more targets (when the recipe is 1343 non-native) with which a recipe is compatible. The regular expression 1344 is matched against :term:`HOST_SYS`. You can use the 1345 variable to stop recipes from being built for classes of systems with 1346 which the recipes are not compatible. Stopping these builds is 1347 particularly useful with kernels. The variable also helps to increase 1348 parsing speed since the build system skips parsing recipes not 1349 compatible with the current system. 1350 1351 :term:`COMPATIBLE_MACHINE` 1352 A regular expression that resolves to one or more target machines 1353 with which a recipe is compatible. The regular expression is matched 1354 against :term:`MACHINEOVERRIDES`. You can use 1355 the variable to stop recipes from being built for machines with which 1356 the recipes are not compatible. Stopping these builds is particularly 1357 useful with kernels. The variable also helps to increase parsing 1358 speed since the build system skips parsing recipes not compatible 1359 with the current machine. 1360 1361 If one wants to have a recipe only available for some architectures 1362 (here ``aarch64`` and ``mips64``), the following can be used:: 1363 1364 COMPATIBLE_MACHINE = "^$" 1365 COMPATIBLE_MACHINE:arch64 = "^(aarch64)$" 1366 COMPATIBLE_MACHINE:mips64 = "^(mips64)$" 1367 1368 The first line means "match all machines whose :term:`MACHINEOVERRIDES` 1369 contains the empty string", which will always be none. 1370 1371 The second is for matching all machines whose :term:`MACHINEOVERRIDES` 1372 contains one override which is exactly ``aarch64``. 1373 1374 The third is for matching all machines whose :term:`MACHINEOVERRIDES` 1375 contains one override which is exactly ``mips64``. 1376 1377 The same could be achieved with:: 1378 1379 COMPATIBLE_MACHINE = "^(aarch64|mips64)$" 1380 1381 .. note:: 1382 1383 When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from 1384 native, the recipe is always skipped. All native recipes must be 1385 entirely target independent and should not rely on :term:`MACHINE`. 1386 1387 :term:`COMPLEMENTARY_GLOB` 1388 Defines wildcards to match when installing a list of complementary 1389 packages for all the packages explicitly (or implicitly) installed in 1390 an image. 1391 1392 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching 1393 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__), 1394 which is similar to the Unix style pathname pattern expansion 1395 (`glob <https://docs.python.org/3/library/glob.html>`__). 1396 1397 The resulting list of complementary packages is associated with an 1398 item that can be added to 1399 :term:`IMAGE_FEATURES`. An example usage of 1400 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES` 1401 will install -dev packages (containing headers and other development 1402 files) for every package in the image. 1403 1404 To add a new feature item pointing to a wildcard, use a variable flag 1405 to specify the feature item name and use the value to specify the 1406 wildcard. Here is an example:: 1407 1408 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' 1409 1410 .. note:: 1411 1412 When installing complementary packages, recommends relationships 1413 (set via :term:`RRECOMMENDS`) are always ignored. 1414 1415 :term:`COMPONENTS_DIR` 1416 Stores sysroot components for each recipe. The OpenEmbedded build 1417 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific 1418 sysroots for other recipes. 1419 1420 The default is 1421 "``${``\ :term:`STAGING_DIR`\ ``}-components``." 1422 (i.e. 1423 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``"). 1424 1425 :term:`CONF_VERSION` 1426 Tracks the version of the local configuration file (i.e. 1427 ``local.conf``). The value for :term:`CONF_VERSION` increments each time 1428 ``build/conf/`` compatibility changes. 1429 1430 :term:`CONFFILES` 1431 Identifies editable or configurable files that are part of a package. 1432 If the Package Management System (PMS) is being used to update 1433 packages on the target system, it is possible that configuration 1434 files you have changed after the original installation and that you 1435 now want to remain unchanged are overwritten. In other words, 1436 editable files might exist in the package that you do not want reset 1437 as part of the package update process. You can use the :term:`CONFFILES` 1438 variable to list the files in the package that you wish to prevent 1439 the PMS from overwriting during this update process. 1440 1441 To use the :term:`CONFFILES` variable, provide a package name override 1442 that identifies the resulting package. Then, provide a 1443 space-separated list of files. Here is an example:: 1444 1445 CONFFILES:${PN} += "${sysconfdir}/file1 \ 1446 ${sysconfdir}/file2 ${sysconfdir}/file3" 1447 1448 There is a relationship between the :term:`CONFFILES` and :term:`FILES` 1449 variables. The files listed within :term:`CONFFILES` must be a subset of 1450 the files listed within :term:`FILES`. Because the configuration files 1451 you provide with :term:`CONFFILES` are simply being identified so that 1452 the PMS will not overwrite them, it makes sense that the files must 1453 already be included as part of the package through the :term:`FILES` 1454 variable. 1455 1456 .. note:: 1457 1458 When specifying paths as part of the :term:`CONFFILES` variable, it is 1459 good practice to use appropriate path variables. 1460 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}`` 1461 rather than ``/usr/bin``. You can find a list of these variables at 1462 the top of the ``meta/conf/bitbake.conf`` file in the 1463 :term:`Source Directory`. 1464 1465 :term:`CONFIG_INITRAMFS_SOURCE` 1466 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The 1467 OpenEmbedded build system receives and uses this kernel Kconfig 1468 variable as an environment variable. By default, the variable is set 1469 to null (""). 1470 1471 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive 1472 with a ``.cpio`` suffix or a space-separated list of directories and 1473 files for building the :term:`Initramfs` image. A cpio archive should contain 1474 a filesystem archive to be used as an :term:`Initramfs` image. Directories 1475 should contain a filesystem layout to be included in the :term:`Initramfs` 1476 image. Files should contain entries according to the format described 1477 by the ``usr/gen_init_cpio`` program in the kernel tree. 1478 1479 If you specify multiple directories and files, the :term:`Initramfs` image 1480 will be the aggregate of all of them. 1481 1482 For information on creating an :term:`Initramfs`, see the 1483 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section 1484 in the Yocto Project Development Tasks Manual. 1485 1486 :term:`CONFIG_SITE` 1487 A list of files that contains ``autoconf`` test results relevant to 1488 the current build. This variable is used by the Autotools utilities 1489 when running ``configure``. 1490 1491 :term:`CONFIGURE_FLAGS` 1492 The minimal arguments for GNU configure. 1493 1494 :term:`CONFLICT_DISTRO_FEATURES` 1495 When inheriting the :ref:`ref-classes-features_check` 1496 class, this variable identifies distribution features that would be 1497 in conflict should the recipe be built. In other words, if the 1498 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also 1499 appears in :term:`DISTRO_FEATURES` within the current configuration, then 1500 the recipe will be skipped, and if the build system attempts to build 1501 the recipe then an error will be triggered. 1502 1503 :term:`CONVERSION_CMD` 1504 This variable is used for storing image conversion commands. 1505 Image conversion can convert an image into different objects like: 1506 1507 - Compressed version of the image 1508 1509 - Checksums for the image 1510 1511 An example of :term:`CONVERSION_CMD` from :ref:`ref-classes-image_types` 1512 class is:: 1513 1514 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 1515 1516 :term:`COPY_LIC_DIRS` 1517 If set to "1" along with the 1518 :term:`COPY_LIC_MANIFEST` variable, the 1519 OpenEmbedded build system copies into the image the license files, 1520 which are located in ``/usr/share/common-licenses``, for each 1521 package. The license files are placed in directories within the image 1522 itself during build time. 1523 1524 .. note:: 1525 1526 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for 1527 newly installed packages to an image, which might be most suitable for 1528 read-only filesystems that cannot be upgraded. See the 1529 :term:`LICENSE_CREATE_PACKAGE` variable for additional information. 1530 You can also reference the ":ref:`dev-manual/licenses:providing license text`" 1531 section in the Yocto Project Development Tasks Manual for 1532 information on providing license text. 1533 1534 :term:`COPY_LIC_MANIFEST` 1535 If set to "1", the OpenEmbedded build system copies the license 1536 manifest for the image to 1537 ``/usr/share/common-licenses/license.manifest`` within the image 1538 itself during build time. 1539 1540 .. note:: 1541 1542 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for 1543 newly installed packages to an image, which might be most suitable for 1544 read-only filesystems that cannot be upgraded. See the 1545 :term:`LICENSE_CREATE_PACKAGE` variable for additional information. 1546 You can also reference the ":ref:`dev-manual/licenses:providing license text`" 1547 section in the Yocto Project Development Tasks Manual for 1548 information on providing license text. 1549 1550 :term:`COPYLEFT_LICENSE_EXCLUDE` 1551 A space-separated list of licenses to exclude from the source archived by 1552 the :ref:`ref-classes-archiver` class. In other words, if a license in a 1553 recipe's :term:`LICENSE` value is in the value of 1554 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the 1555 class. 1556 1557 .. note:: 1558 1559 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the 1560 :term:`COPYLEFT_LICENSE_INCLUDE` variable. 1561 1562 The default value, which is "CLOSED Proprietary", for 1563 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the 1564 :ref:`ref-classes-copyleft_filter` class, which 1565 is inherited by the :ref:`ref-classes-archiver` class. 1566 1567 :term:`COPYLEFT_LICENSE_INCLUDE` 1568 A space-separated list of licenses to include in the source archived 1569 by the :ref:`ref-classes-archiver` class. In other 1570 words, if a license in a recipe's :term:`LICENSE` 1571 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its 1572 source is archived by the class. 1573 1574 The default value is set by the :ref:`ref-classes-copyleft_filter` class, 1575 which is inherited by the :ref:`ref-classes-archiver` class. The default 1576 value includes "GPL*", "LGPL*", and "AGPL*". 1577 1578 :term:`COPYLEFT_PN_EXCLUDE` 1579 A list of recipes to exclude in the source archived by the 1580 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_EXCLUDE` 1581 variable overrides the license inclusion and exclusion caused through the 1582 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` 1583 variables, respectively. 1584 1585 The default value, which is "" indicating to not explicitly exclude 1586 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the 1587 :ref:`ref-classes-copyleft_filter` class, which is inherited by the 1588 :ref:`ref-classes-archiver` class. 1589 1590 :term:`COPYLEFT_PN_INCLUDE` 1591 A list of recipes to include in the source archived by the 1592 :ref:`ref-classes-archiver` class. The :term:`COPYLEFT_PN_INCLUDE` 1593 variable overrides the license inclusion and exclusion caused through the 1594 :term:`COPYLEFT_LICENSE_INCLUDE` and :term:`COPYLEFT_LICENSE_EXCLUDE` 1595 variables, respectively. 1596 1597 The default value, which is "" indicating to not explicitly include 1598 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the 1599 :ref:`ref-classes-copyleft_filter` class, which is inherited by the 1600 :ref:`ref-classes-archiver` class. 1601 1602 :term:`COPYLEFT_RECIPE_TYPES` 1603 A space-separated list of recipe types to include in the source 1604 archived by the :ref:`archiver <ref-classes-archiver>` class. 1605 Recipe types are ``target``, :ref:`ref-classes-native`, 1606 :ref:`ref-classes-nativesdk`, :ref:`ref-classes-cross`, 1607 :ref:`ref-classes-crosssdk`, and :ref:`ref-classes-cross-canadian`. 1608 1609 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES` 1610 is set by the :ref:`ref-classes-copyleft_filter` class, which is 1611 inherited by the :ref:`ref-classes-archiver` class. 1612 1613 :term:`CORE_IMAGE_EXTRA_INSTALL` 1614 Specifies the list of packages to be added to the image. You should 1615 only set this variable in the ``local.conf`` configuration file found 1616 in the :term:`Build Directory`. 1617 1618 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer 1619 supported. 1620 1621 :term:`COREBASE` 1622 Specifies the parent directory of the OpenEmbedded-Core Metadata 1623 layer (i.e. ``meta``). 1624 1625 It is an important distinction that :term:`COREBASE` points to the parent 1626 of this layer and not the layer itself. Consider an example where you 1627 have cloned the Poky Git repository and retained the ``poky`` name 1628 for your local copy of the repository. In this case, :term:`COREBASE` 1629 points to the ``poky`` folder because it is the parent directory of 1630 the ``poky/meta`` layer. 1631 1632 :term:`COREBASE_FILES` 1633 Lists files from the :term:`COREBASE` directory that 1634 should be copied other than the layers listed in the 1635 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows 1636 to copy metadata from the OpenEmbedded build system 1637 into the extensible SDK. 1638 1639 Explicitly listing files in :term:`COREBASE` is needed because it 1640 typically contains build directories and other files that should not 1641 normally be copied into the extensible SDK. Consequently, the value 1642 of :term:`COREBASE_FILES` is used in order to only copy the files that 1643 are actually needed. 1644 1645 :term:`CPP` 1646 The minimal command and arguments used to run the C preprocessor. 1647 1648 :term:`CPPFLAGS` 1649 Specifies the flags to pass to the C pre-processor (i.e. to both the 1650 C and the C++ compilers). This variable is exported to an environment 1651 variable and thus made visible to the software being built during the 1652 compilation step. 1653 1654 Default initialization for :term:`CPPFLAGS` varies depending on what is 1655 being built: 1656 1657 - :term:`TARGET_CPPFLAGS` when building for 1658 the target 1659 1660 - :term:`BUILD_CPPFLAGS` when building for the 1661 build host (i.e. ``-native``) 1662 1663 - :term:`BUILDSDK_CPPFLAGS` when building 1664 for an SDK (i.e. ``nativesdk-``) 1665 1666 :term:`CROSS_COMPILE` 1667 The toolchain binary prefix for the target tools. The 1668 :term:`CROSS_COMPILE` variable is the same as the 1669 :term:`TARGET_PREFIX` variable. 1670 1671 .. note:: 1672 1673 The OpenEmbedded build system sets the :term:`CROSS_COMPILE` 1674 variable only in certain contexts (e.g. when building for kernel 1675 and kernel module recipes). 1676 1677 :term:`CVE_CHECK_IGNORE` 1678 This variable is deprecated and should be replaced by :term:`CVE_STATUS`. 1679 1680 :term:`CVE_CHECK_SHOW_WARNINGS` 1681 Specifies whether or not the :ref:`ref-classes-cve-check` 1682 class should generate warning messages on the console when unpatched 1683 CVEs are found. The default is "1", but you may wish to set it to "0" if 1684 you are already examining/processing the logs after the build has 1685 completed and thus do not need the warning messages. 1686 1687 :term:`CVE_CHECK_SKIP_RECIPE` 1688 The list of package names (:term:`PN`) for which 1689 CVEs (Common Vulnerabilities and Exposures) are ignored. 1690 1691 :term:`CVE_DB_UPDATE_INTERVAL` 1692 Specifies the CVE database update interval in seconds, as used by 1693 ``cve-update-db-native``. The default value is "86400" i.e. once a day 1694 (24*60*60). If the value is set to "0" then the update will be forced 1695 every time. Alternatively, a negative value e.g. "-1" will disable 1696 updates entirely. 1697 1698 :term:`CVE_PRODUCT` 1699 In a recipe, defines the name used to match the recipe name 1700 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__. 1701 1702 The default is ${:term:`BPN`} (except for recipes that inherit the 1703 :ref:`ref-classes-pypi` class where it is set based upon 1704 :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE 1705 database or matches with multiple entries in the database, the default 1706 value needs to be changed. 1707 1708 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`:: 1709 1710 CVE_PRODUCT = "oracle_berkeley_db berkeley_db" 1711 1712 Sometimes the product name is not specific enough, for example 1713 "tar" has been matching CVEs for the GNU ``tar`` package and also 1714 the ``node-tar`` node.js extension. To avoid this problem, use the 1715 vendor name as a prefix. The syntax for this is:: 1716 1717 CVE_PRODUCT = "vendor:package" 1718 1719 :term:`CVE_STATUS` 1720 The CVE ID which is patched or should be ignored. Here is 1721 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`:: 1722 1723 CVE_STATUS[CVE-2020-15523] = "not-applicable-platform: Issue only applies on Windows" 1724 1725 It has the format "reason: description" and the description is optional. 1726 The Reason is mapped to the final CVE state by mapping via 1727 :term:`CVE_CHECK_STATUSMAP`. See :ref:`dev-manual/vulnerabilities:fixing vulnerabilities in recipes` 1728 for details. 1729 1730 :term:`CVE_STATUS_GROUPS` 1731 If there are many CVEs with the same status and reason, they can by simplified by using this 1732 variable instead of many similar lines with :term:`CVE_STATUS`:: 1733 1734 CVE_STATUS_GROUPS = "CVE_STATUS_WIN CVE_STATUS_PATCHED" 1735 1736 CVE_STATUS_WIN = "CVE-1234-0001 CVE-1234-0002" 1737 CVE_STATUS_WIN[status] = "not-applicable-platform: Issue only applies on Windows" 1738 CVE_STATUS_PATCHED = "CVE-1234-0003 CVE-1234-0004" 1739 CVE_STATUS_PATCHED[status] = "fixed-version: Fixed externally" 1740 1741 :term:`CVE_CHECK_STATUSMAP` 1742 Mapping variable for all possible reasons of :term:`CVE_STATUS`: 1743 ``Patched``, ``Unpatched`` and ``Ignored``. 1744 See :ref:`ref-classes-cve-check` or ``meta/conf/cve-check-map.conf`` for more details:: 1745 1746 CVE_CHECK_STATUSMAP[cpe-incorrect] = "Ignored" 1747 1748 :term:`CVE_VERSION` 1749 In a recipe, defines the version used to match the recipe version 1750 against the version in the `NIST CVE database <https://nvd.nist.gov/>`__ 1751 when usign :ref:`ref-classes-cve-check`. 1752 1753 The default is ${:term:`PV`} but if recipes use custom version numbers 1754 which do not map to upstream software component release versions and the versions 1755 used in the CVE database, then this variable can be used to set the 1756 version number for :ref:`ref-classes-cve-check`. Example:: 1757 1758 CVE_VERSION = "2.39" 1759 1760 :term:`CVSDIR` 1761 The directory in which files checked out under the CVS system are 1762 stored. 1763 1764 :term:`CXX` 1765 The minimal command and arguments used to run the C++ compiler. 1766 1767 :term:`CXXFLAGS` 1768 Specifies the flags to pass to the C++ compiler. This variable is 1769 exported to an environment variable and thus made visible to the 1770 software being built during the compilation step. 1771 1772 Default initialization for :term:`CXXFLAGS` varies depending on what is 1773 being built: 1774 1775 - :term:`TARGET_CXXFLAGS` when building for 1776 the target 1777 1778 - :term:`BUILD_CXXFLAGS` when building for the 1779 build host (i.e. ``-native``) 1780 1781 - :term:`BUILDSDK_CXXFLAGS` when building 1782 for an SDK (i.e. ``nativesdk-``) 1783 1784 :term:`D` 1785 The destination directory. The location in the :term:`Build Directory` 1786 where components are installed by the 1787 :ref:`ref-tasks-install` task. This location defaults 1788 to:: 1789 1790 ${WORKDIR}/image 1791 1792 .. note:: 1793 1794 Tasks that read from or write to this directory should run under 1795 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`. 1796 1797 :term:`DATE` 1798 The date the build was started. Dates appear using the year, month, 1799 and day (YMD) format (e.g. "20150209" for February 9th, 2015). 1800 1801 :term:`DATETIME` 1802 The date and time on which the current build started. The format is 1803 suitable for timestamps. 1804 1805 :term:`DEBIAN_NOAUTONAME` 1806 When the :ref:`ref-classes-debian` class is inherited, 1807 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a 1808 particular package should not be renamed according to Debian library 1809 package naming. You must use the package name as an override when you 1810 set this variable. Here is an example from the ``fontconfig`` recipe:: 1811 1812 DEBIAN_NOAUTONAME:fontconfig-utils = "1" 1813 1814 :term:`DEBIANNAME` 1815 When the :ref:`ref-classes-debian` class is inherited, 1816 which is the default behavior, :term:`DEBIANNAME` allows you to override 1817 the library name for an individual package. Overriding the library 1818 name in these cases is rare. You must use the package name as an 1819 override when you set this variable. Here is an example from the 1820 ``dbus`` recipe:: 1821 1822 DEBIANNAME:${PN} = "dbus-1" 1823 1824 :term:`DEBUG_BUILD` 1825 Specifies to build packages with debugging information. This 1826 influences the value of the :term:`SELECTED_OPTIMIZATION` variable. 1827 1828 :term:`DEBUG_OPTIMIZATION` 1829 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when 1830 compiling a system for debugging. This variable defaults to "-O 1831 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe". 1832 1833 :term:`DEBUG_PREFIX_MAP` 1834 Allows to set C compiler options, such as ``-fdebug-prefix-map``, 1835 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to 1836 replace build-time paths by install-time ones in the debugging sections 1837 of binaries. This makes compiler output files location independent, 1838 at the cost of having to pass an extra command to tell the debugger 1839 where source files are. 1840 1841 This is used by the Yocto Project to guarantee 1842 :doc:`/test-manual/reproducible-builds` even when the source code of 1843 a package uses the ``__FILE__`` or ``assert()`` macros. See the 1844 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__ 1845 website for details. 1846 1847 This variable is set in the ``meta/conf/bitbake.conf`` file. It is 1848 not intended to be user-configurable. 1849 1850 :term:`DEFAULT_PREFERENCE` 1851 Specifies a weak bias for recipe selection priority. 1852 1853 The most common usage of this is variable is to set it to "-1" within 1854 a recipe for a development version of a piece of software. Using the 1855 variable in this way causes the stable version of the recipe to build 1856 by default in the absence of :term:`PREFERRED_VERSION` being used to 1857 build the development version. 1858 1859 .. note:: 1860 1861 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden 1862 by :term:`BBFILE_PRIORITY` if that variable is different between two 1863 layers that contain different versions of the same recipe. 1864 1865 :term:`DEFAULTTUNE` 1866 The default CPU and Application Binary Interface (ABI) tunings (i.e. 1867 the "tune") used by the OpenEmbedded build system. The 1868 :term:`DEFAULTTUNE` helps define 1869 :term:`TUNE_FEATURES`. 1870 1871 The default tune is either implicitly or explicitly set by the 1872 machine (:term:`MACHINE`). However, you can override 1873 the setting using available tunes as defined with 1874 :term:`AVAILTUNES`. 1875 1876 :term:`DEPENDS` 1877 Lists a recipe's build-time dependencies. These are dependencies on 1878 other recipes whose contents (e.g. headers and shared libraries) are 1879 needed by the recipe at build time. 1880 1881 As an example, consider a recipe ``foo`` that contains the following 1882 assignment:: 1883 1884 DEPENDS = "bar" 1885 1886 The practical effect of the previous assignment is that all files 1887 installed by bar will be available in the appropriate staging sysroot, 1888 given by the :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time 1889 the :ref:`ref-tasks-configure` task for ``foo`` runs. This mechanism is 1890 implemented by having :ref:`ref-tasks-configure` depend on the 1891 :ref:`ref-tasks-populate_sysroot` task of each recipe listed in 1892 :term:`DEPENDS`, through a 1893 ``[``\ :ref:`deptask <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` 1894 declaration in the :ref:`ref-classes-base` class. 1895 1896 .. note:: 1897 1898 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST` 1899 explicitly. The standard classes and build-related variables are 1900 configured to automatically use the appropriate staging sysroots. 1901 1902 As another example, :term:`DEPENDS` can also be used to add utilities 1903 that run on the build machine during the build. For example, a recipe 1904 that makes use of a code generator built by the recipe ``codegen`` 1905 might have the following:: 1906 1907 DEPENDS = "codegen-native" 1908 1909 For more 1910 information, see the :ref:`ref-classes-native` class and 1911 the :term:`EXTRANATIVEPATH` variable. 1912 1913 .. note:: 1914 1915 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise, 1916 it is a list of :term:`PROVIDES` names, which 1917 usually match recipe names. Putting a package name such as 1918 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo" 1919 instead, as this will put files from all the packages that make 1920 up ``foo``, which includes those from ``foo-dev``, into the 1921 sysroot. 1922 1923 - One recipe having another recipe in :term:`DEPENDS` does not by 1924 itself add any runtime dependencies between the packages 1925 produced by the two recipes. However, as explained in the 1926 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 1927 section in the Yocto Project Overview and Concepts Manual, 1928 runtime dependencies will often be added automatically, meaning 1929 :term:`DEPENDS` alone is sufficient for most recipes. 1930 1931 - Counterintuitively, :term:`DEPENDS` is often necessary even for 1932 recipes that install precompiled components. For example, if 1933 ``libfoo`` is a precompiled library that links against 1934 ``libbar``, then linking against ``libfoo`` requires both 1935 ``libfoo`` and ``libbar`` to be available in the sysroot. 1936 Without a :term:`DEPENDS` from the recipe that installs ``libfoo`` 1937 to the recipe that installs ``libbar``, other recipes might 1938 fail to link against ``libfoo``. 1939 1940 For information on runtime dependencies, see the :term:`RDEPENDS` 1941 variable. You can also see the 1942 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and 1943 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" 1944 sections in the BitBake User Manual for additional information on tasks 1945 and dependencies. 1946 1947 :term:`DEPLOY_DIR` 1948 Points to the general area that the OpenEmbedded build system uses to 1949 place images, packages, SDKs, and other output files that are ready 1950 to be used outside of the build system. By default, this directory 1951 resides within the :term:`Build Directory` as ``${TMPDIR}/deploy``. 1952 1953 For more information on the structure of the Build Directory, see 1954 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. 1955 For more detail on the contents of the ``deploy`` directory, see the 1956 ":ref:`overview-manual/concepts:images`", 1957 ":ref:`overview-manual/concepts:package feeds`", and 1958 ":ref:`overview-manual/concepts:application development sdk`" sections all in the 1959 Yocto Project Overview and Concepts Manual. 1960 1961 :term:`DEPLOY_DIR_DEB` 1962 Points to the area that the OpenEmbedded build system uses to place 1963 Debian packages that are ready to be used outside of the build 1964 system. This variable applies only when :term:`PACKAGE_CLASSES` contains 1965 ":ref:`ref-classes-package_deb`". 1966 1967 The BitBake configuration file initially defines the 1968 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of 1969 :term:`DEPLOY_DIR`:: 1970 1971 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" 1972 1973 The :ref:`ref-classes-package_deb` class uses the 1974 :term:`DEPLOY_DIR_DEB` variable to make sure the 1975 :ref:`ref-tasks-package_write_deb` task 1976 writes Debian packages into the appropriate folder. For more 1977 information on how packaging works, see the 1978 ":ref:`overview-manual/concepts:package feeds`" section 1979 in the Yocto Project Overview and Concepts Manual. 1980 1981 :term:`DEPLOY_DIR_IMAGE` 1982 Points to the area that the OpenEmbedded build system uses to place 1983 images and other associated output files that are ready to be 1984 deployed onto the target machine. The directory is machine-specific 1985 as it contains the ``${MACHINE}`` name. By default, this directory 1986 resides within the :term:`Build Directory` as 1987 ``${DEPLOY_DIR}/images/${MACHINE}/``. 1988 1989 It must not be used directly in recipes when deploying files. Instead, 1990 it's only useful when a recipe needs to "read" a file already deployed 1991 by a dependency. So, it should be filled with the contents of 1992 :term:`DEPLOYDIR` by the :ref:`ref-classes-deploy` class or with the 1993 contents of :term:`IMGDEPLOYDIR` by the :ref:`ref-classes-image` class. 1994 1995 For more information on the structure of the :term:`Build Directory`, see 1996 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section. 1997 For more detail on the contents of the ``deploy`` directory, see the 1998 ":ref:`overview-manual/concepts:images`" and 1999 ":ref:`overview-manual/concepts:application development sdk`" sections both in 2000 the Yocto Project Overview and Concepts Manual. 2001 2002 :term:`DEPLOY_DIR_IPK` 2003 Points to the area that the OpenEmbedded build system uses to place 2004 IPK packages that are ready to be used outside of the build system. 2005 This variable applies only when :term:`PACKAGE_CLASSES` contains 2006 ":ref:`ref-classes-package_ipk`". 2007 2008 The BitBake configuration file initially defines this variable as a 2009 sub-folder of :term:`DEPLOY_DIR`:: 2010 2011 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" 2012 2013 The :ref:`ref-classes-package_ipk` class uses the :term:`DEPLOY_DIR_IPK` 2014 variable to make sure the :ref:`ref-tasks-package_write_ipk` task 2015 writes IPK packages into the appropriate folder. For more information 2016 on how packaging works, see the 2017 ":ref:`overview-manual/concepts:package feeds`" section 2018 in the Yocto Project Overview and Concepts Manual. 2019 2020 :term:`DEPLOY_DIR_RPM` 2021 Points to the area that the OpenEmbedded build system uses to place 2022 RPM packages that are ready to be used outside of the build system. 2023 This variable applies only when :term:`PACKAGE_CLASSES` contains 2024 ":ref:`ref-classes-package_rpm`". 2025 2026 The BitBake configuration file initially defines this variable as a 2027 sub-folder of :term:`DEPLOY_DIR`:: 2028 2029 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" 2030 2031 The :ref:`ref-classes-package_rpm` class uses the 2032 :term:`DEPLOY_DIR_RPM` variable to make sure the 2033 :ref:`ref-tasks-package_write_rpm` task 2034 writes RPM packages into the appropriate folder. For more information 2035 on how packaging works, see the 2036 ":ref:`overview-manual/concepts:package feeds`" section 2037 in the Yocto Project Overview and Concepts Manual. 2038 2039 :term:`DEPLOYDIR` 2040 When inheriting the :ref:`ref-classes-deploy` class, the 2041 :term:`DEPLOYDIR` points to a temporary work area for deployed files that 2042 is set in the :ref:`ref-classes-deploy` class as follows:: 2043 2044 DEPLOYDIR = "${WORKDIR}/deploy-${PN}" 2045 2046 Recipes inheriting the :ref:`ref-classes-deploy` class should copy files to be 2047 deployed into :term:`DEPLOYDIR`, and the class will take care of copying 2048 them into :term:`DEPLOY_DIR_IMAGE` 2049 afterwards. 2050 2051 :term:`DESCRIPTION` 2052 The package description used by package managers. If not set, 2053 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY` 2054 variable. 2055 2056 :term:`DEV_PKG_DEPENDENCY` 2057 Provides an easy way for recipes to disable or adjust the runtime recommendation 2058 (:term:`RRECOMMENDS`) of the ``${PN}-dev`` package on the main 2059 (``${PN}``) package. 2060 2061 :term:`DISABLE_STATIC` 2062 Used in order to disable static linking by default (in order to save 2063 space, since static libraries are often unused in embedded systems.) 2064 The default value is " --disable-static", however it can be set to "" 2065 in order to enable static linking if desired. Certain recipes do this 2066 individually, and also there is a 2067 ``meta/conf/distro/include/no-static-libs.inc`` include file that 2068 disables static linking for a number of recipes. Some software 2069 packages or build tools (such as CMake) have explicit support for 2070 enabling / disabling static linking, and in those cases 2071 :term:`DISABLE_STATIC` is not used. 2072 2073 :term:`DISTRO` 2074 The short name of the distribution. For information on the long name 2075 of the distribution, see the :term:`DISTRO_NAME` 2076 variable. 2077 2078 The :term:`DISTRO` variable corresponds to a distribution configuration 2079 file whose root name is the same as the variable's argument and whose 2080 filename extension is ``.conf``. For example, the distribution 2081 configuration file for the Poky distribution is named ``poky.conf`` 2082 and resides in the ``meta-poky/conf/distro`` directory of the 2083 :term:`Source Directory`. 2084 2085 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as 2086 follows:: 2087 2088 DISTRO = "poky" 2089 2090 Distribution configuration files are located in a ``conf/distro`` 2091 directory within the :term:`Metadata` that contains the 2092 distribution configuration. The value for :term:`DISTRO` must not contain 2093 spaces, and is typically all lower-case. 2094 2095 .. note:: 2096 2097 If the :term:`DISTRO` variable is blank, a set of default configurations 2098 are used, which are specified within 2099 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. 2100 2101 :term:`DISTRO_CODENAME` 2102 Specifies a codename for the distribution being built. 2103 2104 :term:`DISTRO_EXTRA_RDEPENDS` 2105 Specifies a list of distro-specific packages to add to all images. 2106 This variable takes effect through ``packagegroup-base`` so the 2107 variable only really applies to the more full-featured images that 2108 include ``packagegroup-base``. You can use this variable to keep 2109 distro policy out of generic images. As with all other distro 2110 variables, you set this variable in the distro ``.conf`` file. 2111 2112 :term:`DISTRO_EXTRA_RRECOMMENDS` 2113 Specifies a list of distro-specific packages to add to all images if 2114 the packages exist. The packages might not exist or be empty (e.g. 2115 kernel modules). The list of packages are automatically installed but 2116 you can remove them. 2117 2118 :term:`DISTRO_FEATURES` 2119 The software support you want in your distribution for various 2120 features. You define your distribution features in the distribution 2121 configuration file. 2122 2123 In most cases, the presence or absence of a feature in 2124 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied 2125 to the configure script during the 2126 :ref:`ref-tasks-configure` task for recipes that 2127 optionally support the feature. For example, specifying "x11" in 2128 :term:`DISTRO_FEATURES`, causes every piece of software built for the 2129 target that can optionally support X11 to have its X11 support 2130 enabled. 2131 2132 .. note:: 2133 2134 Just enabling :term:`DISTRO_FEATURES` alone doesn't 2135 enable feature support for packages. Mechanisms such as making 2136 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used 2137 to enable/disable package features. 2138 2139 Two more examples are Bluetooth and NFS support. For a more complete 2140 list of features that ships with the Yocto Project and that you can 2141 provide with this variable, see the ":ref:`ref-features-distro`" section. 2142 2143 :term:`DISTRO_FEATURES_BACKFILL` 2144 A space-separated list of features to be added to :term:`DISTRO_FEATURES` 2145 if not also present in :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`. 2146 2147 This variable is set in the ``meta/conf/bitbake.conf`` file. It is 2148 not intended to be user-configurable. It is best to just reference 2149 the variable to see which distro features are being 2150 :ref:`backfilled <ref-features-backfill>` for all distro configurations. 2151 2152 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` 2153 A space-separated list of features from :term:`DISTRO_FEATURES_BACKFILL` 2154 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added 2155 to :term:`DISTRO_FEATURES`) during the build. 2156 2157 This corresponds to an opt-out mechanism. When new default distro 2158 features are introduced, distribution maintainers can review (`consider`) 2159 them and decide to exclude them from the 2160 :ref:`backfilled <ref-features-backfill>` features. Therefore, the 2161 combination of :term:`DISTRO_FEATURES_BACKFILL` and 2162 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` makes it possible to 2163 add new default features without breaking existing distributions. 2164 2165 2166 :term:`DISTRO_FEATURES_DEFAULT` 2167 A convenience variable that gives you the default list of distro 2168 features with the exception of any features specific to the C library 2169 (``libc``). 2170 2171 When creating a custom distribution, you might find it useful to be 2172 able to reuse the default 2173 :term:`DISTRO_FEATURES` options without the 2174 need to write out the full set. Here is an example that uses 2175 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file:: 2176 2177 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" 2178 2179 :term:`DISTRO_FEATURES_FILTER_NATIVE` 2180 Specifies a list of features that if present in the target 2181 :term:`DISTRO_FEATURES` value should be 2182 included in :term:`DISTRO_FEATURES` when building native recipes. This 2183 variable is used in addition to the features filtered using the 2184 :term:`DISTRO_FEATURES_NATIVE` 2185 variable. 2186 2187 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` 2188 Specifies a list of features that if present in the target 2189 :term:`DISTRO_FEATURES` value should be included in 2190 :term:`DISTRO_FEATURES` when building :ref:`ref-classes-nativesdk` 2191 recipes. This variable is used in addition to the features filtered using 2192 the :term:`DISTRO_FEATURES_NATIVESDK` variable. 2193 2194 :term:`DISTRO_FEATURES_NATIVE` 2195 Specifies a list of features that should be included in 2196 :term:`DISTRO_FEATURES` when building native 2197 recipes. This variable is used in addition to the features filtered 2198 using the 2199 :term:`DISTRO_FEATURES_FILTER_NATIVE` 2200 variable. 2201 2202 :term:`DISTRO_FEATURES_NATIVESDK` 2203 Specifies a list of features that should be included in 2204 :term:`DISTRO_FEATURES` when building 2205 :ref:`ref-classes-nativesdk` recipes. This variable is used 2206 in addition to the features filtered using the 2207 :term:`DISTRO_FEATURES_FILTER_NATIVESDK` variable. 2208 2209 :term:`DISTRO_NAME` 2210 The long name of the distribution. For information on the short name 2211 of the distribution, see the :term:`DISTRO` variable. 2212 2213 The :term:`DISTRO_NAME` variable corresponds to a distribution 2214 configuration file whose root name is the same as the variable's 2215 argument and whose filename extension is ``.conf``. For example, the 2216 distribution configuration file for the Poky distribution is named 2217 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory 2218 of the :term:`Source Directory`. 2219 2220 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set 2221 as follows:: 2222 2223 DISTRO_NAME = "Poky (Yocto Project Reference Distro)" 2224 2225 Distribution configuration files are located in a ``conf/distro`` 2226 directory within the :term:`Metadata` that contains the 2227 distribution configuration. 2228 2229 .. note:: 2230 2231 If the :term:`DISTRO_NAME` variable is blank, a set of default 2232 configurations are used, which are specified within 2233 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory. 2234 2235 :term:`DISTRO_VERSION` 2236 The version of the distribution. 2237 2238 :term:`DISTROOVERRIDES` 2239 A colon-separated list of overrides specific to the current 2240 distribution. By default, this list includes the value of 2241 :term:`DISTRO`. 2242 2243 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should 2244 apply to the distribution. 2245 2246 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it 2247 is included in the default value of 2248 :term:`OVERRIDES`. 2249 2250 Here is an example from :yocto_git:`meta-poky/conf/distro/poky-tiny.conf 2251 </poky/tree/meta-poky/conf/distro/poky-tiny.conf>`:: 2252 2253 DISTROOVERRIDES = "poky:poky-tiny" 2254 2255 :term:`DL_DIR` 2256 The central download directory used by the build process to store 2257 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring 2258 for everything except Git repositories. If you want tarballs of Git 2259 repositories, use the 2260 :term:`BB_GENERATE_MIRROR_TARBALLS` 2261 variable. 2262 2263 You can set this directory by defining the :term:`DL_DIR` variable in the 2264 ``conf/local.conf`` file. This directory is self-maintaining and you 2265 should not have to touch it. By default, the directory is 2266 ``downloads`` in the :term:`Build Directory`:: 2267 2268 #DL_DIR ?= "${TOPDIR}/downloads" 2269 2270 To specify a different download directory, 2271 simply remove the comment from the line and provide your directory. 2272 2273 During a first build, the system downloads many different source code 2274 tarballs from various upstream projects. Downloading can take a 2275 while, particularly if your network connection is slow. Tarballs are 2276 all stored in the directory defined by :term:`DL_DIR` and the build 2277 system looks there first to find source tarballs. 2278 2279 .. note:: 2280 2281 When wiping and rebuilding, you can preserve this directory to 2282 speed up this part of subsequent builds. 2283 2284 You can safely share this directory between multiple builds on the 2285 same development machine. For additional information on how the build 2286 process gets source files when working behind a firewall or proxy 2287 server, see this specific question in the ":doc:`faq`" 2288 chapter. You can also refer to the 2289 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" 2290 Wiki page. 2291 2292 :term:`DOC_COMPRESS` 2293 When inheriting the :ref:`ref-classes-compress_doc` 2294 class, this variable sets the compression policy used when the 2295 OpenEmbedded build system compresses man pages and info pages. By 2296 default, the compression method used is gz (gzip). Other policies 2297 available are xz and bz2. 2298 2299 For information on policies and on how to use this variable, see the 2300 comments in the ``meta/classes-recipe/compress_doc.bbclass`` file. 2301 2302 :term:`DT_FILES` 2303 Space-separated list of device tree source files to compile using 2304 a recipe that inherits the :ref:`ref-classes-devicetree` class. These 2305 are relative to the :term:`DT_FILES_PATH`. 2306 2307 For convenience, both ``.dts`` and ``.dtb`` extensions can be used. 2308 2309 Use an empty string (default) to build all device tree sources within 2310 the :term:`DT_FILES_PATH` directory. 2311 2312 :term:`DT_FILES_PATH` 2313 When compiling out-of-tree device tree sources using a recipe that 2314 inherits the :ref:`ref-classes-devicetree` class, this variable specifies 2315 the path to the directory containing dts files to build. 2316 2317 Defaults to the :term:`S` directory. 2318 2319 :term:`DT_PADDING_SIZE` 2320 When inheriting the :ref:`ref-classes-devicetree` class, this variable 2321 specifies the size of padding appended to the device tree blob, used as 2322 extra space typically for additional properties during boot. 2323 2324 :term:`EFI_PROVIDER` 2325 When building bootable images (i.e. where ``hddimg``, ``iso``, or 2326 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the 2327 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The 2328 default is "grub-efi", but "systemd-boot" can be used instead. 2329 2330 See the :ref:`ref-classes-systemd-boot` and :ref:`ref-classes-image-live` 2331 classes for more information. 2332 2333 :term:`ENABLE_BINARY_LOCALE_GENERATION` 2334 Variable that controls which locales for ``glibc`` are generated 2335 during the build (useful if the target device has 64Mbytes of RAM or 2336 less). 2337 2338 :term:`ERR_REPORT_DIR` 2339 When used with the :ref:`ref-classes-report-error` class, specifies the 2340 path used for storing the debug files created by the :ref:`error reporting 2341 tool <dev-manual/error-reporting-tool:using the error reporting tool>`, 2342 which allows you to submit build errors you encounter to a central 2343 database. By default, the value of this variable is 2344 ``${``\ :term:`LOG_DIR`\ ``}/error-report``. 2345 2346 You can set :term:`ERR_REPORT_DIR` to the path you want the error 2347 reporting tool to store the debug files as follows in your 2348 ``local.conf`` file:: 2349 2350 ERR_REPORT_DIR = "path" 2351 2352 :term:`ERROR_QA` 2353 Specifies the quality assurance checks whose failures are reported as 2354 errors by the OpenEmbedded build system. You set this variable in 2355 your distribution configuration file. For a list of the checks you 2356 can control with this variable, see the 2357 ":ref:`ref-classes-insane`" section. 2358 2359 :term:`ESDK_CLASS_INHERIT_DISABLE` 2360 A list of classes to remove from the :term:`INHERIT` 2361 value globally within the extensible SDK configuration. The 2362 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the 2363 default value:: 2364 2365 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc" 2366 2367 Some classes are not generally applicable within the extensible SDK 2368 context. You can use this variable to disable those classes. 2369 2370 For additional information on how to customize the extensible SDK's 2371 configuration, see the 2372 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 2373 section in the Yocto Project Application Development and the 2374 Extensible Software Development Kit (eSDK) manual. 2375 2376 :term:`ESDK_LOCALCONF_ALLOW` 2377 A list of variables allowed through from the OpenEmbedded build 2378 system configuration into the extensible SDK configuration. By 2379 default, the list of variables is empty and is set in the 2380 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class. 2381 2382 This list overrides the variables specified using the 2383 :term:`ESDK_LOCALCONF_REMOVE` variable as well as 2384 other variables automatically added due to the "/" character 2385 being found at the start of the 2386 value, which is usually indicative of being a path and thus might not 2387 be valid on the system where the SDK is installed. 2388 2389 For additional information on how to customize the extensible SDK's 2390 configuration, see the 2391 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 2392 section in the Yocto Project Application Development and the 2393 Extensible Software Development Kit (eSDK) manual. 2394 2395 :term:`ESDK_LOCALCONF_REMOVE` 2396 A list of variables not allowed through from the OpenEmbedded build 2397 system configuration into the extensible SDK configuration. Usually, 2398 these are variables that are specific to the machine on which the 2399 build system is running and thus would be potentially problematic 2400 within the extensible SDK. 2401 2402 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the 2403 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and 2404 excludes the following variables: 2405 2406 - :term:`CONF_VERSION` 2407 - :term:`BB_NUMBER_THREADS` 2408 - :term:`BB_NUMBER_PARSE_THREADS` 2409 - :term:`PARALLEL_MAKE` 2410 - :term:`PRSERV_HOST` 2411 - :term:`SSTATE_MIRRORS` :term:`DL_DIR` 2412 - :term:`SSTATE_DIR` :term:`TMPDIR` 2413 - :term:`BB_SERVER_TIMEOUT` 2414 2415 For additional information on how to customize the extensible SDK's 2416 configuration, see the 2417 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`" 2418 section in the Yocto Project Application Development and the 2419 Extensible Software Development Kit (eSDK) manual. 2420 2421 :term:`EXCLUDE_FROM_SHLIBS` 2422 Triggers the OpenEmbedded build system's shared libraries resolver to 2423 exclude an entire package when scanning for shared libraries. 2424 2425 .. note:: 2426 2427 The shared libraries resolver's functionality results in part from 2428 the internal function ``package_do_shlibs``, which is part of the 2429 :ref:`ref-tasks-package` task. You should be aware that the shared 2430 libraries resolver might implicitly define some dependencies between 2431 packages. 2432 2433 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the 2434 :term:`PRIVATE_LIBS` variable, which excludes a 2435 package's particular libraries only and not the whole package. 2436 2437 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a 2438 particular package:: 2439 2440 EXCLUDE_FROM_SHLIBS = "1" 2441 2442 :term:`EXCLUDE_FROM_WORLD` 2443 Directs BitBake to exclude a recipe from world builds (i.e. 2444 ``bitbake world``). During world builds, BitBake locates, parses and 2445 builds all recipes found in every layer exposed in the 2446 ``bblayers.conf`` configuration file. 2447 2448 To exclude a recipe from a world build using this variable, set the 2449 variable to "1" in the recipe. 2450 2451 .. note:: 2452 2453 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a 2454 world build in order to satisfy dependencies of other recipes. Adding 2455 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not 2456 explicitly added to the list of build targets in a world build. 2457 2458 :term:`EXTENDPE` 2459 Used with file and pathnames to create a prefix for a recipe's 2460 version based on the recipe's :term:`PE` value. If :term:`PE` 2461 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that 2462 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1"). 2463 If a recipe's :term:`PE` is not set (the default) or is equal to zero, 2464 :term:`EXTENDPE` becomes "". 2465 2466 See the :term:`STAMP` variable for an example. 2467 2468 :term:`EXTENDPKGV` 2469 The full package version specification as it appears on the final 2470 packages produced by a recipe. The variable's value is normally used 2471 to fix a runtime dependency to the exact same version of another 2472 package in the same recipe:: 2473 2474 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" 2475 2476 The dependency relationships are intended to force the package 2477 manager to upgrade these types of packages in lock-step. 2478 2479 :term:`EXTERNAL_KERNEL_TOOLS` 2480 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these 2481 tools are not in the source tree. 2482 2483 When kernel tools are available in the tree, they are preferred over 2484 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS` 2485 variable tells the OpenEmbedded build system to prefer the installed 2486 external tools. See the :ref:`ref-classes-kernel-yocto` class in 2487 ``meta/classes-recipe`` to see how the variable is used. 2488 2489 :term:`KERNEL_LOCALVERSION` 2490 This variable allows to append a string to the version 2491 of the kernel image. This corresponds to the ``CONFIG_LOCALVERSION`` 2492 kernel configuration parameter. 2493 2494 Using this variable is only useful when you are using a kernel recipe 2495 inheriting the :ref:`ref-classes-kernel` class, and which doesn't 2496 already set a local version. Therefore, setting this variable has no 2497 impact on ``linux-yocto`` kernels. 2498 2499 :term:`EXTERNAL_TOOLCHAIN` 2500 When you intend to use an 2501 :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`, 2502 this variable allows to specify the directory where this toolchain was 2503 installed. 2504 2505 :term:`EXTERNALSRC` 2506 When inheriting the :ref:`ref-classes-externalsrc` 2507 class, this variable points to the source tree, which is outside of 2508 the OpenEmbedded build system. When set, this variable sets the 2509 :term:`S` variable, which is what the OpenEmbedded build 2510 system uses to locate unpacked recipe source code. 2511 2512 See the ":ref:`ref-classes-externalsrc`" section for details. You 2513 can also find information on how to use this variable in the 2514 ":ref:`dev-manual/building:building software from an external source`" 2515 section in the Yocto Project Development Tasks Manual. 2516 2517 :term:`EXTERNALSRC_BUILD` 2518 When inheriting the :ref:`ref-classes-externalsrc` 2519 class, this variable points to the directory in which the recipe's 2520 source code is built, which is outside of the OpenEmbedded build 2521 system. When set, this variable sets the :term:`B` variable, 2522 which is what the OpenEmbedded build system uses to locate the 2523 :term:`Build Directory`. 2524 2525 See the ":ref:`ref-classes-externalsrc`" section for details. You 2526 can also find information on how to use this variable in the 2527 ":ref:`dev-manual/building:building software from an external source`" 2528 section in the Yocto Project Development Tasks Manual. 2529 2530 :term:`EXTRA_AUTORECONF` 2531 For recipes inheriting the :ref:`ref-classes-autotools` 2532 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to 2533 pass to the ``autoreconf`` command that is executed during the 2534 :ref:`ref-tasks-configure` task. 2535 2536 The default value is "--exclude=autopoint". 2537 2538 :term:`EXTRA_IMAGE_FEATURES` 2539 A list of additional features to include in an image. When listing 2540 more than one feature, separate them with a space. 2541 2542 Typically, you configure this variable in your ``local.conf`` file, 2543 which is found in the :term:`Build Directory`. Although you can use this 2544 variable from within a recipe, best practices dictate that you do not. 2545 2546 .. note:: 2547 2548 To enable primary features from within the image recipe, use the 2549 :term:`IMAGE_FEATURES` variable. 2550 2551 Here are some examples of features you can add: 2552 2553 - "dbg-pkgs" --- adds -dbg packages for all installed packages including 2554 symbol information for debugging and profiling. 2555 2556 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and 2557 enables post-installation logging. See the 'allow-empty-password' and 2558 'post-install-logging' features in the ":ref:`ref-features-image`" 2559 section for more information. 2560 - "dev-pkgs" --- adds -dev packages for all installed packages. This is 2561 useful if you want to develop against the libraries in the image. 2562 - "read-only-rootfs" --- creates an image whose root filesystem is 2563 read-only. See the 2564 ":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`" 2565 section in the Yocto Project Development Tasks Manual for more 2566 information 2567 - "tools-debug" --- adds debugging tools such as gdb and strace. 2568 - "tools-sdk" --- adds development tools such as gcc, make, 2569 pkgconfig and so forth. 2570 - "tools-testapps" --- adds useful testing tools 2571 such as ts_print, aplay, arecord and so forth. 2572 2573 For a complete list of image features that ships with the Yocto 2574 Project, see the ":ref:`ref-features-image`" section. 2575 2576 For an example that shows how to customize your image by using this 2577 variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" 2578 section in the Yocto Project Development Tasks Manual. 2579 2580 :term:`EXTRA_IMAGECMD` 2581 Specifies additional options for the image creation command that has 2582 been specified in :term:`IMAGE_CMD`. When setting 2583 this variable, use an override for the associated image type. Here is 2584 an example:: 2585 2586 EXTRA_IMAGECMD:ext3 ?= "-i 4096" 2587 2588 :term:`EXTRA_IMAGEDEPENDS` 2589 A list of recipes to build that do not provide packages for 2590 installing into the root filesystem. 2591 2592 Sometimes a recipe is required to build the final image but is not 2593 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS` 2594 variable to list these recipes and thus specify the dependencies. A 2595 typical example is a required bootloader in a machine configuration. 2596 2597 .. note:: 2598 2599 To add packages to the root filesystem, see the various 2600 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables. 2601 2602 :term:`EXTRA_OECMAKE` 2603 Additional `CMake <https://cmake.org/overview/>`__ options. See the 2604 :ref:`ref-classes-cmake` class for additional information. 2605 2606 :term:`EXTRA_OECONF` 2607 Additional ``configure`` script options. See 2608 :term:`PACKAGECONFIG_CONFARGS` for 2609 additional information on passing configure script options. 2610 2611 :term:`EXTRA_OEMAKE` 2612 Additional GNU ``make`` options. 2613 2614 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the 2615 variable to specify any required GNU options. 2616 2617 :term:`PARALLEL_MAKE` and 2618 :term:`PARALLEL_MAKEINST` also make use of 2619 :term:`EXTRA_OEMAKE` to pass the required flags. 2620 2621 :term:`EXTRA_OESCONS` 2622 When inheriting the :ref:`ref-classes-scons` class, this 2623 variable specifies additional configuration options you want to pass 2624 to the ``scons`` command line. 2625 2626 :term:`EXTRA_OEMESON` 2627 Additional `Meson <https://mesonbuild.com/>`__ options. See the 2628 :ref:`ref-classes-meson` class for additional information. 2629 2630 In addition to standard Meson options, such options correspond to 2631 `Meson build options <https://mesonbuild.com/Build-options.html>`__ 2632 defined in the ``meson_options.txt`` file in the sources to build. 2633 Here is an example:: 2634 2635 EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" 2636 2637 Note that any custom value for the Meson ``--buildtype`` option 2638 should be set through the :term:`MESON_BUILDTYPE` variable. 2639 2640 :term:`EXTRA_USERS_PARAMS` 2641 When inheriting the :ref:`ref-classes-extrausers` 2642 class, this variable provides image level user and group operations. 2643 This is a more global method of providing user and group 2644 configuration as compared to using the 2645 :ref:`ref-classes-useradd` class, which ties user and 2646 group configurations to a specific recipe. 2647 2648 The set list of commands you can configure using the 2649 :term:`EXTRA_USERS_PARAMS` is shown in the 2650 :ref:`ref-classes-extrausers` class. These commands map to the normal 2651 Unix commands of the same names:: 2652 2653 # EXTRA_USERS_PARAMS = "\ 2654 # useradd -p '' tester; \ 2655 # groupadd developers; \ 2656 # userdel nobody; \ 2657 # groupdel -g video; \ 2658 # groupmod -g 1020 developers; \ 2659 # usermod -s /bin/sh tester; \ 2660 # " 2661 2662 Hardcoded passwords are supported via the ``-p`` parameters for 2663 ``useradd`` or ``usermod``, but only hashed. 2664 2665 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns 2666 passwords. First on host, create the (escaped) password hash:: 2667 2668 printf "%q" $(mkpasswd -m sha256crypt tester01) 2669 2670 The resulting hash is set to a variable and used in ``useradd`` command parameters:: 2671 2672 inherit extrausers 2673 PASSWD = "\$X\$ABC123\$A-Long-Hash" 2674 EXTRA_USERS_PARAMS = "\ 2675 useradd -p '${PASSWD}' tester-jim; \ 2676 useradd -p '${PASSWD}' tester-sue; \ 2677 " 2678 2679 Finally, here is an example that sets the root password:: 2680 2681 inherit extrausers 2682 EXTRA_USERS_PARAMS = "\ 2683 usermod -p '${PASSWD}' root; \ 2684 " 2685 2686 .. note:: 2687 2688 From a security perspective, hardcoding a default password is not 2689 generally a good idea or even legal in some jurisdictions. It is 2690 recommended that you do not do this if you are building a production 2691 image. 2692 2693 Additionally there is a special ``passwd-expire`` command that will 2694 cause the password for a user to be expired and thus force changing it 2695 on first login, for example:: 2696 2697 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;" 2698 2699 .. note:: 2700 2701 At present, ``passwd-expire`` may only work for remote logins when 2702 using OpenSSH and not dropbear as an SSH server. 2703 2704 :term:`EXTRANATIVEPATH` 2705 A list of subdirectories of 2706 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}`` 2707 added to the beginning of the environment variable ``PATH``. As an 2708 example, the following prepends 2709 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to 2710 ``PATH``:: 2711 2712 EXTRANATIVEPATH = "foo bar" 2713 2714 :term:`FAKEROOT` 2715 See :term:`bitbake:FAKEROOT` in the BitBake manual. 2716 2717 :term:`FAKEROOTBASEENV` 2718 See :term:`bitbake:FAKEROOTBASEENV` in the BitBake manual. 2719 2720 :term:`FAKEROOTCMD` 2721 See :term:`bitbake:FAKEROOTCMD` in the BitBake manual. 2722 2723 :term:`FAKEROOTDIRS` 2724 See :term:`bitbake:FAKEROOTDIRS` in the BitBake manual. 2725 2726 :term:`FAKEROOTENV` 2727 See :term:`bitbake:FAKEROOTENV` in the BitBake manual. 2728 2729 :term:`FAKEROOTNOENV` 2730 See :term:`bitbake:FAKEROOTNOENV` in the BitBake manual. 2731 2732 :term:`FEATURE_PACKAGES` 2733 Defines one or more packages to include in an image when a specific 2734 item is included in :term:`IMAGE_FEATURES`. 2735 When setting the value, :term:`FEATURE_PACKAGES` should have the name of 2736 the feature item as an override. Here is an example:: 2737 2738 FEATURE_PACKAGES_widget = "package1 package2" 2739 2740 In this example, if "widget" were added to :term:`IMAGE_FEATURES`, 2741 package1 and package2 would be included in the image. 2742 2743 .. note:: 2744 2745 Packages installed by features defined through :term:`FEATURE_PACKAGES` 2746 are often package groups. While similarly named, you should not 2747 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which 2748 are discussed elsewhere in the documentation. 2749 2750 :term:`FEED_DEPLOYDIR_BASE_URI` 2751 Points to the base URL of the server and location within the 2752 document-root that provides the metadata and packages required by 2753 OPKG to support runtime package management of IPK packages. You set 2754 this variable in your ``local.conf`` file. 2755 2756 Consider the following example:: 2757 2758 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" 2759 2760 This example assumes you are serving 2761 your packages over HTTP and your databases are located in a directory 2762 named ``BOARD-dir``, which is underneath your HTTP server's 2763 document-root. In this case, the OpenEmbedded build system generates 2764 a set of configuration files for you in your target that work with 2765 the feed. 2766 2767 :term:`FETCHCMD` 2768 See :term:`bitbake:FETCHCMD` in the BitBake manual. 2769 2770 :term:`FILE` 2771 See :term:`bitbake:FILE` in the BitBake manual. 2772 2773 :term:`FILES` 2774 The list of files and directories that are placed in a package. The 2775 :term:`PACKAGES` variable lists the packages 2776 generated by a recipe. 2777 2778 To use the :term:`FILES` variable, provide a package name override that 2779 identifies the resulting package. Then, provide a space-separated 2780 list of files or paths that identify the files you want included as 2781 part of the resulting package. Here is an example:: 2782 2783 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" 2784 2785 .. note:: 2786 2787 - When specifying files or paths, you can pattern match using 2788 Python's 2789 `glob <https://docs.python.org/3/library/glob.html>`__ 2790 syntax. For details on the syntax, see the documentation by 2791 following the previous link. 2792 2793 - When specifying paths as part of the :term:`FILES` variable, it is 2794 good practice to use appropriate path variables. For example, 2795 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}`` 2796 rather than ``/usr/bin``. You can find a list of these 2797 variables at the top of the ``meta/conf/bitbake.conf`` file in 2798 the :term:`Source Directory`. You will also 2799 find the default values of the various ``FILES:*`` variables in 2800 this file. 2801 2802 If some of the files you provide with the :term:`FILES` variable are 2803 editable and you know they should not be overwritten during the 2804 package update process by the Package Management System (PMS), you 2805 can identify these files so that the PMS will not overwrite them. See 2806 the :term:`CONFFILES` variable for information on 2807 how to identify these files to the PMS. 2808 2809 :term:`FILES_SOLIBSDEV` 2810 Defines the file specification to match 2811 :term:`SOLIBSDEV`. In other words, 2812 :term:`FILES_SOLIBSDEV` defines the full path name of the development 2813 symbolic link (symlink) for shared libraries on the target platform. 2814 2815 The following statement from the ``bitbake.conf`` shows how it is 2816 set:: 2817 2818 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" 2819 2820 :term:`FILESEXTRAPATHS` 2821 A colon-separated list to extend the search path the OpenEmbedded build 2822 system uses when looking for files and patches as it processes recipes 2823 and append files. The default directories BitBake uses when it processes 2824 recipes are initially defined by the :term:`FILESPATH` variable. You can 2825 extend :term:`FILESPATH` variable by using :term:`FILESEXTRAPATHS`. 2826 2827 Best practices dictate that you accomplish this by using 2828 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you 2829 prepend paths as follows:: 2830 2831 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" 2832 2833 In the above example, the build system first 2834 looks for files in a directory that has the same name as the 2835 corresponding append file. 2836 2837 .. note:: 2838 2839 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate 2840 expansion (``:=``) operator. Immediate expansion makes sure that 2841 BitBake evaluates :term:`THISDIR` at the time the 2842 directive is encountered rather than at some later time when 2843 expansion might result in a directory that does not contain the 2844 files you need. 2845 2846 Also, include the trailing separating colon character if you are 2847 prepending. The trailing colon character is necessary because you 2848 are directing BitBake to extend the path by prepending directories 2849 to the search path. 2850 2851 Here is another common use:: 2852 2853 FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 2854 2855 In this example, the build system extends the 2856 :term:`FILESPATH` variable to include a directory named ``files`` that is 2857 in the same directory as the corresponding append file. 2858 2859 This next example specifically adds three paths:: 2860 2861 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:" 2862 2863 A final example shows how you can extend the search path and include 2864 a :term:`MACHINE`-specific override, which is useful 2865 in a BSP layer:: 2866 2867 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:" 2868 2869 The previous statement appears in the 2870 ``linux-yocto-dev.bbappend`` file, which is found in the 2871 :ref:`overview-manual/development-environment:yocto project source repositories` in 2872 ``meta-intel/common/recipes-kernel/linux``. Here, the machine 2873 override is a special :term:`PACKAGE_ARCH` 2874 definition for multiple ``meta-intel`` machines. 2875 2876 .. note:: 2877 2878 For a layer that supports a single BSP, the override could just be 2879 the value of :term:`MACHINE`. 2880 2881 By prepending paths in ``.bbappend`` files, you allow multiple append 2882 files that reside in different layers but are used for the same 2883 recipe to correctly extend the path. 2884 2885 :term:`FILESOVERRIDES` 2886 A colon-separated list to specify a subset of :term:`OVERRIDES` used by 2887 the OpenEmbedded build system for creating :term:`FILESPATH`. The 2888 :term:`FILESOVERRIDES` variable uses overrides to automatically extend 2889 the :term:`FILESPATH` variable. For an example of how that works, see the 2890 :term:`FILESPATH` variable description. Additionally, you find more 2891 information on how overrides are handled in the 2892 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" 2893 section of the BitBake User Manual. 2894 2895 By default, the :term:`FILESOVERRIDES` variable is defined as:: 2896 2897 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" 2898 2899 .. note:: 2900 2901 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up 2902 with expected overrides and are used in an expected manner by the 2903 build system. 2904 2905 :term:`FILESPATH` 2906 A colon-separated list specifying the default set of directories the 2907 OpenEmbedded build system uses when searching for patches and files. 2908 2909 During the build process, BitBake searches each directory in 2910 :term:`FILESPATH` in the specified order when looking for files and 2911 patches specified by each ``file://`` URI in a recipe's 2912 :term:`SRC_URI` statements. 2913 2914 The default value for the :term:`FILESPATH` variable is defined in the 2915 :ref:`ref-classes-base` class found in ``meta/classes-global`` in the 2916 :term:`Source Directory`:: 2917 2918 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ 2919 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" 2920 2921 The 2922 :term:`FILESPATH` variable is automatically extended using the overrides 2923 from the :term:`FILESOVERRIDES` variable. 2924 2925 .. note:: 2926 2927 - Do not hand-edit the :term:`FILESPATH` variable. If you want the 2928 build system to look in directories other than the defaults, 2929 extend the :term:`FILESPATH` variable by using the 2930 :term:`FILESEXTRAPATHS` variable. 2931 2932 - Be aware that the default :term:`FILESPATH` directories do not map 2933 to directories in custom layers where append files 2934 (``.bbappend``) are used. If you want the build system to find 2935 patches or files that reside with your append files, you need 2936 to extend the :term:`FILESPATH` variable by using the 2937 :term:`FILESEXTRAPATHS` variable. 2938 2939 You can take advantage of this searching behavior in useful ways. For 2940 example, consider a case where there is the following directory structure 2941 for general and machine-specific configurations:: 2942 2943 files/defconfig 2944 files/MACHINEA/defconfig 2945 files/MACHINEB/defconfig 2946 2947 Also in the example, the :term:`SRC_URI` statement contains 2948 "file://defconfig". Given this scenario, you can set 2949 :term:`MACHINE` to "MACHINEA" and cause the build 2950 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to 2951 "MACHINEB" and the build system uses files from ``files/MACHINEB``. 2952 Finally, for any machine other than "MACHINEA" and "MACHINEB", the 2953 build system uses files from ``files/defconfig``. 2954 2955 You can find out more about the patching process in the 2956 ":ref:`overview-manual/concepts:patching`" section 2957 in the Yocto Project Overview and Concepts Manual and the 2958 ":ref:`dev-manual/new-recipe:patching code`" section in 2959 the Yocto Project Development Tasks Manual. See the 2960 :ref:`ref-tasks-patch` task as well. 2961 2962 :term:`FILESYSTEM_PERMS_TABLES` 2963 Allows you to define your own file permissions settings table as part 2964 of your configuration for the packaging process. For example, suppose 2965 you need a consistent set of custom permissions for a set of groups 2966 and users across an entire work project. It is best to do this in the 2967 packages themselves but this is not always possible. 2968 2969 By default, the OpenEmbedded build system uses the ``fs-perms.txt``, 2970 which is located in the ``meta/files`` folder in the :term:`Source Directory`. 2971 If you create your own file 2972 permissions setting table, you should place it in your layer or the 2973 distro's layer. 2974 2975 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the 2976 ``conf/local.conf`` file, which is found in the :term:`Build Directory`, 2977 to point to your custom ``fs-perms.txt``. You can specify more than a 2978 single file permissions setting table. The paths you specify to these 2979 files must be defined within the :term:`BBPATH` variable. 2980 2981 For guidance on how to create your own file permissions settings 2982 table file, examine the existing ``fs-perms.txt``. 2983 2984 :term:`FIT_ADDRESS_CELLS` 2985 Specifies the value of the ``#address-cells`` value for the 2986 description of the FIT image. 2987 2988 The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage` 2989 class, which corresponds to 32 bit addresses. 2990 2991 For platforms that need to set 64 bit addresses, for example in 2992 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to 2993 set this value to "2", as two 32 bit values (cells) will be needed 2994 to represent such addresses. 2995 2996 Here is an example setting "0x400000000" as a load address:: 2997 2998 FIT_ADDRESS_CELLS = "2" 2999 UBOOT_LOADADDRESS= "0x04 0x00000000" 3000 3001 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__. 3002 3003 :term:`FIT_CONF_DEFAULT_DTB` 3004 Specifies the default device tree binary (dtb) file for a FIT image 3005 when multiple ones are provided. 3006 3007 This variable is used in the :ref:`ref-classes-kernel-fitimage` class. 3008 3009 :term:`FIT_DESC` 3010 Specifies the description string encoded into a FIT image. The 3011 default value is set by the :ref:`ref-classes-kernel-fitimage` class as 3012 follows:: 3013 3014 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 3015 3016 :term:`FIT_GENERATE_KEYS` 3017 Decides whether to generate the keys for signing the FIT image if 3018 they don't already exist. The keys are created in 3019 :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0" 3020 by the :ref:`ref-classes-kernel-fitimage` class. 3021 3022 :term:`FIT_HASH_ALG` 3023 Specifies the hash algorithm used in creating the FIT Image. 3024 This variable is set by default to "sha256" by the 3025 :ref:`ref-classes-kernel-fitimage` class. 3026 3027 :term:`FIT_KERNEL_COMP_ALG` 3028 The compression algorithm to use for the kernel image inside the FIT Image. 3029 At present, the only supported values are "gzip" (default), "lzo" or "none". 3030 If you set this variable to anything other than "none" you may also need 3031 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. 3032 3033 This variable is used in the :ref:`ref-classes-kernel-uboot` class. 3034 3035 :term:`FIT_KERNEL_COMP_ALG_EXTENSION` 3036 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default 3037 value is set ".gz" by the :ref:`ref-classes-kernel-uboot` class. If you 3038 set :term:`FIT_KERNEL_COMP_ALG` to "lzo", you may want to set this 3039 variable to ".lzo". 3040 3041 :term:`FIT_KEY_GENRSA_ARGS` 3042 Arguments to ``openssl genrsa`` for generating a RSA private key for 3043 signing the FIT image. The default value is set to "-F4" by the 3044 :ref:`ref-classes-kernel-fitimage` class. 3045 3046 :term:`FIT_KEY_REQ_ARGS` 3047 Arguments to ``openssl req`` for generating a certificate for signing 3048 the FIT image. The default value is "-batch -new" by the 3049 :ref:`ref-classes-kernel-fitimage` class, "batch" for 3050 non interactive mode and "new" for generating new keys. 3051 3052 :term:`FIT_KEY_SIGN_PKCS` 3053 Format for the public key certificate used for signing the FIT image. 3054 The default value is set to "x509" by the 3055 :ref:`ref-classes-kernel-fitimage` class. 3056 3057 :term:`FIT_SIGN_ALG` 3058 Specifies the signature algorithm used in creating the FIT Image. 3059 This variable is set by default to "rsa2048" by the 3060 :ref:`ref-classes-kernel-fitimage` class. 3061 3062 :term:`FIT_PAD_ALG` 3063 Specifies the padding algorithm used in creating the FIT Image. 3064 The default value is set to "pkcs-1.5" by the 3065 :ref:`ref-classes-kernel-fitimage` class. 3066 3067 :term:`FIT_SIGN_INDIVIDUAL` 3068 If set to "1", then the :ref:`ref-classes-kernel-fitimage` 3069 class will sign the kernel, dtb and ramdisk images individually in addition 3070 to signing the FIT image itself. This could be useful if you are 3071 intending to verify signatures in another context than booting via 3072 U-Boot. 3073 3074 This variable is set to "0" by default. 3075 3076 :term:`FIT_SIGN_NUMBITS` 3077 Size of the private key used in the FIT image, in number of bits. 3078 The default value for this variable is set to "2048" 3079 by the :ref:`ref-classes-kernel-fitimage` class. 3080 3081 :term:`FONT_EXTRA_RDEPENDS` 3082 When inheriting the :ref:`ref-classes-fontcache` class, 3083 this variable specifies the runtime dependencies for font packages. 3084 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils". 3085 3086 :term:`FONT_PACKAGES` 3087 When inheriting the :ref:`ref-classes-fontcache` class, this variable 3088 identifies packages containing font files that need to be cached by 3089 Fontconfig. By default, the :ref:`ref-classes-fontcache` class assumes 3090 that fonts are in the recipe's main package (i.e. 3091 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you 3092 need are in a package other than that main package. 3093 3094 :term:`FORCE_RO_REMOVE` 3095 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED`` 3096 during the generation of the root filesystem. 3097 3098 Set the variable to "1" to force the removal of these packages. 3099 3100 :term:`FULL_OPTIMIZATION` 3101 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when 3102 compiling an optimized system. This variable defaults to "-O2 -pipe 3103 ${DEBUG_FLAGS}". 3104 3105 :term:`GCCPIE` 3106 Enables Position Independent Executables (PIE) within the GNU C 3107 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented 3108 Programming (ROP) attacks much more difficult to execute. 3109 3110 By default the ``security_flags.inc`` file enables PIE by setting the 3111 variable as follows:: 3112 3113 GCCPIE ?= "--enable-default-pie" 3114 3115 :term:`GCCVERSION` 3116 Specifies the default version of the GNU C Compiler (GCC) used for 3117 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the 3118 ``meta/conf/distro/include/tcmode-default.inc`` include file:: 3119 3120 GCCVERSION ?= "8.%" 3121 3122 You can override this value by setting it in a 3123 configuration file such as the ``local.conf``. 3124 3125 :term:`GDB` 3126 The minimal command and arguments to run the GNU Debugger. 3127 3128 :term:`GIR_EXTRA_LIBS_PATH` 3129 Allows to specify an extra search path for ``.so`` files 3130 in GLib related recipes using GObject introspection, 3131 and which do not compile without this setting. 3132 See the ":ref:`dev-manual/gobject-introspection:enabling gobject introspection support`" 3133 section for details. 3134 3135 :term:`GITDIR` 3136 The directory in which a local copy of a Git repository is stored 3137 when it is cloned. 3138 3139 :term:`GITHUB_BASE_URI` 3140 When inheriting the :ref:`ref-classes-github-releases` 3141 class, specifies the base URL for fetching releases for the github 3142 project you wish to fetch sources from. The default value is as follows:: 3143 3144 GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/" 3145 3146 :term:`GLIBC_GENERATE_LOCALES` 3147 Specifies the list of GLIBC locales to generate should you not wish 3148 to generate all LIBC locals, which can be time consuming. 3149 3150 .. note:: 3151 3152 If you specifically remove the locale ``en_US.UTF-8``, you must set 3153 :term:`IMAGE_LINGUAS` appropriately. 3154 3155 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file. 3156 By default, all locales are generated:: 3157 3158 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8" 3159 3160 :term:`GO_IMPORT` 3161 When inheriting the :ref:`ref-classes-go` class, this mandatory variable 3162 sets the import path for the Go package that will be created for the code 3163 to build. If you have a ``go.mod`` file in the source directory, this 3164 typically matches the path in the ``module`` line in this file. 3165 3166 Other Go programs importing this package will use this path. 3167 3168 Here is an example setting from the 3169 :yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>` 3170 recipe:: 3171 3172 GO_IMPORT = "golang.org/x/example" 3173 3174 :term:`GO_INSTALL` 3175 When inheriting the :ref:`ref-classes-go` class, this optional variable 3176 specifies which packages in the sources should be compiled and 3177 installed in the Go build space by the 3178 `go install <https://go.dev/ref/mod#go-install>`__ command. 3179 3180 Here is an example setting from the 3181 :oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>` 3182 recipe:: 3183 3184 GO_INSTALL = "\ 3185 ${GO_IMPORT}/cmd/crucible \ 3186 ${GO_IMPORT}/cmd/habtool \ 3187 " 3188 3189 By default, :term:`GO_INSTALL` is defined as:: 3190 3191 GO_INSTALL ?= "${GO_IMPORT}/..." 3192 3193 The ``...`` wildcard means that it will catch all 3194 packages found in the sources. 3195 3196 See the :term:`GO_INSTALL_FILTEROUT` variable for 3197 filtering out unwanted packages from the ones 3198 found from the :term:`GO_INSTALL` value. 3199 3200 :term:`GO_INSTALL_FILTEROUT` 3201 When using the Go "vendor" mechanism to bring in dependencies for a Go 3202 package, the default :term:`GO_INSTALL` setting, which uses the ``...`` 3203 wildcard, will include the vendored packages in the build, which produces 3204 incorrect results. 3205 3206 There are also some Go packages that are structured poorly, so that the 3207 ``...`` wildcard results in building example or test code that should not 3208 be included in the build, or could fail to build. 3209 3210 This optional variable allows for filtering out a subset of the sources. 3211 It defaults to excluding everything under the ``vendor`` subdirectory 3212 under package's main directory. This is the normal location for vendored 3213 packages, but it can be overridden by a recipe to filter out other 3214 subdirectories if needed. 3215 3216 :term:`GO_WORKDIR` 3217 When using Go Modules, the current working directory must be the directory 3218 containing the ``go.mod`` file, or one of its subdirectories. When the 3219 ``go`` tool is used, it will automatically look for the ``go.mod`` file 3220 in the Go working directory or in any parent directory, but not in 3221 subdirectories. 3222 3223 When using the :ref:`ref-classes-go-mod` class to use Go modules, 3224 the optional :term:`GO_WORKDIR` variable, defaulting to the value 3225 of :term:`GO_IMPORT`, allows to specify a different Go working directory. 3226 3227 :term:`GROUPADD_PARAM` 3228 When inheriting the :ref:`ref-classes-useradd` class, 3229 this variable specifies for a package what parameters should be 3230 passed to the ``groupadd`` command if you wish to add a group to the 3231 system when the package is installed. 3232 3233 Here is an example from the ``dbus`` recipe:: 3234 3235 GROUPADD_PARAM:${PN} = "-r netdev" 3236 3237 For information on the standard Linux shell command 3238 ``groupadd``, see https://linux.die.net/man/8/groupadd. 3239 3240 :term:`GROUPMEMS_PARAM` 3241 When inheriting the :ref:`ref-classes-useradd` class, 3242 this variable specifies for a package what parameters should be 3243 passed to the ``groupmems`` command if you wish to modify the members 3244 of a group when the package is installed. 3245 3246 For information on the standard Linux shell command ``groupmems``, 3247 see https://linux.die.net/man/8/groupmems. 3248 3249 :term:`GRUB_GFXSERIAL` 3250 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics 3251 and serial in the boot menu. Set this variable to "1" in your 3252 ``local.conf`` or distribution configuration file to enable graphics 3253 and serial in the menu. 3254 3255 See the :ref:`ref-classes-grub-efi` class for more 3256 information on how this variable is used. 3257 3258 :term:`GRUB_OPTS` 3259 Additional options to add to the GNU GRand Unified Bootloader (GRUB) 3260 configuration. Use a semi-colon character (``;``) to separate 3261 multiple options. 3262 3263 The :term:`GRUB_OPTS` variable is optional. See the 3264 :ref:`ref-classes-grub-efi` class for more information 3265 on how this variable is used. 3266 3267 :term:`GRUB_TIMEOUT` 3268 Specifies the timeout before executing the default ``LABEL`` in the 3269 GNU GRand Unified Bootloader (GRUB). 3270 3271 The :term:`GRUB_TIMEOUT` variable is optional. See the 3272 :ref:`ref-classes-grub-efi` class for more information 3273 on how this variable is used. 3274 3275 :term:`GTKIMMODULES_PACKAGES` 3276 When inheriting the :ref:`ref-classes-gtk-immodules-cache` class, 3277 this variable specifies the packages that contain the GTK+ input 3278 method modules being installed when the modules are in packages other 3279 than the main package. 3280 3281 :term:`HGDIR` 3282 See :term:`bitbake:HGDIR` in the BitBake manual. 3283 3284 :term:`HOMEPAGE` 3285 Website where more information about the software the recipe is 3286 building can be found. 3287 3288 :term:`HOST_ARCH` 3289 The name of the target architecture, which is normally the same as 3290 :term:`TARGET_ARCH`. The OpenEmbedded build system 3291 supports many architectures. Here is an example list of architectures 3292 supported. This list is by no means complete as the architecture is 3293 configurable: 3294 3295 - arm 3296 - i586 3297 - x86_64 3298 - powerpc 3299 - powerpc64 3300 - mips 3301 - mipsel 3302 3303 :term:`HOST_CC_ARCH` 3304 Specifies architecture-specific compiler flags that are passed to the 3305 C compiler. 3306 3307 Default initialization for :term:`HOST_CC_ARCH` varies depending on what 3308 is being built: 3309 3310 - :term:`TARGET_CC_ARCH` when building for the 3311 target 3312 3313 - :term:`BUILD_CC_ARCH` when building for the build host (i.e. 3314 ``-native``) 3315 3316 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e. 3317 ``nativesdk-``) 3318 3319 :term:`HOST_OS` 3320 Specifies the name of the target operating system, which is normally 3321 the same as the :term:`TARGET_OS`. The variable can 3322 be set to "linux" for ``glibc``-based systems and to "linux-musl" for 3323 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and 3324 "linux-musleabi" values possible. 3325 3326 :term:`HOST_PREFIX` 3327 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX` 3328 is normally the same as :term:`TARGET_PREFIX`. 3329 3330 :term:`HOST_SYS` 3331 Specifies the system, including the architecture and the operating 3332 system, for which the build is occurring in the context of the 3333 current recipe. 3334 3335 The OpenEmbedded build system automatically sets this variable based 3336 on :term:`HOST_ARCH`, 3337 :term:`HOST_VENDOR`, and 3338 :term:`HOST_OS` variables. 3339 3340 .. note:: 3341 3342 You do not need to set the variable yourself. 3343 3344 Consider these two examples: 3345 3346 - Given a native recipe on a 32-bit x86 machine running Linux, the 3347 value is "i686-linux". 3348 3349 - Given a recipe being built for a little-endian MIPS target running 3350 Linux, the value might be "mipsel-linux". 3351 3352 :term:`HOST_VENDOR` 3353 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the 3354 same as :term:`TARGET_VENDOR`. 3355 3356 :term:`HOSTTOOLS` 3357 A space-separated list (filter) of tools on the build host that 3358 should be allowed to be called from within build tasks. Using this 3359 filter helps reduce the possibility of host contamination. If a tool 3360 specified in the value of :term:`HOSTTOOLS` is not found on the build 3361 host, the OpenEmbedded build system produces an error and the build 3362 is not started. 3363 3364 For additional information, see 3365 :term:`HOSTTOOLS_NONFATAL`. 3366 3367 :term:`HOSTTOOLS_NONFATAL` 3368 A space-separated list (filter) of tools on the build host that 3369 should be allowed to be called from within build tasks. Using this 3370 filter helps reduce the possibility of host contamination. Unlike 3371 :term:`HOSTTOOLS`, the OpenEmbedded build system 3372 does not produce an error if a tool specified in the value of 3373 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can 3374 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools. 3375 3376 :term:`ICECC_CLASS_DISABLE` 3377 Identifies user classes that you do not want the Icecream distributed 3378 compile support to consider. This variable is used by the 3379 :ref:`ref-classes-icecc` class. You set this variable in 3380 your ``local.conf`` file. 3381 3382 When you list classes using this variable, the recipes inheriting 3383 those classes will not benefit from distributed compilation across 3384 remote hosts. Instead they will be built locally. 3385 3386 :term:`ICECC_DISABLED` 3387 Disables or enables the ``icecc`` (Icecream) function. For more 3388 information on this function and best practices for using this 3389 variable, see the ":ref:`ref-classes-icecc`" 3390 section. 3391 3392 Setting this variable to "1" in your ``local.conf`` disables the 3393 function:: 3394 3395 ICECC_DISABLED ??= "1" 3396 3397 To enable the function, set the variable as follows:: 3398 3399 ICECC_DISABLED = "" 3400 3401 :term:`ICECC_ENV_EXEC` 3402 Points to the ``icecc-create-env`` script that you provide. This 3403 variable is used by the :ref:`ref-classes-icecc` class. You 3404 set this variable in your ``local.conf`` file. 3405 3406 If you do not point to a script that you provide, the OpenEmbedded 3407 build system uses the default script provided by the 3408 :oe_git:`icecc-create-env_0.1.bb 3409 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>` 3410 recipe, which is a modified version and not the one that comes with 3411 ``icecream``. 3412 3413 :term:`ICECC_PARALLEL_MAKE` 3414 Extra options passed to the ``make`` command during the 3415 :ref:`ref-tasks-compile` task that specify parallel 3416 compilation. This variable usually takes the form of "-j x", where x 3417 represents the maximum number of parallel threads ``make`` can run. 3418 3419 .. note:: 3420 3421 The options passed affect builds on all enabled machines on the 3422 network, which are machines running the ``iceccd`` daemon. 3423 3424 If your enabled machines support multiple cores, coming up with the 3425 maximum number of parallel threads that gives you the best 3426 performance could take some experimentation since machine speed, 3427 network lag, available memory, and existing machine loads can all 3428 affect build time. Consequently, unlike the 3429 :term:`PARALLEL_MAKE` variable, there is no 3430 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal 3431 performance. 3432 3433 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not 3434 use it (i.e. the system does not detect and assign the number of 3435 cores as is done with :term:`PARALLEL_MAKE`). 3436 3437 :term:`ICECC_PATH` 3438 The location of the ``icecc`` binary. You can set this variable in 3439 your ``local.conf`` file. If your ``local.conf`` file does not define 3440 this variable, the :ref:`ref-classes-icecc` class attempts 3441 to define it by locating ``icecc`` using ``which``. 3442 3443 :term:`ICECC_RECIPE_DISABLE` 3444 Identifies user recipes that you do not want the Icecream distributed 3445 compile support to consider. This variable is used by the 3446 :ref:`ref-classes-icecc` class. You set this variable in 3447 your ``local.conf`` file. 3448 3449 When you list recipes using this variable, you are excluding them 3450 from distributed compilation across remote hosts. Instead they will 3451 be built locally. 3452 3453 :term:`ICECC_RECIPE_ENABLE` 3454 Identifies user recipes that use an empty 3455 :term:`PARALLEL_MAKE` variable that you want to 3456 force remote distributed compilation on using the Icecream 3457 distributed compile support. This variable is used by the 3458 :ref:`ref-classes-icecc` class. You set this variable in 3459 your ``local.conf`` file. 3460 3461 :term:`IMAGE_BASENAME` 3462 The base name of image output files. This variable defaults to the 3463 recipe name (``${``\ :term:`PN`\ ``}``). 3464 3465 :term:`IMAGE_BOOT_FILES` 3466 A space-separated list of files installed into the boot partition 3467 when preparing an image using the Wic tool with the 3468 ``bootimg-partition`` source plugin. By default, 3469 the files are 3470 installed under the same name as the source files. To change the 3471 installed name, separate it from the original name with a semi-colon 3472 (;). Source files need to be located in 3473 :term:`DEPLOY_DIR_IMAGE`. Here are two 3474 examples:: 3475 3476 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" 3477 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" 3478 3479 Alternatively, source files can be picked up using a glob pattern. In 3480 this case, the destination file must have the same name as the base 3481 name of the source file path. To install files into a directory 3482 within the target location, pass its name after a semi-colon (;). 3483 Here are two examples:: 3484 3485 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" 3486 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" 3487 3488 The first example 3489 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles`` 3490 into the root of the target partition. The second example installs 3491 the same files into a ``boot`` directory within the target partition. 3492 3493 You can find information on how to use the Wic tool in the 3494 ":ref:`dev-manual/wic:creating partitioned images using wic`" 3495 section of the Yocto Project Development Tasks Manual. Reference 3496 material for Wic is located in the 3497 ":doc:`/ref-manual/kickstart`" chapter. 3498 3499 :term:`IMAGE_BUILDINFO_FILE` 3500 When using the :ref:`ref-classes-image-buildinfo` class, 3501 specifies the file in the image to write the build information into. The 3502 default value is "``${sysconfdir}/buildinfo``". 3503 3504 :term:`IMAGE_BUILDINFO_VARS` 3505 When using the :ref:`ref-classes-image-buildinfo` class, 3506 specifies the list of variables to include in the `Build Configuration` 3507 section of the output file (as a space-separated list). Defaults to 3508 ":term:`DISTRO` :term:`DISTRO_VERSION`". 3509 3510 :term:`IMAGE_CLASSES` 3511 A list of classes that all images should inherit. This is typically used 3512 to enable functionality across all image recipes. 3513 3514 Classes specified in :term:`IMAGE_CLASSES` must be located in the 3515 ``classes-recipe/`` or ``classes/`` subdirectories. 3516 3517 :term:`IMAGE_CMD` 3518 Specifies the command to create the image file for a specific image 3519 type, which corresponds to the value set in 3520 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, 3521 ``btrfs``, and so forth). When setting this variable, you should use 3522 an override for the associated type. Here is an example:: 3523 3524 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ 3525 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \ 3526 ${EXTRA_IMAGECMD}" 3527 3528 You typically do not need to set this variable unless you are adding 3529 support for a new image type. For more examples on how to set this 3530 variable, see the :ref:`ref-classes-image_types` 3531 class file, which is ``meta/classes-recipe/image_types.bbclass``. 3532 3533 :term:`IMAGE_DEVICE_TABLES` 3534 Specifies one or more files that contain custom device tables that 3535 are passed to the ``makedevs`` command as part of creating an image. 3536 These files list basic device nodes that should be created under 3537 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set, 3538 ``files/device_table-minimal.txt`` is used, which is located by 3539 :term:`BBPATH`. For details on how you should write 3540 device table files, see ``meta/files/device_table-minimal.txt`` as an 3541 example. 3542 3543 :term:`IMAGE_EFI_BOOT_FILES` 3544 A space-separated list of files installed into the boot partition 3545 when preparing an image using the Wic tool with the 3546 ``bootimg-efi`` source plugin. By default, 3547 the files are 3548 installed under the same name as the source files. To change the 3549 installed name, separate it from the original name with a semi-colon 3550 (;). Source files need to be located in 3551 :term:`DEPLOY_DIR_IMAGE`. Here are two 3552 examples:: 3553 3554 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" 3555 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" 3556 3557 Alternatively, source files can be picked up using a glob pattern. In 3558 this case, the destination file must have the same name as the base 3559 name of the source file path. To install files into a directory 3560 within the target location, pass its name after a semi-colon (;). 3561 Here are two examples:: 3562 3563 IMAGE_EFI_BOOT_FILES = "boot/loader/*" 3564 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" 3565 3566 The first example 3567 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/`` 3568 into the root of the target partition. The second example installs 3569 the same files into a ``boot`` directory within the target partition. 3570 3571 You can find information on how to use the Wic tool in the 3572 ":ref:`dev-manual/wic:creating partitioned images using wic`" 3573 section of the Yocto Project Development Tasks Manual. Reference 3574 material for Wic is located in the 3575 ":doc:`/ref-manual/kickstart`" chapter. 3576 3577 :term:`IMAGE_FEATURES` 3578 The primary list of features to include in an image. Typically, you 3579 configure this variable in an image recipe. Although you can use this 3580 variable from your ``local.conf`` file, which is found in the 3581 :term:`Build Directory`, best practices dictate that you do 3582 not. 3583 3584 .. note:: 3585 3586 To enable extra features from outside the image recipe, use the 3587 :term:`EXTRA_IMAGE_FEATURES` variable. 3588 3589 For a list of image features that ships with the Yocto Project, see 3590 the ":ref:`ref-features-image`" section. 3591 3592 For an example that shows how to customize your image by using this 3593 variable, see the ":ref:`dev-manual/customizing-images:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``" 3594 section in the Yocto Project Development Tasks Manual. 3595 3596 :term:`IMAGE_FSTYPES` 3597 Specifies the formats the OpenEmbedded build system uses during the 3598 build when creating the root filesystem. For example, setting 3599 :term:`IMAGE_FSTYPES` as follows causes the build system to create root 3600 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: 3601 3602 IMAGE_FSTYPES = "ext3 tar.bz2" 3603 3604 For the complete list of supported image formats from which you can 3605 choose, see :term:`IMAGE_TYPES`. 3606 3607 .. note:: 3608 3609 - If an image recipe uses the "inherit image" line and you are 3610 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set 3611 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line. 3612 3613 - Due to the way the OpenEmbedded build system processes this 3614 variable, you cannot update its contents by using ``:append`` 3615 or ``:prepend``. You must use the ``+=`` operator to add one or 3616 more options to the :term:`IMAGE_FSTYPES` variable. 3617 3618 :term:`IMAGE_INSTALL` 3619 Used by recipes to specify the packages to install into an image 3620 through the :ref:`ref-classes-image` class. Use the 3621 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues. 3622 3623 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to 3624 install into an image through :ref:`ref-classes-image`. Additionally, 3625 there are "helper" classes such as the :ref:`ref-classes-core-image` 3626 class which can take lists used with :term:`IMAGE_FEATURES` and turn 3627 them into auto-generated entries in :term:`IMAGE_INSTALL` in addition 3628 to its default contents. 3629 3630 When you use this variable, it is best to use it as follows:: 3631 3632 IMAGE_INSTALL:append = " package-name" 3633 3634 Be sure to include the space 3635 between the quotation character and the start of the package name or 3636 names. 3637 3638 .. note:: 3639 3640 - When working with a 3641 :ref:`core-image-minimal-initramfs <ref-manual/images:images>` 3642 image, do not use the :term:`IMAGE_INSTALL` variable to specify 3643 packages for installation. Instead, use the 3644 :term:`PACKAGE_INSTALL` variable, which 3645 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a 3646 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`. 3647 For information on creating an :term:`Initramfs`, see the 3648 ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" 3649 section in the Yocto Project Development Tasks Manual. 3650 3651 - Using :term:`IMAGE_INSTALL` with the 3652 :ref:`+= <bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>` 3653 BitBake operator within the ``/conf/local.conf`` file or from 3654 within an image recipe is not recommended. Use of this operator in 3655 these ways can cause ordering issues. Since 3656 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a 3657 default value using the 3658 :ref:`?= <bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>` 3659 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL` 3660 results in unexpected behavior when used within 3661 ``conf/local.conf``. Furthermore, the same operation from within an 3662 image recipe may or may not succeed depending on the specific 3663 situation. In both these cases, the behavior is contrary to how 3664 most users expect the ``+=`` operator to work. 3665 3666 :term:`IMAGE_LINGUAS` 3667 Specifies the list of locales to install into the image during the 3668 root filesystem construction process. The OpenEmbedded build system 3669 automatically splits locale files, which are used for localization, 3670 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable 3671 ensures that any locale packages that correspond to packages already 3672 selected for installation into the image are also installed. Here is 3673 an example:: 3674 3675 IMAGE_LINGUAS = "pt-br de-de" 3676 3677 In this example, the build system ensures any Brazilian Portuguese 3678 and German locale files that correspond to packages in the image are 3679 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as 3680 ``*-locale-pt`` and ``*-locale-de``, since some software packages 3681 only provide locale files by language and not by country-specific 3682 language). 3683 3684 See the :term:`GLIBC_GENERATE_LOCALES` 3685 variable for information on generating GLIBC locales. 3686 3687 3688 :term:`IMAGE_LINK_NAME` 3689 The name of the output image symlink (which does not include 3690 the version part as :term:`IMAGE_NAME` does). The default value 3691 is derived using the :term:`IMAGE_BASENAME` and 3692 :term:`IMAGE_MACHINE_SUFFIX` variables:: 3693 3694 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}" 3695 3696 .. note:: 3697 3698 It is possible to set this to "" to disable symlink creation, 3699 however, you also need to set :term:`IMAGE_NAME` to still have 3700 a reasonable value e.g.:: 3701 3702 IMAGE_LINK_NAME = "" 3703 IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" 3704 3705 :term:`IMAGE_MACHINE_SUFFIX` 3706 Specifies the by default machine-specific suffix for image file names 3707 (before the extension). The default value is set as follows:: 3708 3709 IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}" 3710 3711 The default :term:`DEPLOY_DIR_IMAGE` already has a :term:`MACHINE` 3712 subdirectory, so you may find it unnecessary to also include this suffix 3713 in the name of every image file. If you prefer to remove the suffix you 3714 can set this variable to an empty string:: 3715 3716 IMAGE_MACHINE_SUFFIX = "" 3717 3718 (Not to be confused with :term:`IMAGE_NAME_SUFFIX`.) 3719 3720 :term:`IMAGE_MANIFEST` 3721 The manifest file for the image. This file lists all the installed 3722 packages that make up the image. The file contains package 3723 information on a line-per-package basis as follows:: 3724 3725 packagename packagearch version 3726 3727 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest 3728 file as follows:: 3729 3730 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" 3731 3732 The location is 3733 derived using the :term:`IMGDEPLOYDIR` 3734 and :term:`IMAGE_NAME` variables. You can find 3735 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`" 3736 section in the Yocto Project Overview and Concepts Manual. 3737 3738 :term:`IMAGE_NAME` 3739 The name of the output image files minus the extension. By default 3740 this variable is set using the :term:`IMAGE_LINK_NAME`, and 3741 :term:`IMAGE_VERSION_SUFFIX` variables:: 3742 3743 IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}" 3744 3745 :term:`IMAGE_NAME_SUFFIX` 3746 Suffix used for the image output filename --- defaults to ``".rootfs"`` 3747 to distinguish the image file from other files created during image 3748 building; however if this suffix is redundant or not desired you can 3749 clear the value of this variable (set the value to ""). For example, 3750 this is typically cleared in :term:`Initramfs` image recipes. 3751 3752 :term:`IMAGE_OVERHEAD_FACTOR` 3753 Defines a multiplier that the build system applies to the initial 3754 image size for cases when the multiplier times the returned disk 3755 usage value for the image is greater than the sum of 3756 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of 3757 the multiplier applied to the initial image size creates free disk 3758 space in the image as overhead. By default, the build process uses a 3759 multiplier of 1.3 for this variable. This default value results in 3760 30% free disk space added to the image when this method is used to 3761 determine the final generated image size. You should be aware that 3762 post install scripts and the package management system uses disk 3763 space inside this overhead area. Consequently, the multiplier does 3764 not produce an image with all the theoretical free disk space. See 3765 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system 3766 determines the overall image size. 3767 3768 The default 30% free disk space typically gives the image enough room 3769 to boot and allows for basic post installs while still leaving a 3770 small amount of free disk space. If 30% free space is inadequate, you 3771 can increase the default value. For example, the following setting 3772 gives you 50% free space added to the image:: 3773 3774 IMAGE_OVERHEAD_FACTOR = "1.5" 3775 3776 Alternatively, you can ensure a specific amount of free disk space is 3777 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE` 3778 variable. 3779 3780 :term:`IMAGE_PKGTYPE` 3781 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the 3782 OpenEmbedded build system. The variable is defined appropriately by 3783 the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`, 3784 or :ref:`ref-classes-package_ipk` class. 3785 3786 The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image` 3787 classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs. 3788 3789 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the 3790 variable is set indirectly through the appropriate 3791 :ref:`package_* <ref-classes-package>` class using the 3792 :term:`PACKAGE_CLASSES` variable. The 3793 OpenEmbedded build system uses the first package type (e.g. DEB, RPM, 3794 or IPK) that appears with the variable 3795 3796 .. note:: 3797 3798 Files using the ``.tar`` format are never used as a substitute 3799 packaging format for DEB, RPM, and IPK formatted files for your image 3800 or SDK. 3801 3802 :term:`IMAGE_POSTPROCESS_COMMAND` 3803 Specifies a list of functions to call once the OpenEmbedded build 3804 system creates the final image output files. You can specify 3805 functions separated by spaces:: 3806 3807 IMAGE_POSTPROCESS_COMMAND += "function" 3808 3809 If you need to pass the root filesystem path to a command within the 3810 function, you can use ``${IMAGE_ROOTFS}``, which points to the 3811 directory that becomes the root filesystem image. See the 3812 :term:`IMAGE_ROOTFS` variable for more 3813 information. 3814 3815 :term:`IMAGE_PREPROCESS_COMMAND` 3816 Specifies a list of functions to call before the OpenEmbedded build 3817 system creates the final image output files. You can specify 3818 functions separated by spaces:: 3819 3820 IMAGE_PREPROCESS_COMMAND += "function" 3821 3822 If you need to pass the root filesystem path to a command within the 3823 function, you can use ``${IMAGE_ROOTFS}``, which points to the 3824 directory that becomes the root filesystem image. See the 3825 :term:`IMAGE_ROOTFS` variable for more 3826 information. 3827 3828 :term:`IMAGE_ROOTFS` 3829 The location of the root filesystem while it is under construction 3830 (i.e. during the :ref:`ref-tasks-rootfs` task). This 3831 variable is not configurable. Do not change it. 3832 3833 :term:`IMAGE_ROOTFS_ALIGNMENT` 3834 Specifies the alignment for the output image file in Kbytes. If the 3835 size of the image is not a multiple of this value, then the size is 3836 rounded up to the nearest multiple of the value. The default value is 3837 "1". See :term:`IMAGE_ROOTFS_SIZE` for 3838 additional information. 3839 3840 :term:`IMAGE_ROOTFS_EXTRA_SPACE` 3841 Defines additional free disk space created in the image in Kbytes. By 3842 default, this variable is set to "0". This free disk space is added 3843 to the image after the build system determines the image size as 3844 described in :term:`IMAGE_ROOTFS_SIZE`. 3845 3846 This variable is particularly useful when you want to ensure that a 3847 specific amount of free disk space is available on a device after an 3848 image is installed and running. For example, to be sure 5 Gbytes of 3849 free disk space is available, set the variable as follows:: 3850 3851 IMAGE_ROOTFS_EXTRA_SPACE = "5242880" 3852 3853 For example, the Yocto Project Build Appliance specifically requests 3854 40 Gbytes of extra space with the line:: 3855 3856 IMAGE_ROOTFS_EXTRA_SPACE = "41943040" 3857 3858 :term:`IMAGE_ROOTFS_SIZE` 3859 Defines the size in Kbytes for the generated image. The OpenEmbedded 3860 build system determines the final size for the generated image using 3861 an algorithm that takes into account the initial disk space used for 3862 the generated image, a requested size for the image, and requested 3863 additional free disk space to be added to the image. Programatically, 3864 the build system determines the final size of the generated image as 3865 follows:: 3866 3867 if (image-du * overhead) < rootfs-size: 3868 internal-rootfs-size = rootfs-size + xspace 3869 else: 3870 internal-rootfs-size = (image-du * overhead) + xspace 3871 where: 3872 image-du = Returned value of the du command on the image. 3873 overhead = IMAGE_OVERHEAD_FACTOR 3874 rootfs-size = IMAGE_ROOTFS_SIZE 3875 internal-rootfs-size = Initial root filesystem size before any modifications. 3876 xspace = IMAGE_ROOTFS_EXTRA_SPACE 3877 3878 See the :term:`IMAGE_OVERHEAD_FACTOR` 3879 and :term:`IMAGE_ROOTFS_EXTRA_SPACE` 3880 variables for related information. 3881 3882 :term:`IMAGE_TYPEDEP` 3883 Specifies a dependency from one image type on another. Here is an 3884 example from the :ref:`ref-classes-image-live` class:: 3885 3886 IMAGE_TYPEDEP:live = "ext3" 3887 3888 In the previous example, the variable ensures that when "live" is 3889 listed with the :term:`IMAGE_FSTYPES` variable, 3890 the OpenEmbedded build system produces an ``ext3`` image first since 3891 one of the components of the live image is an ``ext3`` formatted 3892 partition containing the root filesystem. 3893 3894 :term:`IMAGE_TYPES` 3895 Specifies the complete list of supported image types by default: 3896 3897 - btrfs 3898 - container 3899 - cpio 3900 - cpio.gz 3901 - cpio.lz4 3902 - cpio.lzma 3903 - cpio.xz 3904 - cramfs 3905 - erofs 3906 - erofs-lz4 3907 - erofs-lz4hc 3908 - ext2 3909 - ext2.bz2 3910 - ext2.gz 3911 - ext2.lzma 3912 - ext3 3913 - ext3.gz 3914 - ext4 3915 - ext4.gz 3916 - f2fs 3917 - hddimg 3918 - iso 3919 - jffs2 3920 - jffs2.sum 3921 - multiubi 3922 - squashfs 3923 - squashfs-lz4 3924 - squashfs-lzo 3925 - squashfs-xz 3926 - tar 3927 - tar.bz2 3928 - tar.gz 3929 - tar.lz4 3930 - tar.xz 3931 - tar.zst 3932 - ubi 3933 - ubifs 3934 - wic 3935 - wic.bz2 3936 - wic.gz 3937 - wic.lzma 3938 3939 For more information about these types of images, see 3940 ``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`. 3941 3942 :term:`IMAGE_VERSION_SUFFIX` 3943 Version suffix that is part of the default :term:`IMAGE_NAME` and 3944 :term:`KERNEL_ARTIFACT_NAME` values. 3945 Defaults to ``"-${DATETIME}"``, however you could set this to a 3946 version string that comes from your external build environment if 3947 desired, and this suffix would then be used consistently across 3948 the build artifacts. 3949 3950 :term:`IMGDEPLOYDIR` 3951 When inheriting the :ref:`ref-classes-image` class directly or 3952 through the :ref:`ref-classes-core-image` class, the 3953 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files 3954 that is set in the ``image`` class as follows:: 3955 3956 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" 3957 3958 Recipes inheriting the :ref:`ref-classes-image` class should copy 3959 files to be deployed into :term:`IMGDEPLOYDIR`, and the class will take 3960 care of copying them into :term:`DEPLOY_DIR_IMAGE` afterwards. 3961 3962 :term:`INCOMPATIBLE_LICENSE` 3963 Specifies a space-separated list of license names (as they would 3964 appear in :term:`LICENSE`) that should be excluded 3965 from the build (if set globally), or from an image (if set locally 3966 in an image recipe). 3967 3968 When the variable is set globally, recipes that provide no alternatives to listed 3969 incompatible licenses are not built. Packages that are individually 3970 licensed with the specified incompatible licenses will be deleted. 3971 Most of the time this does not allow a feasible build (because it becomes impossible 3972 to satisfy build time dependencies), so the recommended way to 3973 implement license restrictions is to set the variable in specific 3974 image recipes where the restrictions must apply. That way there 3975 are no build time restrictions, but the license check is still 3976 performed when the image's filesystem is assembled from packages. 3977 3978 There is some support for wildcards in this variable's value, 3979 however it is restricted to specific licenses. Currently only 3980 these wildcards are allowed and expand as follows: 3981 3982 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later`` 3983 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later`` 3984 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later`` 3985 3986 .. note:: 3987 3988 This functionality is only regularly tested using the following 3989 setting:: 3990 3991 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" 3992 3993 3994 Although you can use other settings, you might be required to 3995 remove dependencies on (or provide alternatives to) components that 3996 are required to produce a functional system image. 3997 3998 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` 3999 Specifies a space-separated list of package and license pairs that 4000 are allowed to be used even if the license is specified in 4001 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are 4002 separated using a colon. Example:: 4003 4004 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only" 4005 4006 :term:`INHERIT` 4007 Causes the named class or classes to be inherited globally. Anonymous 4008 functions in the class or classes are not executed for the base 4009 configuration and in each individual recipe. The OpenEmbedded build 4010 system ignores changes to :term:`INHERIT` in individual recipes. 4011 Classes inherited using :term:`INHERIT` must be located in the 4012 ``classes-global/`` or ``classes/`` subdirectories. 4013 4014 For more information on :term:`INHERIT`, see the 4015 :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`" 4016 section in the BitBake User Manual. 4017 4018 :term:`INHERIT_DISTRO` 4019 Lists classes that will be inherited at the distribution level. It is 4020 unlikely that you want to edit this variable. 4021 4022 Classes specified in :term:`INHERIT_DISTRO` must be located in the 4023 ``classes-global/`` or ``classes/`` subdirectories. 4024 4025 The default value of the variable is set as follows in the 4026 ``meta/conf/distro/defaultsetup.conf`` file:: 4027 4028 INHERIT_DISTRO ?= "debian devshell sstate license" 4029 4030 :term:`INHIBIT_DEFAULT_DEPS` 4031 Prevents the default dependencies, namely the C compiler and standard 4032 C library (libc), from being added to :term:`DEPENDS`. 4033 This variable is usually used within recipes that do not require any 4034 compilation using the C compiler. 4035 4036 Set the variable to "1" to prevent the default dependencies from 4037 being added. 4038 4039 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` 4040 Prevents the OpenEmbedded build system from splitting out debug 4041 information during packaging. By default, the build system splits out 4042 debugging information during the 4043 :ref:`ref-tasks-package` task. For more information on 4044 how debug information is split out, see the 4045 :term:`PACKAGE_DEBUG_SPLIT_STYLE` 4046 variable. 4047 4048 To prevent the build system from splitting out debug information 4049 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as 4050 follows:: 4051 4052 INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 4053 4054 :term:`INHIBIT_PACKAGE_STRIP` 4055 If set to "1", causes the build to not strip binaries in resulting 4056 packages and prevents the ``-dbg`` package from containing the source 4057 files. 4058 4059 By default, the OpenEmbedded build system strips binaries and puts 4060 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``. 4061 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you 4062 plan to debug in general. 4063 4064 :term:`INHIBIT_SYSROOT_STRIP` 4065 If set to "1", causes the build to not strip binaries in the 4066 resulting sysroot. 4067 4068 By default, the OpenEmbedded build system strips binaries in the 4069 resulting sysroot. When you specifically set the 4070 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit 4071 this stripping. 4072 4073 If you want to use this variable, include the :ref:`ref-classes-staging` 4074 class. This class uses a ``sys_strip()`` function to test for the variable 4075 and acts accordingly. 4076 4077 .. note:: 4078 4079 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and 4080 special circumstances. For example, suppose you are building 4081 bare-metal firmware by using an external GCC toolchain. Furthermore, 4082 even if the toolchain's binaries are strippable, there are other files 4083 needed for the build that are not strippable. 4084 4085 :term:`INIT_MANAGER` 4086 Specifies the system init manager to use. Available options are: 4087 4088 - ``sysvinit`` 4089 - ``systemd`` 4090 - ``mdev-busybox`` 4091 4092 With ``sysvinit``, the init manager is set to 4093 :wikipedia:`SysVinit <Init#SysV-style>`, the traditional UNIX init 4094 system. This is the default choice in the Poky distribution, together with 4095 the Udev device manager (see the ":ref:`device-manager`" section). 4096 4097 With ``systemd``, the init manager becomes :wikipedia:`systemd <Systemd>`, 4098 which comes with the :wikipedia:`udev <Udev>` device manager. 4099 4100 With ``mdev-busybox``, the init manager becomes the much simpler BusyBox 4101 init, together with the BusyBox mdev device manager. This is the simplest 4102 and lightest solution, and probably the best choice for low-end systems 4103 with a rather slow CPU and a limited amount of RAM. 4104 4105 More concretely, this is used to include 4106 ``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global 4107 configuration. You can have a look at the 4108 :yocto_git:`meta/conf/distro/include/init-manager-*.inc </poky/tree/meta/conf/distro/include>` 4109 files for more information, and also the ":ref:`init-manager`" 4110 section in the Yocto Project Development Tasks Manual. 4111 4112 :term:`INITRAMFS_DEPLOY_DIR_IMAGE` 4113 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` 4114 where the :term:`INITRAMFS_IMAGE` will be fetched from. This variable is 4115 set by default to ``${DEPLOY_DIR_IMAGE}`` in the 4116 :ref:`ref-classes-kernel` class and it's only meant to be changed when 4117 building an :term:`Initramfs` image from a separate multiconfig via 4118 :term:`INITRAMFS_MULTICONFIG`. 4119 4120 :term:`INITRAMFS_FSTYPES` 4121 Defines the format for the output image of an initial RAM filesystem 4122 (:term:`Initramfs`), which is used during boot. Supported formats are the 4123 same as those supported by the 4124 :term:`IMAGE_FSTYPES` variable. 4125 4126 The default value of this variable, which is set in the 4127 ``meta/conf/bitbake.conf`` configuration file in the 4128 :term:`Source Directory`, is "cpio.gz". The Linux kernel's 4129 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem 4130 :wikipedia:`initrd <Initrd>` mechanism, expects 4131 an optionally compressed cpio archive. 4132 4133 :term:`INITRAMFS_IMAGE` 4134 Specifies the :term:`PROVIDES` name of an image 4135 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`) 4136 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an 4137 additional recipe to be built as a dependency to whatever root 4138 filesystem recipe you might be using (e.g. ``core-image-sato``). The 4139 :term:`Initramfs` image recipe you provide should set 4140 :term:`IMAGE_FSTYPES` to 4141 :term:`INITRAMFS_FSTYPES`. 4142 4143 An :term:`Initramfs` image provides a temporary root filesystem used for 4144 early system initialization (e.g. loading of modules needed to locate 4145 and mount the "real" root filesystem). 4146 4147 .. note:: 4148 4149 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb`` 4150 recipe in the :term:`Source Directory` 4151 for an example :term:`Initramfs` recipe. To select this sample recipe as 4152 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE` 4153 to "core-image-minimal-initramfs". 4154 4155 You can also find more information by referencing the 4156 ``meta-poky/conf/templates/default/local.conf.sample.extended`` 4157 configuration file in the Source Directory, the :ref:`ref-classes-image` 4158 class, and the :ref:`ref-classes-kernel` class to see how to use the 4159 :term:`INITRAMFS_IMAGE` variable. 4160 4161 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no 4162 :term:`Initramfs` image is built. 4163 4164 For more information, you can also see the 4165 :term:`INITRAMFS_IMAGE_BUNDLE` 4166 variable, which allows the generated image to be bundled inside the 4167 kernel image. Additionally, for information on creating an :term:`Initramfs` 4168 image, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section 4169 in the Yocto Project Development Tasks Manual. 4170 4171 :term:`INITRAMFS_IMAGE_BUNDLE` 4172 Controls whether or not the image recipe specified by 4173 :term:`INITRAMFS_IMAGE` is run through an 4174 extra pass 4175 (:ref:`ref-tasks-bundle_initramfs`) during 4176 kernel compilation in order to build a single binary that contains 4177 both the kernel image and the initial RAM filesystem (:term:`Initramfs`) 4178 image. This makes use of the 4179 :term:`CONFIG_INITRAMFS_SOURCE` kernel 4180 feature. 4181 4182 .. note:: 4183 4184 Bundling the :term:`Initramfs` with the kernel conflates the code in the 4185 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2 4186 compatible software may be part of a bundled :term:`Initramfs`. 4187 4188 .. note:: 4189 4190 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a 4191 circular dependency between the kernel recipe and the :term:`Initramfs` 4192 recipe should the :term:`Initramfs` include kernel modules. Should that be 4193 the case, the :term:`Initramfs` recipe depends on the kernel for the 4194 kernel modules, and the kernel depends on the :term:`Initramfs` recipe 4195 since the :term:`Initramfs` is bundled inside the kernel image. 4196 4197 The combined binary is deposited into the ``tmp/deploy`` directory, 4198 which is part of the :term:`Build Directory`. 4199 4200 Setting the variable to "1" in a configuration file causes the 4201 OpenEmbedded build system to generate a kernel image with the 4202 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within:: 4203 4204 INITRAMFS_IMAGE_BUNDLE = "1" 4205 4206 By default, the :ref:`ref-classes-kernel` class sets this variable to a 4207 null string as follows:: 4208 4209 INITRAMFS_IMAGE_BUNDLE ?= "" 4210 4211 .. note:: 4212 4213 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a 4214 configuration file. You cannot set the variable in a recipe file. 4215 4216 See the 4217 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>` 4218 file for additional information. Also, for information on creating an 4219 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section 4220 in the Yocto Project Development Tasks Manual. 4221 4222 :term:`INITRAMFS_IMAGE_NAME` 4223 4224 This value needs to stay in sync with :term:`IMAGE_LINK_NAME`, but with 4225 :term:`INITRAMFS_IMAGE` instead of :term:`IMAGE_BASENAME`. The default value 4226 is set as follows: 4227 4228 INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" 4229 4230 That is, if :term:`INITRAMFS_IMAGE` is set, the value of 4231 :term:`INITRAMFS_IMAGE_NAME` will be set based upon 4232 :term:`INITRAMFS_IMAGE` and :term:`IMAGE_MACHINE_SUFFIX`. 4233 4234 4235 :term:`INITRAMFS_LINK_NAME` 4236 The link name of the initial RAM filesystem image. This variable is 4237 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as 4238 follows:: 4239 4240 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" 4241 4242 The value of the 4243 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same 4244 file, has the following value:: 4245 4246 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 4247 4248 See the :term:`MACHINE` variable for additional 4249 information. 4250 4251 :term:`INITRAMFS_MULTICONFIG` 4252 Defines the multiconfig to create a multiconfig dependency to be used by 4253 the :ref:`ref-classes-kernel` class. 4254 4255 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from 4256 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`. 4257 4258 For more information on how to bundle an :term:`Initramfs` image from a separate 4259 multiconfig see the ":ref:`dev-manual/building:Bundling an Initramfs Image From a Separate Multiconfig`" 4260 section in the Yocto Project Development Tasks Manual. 4261 4262 :term:`INITRAMFS_NAME` 4263 The base name of the initial RAM filesystem image. This variable is 4264 set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as 4265 follows:: 4266 4267 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" 4268 4269 See :term:`KERNEL_ARTIFACT_NAME` for additional information. 4270 4271 :term:`INITRD` 4272 Indicates list of filesystem images to concatenate and use as an 4273 initial RAM disk (``initrd``). 4274 4275 The :term:`INITRD` variable is an optional variable used with the 4276 :ref:`ref-classes-image-live` class. 4277 4278 :term:`INITRD_IMAGE` 4279 When building a "live" bootable image (i.e. when 4280 :term:`IMAGE_FSTYPES` contains "live"), 4281 :term:`INITRD_IMAGE` specifies the image recipe that should be built to 4282 provide the initial RAM disk image. The default value is 4283 "core-image-minimal-initramfs". 4284 4285 See the :ref:`ref-classes-image-live` class for more information. 4286 4287 :term:`INITSCRIPT_NAME` 4288 The filename of the initialization script as installed to 4289 ``${sysconfdir}/init.d``. 4290 4291 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. 4292 The variable is mandatory. 4293 4294 :term:`INITSCRIPT_PACKAGES` 4295 A list of the packages that contain initscripts. If multiple packages 4296 are specified, you need to append the package name to the other 4297 ``INITSCRIPT_*`` as an override. 4298 4299 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`. 4300 The variable is optional and defaults to the :term:`PN` 4301 variable. 4302 4303 :term:`INITSCRIPT_PARAMS` 4304 Specifies the options to pass to ``update-rc.d``. Here is an example:: 4305 4306 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." 4307 4308 In this example, the script has a runlevel of 99, starts the script 4309 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6. 4310 4311 The variable's default value is "defaults", which is set in the 4312 :ref:`ref-classes-update-rc.d` class. 4313 4314 The value in :term:`INITSCRIPT_PARAMS` is passed through to the 4315 ``update-rc.d`` command. For more information on valid parameters, 4316 please see the ``update-rc.d`` manual page at 4317 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html 4318 4319 :term:`INSANE_SKIP` 4320 Specifies the QA checks to skip for a specific package within a 4321 recipe. For example, to skip the check for symbolic link ``.so`` 4322 files in the main package of a recipe, add the following to the 4323 recipe. The package name override must be used, which in this example 4324 is ``${PN}``:: 4325 4326 INSANE_SKIP:${PN} += "dev-so" 4327 4328 See the ":ref:`ref-classes-insane`" section for a 4329 list of the valid QA checks you can specify using this variable. 4330 4331 :term:`INSTALL_TIMEZONE_FILE` 4332 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file. 4333 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the 4334 configuration level to disable this behavior. 4335 4336 :term:`IPK_FEED_URIS` 4337 When the IPK backend is in use and package management is enabled on 4338 the target, you can use this variable to set up ``opkg`` in the 4339 target image to point to package feeds on a nominated server. Once 4340 the feed is established, you can perform installations or upgrades 4341 using the package manager at runtime. 4342 4343 :term:`KARCH` 4344 Defines the kernel architecture used when assembling the 4345 configuration. Architectures supported for this release are: 4346 4347 - powerpc 4348 - i386 4349 - x86_64 4350 - arm 4351 - qemu 4352 - mips 4353 4354 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`. 4355 4356 :term:`KBRANCH` 4357 A regular expression used by the build process to explicitly identify 4358 the kernel branch that is validated, patched, and configured during a 4359 build. You must set this variable to ensure the exact kernel branch 4360 you want is being used by the build process. 4361 4362 Values for this variable are set in the kernel's recipe file and the 4363 kernel's append file. For example, if you are using the 4364 ``linux-yocto_4.12`` kernel, the kernel recipe file is the 4365 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH` 4366 is set as follows in that kernel recipe file:: 4367 4368 KBRANCH ?= "standard/base" 4369 4370 This variable is also used from the kernel's append file to identify 4371 the kernel branch specific to a particular machine or target 4372 hardware. Continuing with the previous kernel example, the kernel's 4373 append file is located in the 4374 BSP layer for a given machine. For example, the append file for the 4375 Beaglebone and generic versions of both 32 and 64-bit IA 4376 machines (``meta-yocto-bsp``) is named 4377 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.1.bbappend``. 4378 Here are the related statements from that append file:: 4379 4380 KBRANCH:genericx86 = "v6.1/standard/base" 4381 KBRANCH:genericx86-64 = "v6.1/standard/base" 4382 KBRANCH:beaglebone-yocto = "v6.1/standard/beaglebone" 4383 4384 The :term:`KBRANCH` statements 4385 identify the kernel branch to use when building for each supported 4386 BSP. 4387 4388 :term:`KBUILD_DEFCONFIG` 4389 When used with the :ref:`ref-classes-kernel-yocto` 4390 class, specifies an "in-tree" kernel configuration file for use 4391 during a kernel build. 4392 4393 Typically, when using a ``defconfig`` to configure a kernel during a 4394 build, you place the file in your layer in the same manner as you 4395 would place patch files and configuration fragment files (i.e. 4396 "out-of-tree"). However, if you want to use a ``defconfig`` file that 4397 is part of the kernel tree (i.e. "in-tree"), you can use the 4398 :term:`KBUILD_DEFCONFIG` variable and append the 4399 :term:`KMACHINE` variable to point to the 4400 ``defconfig`` file. 4401 4402 To use the variable, set it in the append file for your kernel recipe 4403 using the following form:: 4404 4405 KBUILD_DEFCONFIG:<machine> ?= "defconfig_file" 4406 4407 Here is an example from a "raspberrypi2" :term:`MACHINE` build that uses 4408 a ``defconfig`` file named "bcm2709_defconfig":: 4409 4410 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig" 4411 4412 As an alternative, you can use the following within your append file:: 4413 4414 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file" 4415 4416 For more 4417 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the 4418 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" 4419 section in the Yocto Project Linux Kernel Development Manual. 4420 4421 :term:`KCONFIG_MODE` 4422 When used with the :ref:`ref-classes-kernel-yocto` 4423 class, specifies the kernel configuration values to use for options 4424 not specified in the provided ``defconfig`` file. Valid options are:: 4425 4426 KCONFIG_MODE = "alldefconfig" 4427 KCONFIG_MODE = "allnoconfig" 4428 4429 In ``alldefconfig`` mode the options not explicitly specified will be 4430 assigned their Kconfig default value. In ``allnoconfig`` mode the 4431 options not explicitly specified will be disabled in the kernel 4432 config. 4433 4434 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where 4435 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file 4436 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed 4437 in ``${WORKDIR}`` through a meta-layer will be handled in 4438 ``allnoconfig`` mode. 4439 4440 An "in-tree" ``defconfig`` file can be selected via the 4441 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to 4442 be explicitly set. 4443 4444 A ``defconfig`` file compatible with ``allnoconfig`` mode can be 4445 generated by copying the ``.config`` file from a working Linux kernel 4446 build, renaming it to ``defconfig`` and placing it into the Linux 4447 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does 4448 not need to be explicitly set. 4449 4450 A ``defconfig`` file compatible with ``alldefconfig`` mode can be 4451 generated using the 4452 :ref:`ref-tasks-savedefconfig` 4453 task and placed into the Linux kernel ``${WORKDIR}`` through your 4454 meta-layer. Explicitely set :term:`KCONFIG_MODE`:: 4455 4456 KCONFIG_MODE = "alldefconfig" 4457 4458 :term:`KERNEL_ALT_IMAGETYPE` 4459 Specifies an alternate kernel image type for creation in addition to 4460 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and 4461 :term:`KERNEL_IMAGETYPES` variables. 4462 4463 :term:`KERNEL_ARTIFACT_NAME` 4464 Specifies the name of all of the build artifacts. You can change the 4465 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME` 4466 variable. 4467 4468 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the 4469 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the 4470 following default value:: 4471 4472 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" 4473 4474 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`IMAGE_MACHINE_SUFFIX` 4475 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information. 4476 4477 :term:`KERNEL_CLASSES` 4478 A list of classes defining kernel image types that the 4479 :ref:`ref-classes-kernel` class should inherit. You typically 4480 append this variable to enable extended image types. An example is 4481 ":ref:`ref-classes-kernel-fitimage`", which enables 4482 FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. 4483 You can register custom kernel image types with the 4484 :ref:`ref-classes-kernel` class using this variable. 4485 4486 :term:`KERNEL_DANGLING_FEATURES_WARN_ONLY` 4487 When kernel configuration fragments are missing for some 4488 :term:`KERNEL_FEATURES` specified by layers or BSPs, 4489 building and configuring the kernel stops with an error. 4490 4491 You can turn these errors into warnings by setting the 4492 following in ``conf/local.conf``:: 4493 4494 KERNEL_DANGLING_FEATURES_WARN_ONLY = "1" 4495 4496 You will still be warned that runtime issues may occur, 4497 but at least the kernel configuration and build process will 4498 be allowed to continue. 4499 4500 :term:`KERNEL_DEBUG_TIMESTAMPS` 4501 If set to "1", enables timestamping functionality during building 4502 the kernel. The default is "0" to disable this for reproducibility 4503 reasons. 4504 4505 :term:`KERNEL_DEPLOY_DEPEND` 4506 Provides a means of controlling the dependency of an image recipe 4507 on the kernel. The default value is "virtual/kernel:do_deploy", 4508 however for a small initramfs image or other images that do not 4509 need the kernel, this can be set to "" in the image recipe. 4510 4511 :term:`KERNEL_DEVICETREE` 4512 Specifies the name of the generated Linux kernel device tree (i.e. 4513 the ``.dtb``) file. 4514 4515 .. note:: 4516 4517 There is legacy support for specifying the full path to the device 4518 tree. However, providing just the ``.dtb`` file is preferred. 4519 4520 In order to use this variable, the :ref:`ref-classes-kernel-devicetree` 4521 class must be inherited. 4522 4523 :term:`KERNEL_DEVICETREE_BUNDLE` 4524 When set to "1", this variable allows to bundle the Linux kernel 4525 and the Device Tree Binary together in a single file. 4526 4527 This feature is currently only supported on the "arm" (32 bit) 4528 architecture. 4529 4530 This variable is set to "0" by default by the 4531 :ref:`ref-classes-kernel-devicetree` class. 4532 4533 :term:`KERNEL_DTB_LINK_NAME` 4534 The link name of the kernel device tree binary (DTB). This variable 4535 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as 4536 follows:: 4537 4538 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 4539 4540 The 4541 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in 4542 the same file, has the following value:: 4543 4544 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 4545 4546 See the :term:`MACHINE` variable for additional 4547 information. 4548 4549 :term:`KERNEL_DTB_NAME` 4550 The base name of the kernel device tree binary (DTB). This variable 4551 is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as 4552 follows:: 4553 4554 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" 4555 4556 See :term:`KERNEL_ARTIFACT_NAME` for additional information. 4557 4558 :term:`KERNEL_DTBDEST` 4559 This variable, used by the :ref:`ref-classes-kernel-devicetree` 4560 class, allows to change the installation directory of the DTB 4561 (Device Tree Binary) files. 4562 4563 It is set by default to "${KERNEL_IMAGEDEST}" by the 4564 :ref:`ref-classes-kernel` class. 4565 4566 :term:`KERNEL_DTBVENDORED` 4567 This variable, used by the :ref:`ref-classes-kernel-devicetree`, 4568 allows to ignore vendor subdirectories when installing DTB 4569 (Device Tree Binary) files, when it is set to "false". 4570 4571 To keep vendor subdirectories, set this variable to "true". 4572 4573 It is set by default to "false" by the :ref:`ref-classes-kernel` class. 4574 4575 :term:`KERNEL_DTC_FLAGS` 4576 Specifies the ``dtc`` flags that are passed to the Linux kernel build 4577 system when generating the device trees (via ``DTC_FLAGS`` environment 4578 variable). 4579 4580 In order to use this variable, the :ref:`ref-classes-kernel-devicetree` 4581 class must be inherited. 4582 4583 :term:`KERNEL_EXTRA_ARGS` 4584 Specifies additional ``make`` command-line arguments the OpenEmbedded 4585 build system passes on when compiling the kernel. 4586 4587 :term:`KERNEL_FEATURES` 4588 Includes additional kernel metadata. In the OpenEmbedded build 4589 system, the default Board Support Packages (BSPs) 4590 :term:`Metadata` is provided through the 4591 :term:`KMACHINE` and :term:`KBRANCH` 4592 variables. You can use the :term:`KERNEL_FEATURES` variable from within 4593 the kernel recipe or kernel append file to further add metadata for 4594 all BSPs or specific BSPs. 4595 4596 The metadata you add through this variable includes config fragments 4597 and features descriptions, which usually includes patches as well as 4598 config fragments. You typically override the :term:`KERNEL_FEATURES` 4599 variable for a specific machine. In this way, you can provide 4600 validated, but optional, sets of kernel configurations and features. 4601 4602 For example, the following example from the ``linux-yocto-rt_4.12`` 4603 kernel recipe adds "netfilter" and "taskstats" features to all BSPs 4604 as well as "virtio" configurations to all QEMU machines. The last two 4605 statements add specific configurations to targeted machine types:: 4606 4607 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" 4608 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" 4609 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc" 4610 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc" 4611 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc" 4612 4613 :term:`KERNEL_FIT_LINK_NAME` 4614 The link name of the kernel flattened image tree (FIT) image. This 4615 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` 4616 file as follows:: 4617 4618 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 4619 4620 The value of the 4621 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same 4622 file, has the following value:: 4623 4624 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 4625 4626 See the :term:`MACHINE` variable for additional 4627 information. 4628 4629 :term:`KERNEL_FIT_NAME` 4630 The base name of the kernel flattened image tree (FIT) image. This 4631 variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` 4632 file as follows:: 4633 4634 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" 4635 4636 See :term:`KERNEL_ARTIFACT_NAME` for additional information. 4637 4638 :term:`KERNEL_IMAGE_LINK_NAME` 4639 The link name for the kernel image. This variable is set in the 4640 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: 4641 4642 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 4643 4644 The value of 4645 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same 4646 file, has the following value:: 4647 4648 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 4649 4650 See the :term:`MACHINE` variable for additional 4651 information. 4652 4653 :term:`KERNEL_IMAGE_MAXSIZE` 4654 Specifies the maximum size of the kernel image file in kilobytes. If 4655 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is 4656 checked against the set value during the 4657 :ref:`ref-tasks-sizecheck` task. The task fails if 4658 the kernel image file is larger than the setting. 4659 4660 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a 4661 limited amount of space in which the kernel image must be stored. 4662 4663 By default, this variable is not set, which means the size of the 4664 kernel image is not checked. 4665 4666 :term:`KERNEL_IMAGE_NAME` 4667 The base name of the kernel image. This variable is set in the 4668 ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: 4669 4670 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" 4671 4672 See :term:`KERNEL_ARTIFACT_NAME` for additional information. 4673 4674 :term:`KERNEL_IMAGETYPE` 4675 The type of kernel to build for a device, usually set by the machine 4676 configuration files and defaults to "zImage". This variable is used 4677 when building the kernel and is passed to ``make`` as the target to 4678 build. 4679 4680 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`. 4681 4682 :term:`KERNEL_IMAGETYPES` 4683 Lists additional types of kernel images to build for a device in addition 4684 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the 4685 machine configuration files. 4686 4687 :term:`KERNEL_MODULE_AUTOLOAD` 4688 Lists kernel modules that need to be auto-loaded during boot. 4689 4690 .. note:: 4691 4692 This variable replaces the deprecated :term:`module_autoload` 4693 variable. 4694 4695 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it 4696 can be recognized by the kernel recipe or by an out-of-tree kernel 4697 module recipe (e.g. a machine configuration file, a distribution 4698 configuration file, an append file for the recipe, or the recipe 4699 itself). 4700 4701 Specify it as follows:: 4702 4703 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" 4704 4705 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build 4706 system to populate the ``/etc/modules-load.d/modname.conf`` file with 4707 the list of modules to be auto-loaded on boot. The modules appear 4708 one-per-line in the file. Here is an example of the most common use 4709 case:: 4710 4711 KERNEL_MODULE_AUTOLOAD += "module_name" 4712 4713 For information on how to populate the ``modname.conf`` file with 4714 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable. 4715 4716 :term:`KERNEL_MODULE_PROBECONF` 4717 Provides a list of modules for which the OpenEmbedded build system 4718 expects to find ``module_conf_``\ modname values that specify 4719 configuration for each of the modules. For information on how to 4720 provide those module configurations, see the 4721 :term:`module_conf_* <module_conf>` variable. 4722 4723 :term:`KERNEL_PACKAGE_NAME` 4724 Specifies the base name of the kernel packages, such as "kernel" 4725 in the kernel packages such as "kernel-modules", "kernel-image" and 4726 "kernel-dbg". 4727 4728 The default value for this variable is set to "kernel" by the 4729 :ref:`ref-classes-kernel` class. 4730 4731 :term:`KERNEL_PATH` 4732 The location of the kernel sources. This variable is set to the value 4733 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` 4734 class. For information on how this variable is used, see the 4735 ":ref:`kernel-dev/common:incorporating out-of-tree modules`" 4736 section in the Yocto Project Linux Kernel Development Manual. 4737 4738 To help maximize compatibility with out-of-tree drivers used to build 4739 modules, the OpenEmbedded build system also recognizes and uses the 4740 :term:`KERNEL_SRC` variable, which is identical to 4741 the :term:`KERNEL_PATH` variable. Both variables are common variables 4742 used by external Makefiles to point to the kernel source directory. 4743 4744 :term:`KERNEL_SRC` 4745 The location of the kernel sources. This variable is set to the value 4746 of the :term:`STAGING_KERNEL_DIR` within the :ref:`ref-classes-module` 4747 class. For information on how this variable is used, see the 4748 ":ref:`kernel-dev/common:incorporating out-of-tree modules`" 4749 section in the Yocto Project Linux Kernel Development Manual. 4750 4751 To help maximize compatibility with out-of-tree drivers used to build 4752 modules, the OpenEmbedded build system also recognizes and uses the 4753 :term:`KERNEL_PATH` variable, which is identical 4754 to the :term:`KERNEL_SRC` variable. Both variables are common variables 4755 used by external Makefiles to point to the kernel source directory. 4756 4757 :term:`KERNEL_STRIP` 4758 Allows to specific which ``strip`` command to use to strip the kernel 4759 binary, typically either GNU binutils ``strip`` or ``llvm-strip``. 4760 4761 :term:`KERNEL_VERSION` 4762 Specifies the version of the kernel as extracted from ``version.h`` 4763 or ``utsrelease.h`` within the kernel sources. Effects of setting 4764 this variable do not take effect until the kernel has been 4765 configured. Consequently, attempting to refer to this variable in 4766 contexts prior to configuration will not work. 4767 4768 :term:`KERNELDEPMODDEPEND` 4769 Specifies whether the data referenced through 4770 :term:`PKGDATA_DIR` is needed or not. 4771 :term:`KERNELDEPMODDEPEND` does not control whether or not that data 4772 exists, but simply whether or not it is used. If you do not need to 4773 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your 4774 :term:`Initramfs` recipe. Setting the variable there when the data is not 4775 needed avoids a potential dependency loop. 4776 4777 :term:`KFEATURE_DESCRIPTION` 4778 Provides a short description of a configuration fragment. You use 4779 this variable in the ``.scc`` file that describes a configuration 4780 fragment file. Here is the variable used in a file named ``smp.scc`` 4781 to describe SMP being enabled:: 4782 4783 define KFEATURE_DESCRIPTION "Enable SMP" 4784 4785 :term:`KMACHINE` 4786 The machine as known by the kernel. Sometimes the machine name used 4787 by the kernel does not match the machine name used by the 4788 OpenEmbedded build system. For example, the machine name that the 4789 OpenEmbedded build system understands as ``core2-32-intel-common`` 4790 goes by a different name in the Linux Yocto kernel. The kernel 4791 understands that machine as ``intel-core2-32``. For cases like these, 4792 the :term:`KMACHINE` variable maps the kernel machine name to the 4793 OpenEmbedded build system machine name. 4794 4795 These mappings between different names occur in the Yocto Linux 4796 Kernel's ``meta`` branch. As an example take a look in the 4797 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: 4798 4799 LINUX_VERSION:core2-32-intel-common = "3.19.0" 4800 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}" 4801 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974" 4802 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711" 4803 KMACHINE:core2-32-intel-common = "intel-core2-32" 4804 KBRANCH:core2-32-intel-common = "standard/base" 4805 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}" 4806 4807 The :term:`KMACHINE` statement says 4808 that the kernel understands the machine name as "intel-core2-32". 4809 However, the OpenEmbedded build system understands the machine as 4810 "core2-32-intel-common". 4811 4812 :term:`KTYPE` 4813 Defines the kernel type to be used in assembling the configuration. 4814 The linux-yocto recipes define "standard", "tiny", and "preempt-rt" 4815 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" 4816 section in the 4817 Yocto Project Linux Kernel Development Manual for more information on 4818 kernel types. 4819 4820 You define the :term:`KTYPE` variable in the 4821 :ref:`kernel-dev/advanced:bsp descriptions`. The 4822 value you use must match the value used for the 4823 :term:`LINUX_KERNEL_TYPE` value used by the 4824 kernel recipe. 4825 4826 :term:`LABELS` 4827 Provides a list of targets for automatic configuration. 4828 4829 See the :ref:`ref-classes-grub-efi` class for more 4830 information on how this variable is used. 4831 4832 :term:`LAYERDEPENDS` 4833 Lists the layers, separated by spaces, on which this recipe depends. 4834 Optionally, you can specify a specific layer version for a dependency 4835 by adding it to the end of the layer name. Here is an example:: 4836 4837 LAYERDEPENDS_mylayer = "anotherlayer (=3)" 4838 4839 In this previous example, 4840 version 3 of "anotherlayer" is compared against 4841 :term:`LAYERVERSION`\ ``_anotherlayer``. 4842 4843 An error is produced if any dependency is missing or the version 4844 numbers (if specified) do not match exactly. This variable is used in 4845 the ``conf/layer.conf`` file and must be suffixed with the name of 4846 the specific layer (e.g. ``LAYERDEPENDS_mylayer``). 4847 4848 :term:`LAYERDIR` 4849 When used inside the ``layer.conf`` configuration file, this variable 4850 provides the path of the current layer. This variable is not 4851 available outside of ``layer.conf`` and references are expanded 4852 immediately when parsing of the file completes. 4853 4854 :term:`LAYERDIR_RE` 4855 See :term:`bitbake:LAYERDIR_RE` in the BitBake manual. 4856 4857 :term:`LAYERRECOMMENDS` 4858 Lists the layers, separated by spaces, recommended for use with this 4859 layer. 4860 4861 Optionally, you can specify a specific layer version for a 4862 recommendation by adding the version to the end of the layer name. 4863 Here is an example:: 4864 4865 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" 4866 4867 In this previous example, version 3 of "anotherlayer" is compared 4868 against ``LAYERVERSION_anotherlayer``. 4869 4870 This variable is used in the ``conf/layer.conf`` file and must be 4871 suffixed with the name of the specific layer (e.g. 4872 ``LAYERRECOMMENDS_mylayer``). 4873 4874 :term:`LAYERSERIES_COMPAT` 4875 See :term:`bitbake:LAYERSERIES_COMPAT` in the BitBake manual. 4876 4877 :term:`LAYERVERSION` 4878 Optionally specifies the version of a layer as a single number. You 4879 can use this within :term:`LAYERDEPENDS` for 4880 another layer in order to depend on a specific version of the layer. 4881 This variable is used in the ``conf/layer.conf`` file and must be 4882 suffixed with the name of the specific layer (e.g. 4883 ``LAYERVERSION_mylayer``). 4884 4885 :term:`LD` 4886 The minimal command and arguments used to run the linker. 4887 4888 :term:`LDFLAGS` 4889 Specifies the flags to pass to the linker. This variable is exported 4890 to an environment variable and thus made visible to the software 4891 being built during the compilation step. 4892 4893 Default initialization for :term:`LDFLAGS` varies depending on what is 4894 being built: 4895 4896 - :term:`TARGET_LDFLAGS` when building for the 4897 target 4898 4899 - :term:`BUILD_LDFLAGS` when building for the 4900 build host (i.e. ``-native``) 4901 4902 - :term:`BUILDSDK_LDFLAGS` when building for 4903 an SDK (i.e. ``nativesdk-``) 4904 4905 :term:`LEAD_SONAME` 4906 Specifies the lead (or primary) compiled library file (i.e. ``.so``) 4907 that the :ref:`ref-classes-debian` class applies its 4908 naming policy to given a recipe that packages multiple libraries. 4909 4910 This variable works in conjunction with the :ref:`ref-classes-debian` 4911 class. 4912 4913 :term:`LIC_FILES_CHKSUM` 4914 Checksums of the license text in the recipe source code. 4915 4916 This variable tracks changes in license text of the source code 4917 files. If the license text is changed, it will trigger a build 4918 failure, which gives the developer an opportunity to review any 4919 license change. 4920 4921 This variable must be defined for all recipes (unless 4922 :term:`LICENSE` is set to "CLOSED"). 4923 4924 For more information, see the ":ref:`dev-manual/licenses:tracking license changes`" 4925 section in the Yocto Project Development Tasks Manual. 4926 4927 :term:`LICENSE` 4928 The list of source licenses for the recipe. Follow these rules: 4929 4930 - Do not use spaces within individual license names. 4931 4932 - Separate license names using \| (pipe) when there is a choice 4933 between licenses. 4934 4935 - Separate license names using & (ampersand) when there are 4936 multiple licenses for different parts of the source. 4937 4938 - You can use spaces between license names. 4939 4940 - For standard licenses, use the names of the files in 4941 ``meta/files/common-licenses/`` or the 4942 :term:`SPDXLICENSEMAP` flag names defined in 4943 ``meta/conf/licenses.conf``. 4944 4945 Here are some examples:: 4946 4947 LICENSE = "LGPL-2.1-only | GPL-3.0-only" 4948 LICENSE = "MPL-1.0 & LGPL-2.1-only" 4949 LICENSE = "GPL-2.0-or-later" 4950 4951 The first example is from the 4952 recipes for Qt, which the user may choose to distribute under either 4953 the LGPL version 2.1 or GPL version 3. The second example is from 4954 Cairo where two licenses cover different parts of the source code. 4955 The final example is from ``sysstat``, which presents a single 4956 license. 4957 4958 You can also specify licenses on a per-package basis to handle 4959 situations where components of the output have different licenses. 4960 For example, a piece of software whose code is licensed under GPLv2 4961 but has accompanying documentation licensed under the GNU Free 4962 Documentation License 1.2 could be specified as follows:: 4963 4964 LICENSE = "GFDL-1.2 & GPL-2.0-only" 4965 LICENSE:${PN} = "GPL-2.0.only" 4966 LICENSE:${PN}-doc = "GFDL-1.2" 4967 4968 :term:`LICENSE_CREATE_PACKAGE` 4969 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded 4970 build system to create an extra package (i.e. 4971 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add 4972 those packages to the 4973 :term:`RRECOMMENDS`\ ``:${PN}``. 4974 4975 The ``${PN}-lic`` package installs a directory in 4976 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base 4977 name, and installs files in that directory that contain license and 4978 copyright information (i.e. copies of the appropriate license files 4979 from ``meta/common-licenses`` that match the licenses specified in 4980 the :term:`LICENSE` variable of the recipe metadata 4981 and copies of files marked in 4982 :term:`LIC_FILES_CHKSUM` as containing 4983 license text). 4984 4985 For related information on providing license text, see the 4986 :term:`COPY_LIC_DIRS` variable, the 4987 :term:`COPY_LIC_MANIFEST` variable, and the 4988 ":ref:`dev-manual/licenses:providing license text`" 4989 section in the Yocto Project Development Tasks Manual. 4990 4991 :term:`LICENSE_FLAGS` 4992 Specifies additional flags for a recipe you must allow through 4993 :term:`LICENSE_FLAGS_ACCEPTED` in 4994 order for the recipe to be built. When providing multiple flags, 4995 separate them with spaces. 4996 4997 This value is independent of :term:`LICENSE` and is 4998 typically used to mark recipes that might require additional licenses 4999 in order to be used in a commercial product. For more information, 5000 see the 5001 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" 5002 section in the Yocto Project Development Tasks Manual. 5003 5004 :term:`LICENSE_FLAGS_ACCEPTED` 5005 Lists license flags that when specified in 5006 :term:`LICENSE_FLAGS` within a recipe should not 5007 prevent that recipe from being built. For more information, see the 5008 ":ref:`dev-manual/licenses:enabling commercially licensed recipes`" 5009 section in the Yocto Project Development Tasks Manual. 5010 5011 :term:`LICENSE_FLAGS_DETAILS` 5012 Adds details about a flag in :term:`LICENSE_FLAGS`. This way, 5013 if such a flag is not accepted through :term:`LICENSE_FLAGS_ACCEPTED`, 5014 the error message will be more informative, containing the specified 5015 extra details. 5016 5017 For example, a recipe with an EULA may set:: 5018 5019 LICENSE_FLAGS = "FooBar-EULA" 5020 LICENSE_FLAGS_DETAILS[FooBar-EULA] = "For further details, see https://example.com/eula." 5021 5022 If ``Foobar-EULA`` isn't in :term:`LICENSE_FLAGS_ACCEPTED`, the 5023 error message is more useful:: 5024 5025 Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED. 5026 For further details, see https://example.com/eula. 5027 5028 :term:`LICENSE_PATH` 5029 Path to additional licenses used during the build. By default, the 5030 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the 5031 directory that holds common license text used during the build. The 5032 :term:`LICENSE_PATH` variable allows you to extend that location to other 5033 areas that have additional licenses:: 5034 5035 LICENSE_PATH += "path-to-additional-common-licenses" 5036 5037 :term:`LINUX_KERNEL_TYPE` 5038 Defines the kernel type to be used in assembling the configuration. 5039 The linux-yocto recipes define "standard", "tiny", and "preempt-rt" 5040 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" 5041 section in the 5042 Yocto Project Linux Kernel Development Manual for more information on 5043 kernel types. 5044 5045 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to 5046 "standard". Together with :term:`KMACHINE`, the 5047 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by 5048 the kernel tools to find the appropriate description within the 5049 kernel :term:`Metadata` with which to build out the sources 5050 and configuration. 5051 5052 :term:`LINUX_VERSION` 5053 The Linux version from ``kernel.org`` on which the Linux kernel image 5054 being built using the OpenEmbedded build system is based. You define 5055 this variable in the kernel recipe. For example, the 5056 ``linux-yocto-3.4.bb`` kernel recipe found in 5057 ``meta/recipes-kernel/linux`` defines the variables as follows:: 5058 5059 LINUX_VERSION ?= "3.4.24" 5060 5061 The :term:`LINUX_VERSION` variable is used to define :term:`PV` 5062 for the recipe:: 5063 5064 PV = "${LINUX_VERSION}+git${SRCPV}" 5065 5066 :term:`LINUX_VERSION_EXTENSION` 5067 A string extension compiled into the version string of the Linux 5068 kernel built with the OpenEmbedded build system. You define this 5069 variable in the kernel recipe. For example, the linux-yocto kernel 5070 recipes all define the variable as follows:: 5071 5072 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" 5073 5074 Defining this variable essentially sets the Linux kernel 5075 configuration item ``CONFIG_LOCALVERSION``, which is visible through 5076 the ``uname`` command. Here is an example that shows the extension 5077 assuming it was set as previously shown:: 5078 5079 $ uname -r 5080 3.7.0-rc8-custom 5081 5082 :term:`LOG_DIR` 5083 Specifies the directory to which the OpenEmbedded build system writes 5084 overall log files. The default directory is ``${TMPDIR}/log``. 5085 5086 For the directory containing logs specific to each task, see the 5087 :term:`T` variable. 5088 5089 :term:`MACHINE` 5090 Specifies the target device for which the image is built. You define 5091 :term:`MACHINE` in the ``local.conf`` file found in the 5092 :term:`Build Directory`. By default, :term:`MACHINE` is set to 5093 "qemux86", which is an x86-based architecture machine to be emulated 5094 using QEMU:: 5095 5096 MACHINE ?= "qemux86" 5097 5098 The variable corresponds to a machine configuration file of the same 5099 name, through which machine-specific configurations are set. Thus, 5100 when :term:`MACHINE` is set to "qemux86", the corresponding 5101 ``qemux86.conf`` machine configuration file can be found in 5102 the :term:`Source Directory` in 5103 ``meta/conf/machine``. 5104 5105 The list of machines supported by the Yocto Project as shipped 5106 include the following:: 5107 5108 MACHINE ?= "qemuarm" 5109 MACHINE ?= "qemuarm64" 5110 MACHINE ?= "qemumips" 5111 MACHINE ?= "qemumips64" 5112 MACHINE ?= "qemuppc" 5113 MACHINE ?= "qemux86" 5114 MACHINE ?= "qemux86-64" 5115 MACHINE ?= "genericx86" 5116 MACHINE ?= "genericx86-64" 5117 MACHINE ?= "beaglebone" 5118 5119 The last five are Yocto Project reference hardware 5120 boards, which are provided in the ``meta-yocto-bsp`` layer. 5121 5122 .. note:: 5123 5124 Adding additional Board Support Package (BSP) layers to your 5125 configuration adds new possible settings for :term:`MACHINE`. 5126 5127 :term:`MACHINE_ARCH` 5128 Specifies the name of the machine-specific architecture. This 5129 variable is set automatically from :term:`MACHINE` or 5130 :term:`TUNE_PKGARCH`. You should not hand-edit 5131 the :term:`MACHINE_ARCH` variable. 5132 5133 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` 5134 A list of required machine-specific packages to install as part of 5135 the image being built. The build process depends on these packages 5136 being present. Furthermore, because this is a "machine-essential" 5137 variable, the list of packages are essential for the machine to boot. 5138 The impact of this variable affects images based on 5139 ``packagegroup-core-boot``, including the ``core-image-minimal`` 5140 image. 5141 5142 This variable is similar to the 5143 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception 5144 that the image being built has a build dependency on the variable's 5145 list of packages. In other words, the image will not build if a file 5146 in this list is not found. 5147 5148 As an example, suppose the machine for which you are building 5149 requires ``example-init`` to be run during boot to initialize the 5150 hardware. In this case, you would use the following in the machine's 5151 ``.conf`` configuration file:: 5152 5153 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" 5154 5155 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` 5156 A list of recommended machine-specific packages to install as part of 5157 the image being built. The build process does not depend on these 5158 packages being present. However, because this is a 5159 "machine-essential" variable, the list of packages are essential for 5160 the machine to boot. The impact of this variable affects images based 5161 on ``packagegroup-core-boot``, including the ``core-image-minimal`` 5162 image. 5163 5164 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` 5165 variable with the exception that the image being built does not have 5166 a build dependency on the variable's list of packages. In other 5167 words, the image will still build if a package in this list is not 5168 found. Typically, this variable is used to handle essential kernel 5169 modules, whose functionality may be selected to be built into the 5170 kernel rather than as a module, in which case a package will not be 5171 produced. 5172 5173 Consider an example where you have a custom kernel where a specific 5174 touchscreen driver is required for the machine to be usable. However, 5175 the driver can be built as a module or into the kernel depending on 5176 the kernel configuration. If the driver is built as a module, you 5177 want it to be installed. But, when the driver is built into the 5178 kernel, you still want the build to succeed. This variable sets up a 5179 "recommends" relationship so that in the latter case, the build will 5180 not fail due to the missing package. To accomplish this, assuming the 5181 package for the module was called ``kernel-module-ab123``, you would 5182 use the following in the machine's ``.conf`` configuration file:: 5183 5184 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" 5185 5186 .. note:: 5187 5188 In this example, the ``kernel-module-ab123`` recipe needs to 5189 explicitly set its :term:`PACKAGES` variable to ensure that BitBake 5190 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to 5191 satisfy the dependency. 5192 5193 Some examples of these machine essentials are flash, screen, 5194 keyboard, mouse, or touchscreen drivers (depending on the machine). 5195 5196 :term:`MACHINE_EXTRA_RDEPENDS` 5197 A list of machine-specific packages to install as part of the image 5198 being built that are not essential for the machine to boot. However, 5199 the build process for more fully-featured images depends on the 5200 packages being present. 5201 5202 This variable affects all images based on ``packagegroup-base``, 5203 which does not include the ``core-image-minimal`` or 5204 ``core-image-full-cmdline`` images. 5205 5206 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable 5207 with the exception that the image being built has a build dependency 5208 on the variable's list of packages. In other words, the image will 5209 not build if a file in this list is not found. 5210 5211 An example is a machine that has WiFi capability but is not essential 5212 for the machine to boot the image. However, if you are building a 5213 more fully-featured image, you want to enable the WiFi. The package 5214 containing the firmware for the WiFi hardware is always expected to 5215 exist, so it is acceptable for the build process to depend upon 5216 finding the package. In this case, assuming the package for the 5217 firmware was called ``wifidriver-firmware``, you would use the 5218 following in the ``.conf`` file for the machine:: 5219 5220 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" 5221 5222 :term:`MACHINE_EXTRA_RRECOMMENDS` 5223 A list of machine-specific packages to install as part of the image 5224 being built that are not essential for booting the machine. The image 5225 being built has no build dependency on this list of packages. 5226 5227 This variable affects only images based on ``packagegroup-base``, 5228 which does not include the ``core-image-minimal`` or 5229 ``core-image-full-cmdline`` images. 5230 5231 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable 5232 with the exception that the image being built does not have a build 5233 dependency on the variable's list of packages. In other words, the 5234 image will build if a file in this list is not found. 5235 5236 An example is a machine that has WiFi capability but is not essential 5237 For the machine to boot the image. However, if you are building a 5238 more fully-featured image, you want to enable WiFi. In this case, the 5239 package containing the WiFi kernel module will not be produced if the 5240 WiFi driver is built into the kernel, in which case you still want 5241 the build to succeed instead of failing as a result of the package 5242 not being found. To accomplish this, assuming the package for the 5243 module was called ``kernel-module-examplewifi``, you would use the 5244 following in the ``.conf`` file for the machine:: 5245 5246 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" 5247 5248 :term:`MACHINE_FEATURES` 5249 Specifies the list of hardware features the 5250 :term:`MACHINE` is capable of supporting. For related 5251 information on enabling features, see the 5252 :term:`DISTRO_FEATURES`, 5253 :term:`COMBINED_FEATURES`, and 5254 :term:`IMAGE_FEATURES` variables. 5255 5256 For a list of hardware features supported by the Yocto Project as 5257 shipped, see the ":ref:`ref-features-machine`" section. 5258 5259 :term:`MACHINE_FEATURES_BACKFILL` 5260 A list of space-separated features to be added to 5261 :term:`MACHINE_FEATURES` if not also present in 5262 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`. 5263 5264 This variable is set in the ``meta/conf/bitbake.conf`` file. It is not 5265 intended to be user-configurable. It is best to just reference the 5266 variable to see which machine features are being 5267 :ref:`backfilled <ref-features-backfill>` for all machine configurations. 5268 5269 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` 5270 A list of space-separated features from :term:`MACHINE_FEATURES_BACKFILL` 5271 that should not be :ref:`backfilled <ref-features-backfill>` (i.e. added 5272 to :term:`MACHINE_FEATURES`) during the build. 5273 5274 This corresponds to an opt-out mechanism. When new default machine 5275 features are introduced, machine definition maintainers can review 5276 (`consider`) them and decide to exclude them from the 5277 :ref:`backfilled <ref-features-backfill>` features. Therefore, the 5278 combination of :term:`MACHINE_FEATURES_BACKFILL` and 5279 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` makes it possible to 5280 add new default features without breaking existing machine definitions. 5281 5282 :term:`MACHINEOVERRIDES` 5283 A colon-separated list of overrides that apply to the current 5284 machine. By default, this list includes the value of 5285 :term:`MACHINE`. 5286 5287 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that 5288 should apply to a machine. For example, all machines emulated in QEMU 5289 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named 5290 ``meta/conf/machine/include/qemu.inc`` that prepends the following 5291 override to :term:`MACHINEOVERRIDES`:: 5292 5293 MACHINEOVERRIDES =. "qemuall:" 5294 5295 This 5296 override allows variables to be overridden for all machines emulated 5297 in QEMU, like in the following example from the ``connman-conf`` 5298 recipe:: 5299 5300 SRC_URI:append:qemuall = " file://wired.config \ 5301 file://wired-setup \ 5302 " 5303 5304 The underlying mechanism behind 5305 :term:`MACHINEOVERRIDES` is simply that it is included in the default 5306 value of :term:`OVERRIDES`. 5307 5308 :term:`MAINTAINER` 5309 The email address of the distribution maintainer. 5310 5311 :term:`MESON_BUILDTYPE` 5312 Value of the Meson ``--buildtype`` argument used by the 5313 :ref:`ref-classes-meson` class. It defaults to ``debug`` if 5314 :term:`DEBUG_BUILD` is set to "1", and ``plain`` otherwise. 5315 5316 See `Meson build options <https://mesonbuild.com/Builtin-options.html>`__ 5317 for the values you could set in a recipe. Values such as ``plain``, 5318 ``debug``, ``debugoptimized``, ``release`` and ``minsize`` allow 5319 you to specify the inclusion of debugging symbols and the compiler 5320 optimizations (none, performance or size). 5321 5322 :term:`MESON_TARGET` 5323 A variable for the :ref:`ref-classes-meson` class, allowing to choose 5324 a Meson target to build in :ref:`ref-tasks-compile`. Otherwise, the 5325 default targets are built. 5326 5327 :term:`METADATA_BRANCH` 5328 The branch currently checked out for the OpenEmbedded-Core layer (path 5329 determined by :term:`COREBASE`). 5330 5331 :term:`METADATA_REVISION` 5332 The revision currently checked out for the OpenEmbedded-Core layer (path 5333 determined by :term:`COREBASE`). 5334 5335 :term:`MIME_XDG_PACKAGES` 5336 The current implementation of the :ref:`ref-classes-mime-xdg` 5337 class cannot detect ``.desktop`` files installed through absolute 5338 symbolic links. Use this setting to make the class create post-install 5339 and post-remove scripts for these packages anyway, to invoke the 5340 ``update-destop-database`` command. 5341 5342 :term:`MIRRORS` 5343 Specifies additional paths from which the OpenEmbedded build system 5344 gets source code. When the build system searches for source code, it 5345 first tries the local download directory. If that location fails, the 5346 build system tries locations defined by 5347 :term:`PREMIRRORS`, the upstream source, and then 5348 locations specified by :term:`MIRRORS` in that order. 5349 5350 The default value for :term:`MIRRORS` is defined in the 5351 ``meta/classes-global/mirrors.bbclass`` file in the core metadata layer. 5352 5353 :term:`MLPREFIX` 5354 Specifies a prefix has been added to :term:`PN` to create a 5355 special version of a recipe or package (i.e. a Multilib version). The 5356 variable is used in places where the prefix needs to be added to or 5357 removed from a name (e.g. the :term:`BPN` variable). 5358 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`. 5359 5360 .. note:: 5361 5362 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation 5363 is historical and comes from a time when ":ref:`ref-classes-nativesdk`" 5364 was a suffix rather than a prefix on the recipe name. When 5365 ":ref:`ref-classes-nativesdk`" was turned into a prefix, it made sense 5366 to set :term:`MLPREFIX` for it as well. 5367 5368 To help understand when :term:`MLPREFIX` might be needed, consider when 5369 :term:`BBCLASSEXTEND` is used to provide a :ref:`ref-classes-nativesdk` 5370 version of a recipe in addition to the target version. If that recipe 5371 declares build-time dependencies on tasks in other recipes by using 5372 :term:`DEPENDS`, then a dependency on "foo" will automatically get 5373 rewritten to a dependency on "nativesdk-foo". However, dependencies like 5374 the following will not get rewritten automatically:: 5375 5376 do_foo[depends] += "recipe:do_foo" 5377 5378 If you want such a dependency to also get transformed, you can do the 5379 following:: 5380 5381 do_foo[depends] += "${MLPREFIX}recipe:do_foo" 5382 5383 :term:`module_autoload` 5384 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD` 5385 variable. You should replace all occurrences of :term:`module_autoload` 5386 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example:: 5387 5388 module_autoload_rfcomm = "rfcomm" 5389 5390 should now be replaced with:: 5391 5392 KERNEL_MODULE_AUTOLOAD += "rfcomm" 5393 5394 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information. 5395 5396 :term:`module_conf` 5397 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`__ 5398 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf`` 5399 file. 5400 5401 You can use this variable anywhere that it can be recognized by the 5402 kernel recipe or out-of-tree kernel module recipe (e.g. a machine 5403 configuration file, a distribution configuration file, an append file 5404 for the recipe, or the recipe itself). If you use this variable, you 5405 must also be sure to list the module name in the 5406 :term:`KERNEL_MODULE_PROBECONF` 5407 variable. 5408 5409 Here is the general syntax:: 5410 5411 module_conf_module_name = "modprobe.d-syntax" 5412 5413 You must use the kernel module name override. 5414 5415 Run ``man modprobe.d`` in the shell to find out more information on 5416 the exact syntax you want to provide with :term:`module_conf`. 5417 5418 Including :term:`module_conf` causes the OpenEmbedded build system to 5419 populate the ``/etc/modprobe.d/modname.conf`` file with 5420 ``modprobe.d`` syntax lines. Here is an example that adds the options 5421 ``arg1`` and ``arg2`` to a module named ``mymodule``:: 5422 5423 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" 5424 5425 For information on how to specify kernel modules to auto-load on 5426 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable. 5427 5428 :term:`MODULE_TARBALL_DEPLOY` 5429 Controls creation of the ``modules-*.tgz`` file. Set this variable to 5430 "0" to disable creation of this file, which contains all of the 5431 kernel modules resulting from a kernel build. 5432 5433 :term:`MODULE_TARBALL_LINK_NAME` 5434 The link name of the kernel module tarball. This variable is set in 5435 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: 5436 5437 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" 5438 5439 The value 5440 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the 5441 same file, has the following value:: 5442 5443 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" 5444 5445 See the :term:`MACHINE` variable for additional information. 5446 5447 :term:`MODULE_TARBALL_NAME` 5448 The base name of the kernel module tarball. This variable is set in 5449 the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows:: 5450 5451 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" 5452 5453 See :term:`KERNEL_ARTIFACT_NAME` for additional information. 5454 5455 :term:`MOUNT_BASE` 5456 On non-systemd systems (where ``udev-extraconf`` is being used), 5457 specifies the base directory for auto-mounting filesystems. The 5458 default value is "/run/media". 5459 5460 :term:`MULTIMACH_TARGET_SYS` 5461 Uniquely identifies the type of the target system for which packages 5462 are being built. This variable allows output for different types of 5463 target systems to be put into different subdirectories of the same 5464 output directory. 5465 5466 The default value of this variable is:: 5467 5468 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} 5469 5470 Some classes (e.g. :ref:`ref-classes-cross-canadian`) modify the 5471 :term:`MULTIMACH_TARGET_SYS` value. 5472 5473 See the :term:`STAMP` variable for an example. See the 5474 :term:`STAGING_DIR_TARGET` variable for more information. 5475 5476 :term:`NATIVELSBSTRING` 5477 A string identifying the host distribution. Strings consist of the 5478 host distributor ID followed by the release, as reported by the 5479 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For 5480 example, when running a build on Ubuntu 12.10, the value is 5481 "Ubuntu-12.10". If this information is unable to be determined, the 5482 value resolves to "Unknown". 5483 5484 This variable is used by default to isolate native shared state 5485 packages for different distributions (e.g. to avoid problems with 5486 ``glibc`` version incompatibilities). Additionally, the variable is 5487 checked against 5488 :term:`SANITY_TESTED_DISTROS` if that 5489 variable is set. 5490 5491 :term:`NM` 5492 The minimal command and arguments to run ``nm``. 5493 5494 :term:`NO_GENERIC_LICENSE` 5495 Avoids QA errors when you use a non-common, non-CLOSED license in a 5496 recipe. There are packages, such as the linux-firmware package, with many 5497 licenses that are not in any way common. Also, new licenses are added 5498 occasionally to avoid introducing a lot of common license files, 5499 which are only applicable to a specific package. 5500 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does 5501 not exist in common licenses. 5502 5503 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a 5504 recipe:: 5505 5506 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" 5507 5508 Here is an example that 5509 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched 5510 source:: 5511 5512 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" 5513 5514 :term:`NO_RECOMMENDATIONS` 5515 Prevents installation of all "recommended-only" packages. 5516 Recommended-only packages are packages installed only through the 5517 :term:`RRECOMMENDS` variable). Setting the 5518 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on:: 5519 5520 NO_RECOMMENDATIONS = "1" 5521 5522 You can set this variable globally in your ``local.conf`` file or you 5523 can attach it to a specific image recipe by using the recipe name 5524 override:: 5525 5526 NO_RECOMMENDATIONS:pn-target_image = "1" 5527 5528 It is important to realize that if you choose to not install packages 5529 using this variable and some other packages are dependent on them 5530 (i.e. listed in a recipe's :term:`RDEPENDS` 5531 variable), the OpenEmbedded build system ignores your request and 5532 will install the packages to avoid dependency errors. 5533 5534 .. note:: 5535 5536 Some recommended packages might be required for certain system 5537 functionality, such as kernel modules. It is up to you to add 5538 packages with the :term:`IMAGE_INSTALL` variable. 5539 5540 This variable is only supported when using the IPK and RPM 5541 packaging backends. DEB is not supported. 5542 5543 See the :term:`BAD_RECOMMENDATIONS` and 5544 the :term:`PACKAGE_EXCLUDE` variables for 5545 related information. 5546 5547 :term:`NOAUTOPACKAGEDEBUG` 5548 Disables auto package from splitting ``.debug`` files. If a recipe 5549 requires ``FILES:${PN}-dbg`` to be set manually, the 5550 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the 5551 content of the debug package. For example:: 5552 5553 NOAUTOPACKAGEDEBUG = "1" 5554 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" 5555 FILES:${PN}-dbg = "/usr/src/debug/" 5556 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" 5557 5558 :term:`NON_MULTILIB_RECIPES` 5559 A list of recipes that should not be built for multilib. OE-Core's 5560 ``multilib.conf`` file defines a reasonable starting point for this 5561 list with:: 5562 5563 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot" 5564 5565 :term:`OBJCOPY` 5566 The minimal command and arguments to run ``objcopy``. 5567 5568 :term:`OBJDUMP` 5569 The minimal command and arguments to run ``objdump``. 5570 5571 :term:`OE_BINCONFIG_EXTRA_MANGLE` 5572 When inheriting the :ref:`ref-classes-binconfig` class, 5573 this variable specifies additional arguments passed to the "sed" 5574 command. The sed command alters any paths in configuration scripts 5575 that have been set up during compilation. Inheriting this class 5576 results in all paths in these scripts being changed to point into the 5577 ``sysroots/`` directory so that all builds that use the script will 5578 use the correct directories for the cross compiling layout. 5579 5580 See the ``meta/classes-recipe/binconfig.bbclass`` in the 5581 :term:`Source Directory` for details on how this class 5582 applies these additional sed command arguments. 5583 5584 :term:`OECMAKE_GENERATOR` 5585 A variable for the :ref:`ref-classes-cmake` class, allowing to choose 5586 which back-end will be generated by CMake to build an application. 5587 5588 By default, this variable is set to ``Ninja``, which is faster than GNU 5589 make, but if building is broken with Ninja, a recipe can use this 5590 variable to use GNU make instead:: 5591 5592 OECMAKE_GENERATOR = "Unix Makefiles" 5593 5594 :term:`OE_IMPORTS` 5595 An internal variable used to tell the OpenEmbedded build system what 5596 Python modules to import for every Python function run by the system. 5597 5598 .. note:: 5599 5600 Do not set this variable. It is for internal use only. 5601 5602 :term:`OE_INIT_ENV_SCRIPT` 5603 The name of the build environment setup script for the purposes of 5604 setting up the environment within the extensible SDK. The default 5605 value is "oe-init-build-env". 5606 5607 If you use a custom script to set up your build environment, set the 5608 :term:`OE_INIT_ENV_SCRIPT` variable to its name. 5609 5610 :term:`OE_TERMINAL` 5611 Controls how the OpenEmbedded build system spawns interactive 5612 terminals on the host development system (e.g. using the BitBake 5613 command with the ``-c devshell`` command-line option). For more 5614 information, see the ":ref:`dev-manual/development-shell:using a development shell`" section in 5615 the Yocto Project Development Tasks Manual. 5616 5617 You can use the following values for the :term:`OE_TERMINAL` variable: 5618 5619 - auto 5620 - gnome 5621 - xfce 5622 - rxvt 5623 - screen 5624 - konsole 5625 - none 5626 5627 :term:`OEROOT` 5628 The directory from which the top-level build environment setup script 5629 is sourced. The Yocto Project provides a top-level build environment 5630 setup script: :ref:`structure-core-script`. When you run this 5631 script, the :term:`OEROOT` variable resolves to the directory that 5632 contains the script. 5633 5634 For additional information on how this variable is used, see the 5635 initialization script. 5636 5637 :term:`OEQA_REPRODUCIBLE_TEST_PACKAGE` 5638 Set the package manager(s) for build reproducibility testing. 5639 See :yocto_git:`reproducible.py </poky/tree/meta/lib/oeqa/selftest/cases/reproducible.py>` 5640 and :doc:`/test-manual/reproducible-builds`. 5641 5642 :term:`OEQA_REPRODUCIBLE_TEST_TARGET` 5643 Set build target for build reproducibility testing. By default 5644 all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD` 5645 and :doc:`/test-manual/reproducible-builds`. 5646 5647 :term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS` 5648 Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>` 5649 when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`. 5650 5651 :term:`OLDEST_KERNEL` 5652 Declares the oldest version of the Linux kernel that the produced 5653 binaries must support. This variable is passed into the build of the 5654 Embedded GNU C Library (``glibc``). 5655 5656 The default for this variable comes from the 5657 ``meta/conf/bitbake.conf`` configuration file. You can override this 5658 default by setting the variable in a custom distribution 5659 configuration file. 5660 5661 :term:`OVERLAYFS_ETC_DEVICE` 5662 When the :ref:`ref-classes-overlayfs-etc` class is 5663 inherited, specifies the device to be mounted for the read/write 5664 layer of ``/etc``. There is no default, so you must set this if you 5665 wish to enable :ref:`ref-classes-overlayfs-etc`, for 5666 example, assuming ``/dev/mmcblk0p2`` was the desired device:: 5667 5668 OVERLAYFS_ETC_DEVICE = "/dev/mmcblk0p2" 5669 5670 :term:`OVERLAYFS_ETC_EXPOSE_LOWER` 5671 When the :ref:`ref-classes-overlayfs-etc` class is 5672 inherited, if set to "1" then a read-only access to the original 5673 ``/etc`` content will be provided as a ``lower/`` subdirectory of 5674 :term:`OVERLAYFS_ETC_MOUNT_POINT`. The default value is "0". 5675 5676 :term:`OVERLAYFS_ETC_FSTYPE` 5677 When the :ref:`ref-classes-overlayfs-etc` class is 5678 inherited, specifies the file system type for the read/write 5679 layer of ``/etc``. There is no default, so you must set this if you 5680 wish to enable :ref:`ref-classes-overlayfs-etc`, 5681 for example, assuming the file system is ext4:: 5682 5683 OVERLAYFS_ETC_FSTYPE = "ext4" 5684 5685 :term:`OVERLAYFS_ETC_MOUNT_OPTIONS` 5686 When the :ref:`ref-classes-overlayfs-etc` class is 5687 inherited, specifies the mount options for the read-write layer. 5688 The default value is "defaults". 5689 5690 :term:`OVERLAYFS_ETC_MOUNT_POINT` 5691 When the :ref:`ref-classes-overlayfs-etc` class is 5692 inherited, specifies the parent mount path for the filesystem layers. 5693 There is no default, so you must set this if you wish to enable 5694 :ref:`ref-classes-overlayfs-etc`, for example if the desired path is 5695 "/data":: 5696 5697 OVERLAYFS_ETC_MOUNT_POINT = "/data" 5698 5699 :term:`OVERLAYFS_ETC_USE_ORIG_INIT_NAME` 5700 When the :ref:`ref-classes-overlayfs-etc` class is inherited, controls 5701 how the generated init will be named. For more information, see the 5702 :ref:`ref-classes-overlayfs-etc` class documentation. The default value 5703 is "1". 5704 5705 :term:`OVERLAYFS_MOUNT_POINT` 5706 When inheriting the :ref:`ref-classes-overlayfs` class, 5707 specifies mount point(s) to be used. For example:: 5708 5709 OVERLAYFS_MOUNT_POINT[data] = "/data" 5710 5711 The assumes you have a ``data.mount`` systemd unit defined elsewhere in 5712 your BSP (e.g. in ``systemd-machine-units`` recipe) and it is installed 5713 into the image. For more information see :ref:`ref-classes-overlayfs`. 5714 5715 .. note:: 5716 5717 Although the :ref:`ref-classes-overlayfs` class is 5718 inherited by individual recipes, :term:`OVERLAYFS_MOUNT_POINT` 5719 should be set in your machine configuration. 5720 5721 :term:`OVERLAYFS_QA_SKIP` 5722 When inheriting the :ref:`ref-classes-overlayfs` class, 5723 provides the ability to disable QA checks for particular overlayfs 5724 mounts. For example:: 5725 5726 OVERLAYFS_QA_SKIP[data] = "mount-configured" 5727 5728 .. note:: 5729 5730 Although the :ref:`ref-classes-overlayfs` class is 5731 inherited by individual recipes, :term:`OVERLAYFS_QA_SKIP` 5732 should be set in your machine configuration. 5733 5734 :term:`OVERLAYFS_WRITABLE_PATHS` 5735 When inheriting the :ref:`ref-classes-overlayfs` class, 5736 specifies writable paths used at runtime for the recipe. For 5737 example:: 5738 5739 OVERLAYFS_WRITABLE_PATHS[data] = "/usr/share/my-custom-application" 5740 5741 :term:`OVERRIDES` 5742 A colon-separated list of overrides that currently apply. Overrides 5743 are a BitBake mechanism that allows variables to be selectively 5744 overridden at the end of parsing. The set of overrides in 5745 :term:`OVERRIDES` represents the "state" during building, which includes 5746 the current recipe being built, the machine for which it is being 5747 built, and so forth. 5748 5749 As an example, if the string "an-override" appears as an element in 5750 the colon-separated list in :term:`OVERRIDES`, then the following 5751 assignment will override ``FOO`` with the value "overridden" at the 5752 end of parsing:: 5753 5754 FOO:an-override = "overridden" 5755 5756 See the 5757 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" 5758 section in the BitBake User Manual for more information on the 5759 overrides mechanism. 5760 5761 The default value of :term:`OVERRIDES` includes the values of the 5762 :term:`CLASSOVERRIDE`, 5763 :term:`MACHINEOVERRIDES`, and 5764 :term:`DISTROOVERRIDES` variables. Another 5765 important override included by default is ``pn-${PN}``. This override 5766 allows variables to be set for a single recipe within configuration 5767 (``.conf``) files. Here is an example:: 5768 5769 FOO:pn-myrecipe = "myrecipe-specific value" 5770 5771 .. note:: 5772 5773 An easy way to see what overrides apply is to search for :term:`OVERRIDES` 5774 in the output of the ``bitbake -e`` command. See the 5775 ":ref:`dev-manual/debugging:viewing variable values`" section in the Yocto 5776 Project Development Tasks Manual for more information. 5777 5778 :term:`P` 5779 The recipe name and version. :term:`P` is comprised of the following:: 5780 5781 ${PN}-${PV} 5782 5783 :term:`P4DIR` 5784 See :term:`bitbake:P4DIR` in the BitBake manual. 5785 5786 :term:`PACKAGE_ADD_METADATA` 5787 This variable defines additional metadata to add to packages. 5788 5789 You may find you need to inject additional metadata into packages. 5790 This variable allows you to do that by setting the injected data as 5791 the value. Multiple fields can be added by splitting the content with 5792 the literal separator "\n". 5793 5794 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable 5795 to do package type specific settings. It can also be made package 5796 specific by using the package name as a suffix. 5797 5798 You can find out more about applying this variable in the 5799 ":ref:`dev-manual/packages:adding custom metadata to packages`" 5800 section in the Yocto Project Development Tasks Manual. 5801 5802 :term:`PACKAGE_ARCH` 5803 The architecture of the resulting package or packages. 5804 5805 By default, the value of this variable is set to 5806 :term:`TUNE_PKGARCH` when building for the 5807 target, :term:`BUILD_ARCH` when building for the 5808 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the 5809 SDK. 5810 5811 .. note:: 5812 5813 See :term:`SDK_ARCH` for more information. 5814 5815 However, if your recipe's output packages are built specific to the 5816 target machine rather than generally for the architecture of the 5817 machine, you should set :term:`PACKAGE_ARCH` to the value of 5818 :term:`MACHINE_ARCH` in the recipe as follows:: 5819 5820 PACKAGE_ARCH = "${MACHINE_ARCH}" 5821 5822 :term:`PACKAGE_ARCHS` 5823 Specifies a list of architectures compatible with the target machine. 5824 This variable is set automatically and should not normally be 5825 hand-edited. Entries are separated using spaces and listed in order 5826 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any 5827 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}". 5828 5829 :term:`PACKAGE_BEFORE_PN` 5830 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so 5831 that those added packages can pick up files that would normally be 5832 included in the default package. 5833 5834 :term:`PACKAGE_CLASSES` 5835 This variable, which is set in the ``local.conf`` configuration file 5836 found in the ``conf`` folder of the 5837 :term:`Build Directory`, specifies the package manager the 5838 OpenEmbedded build system uses when packaging data. 5839 5840 You can provide one or more of the following arguments for the 5841 variable:: 5842 5843 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" 5844 5845 The build system uses only the first argument in the list as the 5846 package manager when creating your image or SDK. However, packages 5847 will be created using any additional packaging classes you specify. 5848 For example, if you use the following in your ``local.conf`` file:: 5849 5850 PACKAGE_CLASSES ?= "package_ipk" 5851 5852 The OpenEmbedded build system uses 5853 the IPK package manager to create your image or SDK. 5854 5855 For information on packaging and build performance effects as a 5856 result of the package manager in use, see the 5857 ":ref:`ref-classes-package`" section. 5858 5859 :term:`PACKAGE_DEBUG_SPLIT_STYLE` 5860 Determines how to split up and package debug and source information 5861 when creating debugging packages to be used with the GNU Project 5862 Debugger (GDB). In general, based on the value of this variable, 5863 you can combine the source and debug info in a single package, 5864 you can break out the source into a separate package that can be 5865 installed independently, or you can choose to not have the source 5866 packaged at all. 5867 5868 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable: 5869 5870 - "``.debug``": All debugging and source info is placed in a single 5871 ``*-dbg`` package; debug symbol files are placed next to the 5872 binary in a ``.debug`` directory so that, if a binary is installed 5873 into ``/bin``, the corresponding debug symbol file is installed 5874 in ``/bin/.debug``. Source files are installed in the same ``*-dbg`` 5875 package under ``/usr/src/debug``. 5876 5877 - "``debug-file-directory``": As above, all debugging and source info 5878 is placed in a single ``*-dbg`` package; debug symbol files are 5879 placed entirely under the directory ``/usr/lib/debug`` and separated 5880 by the path from where the binary is installed, so that if a binary 5881 is installed in ``/bin``, the corresponding debug symbols are installed 5882 in ``/usr/lib/debug/bin``, and so on. As above, source is installed 5883 in the same package under ``/usr/src/debug``. 5884 5885 - "``debug-with-srcpkg``": Debugging info is placed in the standard 5886 ``*-dbg`` package as with the ``.debug`` value, while source is 5887 placed in a separate ``*-src`` package, which can be installed 5888 independently. This is the default setting for this variable, 5889 as defined in Poky's ``bitbake.conf`` file. 5890 5891 - "``debug-without-src``": The same behavior as with the ``.debug`` 5892 setting, but no source is packaged at all. 5893 5894 .. note:: 5895 5896 Much of the above package splitting can be overridden via 5897 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable. 5898 5899 You can find out more about debugging using GDB by reading the 5900 ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section 5901 in the Yocto Project Development Tasks Manual. 5902 5903 :term:`PACKAGE_EXCLUDE` 5904 Lists packages that should not be installed into an image. For 5905 example:: 5906 5907 PACKAGE_EXCLUDE = "package_name package_name package_name ..." 5908 5909 You can set this variable globally in your ``local.conf`` file or you 5910 can attach it to a specific image recipe by using the recipe name 5911 override:: 5912 5913 PACKAGE_EXCLUDE:pn-target_image = "package_name" 5914 5915 If you choose to not install a package using this variable and some 5916 other package is dependent on it (i.e. listed in a recipe's 5917 :term:`RDEPENDS` variable), the OpenEmbedded build 5918 system generates a fatal installation error. Because the build system 5919 halts the process with a fatal error, you can use the variable with 5920 an iterative development process to remove specific components from a 5921 system. 5922 5923 This variable is supported only when using the IPK and RPM 5924 packaging backends. DEB is not supported. 5925 5926 See the :term:`NO_RECOMMENDATIONS` and the 5927 :term:`BAD_RECOMMENDATIONS` variables for 5928 related information. 5929 5930 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` 5931 Prevents specific packages from being installed when you are 5932 installing complementary packages. 5933 5934 You might find that you want to prevent installing certain packages 5935 when you are installing complementary packages. For example, if you 5936 are using :term:`IMAGE_FEATURES` to install 5937 ``dev-pkgs``, you might not want to install all packages from a 5938 particular multilib. If you find yourself in this situation, you can 5939 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular 5940 expressions to match the packages you want to exclude. 5941 5942 :term:`PACKAGE_EXTRA_ARCHS` 5943 Specifies the list of architectures compatible with the device CPU. 5944 This variable is useful when you build for several different devices 5945 that use miscellaneous processors such as XScale and ARM926-EJS. 5946 5947 :term:`PACKAGE_FEED_ARCHS` 5948 Optionally specifies the package architectures used as part of the 5949 package feed URIs during the build. When used, the 5950 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed 5951 URI, which is constructed using the 5952 :term:`PACKAGE_FEED_URIS` and 5953 :term:`PACKAGE_FEED_BASE_PATHS` 5954 variables. 5955 5956 .. note:: 5957 5958 You can use the :term:`PACKAGE_FEED_ARCHS` 5959 variable to allow specific package architectures. If you do 5960 not need to allow specific architectures, which is a common 5961 case, you can omit this variable. Omitting the variable results in 5962 all available architectures for the current machine being included 5963 into remote package feeds. 5964 5965 Consider the following example where the :term:`PACKAGE_FEED_URIS`, 5966 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are 5967 defined in your ``local.conf`` file:: 5968 5969 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 5970 https://example.com/packagerepos/updates" 5971 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 5972 PACKAGE_FEED_ARCHS = "all core2-64" 5973 5974 Given these settings, the resulting package feeds are as follows: 5975 5976 .. code-block:: none 5977 5978 https://example.com/packagerepos/release/rpm/all 5979 https://example.com/packagerepos/release/rpm/core2-64 5980 https://example.com/packagerepos/release/rpm-dev/all 5981 https://example.com/packagerepos/release/rpm-dev/core2-64 5982 https://example.com/packagerepos/updates/rpm/all 5983 https://example.com/packagerepos/updates/rpm/core2-64 5984 https://example.com/packagerepos/updates/rpm-dev/all 5985 https://example.com/packagerepos/updates/rpm-dev/core2-64 5986 5987 :term:`PACKAGE_FEED_BASE_PATHS` 5988 Specifies the base path used when constructing package feed URIs. The 5989 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a 5990 package feed URI used by the OpenEmbedded build system. The base path 5991 lies between the :term:`PACKAGE_FEED_URIS` 5992 and :term:`PACKAGE_FEED_ARCHS` variables. 5993 5994 Consider the following example where the :term:`PACKAGE_FEED_URIS`, 5995 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are 5996 defined in your ``local.conf`` file:: 5997 5998 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 5999 https://example.com/packagerepos/updates" 6000 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 6001 PACKAGE_FEED_ARCHS = "all core2-64" 6002 6003 Given these settings, the resulting package feeds are as follows: 6004 6005 .. code-block:: none 6006 6007 https://example.com/packagerepos/release/rpm/all 6008 https://example.com/packagerepos/release/rpm/core2-64 6009 https://example.com/packagerepos/release/rpm-dev/all 6010 https://example.com/packagerepos/release/rpm-dev/core2-64 6011 https://example.com/packagerepos/updates/rpm/all 6012 https://example.com/packagerepos/updates/rpm/core2-64 6013 https://example.com/packagerepos/updates/rpm-dev/all 6014 https://example.com/packagerepos/updates/rpm-dev/core2-64 6015 6016 :term:`PACKAGE_FEED_URIS` 6017 Specifies the front portion of the package feed URI used by the 6018 OpenEmbedded build system. Each final package feed URI is comprised 6019 of :term:`PACKAGE_FEED_URIS`, 6020 :term:`PACKAGE_FEED_BASE_PATHS`, and 6021 :term:`PACKAGE_FEED_ARCHS` variables. 6022 6023 Consider the following example where the :term:`PACKAGE_FEED_URIS`, 6024 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are 6025 defined in your ``local.conf`` file:: 6026 6027 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ 6028 https://example.com/packagerepos/updates" 6029 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev" 6030 PACKAGE_FEED_ARCHS = "all core2-64" 6031 6032 Given these settings, the resulting package feeds are as follows: 6033 6034 .. code-block:: none 6035 6036 https://example.com/packagerepos/release/rpm/all 6037 https://example.com/packagerepos/release/rpm/core2-64 6038 https://example.com/packagerepos/release/rpm-dev/all 6039 https://example.com/packagerepos/release/rpm-dev/core2-64 6040 https://example.com/packagerepos/updates/rpm/all 6041 https://example.com/packagerepos/updates/rpm/core2-64 6042 https://example.com/packagerepos/updates/rpm-dev/all 6043 https://example.com/packagerepos/updates/rpm-dev/core2-64 6044 6045 :term:`PACKAGE_INSTALL` 6046 The final list of packages passed to the package manager for 6047 installation into the image. 6048 6049 Because the package manager controls actual installation of all 6050 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is 6051 not the final list of packages that are actually installed. This 6052 variable is internal to the image construction code. Consequently, in 6053 general, you should use the 6054 :term:`IMAGE_INSTALL` variable to specify 6055 packages for installation. The exception to this is when working with 6056 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>` 6057 image. When working with an initial RAM filesystem (:term:`Initramfs`) image, 6058 use the :term:`PACKAGE_INSTALL` variable. For information on creating an 6059 :term:`Initramfs`, see the ":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`" section 6060 in the Yocto Project Development Tasks Manual. 6061 6062 :term:`PACKAGE_INSTALL_ATTEMPTONLY` 6063 Specifies a list of packages the OpenEmbedded build system attempts 6064 to install when creating an image. If a listed package fails to 6065 install, the build system does not generate an error. This variable 6066 is generally not user-defined. 6067 6068 :term:`PACKAGE_PREPROCESS_FUNCS` 6069 Specifies a list of functions run to pre-process the 6070 :term:`PKGD` directory prior to splitting the files out 6071 to individual packages. 6072 6073 :term:`PACKAGE_WRITE_DEPS` 6074 Specifies a list of dependencies for post-installation and 6075 pre-installation scripts on native/cross tools. If your 6076 post-installation or pre-installation script can execute at root filesystem 6077 creation time rather than on the target but depends on a native tool 6078 in order to execute, you need to list the tools in 6079 :term:`PACKAGE_WRITE_DEPS`. 6080 6081 For information on running post-installation scripts, see the 6082 ":ref:`dev-manual/new-recipe:post-installation scripts`" 6083 section in the Yocto Project Development Tasks Manual. 6084 6085 :term:`PACKAGECONFIG` 6086 This variable provides a means of enabling or disabling features of a 6087 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in 6088 recipes when you specify features and then arguments that define 6089 feature behaviors. Here is the basic block structure (broken over 6090 multiple lines for readability):: 6091 6092 PACKAGECONFIG ??= "f1 f2 f3 ..." 6093 PACKAGECONFIG[f1] = "\ 6094 --with-f1, \ 6095 --without-f1, \ 6096 build-deps-for-f1, \ 6097 runtime-deps-for-f1, \ 6098 runtime-recommends-for-f1, \ 6099 packageconfig-conflicts-for-f1" 6100 PACKAGECONFIG[f2] = "\ 6101 ... and so on and so on ... 6102 6103 The :term:`PACKAGECONFIG` variable itself specifies a space-separated 6104 list of the features to enable. Following the features, you can 6105 determine the behavior of each feature by providing up to six 6106 order-dependent arguments, which are separated by commas. You can 6107 omit any argument you like but must retain the separating commas. The 6108 order is important and specifies the following: 6109 6110 #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS` 6111 if the feature is enabled. 6112 6113 #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS` 6114 if the feature is disabled. 6115 6116 #. Additional build dependencies (:term:`DEPENDS`) 6117 that should be added if the feature is enabled. 6118 6119 #. Additional runtime dependencies (:term:`RDEPENDS`) 6120 that should be added if the feature is enabled. 6121 6122 #. Additional runtime recommendations 6123 (:term:`RRECOMMENDS`) that should be added if 6124 the feature is enabled. 6125 6126 #. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG` 6127 settings for this feature. 6128 6129 Consider the following :term:`PACKAGECONFIG` block taken from the 6130 ``librsvg`` recipe. In this example the feature is ``gtk``, which has 6131 three arguments that determine the feature's behavior:: 6132 6133 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" 6134 6135 The 6136 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is 6137 enabled. In this case, ``--with-gtk3`` is added to the configure 6138 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the 6139 other hand, if the feature is disabled say through a ``.bbappend`` 6140 file in another layer, then the second argument ``--without-gtk3`` is 6141 added to the configure script instead. 6142 6143 The basic :term:`PACKAGECONFIG` structure previously described holds true 6144 regardless of whether you are creating a block or changing a block. 6145 When creating a block, use the structure inside your recipe. 6146 6147 If you want to change an existing :term:`PACKAGECONFIG` block, you can do 6148 so one of two ways: 6149 6150 - *Append file:* Create an append file named 6151 ``recipename.bbappend`` in your layer and override the value of 6152 :term:`PACKAGECONFIG`. You can either completely override the 6153 variable:: 6154 6155 PACKAGECONFIG = "f4 f5" 6156 6157 Or, you can just append the variable:: 6158 6159 PACKAGECONFIG:append = " f4" 6160 6161 - *Configuration file:* This method is identical to changing the 6162 block through an append file except you edit your ``local.conf`` 6163 or ``mydistro.conf`` file. As with append files previously 6164 described, you can either completely override the variable:: 6165 6166 PACKAGECONFIG:pn-recipename = "f4 f5" 6167 6168 Or, you can just amend the variable:: 6169 6170 PACKAGECONFIG:append:pn-recipename = " f4" 6171 6172 Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service 6173 in which :term:`PACKAGECONFIG` is used to transform the systemd service 6174 into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`:: 6175 6176 example.c 6177 example.service 6178 CMakeLists.txt 6179 6180 The ``CMakeLists.txt`` file contains:: 6181 6182 if(WITH_SYSTEMD) 6183 install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd) 6184 endif(WITH_SYSTEMD) 6185 6186 In order to enable the installation of ``example.service`` we need to 6187 ensure that ``-DWITH_SYSTEMD=ON`` is passed to the ``cmake`` command 6188 execution. Recipes that have ``CMakeLists.txt`` generally inherit the 6189 :ref:`ref-classes-cmake` class, that runs ``cmake`` with 6190 :term:`EXTRA_OECMAKE`, which :term:`PACKAGECONFIG_CONFARGS` will be 6191 appended to. Now, knowing that :term:`PACKAGECONFIG_CONFARGS` is 6192 automatically filled with either the first or second element of 6193 :term:`PACKAGECONFIG` flag value, the recipe would be like:: 6194 6195 inherit cmake 6196 PACKAGECONFIG = "systemd" 6197 PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF" 6198 6199 A side note to this recipe is to check if ``systemd`` is in fact the used :term:`INIT_MANAGER` 6200 or not:: 6201 6202 PACKAGECONFIG = "${@'systemd' if d.getVar('INIT_MANAGER') == 'systemd' else ''}" 6203 6204 :term:`PACKAGECONFIG_CONFARGS` 6205 A space-separated list of configuration options generated from the 6206 :term:`PACKAGECONFIG` setting. 6207 6208 Classes such as :ref:`ref-classes-autotools` and :ref:`ref-classes-cmake` 6209 use :term:`PACKAGECONFIG_CONFARGS` to pass :term:`PACKAGECONFIG` options 6210 to ``configure`` and ``cmake``, respectively. If you are using 6211 :term:`PACKAGECONFIG` but not a class that handles the 6212 :ref:`ref-tasks-configure` task, then you need to use 6213 :term:`PACKAGECONFIG_CONFARGS` appropriately. 6214 6215 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` 6216 For recipes inheriting the :ref:`ref-classes-packagegroup` class, setting 6217 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the 6218 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth) 6219 should not be automatically created by the ``packagegroup`` recipe, 6220 which is the default behavior. 6221 6222 :term:`PACKAGES` 6223 The list of packages the recipe creates. The default value is the 6224 following:: 6225 6226 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} 6227 6228 During packaging, the :ref:`ref-tasks-package` task 6229 goes through :term:`PACKAGES` and uses the :term:`FILES` 6230 variable corresponding to each package to assign files to the 6231 package. If a file matches the :term:`FILES` variable for more than one 6232 package in :term:`PACKAGES`, it will be assigned to the earliest 6233 (leftmost) package. 6234 6235 Packages in the variable's list that are empty (i.e. where none of 6236 the patterns in ``FILES:``\ pkg match any files installed by the 6237 :ref:`ref-tasks-install` task) are not generated, 6238 unless generation is forced through the 6239 :term:`ALLOW_EMPTY` variable. 6240 6241 :term:`PACKAGES_DYNAMIC` 6242 A promise that your recipe satisfies runtime dependencies for 6243 optional modules that are found in other recipes. 6244 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it 6245 only states that they should be satisfied. For example, if a hard, 6246 runtime dependency (:term:`RDEPENDS`) of another 6247 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC` 6248 variable, but a package with the module name is never actually 6249 produced, then the other package will be broken. Thus, if you attempt 6250 to include that package in an image, you will get a dependency 6251 failure from the packaging system during the 6252 :ref:`ref-tasks-rootfs` task. 6253 6254 Typically, if there is a chance that such a situation can occur and 6255 the package that is not created is valid without the dependency being 6256 satisfied, then you should use :term:`RRECOMMENDS` 6257 (a soft runtime dependency) instead of :term:`RDEPENDS`. 6258 6259 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when 6260 you are splitting packages, see the 6261 ":ref:`dev-manual/packages:handling optional module packaging`" 6262 section in the Yocto Project Development Tasks Manual. 6263 6264 :term:`PACKAGESPLITFUNCS` 6265 Specifies a list of functions run to perform additional splitting of 6266 files into individual packages. Recipes can either prepend to this 6267 variable or prepend to the ``populate_packages`` function in order to 6268 perform additional package splitting. In either case, the function 6269 should set :term:`PACKAGES`, 6270 :term:`FILES`, :term:`RDEPENDS` and 6271 other packaging variables appropriately in order to perform the 6272 desired splitting. 6273 6274 :term:`PARALLEL_MAKE` 6275 6276 Extra options passed to the build tool command (``make``, 6277 ``ninja`` or more specific build engines, like the Go language one) 6278 during the :ref:`ref-tasks-compile` task, to specify parallel compilation 6279 on the local build host. This variable is usually in the form "-j x", 6280 where x represents the maximum number of parallel threads such engines 6281 can run. 6282 6283 .. note:: 6284 6285 For software compiled by ``make``, in order for :term:`PARALLEL_MAKE` 6286 to be effective, ``make`` must be called with 6287 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy 6288 way to ensure this is to use the ``oe_runmake`` function. 6289 6290 By default, the OpenEmbedded build system automatically sets this 6291 variable to be equal to the number of cores the build system uses. 6292 6293 .. note:: 6294 6295 If the software being built experiences dependency issues during 6296 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear 6297 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For 6298 information on addressing race conditions, see the 6299 ":ref:`dev-manual/debugging:debugging parallel make races`" 6300 section in the Yocto Project Development Tasks Manual. 6301 6302 For single socket systems (i.e. one CPU), you should not have to 6303 override this variable to gain optimal parallelism during builds. 6304 However, if you have very large systems that employ multiple physical 6305 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is 6306 not set higher than "-j 20". 6307 6308 For more information on speeding up builds, see the 6309 ":ref:`dev-manual/speeding-up-build:speeding up a build`" 6310 section in the Yocto Project Development Tasks Manual. 6311 6312 :term:`PARALLEL_MAKEINST` 6313 Extra options passed to the build tool install command 6314 (``make install``, ``ninja install`` or more specific ones) 6315 during the :ref:`ref-tasks-install` task in order to specify 6316 parallel installation. This variable defaults to the value of 6317 :term:`PARALLEL_MAKE`. 6318 6319 .. note:: 6320 6321 For software compiled by ``make``, in order for :term:`PARALLEL_MAKEINST` 6322 to be effective, ``make`` must be called with 6323 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy 6324 way to ensure this is to use the ``oe_runmake`` function. 6325 6326 If the software being built experiences dependency issues during 6327 the :ref:`ref-tasks-install` task that result in race conditions, you can 6328 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a 6329 workaround. For information on addressing race conditions, see the 6330 ":ref:`dev-manual/debugging:debugging parallel make races`" 6331 section in the Yocto Project Development Tasks Manual. 6332 6333 :term:`PATCHRESOLVE` 6334 Determines the action to take when a patch fails. You can set this 6335 variable to one of two values: "noop" and "user". 6336 6337 The default value of "noop" causes the build to simply fail when the 6338 OpenEmbedded build system cannot successfully apply a patch. Setting 6339 the value to "user" causes the build system to launch a shell and 6340 places you in the right location so that you can manually resolve the 6341 conflicts. 6342 6343 Set this variable in your ``local.conf`` file. 6344 6345 :term:`PATCHTOOL` 6346 Specifies the utility used to apply patches for a recipe during the 6347 :ref:`ref-tasks-patch` task. You can specify one of 6348 three utilities: "patch", "quilt", or "git". The default utility used 6349 is "quilt" except for the quilt-native recipe itself. Because the 6350 quilt tool is not available at the time quilt-native is being 6351 patched, it uses "patch". 6352 6353 If you wish to use an alternative patching tool, set the variable in 6354 the recipe using one of the following:: 6355 6356 PATCHTOOL = "patch" 6357 PATCHTOOL = "quilt" 6358 PATCHTOOL = "git" 6359 6360 :term:`PE` 6361 The epoch of the recipe. By default, this variable is unset. The 6362 variable is used to make upgrades possible when the versioning scheme 6363 changes in some backwards incompatible way. 6364 6365 :term:`PE` is the default value of the :term:`PKGE` variable. 6366 6367 :term:`PEP517_WHEEL_PATH` 6368 When used by recipes that inherit the :ref:`ref-classes-python_pep517` 6369 class, denotes the path to ``dist/`` (short for distribution) where the 6370 binary archive ``wheel`` is built. 6371 6372 :term:`PERSISTENT_DIR` 6373 See :term:`bitbake:PERSISTENT_DIR` in the BitBake manual. 6374 6375 :term:`PF` 6376 Specifies the recipe or package name and includes all version and 6377 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and 6378 ``bash-4.2-r1/``). This variable is comprised of the following: 6379 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} 6380 6381 :term:`PIXBUF_PACKAGES` 6382 When inheriting the :ref:`ref-classes-pixbufcache` 6383 class, this variable identifies packages that contain the pixbuf 6384 loaders used with ``gdk-pixbuf``. By default, the 6385 :ref:`ref-classes-pixbufcache` class assumes that 6386 the loaders are in the recipe's main package (i.e. 6387 ``${``\ :term:`PN`\ ``}``). Use this variable if the 6388 loaders you need are in a package other than that main package. 6389 6390 :term:`PKG` 6391 The name of the resulting package created by the OpenEmbedded build 6392 system. 6393 6394 .. note:: 6395 6396 When using the :term:`PKG` variable, you must use a package name override. 6397 6398 For example, when the :ref:`ref-classes-debian` class renames the output 6399 package, it does so by setting ``PKG:packagename``. 6400 6401 :term:`PKG_CONFIG_PATH` 6402 The path to ``pkg-config`` files for the current build context. 6403 ``pkg-config`` reads this variable from the environment. 6404 6405 :term:`PKGD` 6406 Points to the destination directory for files to be packaged before 6407 they are split into individual packages. This directory defaults to 6408 the following:: 6409 6410 ${WORKDIR}/package 6411 6412 Do not change this default. 6413 6414 :term:`PKGDATA_DIR` 6415 Points to a shared, global-state directory that holds data generated 6416 during the packaging process. During the packaging process, the 6417 :ref:`ref-tasks-packagedata` task packages data 6418 for each recipe and installs it into this temporary, shared area. 6419 This directory defaults to the following, which you should not 6420 change:: 6421 6422 ${STAGING_DIR_HOST}/pkgdata 6423 6424 For examples of how this data is used, see the 6425 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 6426 section in the Yocto Project Overview and Concepts Manual and the 6427 ":ref:`dev-manual/debugging:viewing package information with \`\`oe-pkgdata-util\`\``" 6428 section in the Yocto Project Development Tasks Manual. For more 6429 information on the shared, global-state directory, see 6430 :term:`STAGING_DIR_HOST`. 6431 6432 :term:`PKGDEST` 6433 Points to the parent directory for files to be packaged after they 6434 have been split into individual packages. This directory defaults to 6435 the following:: 6436 6437 ${WORKDIR}/packages-split 6438 6439 Under this directory, the build system creates directories for each 6440 package specified in :term:`PACKAGES`. Do not change 6441 this default. 6442 6443 :term:`PKGDESTWORK` 6444 Points to a temporary work area where the 6445 :ref:`ref-tasks-package` task saves package metadata. 6446 The :term:`PKGDESTWORK` location defaults to the following:: 6447 6448 ${WORKDIR}/pkgdata 6449 6450 Do not change this default. 6451 6452 The :ref:`ref-tasks-packagedata` task copies the 6453 package metadata from :term:`PKGDESTWORK` to 6454 :term:`PKGDATA_DIR` to make it available globally. 6455 6456 :term:`PKGE` 6457 The epoch of the package(s) built by the recipe. By default, :term:`PKGE` 6458 is set to :term:`PE`. 6459 6460 :term:`PKGR` 6461 The revision of the package(s) built by the recipe. By default, 6462 :term:`PKGR` is set to :term:`PR`. 6463 6464 :term:`PKGV` 6465 The version of the package(s) built by the recipe. By default, 6466 :term:`PKGV` is set to :term:`PV`. 6467 6468 :term:`PN` 6469 This variable can have two separate functions depending on the 6470 context: a recipe name or a resulting package name. 6471 6472 :term:`PN` refers to a recipe name in the context of a file used by the 6473 OpenEmbedded build system as input to create a package. The name is 6474 normally extracted from the recipe file name. For example, if the 6475 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN` 6476 will be "expat". 6477 6478 The variable refers to a package name in the context of a file 6479 created or produced by the OpenEmbedded build system. 6480 6481 If applicable, the :term:`PN` variable also contains any special suffix 6482 or prefix. For example, using ``bash`` to build packages for the 6483 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build 6484 packages for the target and for Multilib, :term:`PN` would be ``bash`` 6485 and ``lib64-bash``, respectively. 6486 6487 :term:`POPULATE_SDK_POST_HOST_COMMAND` 6488 Specifies a list of functions to call once the OpenEmbedded build 6489 system has created the host part of the SDK. You can specify 6490 functions separated by spaces:: 6491 6492 POPULATE_SDK_POST_HOST_COMMAND += "function" 6493 6494 If you need to pass the SDK path to a command within a function, you 6495 can use ``${SDK_DIR}``, which points to the parent directory used by 6496 the OpenEmbedded build system when creating SDK output. See the 6497 :term:`SDK_DIR` variable for more information. 6498 6499 :term:`POPULATE_SDK_POST_TARGET_COMMAND` 6500 Specifies a list of functions to call once the OpenEmbedded build 6501 system has created the target part of the SDK. You can specify 6502 functions separated by spaces:: 6503 6504 POPULATE_SDK_POST_TARGET_COMMAND += "function" 6505 6506 If you need to pass the SDK path to a command within a function, you 6507 can use ``${SDK_DIR}``, which points to the parent directory used by 6508 the OpenEmbedded build system when creating SDK output. See the 6509 :term:`SDK_DIR` variable for more information. 6510 6511 :term:`PR` 6512 The revision of the recipe. The default value for this variable is 6513 "r0". Subsequent revisions of the recipe conventionally have the 6514 values "r1", "r2", and so forth. When :term:`PV` increases, 6515 :term:`PR` is conventionally reset to "r0". 6516 6517 .. note:: 6518 6519 The OpenEmbedded build system does not need the aid of :term:`PR` 6520 to know when to rebuild a recipe. The build system uses the task 6521 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the 6522 :ref:`stamp <structure-build-tmp-stamps>` and 6523 :ref:`overview-manual/concepts:shared state cache` 6524 mechanisms. 6525 6526 The :term:`PR` variable primarily becomes significant when a package 6527 manager dynamically installs packages on an already built image. In 6528 this case, :term:`PR`, which is the default value of 6529 :term:`PKGR`, helps the package manager distinguish which 6530 package is the most recent one in cases where many packages have the 6531 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with 6532 the same :term:`PV` usually means that the packages all install the same 6533 upstream version, but with later (:term:`PR`) version packages including 6534 packaging fixes. 6535 6536 .. note:: 6537 6538 :term:`PR` does not need to be increased for changes that do not change the 6539 package contents or metadata. 6540 6541 Because manually managing :term:`PR` can be cumbersome and error-prone, 6542 an automated solution exists. See the 6543 ":ref:`dev-manual/packages:working with a pr service`" section 6544 in the Yocto Project Development Tasks Manual for more information. 6545 6546 :term:`PREFERRED_PROVIDER` 6547 If multiple recipes provide the same item, this variable determines 6548 which recipe is preferred and thus provides the item (i.e. the 6549 preferred provider). You should always suffix this variable with the 6550 name of the provided item. And, you should define the variable using 6551 the preferred recipe's name (:term:`PN`). Here is a common 6552 example:: 6553 6554 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 6555 6556 In the previous example, multiple recipes are providing "virtual/kernel". 6557 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of 6558 the recipe you prefer to provide "virtual/kernel". 6559 6560 Following are more examples:: 6561 6562 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" 6563 PREFERRED_PROVIDER_virtual/libgl ?= "mesa" 6564 6565 For more 6566 information, see the ":ref:`dev-manual/new-recipe:using virtual providers`" 6567 section in the Yocto Project Development Tasks Manual. 6568 6569 .. note:: 6570 6571 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any 6572 recipe that :term:`PROVIDES` that item but is not selected (defined) 6573 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually 6574 desirable since this mechanism is designed to select between mutually 6575 exclusive alternative providers. 6576 6577 :term:`PREFERRED_PROVIDERS` 6578 See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. 6579 6580 :term:`PREFERRED_VERSION` 6581 If there are multiple versions of a recipe available, this variable 6582 determines which version should be given preference. You must always 6583 suffix the variable with the :term:`PN` you want to select (`python` in 6584 the first example below), and you should specify the :term:`PV` 6585 accordingly (`3.4.0` in the example). 6586 6587 The :term:`PREFERRED_VERSION` variable supports limited wildcard use 6588 through the "``%``" character. You can use the character to match any 6589 number of characters, which can be useful when specifying versions 6590 that contain long revision numbers that potentially change. Here are 6591 two examples:: 6592 6593 PREFERRED_VERSION_python = "3.4.0" 6594 PREFERRED_VERSION_linux-yocto = "5.0%" 6595 6596 .. note:: 6597 6598 The use of the "%" character is limited in that it only works at the end of the 6599 string. You cannot use the wildcard character in any other 6600 location of the string. 6601 6602 The specified version is matched against :term:`PV`, which 6603 does not necessarily match the version part of the recipe's filename. 6604 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` 6605 where ``foo_git.bb`` contains the following assignment:: 6606 6607 PV = "1.1+git${SRCPV}" 6608 6609 In this case, the correct way to select 6610 ``foo_git.bb`` is by using an assignment such as the following:: 6611 6612 PREFERRED_VERSION_foo = "1.1+git%" 6613 6614 Compare that previous example 6615 against the following incorrect example, which does not work:: 6616 6617 PREFERRED_VERSION_foo = "git" 6618 6619 Sometimes the :term:`PREFERRED_VERSION` variable can be set by 6620 configuration files in a way that is hard to change. You can use 6621 :term:`OVERRIDES` to set a machine-specific 6622 override. Here is an example:: 6623 6624 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%" 6625 6626 Although not recommended, worst case, you can also use the 6627 "forcevariable" override, which is the strongest override possible. 6628 Here is an example:: 6629 6630 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%" 6631 6632 .. note:: 6633 6634 The ``:forcevariable`` override is not handled specially. This override 6635 only works because the default value of :term:`OVERRIDES` includes "forcevariable". 6636 6637 If a recipe with the specified version is not available, a warning 6638 message will be shown. See :term:`REQUIRED_VERSION` if you want this 6639 to be an error instead. 6640 6641 :term:`PREMIRRORS` 6642 Specifies additional paths from which the OpenEmbedded build system 6643 gets source code. When the build system searches for source code, it 6644 first tries the local download directory. If that location fails, the 6645 build system tries locations defined by :term:`PREMIRRORS`, the upstream 6646 source, and then locations specified by 6647 :term:`MIRRORS` in that order. 6648 6649 The default value for :term:`PREMIRRORS` is defined in the 6650 ``meta/classes-global/mirrors.bbclass`` file in the core metadata layer. 6651 6652 Typically, you could add a specific server for the build system to 6653 attempt before any others by adding something like the following to 6654 the ``local.conf`` configuration file in the 6655 :term:`Build Directory`:: 6656 6657 PREMIRRORS:prepend = "\ 6658 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ 6659 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ 6660 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \ 6661 https://.*/.* &YOCTO_DL_URL;/mirror/sources/" 6662 6663 These changes cause the 6664 build system to intercept Git, FTP, HTTP, and HTTPS requests and 6665 direct them to the ``http://`` sources mirror. You can use 6666 ``file://`` URLs to point to local directories or network shares as 6667 well. 6668 6669 :term:`PRIORITY` 6670 Indicates the importance of a package. 6671 6672 :term:`PRIORITY` is considered to be part of the distribution policy 6673 because the importance of any given recipe depends on the purpose for 6674 which the distribution is being produced. Thus, :term:`PRIORITY` is not 6675 normally set within recipes. 6676 6677 You can set :term:`PRIORITY` to "required", "standard", "extra", and 6678 "optional", which is the default. 6679 6680 :term:`PRIVATE_LIBS` 6681 Specifies libraries installed within a recipe that should be ignored 6682 by the OpenEmbedded build system's shared library resolver. This 6683 variable is typically used when software being built by a recipe has 6684 its own private versions of a library normally provided by another 6685 recipe. In this case, you would not want the package containing the 6686 private libraries to be set as a dependency on other unrelated 6687 packages that should instead depend on the package providing the 6688 standard version of the library. 6689 6690 Libraries specified in this variable should be specified by their 6691 file name. For example, from the Firefox recipe in meta-browser:: 6692 6693 PRIVATE_LIBS = "libmozjs.so \ 6694 libxpcom.so \ 6695 libnspr4.so \ 6696 libxul.so \ 6697 libmozalloc.so \ 6698 libplc4.so \ 6699 libplds4.so" 6700 6701 For more information, see the 6702 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 6703 section in the Yocto Project Overview and Concepts Manual. 6704 6705 :term:`PROVIDES` 6706 A list of aliases by which a particular recipe can be known. By 6707 default, a recipe's own :term:`PN` is implicitly already in its 6708 :term:`PROVIDES` list and therefore does not need to mention that it 6709 provides itself. If a recipe uses :term:`PROVIDES`, the additional 6710 aliases are synonyms for the recipe and can be useful for satisfying 6711 dependencies of other recipes during the build as specified by 6712 :term:`DEPENDS`. 6713 6714 Consider the following example :term:`PROVIDES` statement from the recipe 6715 file ``eudev_3.2.9.bb``:: 6716 6717 PROVIDES += "udev" 6718 6719 The :term:`PROVIDES` statement 6720 results in the "eudev" recipe also being available as simply "udev". 6721 6722 .. note:: 6723 6724 A recipe's own recipe name (:term:`PN`) is always implicitly prepended 6725 to :term:`PROVIDES`, so while using "+=" in the above example may not be 6726 strictly necessary it is recommended to avoid confusion. 6727 6728 In addition to providing recipes under alternate names, the 6729 :term:`PROVIDES` mechanism is also used to implement virtual targets. A 6730 virtual target is a name that corresponds to some particular 6731 functionality (e.g. a Linux kernel). Recipes that provide the 6732 functionality in question list the virtual target in :term:`PROVIDES`. 6733 Recipes that depend on the functionality in question can include the 6734 virtual target in :term:`DEPENDS` to leave the choice of provider open. 6735 6736 Conventionally, virtual targets have names on the form 6737 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part 6738 of the name and has no syntactical significance. 6739 6740 The :term:`PREFERRED_PROVIDER` variable is 6741 used to select which particular recipe provides a virtual target. 6742 6743 .. note:: 6744 6745 A corresponding mechanism for virtual runtime dependencies 6746 (packages) exists. However, the mechanism does not depend on any 6747 special functionality beyond ordinary variable assignments. For 6748 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of 6749 the component that manages the ``/dev`` directory. 6750 6751 Setting the "preferred provider" for runtime dependencies is as 6752 simple as using the following assignment in a configuration file:: 6753 6754 VIRTUAL-RUNTIME_dev_manager = "udev" 6755 6756 6757 :term:`PRSERV_HOST` 6758 The network based :term:`PR` service host and port. 6759 6760 The ``conf/templates/default/local.conf.sample.extended`` configuration 6761 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST` 6762 variable is set:: 6763 6764 PRSERV_HOST = "localhost:0" 6765 6766 You must 6767 set the variable if you want to automatically start a local :ref:`PR 6768 service <dev-manual/packages:working with a pr service>`. You can 6769 set :term:`PRSERV_HOST` to other values to use a remote PR service. 6770 6771 6772 :term:`PSEUDO_IGNORE_PATHS` 6773 A comma-separated (without spaces) list of path prefixes that should be ignored 6774 by pseudo when monitoring and recording file operations, in order to avoid 6775 problems with files being written to outside of the pseudo context and 6776 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list 6777 and can include partial directory (or file) names. 6778 6779 6780 :term:`PTEST_ENABLED` 6781 Specifies whether or not :ref:`Package 6782 Test <dev-manual/packages:testing packages with ptest>` (ptest) 6783 functionality is enabled when building a recipe. You should not set 6784 this variable directly. Enabling and disabling building Package Tests 6785 at build time should be done by adding "ptest" to (or removing it 6786 from) :term:`DISTRO_FEATURES`. 6787 6788 :term:`PV` 6789 The version of the recipe. The version is normally extracted from the 6790 recipe filename. For example, if the recipe is named 6791 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1". 6792 :term:`PV` is generally not overridden within a recipe unless it is 6793 building an unstable (i.e. development) version from a source code 6794 repository (e.g. Git or Subversion). 6795 6796 :term:`PV` is the default value of the :term:`PKGV` variable. 6797 6798 :term:`PYPI_PACKAGE` 6799 When inheriting the :ref:`ref-classes-pypi` class, specifies the 6800 `PyPI <https://pypi.org/>`__ package name to be built. The default value 6801 is set based upon :term:`BPN` (stripping any "python-" or "python3-" 6802 prefix off if present), however for some packages it will need to be set 6803 explicitly if that will not match the package name (e.g. where the 6804 package name has a prefix, underscores, uppercase letters etc.) 6805 6806 :term:`PYTHON_ABI` 6807 When used by recipes that inherit the :ref:`ref-classes-setuptools3` 6808 class, denotes the Application Binary Interface (ABI) currently in use 6809 for Python. By default, the ABI is "m". You do not have to set this 6810 variable as the OpenEmbedded build system sets it for you. 6811 6812 The OpenEmbedded build system uses the ABI to construct directory 6813 names used when installing the Python headers and libraries in 6814 sysroot (e.g. ``.../python3.3m/...``). 6815 6816 :term:`PYTHON_PN` 6817 When used by recipes that inherit the :ref:`ref-classes-setuptools3` 6818 class, specifies the major Python version being built. For Python 3.x, 6819 :term:`PYTHON_PN` would be "python3". You do not have to set this 6820 variable as the OpenEmbedded build system automatically sets it for you. 6821 6822 The variable allows recipes to use common infrastructure such as the 6823 following:: 6824 6825 DEPENDS += "${PYTHON_PN}-native" 6826 6827 In the previous example, 6828 the version of the dependency is :term:`PYTHON_PN`. 6829 6830 :term:`QA_EMPTY_DIRS` 6831 Specifies a list of directories that are expected to be empty when 6832 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or 6833 :term:`WARN_QA` these will be checked and an error or warning 6834 (respectively) will be produced. 6835 6836 The default :term:`QA_EMPTY_DIRS` value is set in 6837 :ref:`insane.bbclass <ref-classes-insane>`. 6838 6839 :term:`QA_EMPTY_DIRS_RECOMMENDATION` 6840 Specifies a recommendation for why a directory must be empty, 6841 which will be included in the error message if a specific directory 6842 is found to contain files. Must be overridden with the directory 6843 path to match on. 6844 6845 If no recommendation is specified for a directory, then the default 6846 "but it is expected to be empty" will be used. 6847 6848 An example message shows if files were present in '/dev':: 6849 6850 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime" 6851 6852 :term:`RANLIB` 6853 The minimal command and arguments to run ``ranlib``. 6854 6855 :term:`RCONFLICTS` 6856 The list of packages that conflict with packages. Note that packages 6857 will not be installed if conflicting packages are not first removed. 6858 6859 Like all package-controlling variables, you must always use them in 6860 conjunction with a package name override. Here is an example:: 6861 6862 RCONFLICTS:${PN} = "another_conflicting_package_name" 6863 6864 BitBake, which the OpenEmbedded build system uses, supports 6865 specifying versioned dependencies. Although the syntax varies 6866 depending on the packaging format, BitBake hides these differences 6867 from you. Here is the general syntax to specify versions with the 6868 :term:`RCONFLICTS` variable:: 6869 6870 RCONFLICTS:${PN} = "package (operator version)" 6871 6872 For ``operator``, you can specify the following: 6873 6874 - = 6875 - < 6876 - > 6877 - <= 6878 - >= 6879 6880 For example, the following sets up a dependency on version 1.2 or 6881 greater of the package ``foo``:: 6882 6883 RCONFLICTS:${PN} = "foo (>= 1.2)" 6884 6885 :term:`RDEPENDS` 6886 Lists runtime dependencies of a package. These dependencies are other 6887 packages that must be installed in order for the package to function 6888 correctly. As an example, the following assignment declares that the 6889 package ``foo`` needs the packages ``bar`` and ``baz`` to be 6890 installed:: 6891 6892 RDEPENDS:foo = "bar baz" 6893 6894 The most common types of package 6895 runtime dependencies are automatically detected and added. Therefore, 6896 most recipes do not need to set :term:`RDEPENDS`. For more information, 6897 see the 6898 ":ref:`overview-manual/concepts:automatically added runtime dependencies`" 6899 section in the Yocto Project Overview and Concepts Manual. 6900 6901 The practical effect of the above :term:`RDEPENDS` assignment is that 6902 ``bar`` and ``baz`` will be declared as dependencies inside the 6903 package ``foo`` when it is written out by one of the 6904 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks. 6905 Exactly how this is done depends on which package format is used, 6906 which is determined by 6907 :term:`PACKAGE_CLASSES`. When the 6908 corresponding package manager installs the package, it will know to 6909 also install the packages on which it depends. 6910 6911 To ensure that the packages ``bar`` and ``baz`` get built, the 6912 previous :term:`RDEPENDS` assignment also causes a task dependency to be 6913 added. This dependency is from the recipe's 6914 :ref:`ref-tasks-build` (not to be confused with 6915 :ref:`ref-tasks-compile`) task to the 6916 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and 6917 ``baz``. 6918 6919 The names of the packages you list within :term:`RDEPENDS` must be the 6920 names of other packages --- they cannot be recipe names. Although 6921 package names and recipe names usually match, the important point 6922 here is that you are providing package names within the :term:`RDEPENDS` 6923 variable. For an example of the default list of packages created from 6924 a recipe, see the :term:`PACKAGES` variable. 6925 6926 Because the :term:`RDEPENDS` variable applies to packages being built, 6927 you should always use the variable in a form with an attached package 6928 name (remember that a single recipe can build multiple packages). For 6929 example, suppose you are building a development package that depends 6930 on the ``perl`` package. In this case, you would use the following 6931 :term:`RDEPENDS` statement:: 6932 6933 RDEPENDS:${PN}-dev += "perl" 6934 6935 In the example, 6936 the development package depends on the ``perl`` package. Thus, the 6937 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of 6938 the variable. 6939 6940 .. note:: 6941 6942 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}`` 6943 by default. This default is set in the BitBake configuration file 6944 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove 6945 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator 6946 rather than the "=" operator. 6947 6948 The package names you use with :term:`RDEPENDS` must appear as they would 6949 in the :term:`PACKAGES` variable. The :term:`PKG` variable 6950 allows a different name to be used for the final package (e.g. the 6951 :ref:`ref-classes-debian` class uses this to rename 6952 packages), but this final package name cannot be used with 6953 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be 6954 independent of the package format used. 6955 6956 BitBake, which the OpenEmbedded build system uses, supports 6957 specifying versioned dependencies. Although the syntax varies 6958 depending on the packaging format, BitBake hides these differences 6959 from you. Here is the general syntax to specify versions with the 6960 :term:`RDEPENDS` variable:: 6961 6962 RDEPENDS:${PN} = "package (operator version)" 6963 6964 For ``operator``, you can specify the following: 6965 6966 - = 6967 - < 6968 - > 6969 - <= 6970 - >= 6971 6972 For version, provide the version number. 6973 6974 .. note:: 6975 6976 You can use :term:`EXTENDPKGV` to provide a full package version 6977 specification. 6978 6979 For example, the following sets up a dependency on version 1.2 or 6980 greater of the package ``foo``:: 6981 6982 RDEPENDS:${PN} = "foo (>= 1.2)" 6983 6984 For information on build-time dependencies, see the :term:`DEPENDS` 6985 variable. You can also see the 6986 ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and 6987 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the 6988 BitBake User Manual for additional information on tasks and dependencies. 6989 6990 :term:`RECIPE_MAINTAINER` 6991 This variable defines the name and e-mail address of the maintainer of a 6992 recipe. Such information can be used by human users submitted changes, 6993 and by automated tools to send notifications, for example about 6994 vulnerabilities or source updates. 6995 6996 The variable can be defined in a global distribution :oe_git:`maintainers.inc 6997 </openembedded-core/tree/meta/conf/distro/include/maintainers.inc>` file:: 6998 6999 meta/conf/distro/include/maintainers.inc:RECIPE_MAINTAINER:pn-sysvinit = "Ross Burton <ross.burton@arm.com>" 7000 7001 It can also be directly defined in a recipe, 7002 for example in the ``libgpiod`` one:: 7003 7004 RECIPE_MAINTAINER = "Bartosz Golaszewski <brgl@bgdev.pl>" 7005 7006 :term:`RECIPE_NO_UPDATE_REASON` 7007 If a recipe should not be replaced by a more recent upstream version, 7008 putting the reason why in this variable in a recipe allows 7009 ``devtool check-upgrade-status`` command to display it, as explained 7010 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" 7011 section. 7012 7013 :term:`RECIPE_SYSROOT` 7014 This variable points to the directory that holds all files populated from 7015 recipes specified in :term:`DEPENDS`. As the name indicates, 7016 think of this variable as a custom root (``/``) for the recipe that will be 7017 used by the compiler in order to find headers and other files needed to complete 7018 its job. 7019 7020 This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET` 7021 according to the type of the recipe and the build target. 7022 7023 To better understand this variable, consider the following examples: 7024 7025 - For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"`` 7026 7027 - For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"`` 7028 or other library sysroot directories. 7029 7030 The default value is ``"${WORKDIR}/recipe-sysroot"``. 7031 Do not modify it. 7032 7033 :term:`RECIPE_SYSROOT_NATIVE` 7034 This is similar to :term:`RECIPE_SYSROOT` but the populated files are from 7035 ``-native`` recipes. This allows a recipe built for the target machine to 7036 use ``native`` tools. 7037 7038 This variable is related to :term:`STAGING_DIR_NATIVE`. 7039 7040 The default value is ``"${WORKDIR}/recipe-sysroot-native"``. 7041 Do not modify it. 7042 7043 :term:`REPODIR` 7044 See :term:`bitbake:REPODIR` in the BitBake manual. 7045 7046 :term:`REQUIRED_DISTRO_FEATURES` 7047 When inheriting the :ref:`ref-classes-features_check` 7048 class, this variable identifies distribution features that must exist 7049 in the current configuration in order for the OpenEmbedded build 7050 system to build the recipe. In other words, if the 7051 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not 7052 appear in :term:`DISTRO_FEATURES` within the current configuration, then 7053 the recipe will be skipped, and if the build system attempts to build 7054 the recipe then an error will be triggered. 7055 7056 :term:`REQUIRED_VERSION` 7057 If there are multiple versions of a recipe available, this variable 7058 determines which version should be given preference. 7059 :term:`REQUIRED_VERSION` works in exactly the same manner as 7060 :term:`PREFERRED_VERSION`, except that if the specified version is not 7061 available then an error message is shown and the build fails 7062 immediately. 7063 7064 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set 7065 for the same recipe, the :term:`REQUIRED_VERSION` value applies. 7066 7067 :term:`RM_WORK_EXCLUDE` 7068 With :ref:`ref-classes-rm-work` enabled, this variable 7069 specifies a list of recipes whose work directories should not be removed. 7070 See the ":ref:`ref-classes-rm-work`" section for more details. 7071 7072 :term:`ROOT_HOME` 7073 Defines the root home directory. By default, this directory is set as 7074 follows in the BitBake configuration file:: 7075 7076 ROOT_HOME ??= "/home/root" 7077 7078 .. note:: 7079 7080 This default value is likely used because some embedded solutions 7081 prefer to have a read-only root filesystem and prefer to keep 7082 writeable data in one place. 7083 7084 You can override the default by setting the variable in any layer or 7085 in the ``local.conf`` file. Because the default is set using a "weak" 7086 assignment (i.e. "??="), you can use either of the following forms to 7087 define your override:: 7088 7089 ROOT_HOME = "/root" 7090 ROOT_HOME ?= "/root" 7091 7092 These 7093 override examples use ``/root``, which is probably the most commonly 7094 used override. 7095 7096 :term:`ROOTFS` 7097 Indicates a filesystem image to include as the root filesystem. 7098 7099 The :term:`ROOTFS` variable is an optional variable used with the 7100 :ref:`ref-classes-image-live` class. 7101 7102 :term:`ROOTFS_POSTINSTALL_COMMAND` 7103 Specifies a list of functions to call after the OpenEmbedded build 7104 system has installed packages. You can specify functions separated by 7105 spaces:: 7106 7107 ROOTFS_POSTINSTALL_COMMAND += "function" 7108 7109 If you need to pass the root filesystem path to a command within a 7110 function, you can use ``${IMAGE_ROOTFS}``, which points to the 7111 directory that becomes the root filesystem image. See the 7112 :term:`IMAGE_ROOTFS` variable for more 7113 information. 7114 7115 :term:`ROOTFS_POSTPROCESS_COMMAND` 7116 Specifies a list of functions to call once the OpenEmbedded build 7117 system has created the root filesystem. You can specify functions 7118 separated by spaces:: 7119 7120 ROOTFS_POSTPROCESS_COMMAND += "function" 7121 7122 If you need to pass the root filesystem path to a command within a 7123 function, you can use ``${IMAGE_ROOTFS}``, which points to the 7124 directory that becomes the root filesystem image. See the 7125 :term:`IMAGE_ROOTFS` variable for more 7126 information. 7127 7128 :term:`ROOTFS_POSTUNINSTALL_COMMAND` 7129 Specifies a list of functions to call after the OpenEmbedded build 7130 system has removed unnecessary packages. When runtime package 7131 management is disabled in the image, several packages are removed 7132 including ``base-passwd``, ``shadow``, and ``update-alternatives``. 7133 You can specify functions separated by spaces:: 7134 7135 ROOTFS_POSTUNINSTALL_COMMAND += "function" 7136 7137 If you need to pass the root filesystem path to a command within a 7138 function, you can use ``${IMAGE_ROOTFS}``, which points to the 7139 directory that becomes the root filesystem image. See the 7140 :term:`IMAGE_ROOTFS` variable for more 7141 information. 7142 7143 :term:`ROOTFS_PREPROCESS_COMMAND` 7144 Specifies a list of functions to call before the OpenEmbedded build 7145 system has created the root filesystem. You can specify functions 7146 separated by spaces:: 7147 7148 ROOTFS_PREPROCESS_COMMAND += "function" 7149 7150 If you need to pass the root filesystem path to a command within a 7151 function, you can use ``${IMAGE_ROOTFS}``, which points to the 7152 directory that becomes the root filesystem image. See the 7153 :term:`IMAGE_ROOTFS` variable for more 7154 information. 7155 7156 :term:`RPROVIDES` 7157 A list of package name aliases that a package also provides. These 7158 aliases are useful for satisfying runtime dependencies of other 7159 packages both during the build and on the target (as specified by 7160 :term:`RDEPENDS`). 7161 7162 .. note:: 7163 7164 A package's own name is implicitly already in its :term:`RPROVIDES` list. 7165 7166 As with all package-controlling variables, you must always use the 7167 variable in conjunction with a package name override. Here is an 7168 example:: 7169 7170 RPROVIDES:${PN} = "widget-abi-2" 7171 7172 :term:`RRECOMMENDS` 7173 A list of packages that extends the usability of a package being 7174 built. The package being built does not depend on this list of 7175 packages in order to successfully build, but rather uses them for 7176 extended usability. To specify runtime dependencies for packages, see 7177 the :term:`RDEPENDS` variable. 7178 7179 The package manager will automatically install the :term:`RRECOMMENDS` 7180 list of packages when installing the built package. However, you can 7181 prevent listed packages from being installed by using the 7182 :term:`BAD_RECOMMENDATIONS`, 7183 :term:`NO_RECOMMENDATIONS`, and 7184 :term:`PACKAGE_EXCLUDE` variables. 7185 7186 Packages specified in :term:`RRECOMMENDS` need not actually be produced. 7187 However, there must be a recipe providing each package, either 7188 through the :term:`PACKAGES` or 7189 :term:`PACKAGES_DYNAMIC` variables or the 7190 :term:`RPROVIDES` variable, or an error will occur 7191 during the build. If such a recipe does exist and the package is not 7192 produced, the build continues without error. 7193 7194 Because the :term:`RRECOMMENDS` variable applies to packages being built, 7195 you should always attach an override to the variable to specify the 7196 particular package whose usability is being extended. For example, 7197 suppose you are building a development package that is extended to 7198 support wireless functionality. In this case, you would use the 7199 following:: 7200 7201 RRECOMMENDS:${PN}-dev += "wireless_package_name" 7202 7203 In the 7204 example, the package name (``${PN}-dev``) must appear as it would in 7205 the :term:`PACKAGES` namespace before any renaming of the output package 7206 by classes such as :ref:`ref-classes-debian`. 7207 7208 BitBake, which the OpenEmbedded build system uses, supports 7209 specifying versioned recommends. Although the syntax varies depending 7210 on the packaging format, BitBake hides these differences from you. 7211 Here is the general syntax to specify versions with the 7212 :term:`RRECOMMENDS` variable:: 7213 7214 RRECOMMENDS:${PN} = "package (operator version)" 7215 7216 For ``operator``, you can specify the following: 7217 7218 - = 7219 - < 7220 - > 7221 - <= 7222 - >= 7223 7224 For example, the following sets up a recommend on version 1.2 or 7225 greater of the package ``foo``:: 7226 7227 RRECOMMENDS:${PN} = "foo (>= 1.2)" 7228 7229 :term:`RREPLACES` 7230 A list of packages replaced by a package. The package manager uses 7231 this variable to determine which package should be installed to 7232 replace other package(s) during an upgrade. In order to also have the 7233 other package(s) removed at the same time, you must add the name of 7234 the other package to the :term:`RCONFLICTS` variable. 7235 7236 As with all package-controlling variables, you must use this variable 7237 in conjunction with a package name override. Here is an example:: 7238 7239 RREPLACES:${PN} = "other_package_being_replaced" 7240 7241 BitBake, which the OpenEmbedded build system uses, supports 7242 specifying versioned replacements. Although the syntax varies 7243 depending on the packaging format, BitBake hides these differences 7244 from you. Here is the general syntax to specify versions with the 7245 :term:`RREPLACES` variable:: 7246 7247 RREPLACES:${PN} = "package (operator version)" 7248 7249 For ``operator``, you can specify the following: 7250 7251 - = 7252 - < 7253 - > 7254 - <= 7255 - >= 7256 7257 For example, the following sets up a replacement using version 1.2 7258 or greater of the package ``foo``:: 7259 7260 RREPLACES:${PN} = "foo (>= 1.2)" 7261 7262 :term:`RSUGGESTS` 7263 A list of additional packages that you can suggest for installation 7264 by the package manager at the time a package is installed. Not all 7265 package managers support this functionality. 7266 7267 As with all package-controlling variables, you must always use this 7268 variable in conjunction with a package name override. Here is an 7269 example:: 7270 7271 RSUGGESTS:${PN} = "useful_package another_package" 7272 7273 :term:`RUST_CHANNEL` 7274 Specifies which version of Rust to build - "stable", "beta" or "nightly". 7275 The default value is "stable". Set this at your own risk, as values other 7276 than "stable" are not guaranteed to work at a given time. 7277 7278 :term:`S` 7279 The location in the :term:`Build Directory` where 7280 unpacked recipe source code resides. By default, this directory is 7281 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``, 7282 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe 7283 version. If the source tarball extracts the code to a directory named 7284 anything other than ``${BPN}-${PV}``, or if the source code is 7285 fetched from an SCM such as Git or Subversion, then you must set 7286 :term:`S` in the recipe so that the OpenEmbedded build system knows where 7287 to find the unpacked source. 7288 7289 As an example, assume a :term:`Source Directory` 7290 top-level folder named ``poky`` and a default :term:`Build Directory` at 7291 ``poky/build``. In this case, the work directory the build system 7292 uses to keep the unpacked recipe for ``db`` is the following:: 7293 7294 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 7295 7296 The unpacked source code resides in the ``db-5.1.19`` folder. 7297 7298 This next example assumes a Git repository. By default, Git 7299 repositories are cloned to ``${WORKDIR}/git`` during 7300 :ref:`ref-tasks-fetch`. Since this path is different 7301 from the default value of :term:`S`, you must set it specifically so the 7302 source can be located:: 7303 7304 SRC_URI = "git://path/to/repo.git;branch=main" 7305 S = "${WORKDIR}/git" 7306 7307 :term:`SANITY_REQUIRED_UTILITIES` 7308 Specifies a list of command-line utilities that should be checked for 7309 during the initial sanity checking process when running BitBake. If 7310 any of the utilities are not installed on the build host, then 7311 BitBake immediately exits with an error. 7312 7313 :term:`SANITY_TESTED_DISTROS` 7314 A list of the host distribution identifiers that the build system has 7315 been tested against. Identifiers consist of the host distributor ID 7316 followed by the release, as reported by the ``lsb_release`` tool or 7317 as read from ``/etc/lsb-release``. Separate the list items with 7318 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is 7319 not empty and the current value of 7320 :term:`NATIVELSBSTRING` does not appear in the 7321 list, then the build system reports a warning that indicates the 7322 current host distribution has not been tested as a build host. 7323 7324 :term:`SDK_ARCH` 7325 The target architecture for the SDK. Typically, you do not directly 7326 set this variable. Instead, use :term:`SDKMACHINE`. 7327 7328 :term:`SDK_ARCHIVE_TYPE` 7329 Specifies the type of archive to create for the SDK. Valid values: 7330 7331 - ``tar.xz`` (default) 7332 - ``zip`` 7333 7334 Only one archive type can be specified. 7335 7336 :term:`SDK_BUILDINFO_FILE` 7337 When using the :ref:`ref-classes-image-buildinfo` class, 7338 specifies the file in the SDK to write the build information into. The 7339 default value is "``/buildinfo``". 7340 7341 :term:`SDK_CUSTOM_TEMPLATECONF` 7342 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to 7343 "1" and a ``conf/templateconf.cfg`` file exists in the :term:`Build Directory` 7344 (:term:`TOPDIR`) then this will be copied into the SDK. 7345 7346 :term:`SDK_DEPLOY` 7347 The directory set up and used by the 7348 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which the 7349 SDK is deployed. The :ref:`populate_sdk_base <ref-classes-populate-sdk>` 7350 class defines :term:`SDK_DEPLOY` as follows:: 7351 7352 SDK_DEPLOY = "${TMPDIR}/deploy/sdk" 7353 7354 :term:`SDK_DIR` 7355 The parent directory used by the OpenEmbedded build system when 7356 creating SDK output. The 7357 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines 7358 the variable as follows:: 7359 7360 SDK_DIR = "${WORKDIR}/sdk" 7361 7362 .. note:: 7363 7364 The :term:`SDK_DIR` directory is a temporary directory as it is part of 7365 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`. 7366 7367 :term:`SDK_EXT_TYPE` 7368 Controls whether or not shared state artifacts are copied into the 7369 extensible SDK. The default value of "full" copies all of the 7370 required shared state artifacts into the extensible SDK. The value 7371 "minimal" leaves these artifacts out of the SDK. 7372 7373 .. note:: 7374 7375 If you set the variable to "minimal", you need to ensure 7376 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the 7377 artifacts to be fetched as needed. 7378 7379 :term:`SDK_HOST_MANIFEST` 7380 The manifest file for the host part of the SDK. This file lists all 7381 the installed packages that make up the host part of the SDK. The 7382 file contains package information on a line-per-package basis as 7383 follows:: 7384 7385 packagename packagearch version 7386 7387 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class 7388 defines the manifest file as follows:: 7389 7390 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" 7391 7392 The location is derived using the :term:`SDK_DEPLOY` and 7393 :term:`TOOLCHAIN_OUTPUTNAME` variables. 7394 7395 :term:`SDK_INCLUDE_PKGDATA` 7396 When set to "1", specifies to include the packagedata for all recipes 7397 in the "world" target in the extensible SDK. Including this data 7398 allows the ``devtool search`` command to find these recipes in search 7399 results, as well as allows the ``devtool add`` command to map 7400 dependencies more effectively. 7401 7402 .. note:: 7403 7404 Enabling the :term:`SDK_INCLUDE_PKGDATA` 7405 variable significantly increases build time because all of world 7406 needs to be built. Enabling the variable also slightly increases 7407 the size of the extensible SDK. 7408 7409 :term:`SDK_INCLUDE_TOOLCHAIN` 7410 When set to "1", specifies to include the toolchain in the extensible 7411 SDK. Including the toolchain is useful particularly when 7412 :term:`SDK_EXT_TYPE` is set to "minimal" to keep 7413 the SDK reasonably small but you still want to provide a usable 7414 toolchain. For example, suppose you want to use the toolchain from an 7415 IDE or from other tools and you do not want to perform additional 7416 steps to install the toolchain. 7417 7418 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if 7419 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if 7420 :term:`SDK_EXT_TYPE` is set to "full". 7421 7422 :term:`SDK_NAME` 7423 The base name for SDK output files. The default value (as set in 7424 ``meta-poky/conf/distro/poky.conf``) is derived from the 7425 :term:`DISTRO`, 7426 :term:`TCLIBC`, 7427 :term:`SDKMACHINE`, 7428 :term:`IMAGE_BASENAME`, 7429 :term:`TUNE_PKGARCH`, and 7430 :term:`MACHINE` variables:: 7431 7432 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" 7433 7434 :term:`SDK_OS` 7435 Specifies the operating system for which the SDK will be built. The 7436 default value is the value of :term:`BUILD_OS`. 7437 7438 :term:`SDK_OUTPUT` 7439 The location used by the OpenEmbedded build system when creating SDK 7440 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` 7441 class defines the variable as follows:: 7442 7443 SDK_DIR = "${WORKDIR}/sdk" 7444 SDK_OUTPUT = "${SDK_DIR}/image" 7445 SDK_DEPLOY = "${DEPLOY_DIR}/sdk" 7446 7447 .. note:: 7448 7449 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of 7450 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is 7451 :term:`SDK_DEPLOY`. 7452 7453 :term:`SDK_PACKAGE_ARCHS` 7454 Specifies a list of architectures compatible with the SDK machine. 7455 This variable is set automatically and should not normally be 7456 hand-edited. Entries are separated using spaces and listed in order 7457 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any 7458 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}". 7459 7460 :term:`SDK_POSTPROCESS_COMMAND` 7461 Specifies a list of functions to call once the OpenEmbedded build 7462 system creates the SDK. You can specify functions separated by 7463 spaces: 7464 7465 SDK_POSTPROCESS_COMMAND += "function" 7466 7467 If you need to pass an SDK path to a command within a function, you 7468 can use ``${SDK_DIR}``, which points to the parent directory used by 7469 the OpenEmbedded build system when creating SDK output. See the 7470 :term:`SDK_DIR` variable for more information. 7471 7472 :term:`SDK_PREFIX` 7473 The toolchain binary prefix used for 7474 :ref:`ref-classes-nativesdk` recipes. The 7475 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the 7476 :term:`TARGET_PREFIX` when building 7477 ``nativesdk`` recipes. The default value is "${SDK_SYS}-". 7478 7479 :term:`SDK_RECRDEP_TASKS` 7480 A list of shared state tasks added to the extensible SDK. By default, 7481 the following tasks are added: 7482 7483 - :ref:`ref-tasks-populate_lic` 7484 - :ref:`ref-tasks-package_qa` 7485 - :ref:`ref-tasks-populate_sysroot` 7486 - :ref:`ref-tasks-deploy` 7487 7488 Despite the default value of "" for the 7489 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added 7490 to the SDK. To specify tasks beyond these four, you need to use the 7491 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional 7492 tasks that are needed in order to build 7493 :term:`SDK_TARGETS`). 7494 7495 :term:`SDK_SYS` 7496 Specifies the system, including the architecture and the operating 7497 system, for which the SDK will be built. 7498 7499 The OpenEmbedded build system automatically sets this variable based 7500 on :term:`SDK_ARCH`, 7501 :term:`SDK_VENDOR`, and 7502 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS` 7503 variable yourself. 7504 7505 :term:`SDK_TARGET_MANIFEST` 7506 The manifest file for the target part of the SDK. This file lists all 7507 the installed packages that make up the target part of the SDK. The 7508 file contains package information on a line-per-package basis as 7509 follows:: 7510 7511 packagename packagearch version 7512 7513 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class 7514 defines the manifest file as follows:: 7515 7516 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" 7517 7518 The location is derived using the :term:`SDK_DEPLOY` and 7519 :term:`TOOLCHAIN_OUTPUTNAME` variables. 7520 7521 :term:`SDK_TARGETS` 7522 A list of targets to install from shared state as part of the 7523 standard or extensible SDK installation. The default value is "${PN}" 7524 (i.e. the image from which the SDK is built). 7525 7526 The :term:`SDK_TARGETS` variable is an internal variable and typically 7527 would not be changed. 7528 7529 :term:`SDK_TITLE` 7530 The title to be printed when running the SDK installer. By default, 7531 this title is based on the :term:`DISTRO_NAME` or 7532 :term:`DISTRO` variable and is set in the 7533 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as 7534 follows:: 7535 7536 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" 7537 7538 For the default distribution "poky", 7539 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)". 7540 7541 For information on how to change this default title, see the 7542 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`" 7543 section in the Yocto Project Application Development and the 7544 Extensible Software Development Kit (eSDK) manual. 7545 7546 :term:`SDK_TOOLCHAIN_LANGS` 7547 Specifies programming languages to support in the SDK, as a 7548 space-separated list. Currently supported items are ``rust`` and ``go``. 7549 7550 :term:`SDK_UPDATE_URL` 7551 An optional URL for an update server for the extensible SDK. If set, 7552 the value is used as the default update server when running 7553 ``devtool sdk-update`` within the extensible SDK. 7554 7555 :term:`SDK_VENDOR` 7556 Specifies the name of the SDK vendor. 7557 7558 :term:`SDK_VERSION` 7559 Specifies the version of the SDK. The Poky distribution configuration file 7560 (``/meta-poky/conf/distro/poky.conf``) sets the default 7561 :term:`SDK_VERSION` as follows:: 7562 7563 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" 7564 7565 For additional information, see the 7566 :term:`DISTRO_VERSION` and 7567 :term:`METADATA_REVISION` variables. 7568 7569 :term:`SDK_ZIP_OPTIONS` 7570 Specifies extra options to pass to the ``zip`` command when zipping the SDK 7571 (i.e. when :term:`SDK_ARCHIVE_TYPE` is set to "zip"). The default value is 7572 "-y". 7573 7574 :term:`SDKEXTPATH` 7575 The default installation directory for the Extensible SDK. By 7576 default, this directory is based on the :term:`DISTRO` 7577 variable and is set in the 7578 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as 7579 follows:: 7580 7581 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" 7582 7583 For the 7584 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk". 7585 7586 For information on how to change this default directory, see the 7587 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`" 7588 section in the Yocto Project Application Development and the 7589 Extensible Software Development Kit (eSDK) manual. 7590 7591 :term:`SDKIMAGE_FEATURES` 7592 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to 7593 the SDK generated from an image using the following command:: 7594 7595 $ bitbake -c populate_sdk imagename 7596 7597 :term:`SDKMACHINE` 7598 The machine for which the SDK is built. In other words, the SDK is built 7599 such that it runs on the target you specify with the :term:`SDKMACHINE` 7600 value. The value points to a corresponding ``.conf`` file under 7601 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``, 7602 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are 7603 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`. 7604 7605 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the 7606 architecture of the build machine. 7607 7608 .. note:: 7609 7610 You cannot set the :term:`SDKMACHINE` 7611 variable in your distribution configuration file. If you do, the 7612 configuration will not take effect. 7613 7614 :term:`SDKPATH` 7615 Defines the path offered to the user for installation of the SDK that 7616 is generated by the OpenEmbedded build system. The path appears as 7617 the default location for installing the SDK when you run the SDK's 7618 installation script. You can override the offered path when you run 7619 the script. 7620 7621 :term:`SDKTARGETSYSROOT` 7622 The full path to the sysroot used for cross-compilation within an SDK 7623 as it will be when installed into the default 7624 :term:`SDKPATH`. 7625 7626 :term:`SECTION` 7627 The section in which packages should be categorized. Package 7628 management utilities can make use of this variable. 7629 7630 :term:`SELECTED_OPTIMIZATION` 7631 Specifies the optimization flags passed to the C compiler when 7632 building for the target. The flags are passed through the default 7633 value of the :term:`TARGET_CFLAGS` variable. 7634 7635 The :term:`SELECTED_OPTIMIZATION` variable takes the value of 7636 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which 7637 case the value of :term:`DEBUG_OPTIMIZATION` is used. 7638 7639 :term:`SERIAL_CONSOLES` 7640 Defines a serial console (TTY) to enable using 7641 :wikipedia:`getty <Getty_(Unix)>`. Provide a value that specifies the 7642 baud rate followed by the TTY device name separated by a semicolon. 7643 Use spaces to separate multiple devices:: 7644 7645 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" 7646 7647 :term:`SETUPTOOLS_BUILD_ARGS` 7648 When used by recipes that inherit the :ref:`ref-classes-setuptools3` 7649 class, this variable can be used to specify additional arguments to be 7650 passed to ``setup.py build`` in the ``setuptools3_do_compile()`` task. 7651 7652 :term:`SETUPTOOLS_INSTALL_ARGS` 7653 When used by recipes that inherit the :ref:`ref-classes-setuptools3` 7654 class, this variable can be used to specify additional arguments to be 7655 passed to ``setup.py install`` in the ``setuptools3_do_install()`` task. 7656 7657 :term:`SETUPTOOLS_SETUP_PATH` 7658 When used by recipes that inherit the :ref:`ref-classes-setuptools3` 7659 class, this variable should be used to specify the directory in which 7660 the ``setup.py`` file is located if it is not at the root of the source 7661 tree (as specified by :term:`S`). For example, in a recipe where the 7662 sources are fetched from a Git repository and ``setup.py`` is in a 7663 ``python/pythonmodule`` subdirectory, you would have this:: 7664 7665 S = "${WORKDIR}/git" 7666 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule" 7667 7668 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS` 7669 A list of recipe dependencies that should not be used to determine 7670 signatures of tasks from one recipe when they depend on tasks from 7671 another recipe. For example:: 7672 7673 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2" 7674 7675 In the previous example, ``intone`` depends on ``mplayer2``. 7676 7677 You can use the special token ``"*"`` on the left-hand side of the 7678 dependency to match all recipes except the one on the right-hand 7679 side. Here is an example:: 7680 7681 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native" 7682 7683 In the previous example, all recipes except ``quilt-native`` ignore 7684 task signatures from the ``quilt-native`` recipe when determining 7685 their task signatures. 7686 7687 Use of this variable is one mechanism to remove dependencies that 7688 affect task signatures and thus force rebuilds when a recipe changes. 7689 7690 .. note:: 7691 7692 If you add an inappropriate dependency for a recipe relationship, 7693 the software might break during runtime if the interface of the 7694 second recipe was changed after the first recipe had been built. 7695 7696 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` 7697 A list of recipes that are completely stable and will never change. 7698 The ABI for the recipes in the list are presented by output from the 7699 tasks run to build the recipe. Use of this variable is one way to 7700 remove dependencies from one recipe on another that affect task 7701 signatures and thus force rebuilds when the recipe changes. 7702 7703 .. note:: 7704 7705 If you add an inappropriate variable to this list, the software 7706 might break at runtime if the interface of the recipe was changed 7707 after the other had been built. 7708 7709 :term:`SITEINFO_BITS` 7710 Specifies the number of bits for the target system CPU. The value 7711 should be either "32" or "64". 7712 7713 :term:`SITEINFO_ENDIANNESS` 7714 Specifies the endian byte order of the target system. The value 7715 should be either "le" for little-endian or "be" for big-endian. 7716 7717 :term:`SKIP_FILEDEPS` 7718 Enables removal of all files from the "Provides" section of an RPM 7719 package. Removal of these files is required for packages containing 7720 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``. 7721 7722 To enable file removal, set the variable to "1" in your 7723 ``conf/local.conf`` configuration file in your: 7724 :term:`Build Directory`:: 7725 7726 SKIP_FILEDEPS = "1" 7727 7728 :term:`SKIP_RECIPE` 7729 Used to prevent the OpenEmbedded build system from building a given 7730 recipe. Specify the :term:`PN` value as a variable flag (``varflag``) 7731 and provide a reason, which will be reported when attempting to 7732 build the recipe. 7733 7734 To prevent a recipe from being built, use the :term:`SKIP_RECIPE` 7735 variable in your ``local.conf`` file or distribution configuration. 7736 Here is an example which prevents ``myrecipe`` from being built:: 7737 7738 SKIP_RECIPE[myrecipe] = "Not supported by our organization." 7739 7740 :term:`SOC_FAMILY` 7741 A colon-separated list grouping together machines based upon the same 7742 family of SoC (System On Chip). You typically set this variable in a 7743 common ``.inc`` file that you include in the configuration files of all 7744 the machines. 7745 7746 .. note:: 7747 7748 You must include ``conf/machine/include/soc-family.inc`` for this 7749 variable to appear in :term:`MACHINEOVERRIDES`. 7750 7751 :term:`SOLIBS` 7752 Defines the suffix for shared libraries used on the target platform. 7753 By default, this suffix is ".so.*" for all Linux-based systems and is 7754 defined in the ``meta/conf/bitbake.conf`` configuration file. 7755 7756 You will see this variable referenced in the default values of 7757 ``FILES:${PN}``. 7758 7759 :term:`SOLIBSDEV` 7760 Defines the suffix for the development symbolic link (symlink) for 7761 shared libraries on the target platform. By default, this suffix is 7762 ".so" for Linux-based systems and is defined in the 7763 ``meta/conf/bitbake.conf`` configuration file. 7764 7765 You will see this variable referenced in the default values of 7766 ``FILES:${PN}-dev``. 7767 7768 :term:`SOURCE_DATE_EPOCH` 7769 This defines a date expressed in number of seconds since 7770 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by 7771 multiple build systems to force a timestamp in built binaries. 7772 Many upstream projects already support this variable. 7773 7774 You will find more details in the `official specifications 7775 <https://reproducible-builds.org/specs/source-date-epoch/>`__. 7776 7777 A value for each recipe is computed from the sources by 7778 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`. 7779 7780 If a recipe wishes to override the default behavior, it should set its 7781 own :term:`SOURCE_DATE_EPOCH` value:: 7782 7783 SOURCE_DATE_EPOCH = "1613559011" 7784 7785 :term:`SOURCE_MIRROR_FETCH` 7786 When you are fetching files to create a mirror of sources (i.e. 7787 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in 7788 your ``local.conf`` configuration file ensures the source for all 7789 recipes are fetched regardless of whether or not a recipe is 7790 compatible with the configuration. A recipe is considered 7791 incompatible with the currently configured machine when either or 7792 both the :term:`COMPATIBLE_MACHINE` 7793 variable and :term:`COMPATIBLE_HOST` variables 7794 specify compatibility with a machine other than that of the current 7795 machine or host. 7796 7797 .. note:: 7798 7799 Do not set the :term:`SOURCE_MIRROR_FETCH` 7800 variable unless you are creating a source mirror. In other words, 7801 do not set the variable during a normal build. 7802 7803 :term:`SOURCE_MIRROR_URL` 7804 Defines your own :term:`PREMIRRORS` from which to 7805 first fetch source before attempting to fetch from the upstream 7806 specified in :term:`SRC_URI`. 7807 7808 To use this variable, you must globally inherit the 7809 :ref:`ref-classes-own-mirrors` class and then provide 7810 the URL to your mirrors. Here is the general syntax:: 7811 7812 INHERIT += "own-mirrors" 7813 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" 7814 7815 .. note:: 7816 7817 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`. 7818 7819 :term:`SPDX_ARCHIVE_PACKAGED` 7820 This option allows to add to :term:`SPDX` output compressed archives 7821 of the files in the generated target packages. 7822 7823 Such archives are available in 7824 ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst`` 7825 under the :term:`Build Directory`. 7826 7827 Enable this option as follows:: 7828 7829 SPDX_ARCHIVE_PACKAGED = "1" 7830 7831 According to our tests on release 4.1 "langdale", building 7832 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this 7833 option multiplied the size of the ``tmp/deploy/spdx`` directory by a 7834 factor of 13 (+1.6 GiB for this image), compared to just using the 7835 :ref:`ref-classes-create-spdx` class with no option. 7836 7837 Note that this option doesn't increase the size of :term:`SPDX` 7838 files in ``tmp/deploy/images/MACHINE``. 7839 7840 :term:`SPDX_ARCHIVE_SOURCES` 7841 This option allows to add to :term:`SPDX` output compressed archives 7842 of the sources for packages installed on the target. It currently 7843 only works when :term:`SPDX_INCLUDE_SOURCES` is set. 7844 7845 This is one way of fulfilling "source code access" license 7846 requirements. 7847 7848 Such source archives are available in 7849 ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst`` 7850 under the :term:`Build Directory`. 7851 7852 Enable this option as follows:: 7853 7854 SPDX_INCLUDE_SOURCES = "1" 7855 SPDX_ARCHIVE_SOURCES = "1" 7856 7857 According to our tests on release 4.1 "langdale", building 7858 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling 7859 these options multiplied the size of the ``tmp/deploy/spdx`` 7860 directory by a factor of 11 (+1.4 GiB for this image), 7861 compared to just using the :ref:`ref-classes-create-spdx` 7862 class with no option. 7863 7864 Note that using this option only marginally increases the size 7865 of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/`` 7866 (+ 0.07\% with the tested image), compared to just enabling 7867 :term:`SPDX_INCLUDE_SOURCES`. 7868 7869 :term:`SPDX_CUSTOM_ANNOTATION_VARS` 7870 This option allows to associate `SPDX annotations 7871 <https://spdx.github.io/spdx-spec/v2.3/annotations/>`__ to a recipe, 7872 using the values of variables in the recipe:: 7873 7874 ANNOTATION1 = "First annotation for recipe" 7875 ANNOTATION2 = "Second annotation for recipe" 7876 SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2" 7877 7878 This will add a new block to the recipe ``.sdpx.json`` output:: 7879 7880 "annotations": [ 7881 { 7882 "annotationDate": "2023-04-18T08:32:12Z", 7883 "annotationType": "OTHER", 7884 "annotator": "Tool: oe-spdx-creator - 1.0", 7885 "comment": "ANNOTATION1=First annotation for recipe" 7886 }, 7887 { 7888 "annotationDate": "2023-04-18T08:32:12Z", 7889 "annotationType": "OTHER", 7890 "annotator": "Tool: oe-spdx-creator - 1.0", 7891 "comment": "ANNOTATION2=Second annotation for recipe" 7892 } 7893 ], 7894 7895 :term:`SPDX_INCLUDE_SOURCES` 7896 This option allows to add a description of the source files used to build 7897 the host tools and the target packages, to the ``spdx.json`` files in 7898 ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`. 7899 As a consequence, the ``spdx.json`` files under the ``by-namespace`` and 7900 ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also 7901 modified to include references to such source file descriptions. 7902 7903 Enable this option as follows:: 7904 7905 SPDX_INCLUDE_SOURCES = "1" 7906 7907 According to our tests on release 4.1 "langdale", building 7908 ``core-image-minimal`` for the ``qemux86-64`` machine, enabling 7909 this option multiplied the total size of the ``tmp/deploy/spdx`` 7910 directory by a factor of 3 (+291 MiB for this image), 7911 and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in 7912 ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this 7913 image), compared to just using the :ref:`ref-classes-create-spdx` class 7914 with no option. 7915 7916 :term:`SPDX_PRETTY` 7917 This option makes the SPDX output more human-readable, using 7918 identation and newlines, instead of the default output in a 7919 single line:: 7920 7921 SPDX_PRETTY = "1" 7922 7923 The generated SPDX files are approximately 20% bigger, but 7924 this option is recommended if you want to inspect the SPDX 7925 output files with a text editor. 7926 7927 :term:`SPDXLICENSEMAP` 7928 Maps commonly used license names to their SPDX counterparts found in 7929 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP` 7930 mappings, see the ``meta/conf/licenses.conf`` file. 7931 7932 For additional information, see the :term:`LICENSE` 7933 variable. 7934 7935 :term:`SPECIAL_PKGSUFFIX` 7936 A list of prefixes for :term:`PN` used by the OpenEmbedded 7937 build system to create variants of recipes or packages. The list 7938 specifies the prefixes to strip off during certain circumstances such 7939 as the generation of the :term:`BPN` variable. 7940 7941 :term:`SPL_BINARY` 7942 The file type for the Secondary Program Loader (SPL). Some devices 7943 use an SPL from which to boot (e.g. the BeagleBone development 7944 board). For such cases, you can declare the file type of the SPL 7945 binary in the ``u-boot.inc`` include file, which is used in the 7946 U-Boot recipe. 7947 7948 The SPL file type is set to "null" by default in the ``u-boot.inc`` 7949 file as follows:: 7950 7951 # Some versions of u-boot build an SPL (Second Program Loader) image that 7952 # should be packaged along with the u-boot binary as well as placed in the 7953 # deploy directory. For those versions they can set the following variables 7954 # to allow packaging the SPL. 7955 SPL_BINARY ?= "" 7956 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" 7957 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" 7958 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" 7959 7960 The :term:`SPL_BINARY` variable helps form 7961 various ``SPL_*`` variables used by the OpenEmbedded build system. 7962 7963 See the BeagleBone machine configuration example in the 7964 ":ref:`dev-manual/layers:adding a layer using the \`\`bitbake-layers\`\` script`" 7965 section in the Yocto Project Board Support Package Developer's Guide 7966 for additional information. 7967 7968 :term:`SPL_MKIMAGE_DTCOPTS` 7969 Options for the device tree compiler passed to ``mkimage -D`` feature 7970 while creating a FIT image with the :ref:`ref-classes-uboot-sign` 7971 class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the 7972 :ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option 7973 to ``mkimage``. 7974 7975 The default value is set to "" by the :ref:`ref-classes-uboot-config` 7976 class. 7977 7978 :term:`SPL_SIGN_ENABLE` 7979 Enable signing of the U-Boot FIT image. The default value is "0". 7980 This variable is used by the :ref:`ref-classes-uboot-sign` class. 7981 7982 :term:`SPL_SIGN_KEYDIR` 7983 Location of the directory containing the RSA key and certificate used for 7984 signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign` 7985 class. 7986 7987 :term:`SPL_SIGN_KEYNAME` 7988 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class 7989 for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR` 7990 directory. If we have for example a ``dev.key`` key and a ``dev.crt`` 7991 certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will 7992 have to set :term:`SPL_SIGN_KEYNAME` to ``dev``. 7993 7994 :term:`SPLASH` 7995 This variable, used by the :ref:`ref-classes-image` class, allows 7996 to choose splashscreen applications. Set it to the names of packages 7997 for such applications to use. This variable is set by default to 7998 ``psplash``. 7999 8000 :term:`SPLASH_IMAGES` 8001 This variable, used by the ``psplash`` recipe, allows to customize 8002 the default splashscreen image. 8003 8004 Specified images in PNG format are converted to ``.h`` files by the recipe, 8005 and are included in the ``psplash`` binary, so you won't find them in 8006 the root filesystem. 8007 8008 To make such a change, it is recommended to customize the 8009 ``psplash`` recipe in a custom layer. Here is an example structure for 8010 an ``ACME`` board:: 8011 8012 meta-acme/recipes-core/psplash 8013 ├── files 8014 │ └── logo-acme.png 8015 └── psplash_%.bbappend 8016 8017 And here are the contents of the ``psplash_%.bbappend`` file in 8018 this example:: 8019 8020 SPLASH_IMAGES = "file://logo-acme.png;outsuffix=default" 8021 FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 8022 8023 You could even add specific configuration options for ``psplash``, 8024 for example:: 8025 8026 EXTRA_OECONF += "--disable-startup-msg --enable-img-fullscreen" 8027 8028 For information on append files, see the 8029 ":ref:`dev-manual/layers:appending other layers metadata with your layer`" 8030 section. 8031 8032 :term:`SRCREV_FORMAT` 8033 See :term:`bitbake:SRCREV_FORMAT` in the BitBake manual. 8034 8035 :term:`SRC_URI` 8036 8037 See the BitBake manual for the initial description for this variable: 8038 :term:`bitbake:SRC_URI`. 8039 8040 The following features are added by OpenEmbedded and the Yocto Project. 8041 8042 There are standard and recipe-specific options. Here are standard ones: 8043 8044 - ``apply`` --- whether to apply the patch or not. The default 8045 action is to apply the patch. 8046 8047 - ``striplevel`` --- which striplevel to use when applying the 8048 patch. The default level is 1. 8049 8050 - ``patchdir`` --- specifies the directory in which the patch should 8051 be applied. The default is ``${``\ :term:`S`\ ``}``. 8052 8053 Here are options specific to recipes building code from a revision 8054 control system: 8055 8056 - ``mindate`` --- apply the patch only if 8057 :term:`SRCDATE` is equal to or greater than 8058 ``mindate``. 8059 8060 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later 8061 than ``maxdate``. 8062 8063 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or 8064 greater than ``minrev``. 8065 8066 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later 8067 than ``maxrev``. 8068 8069 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to 8070 ``rev``. 8071 8072 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to 8073 ``rev``. 8074 8075 .. note:: 8076 8077 If you want the build system to pick up files specified through 8078 a :term:`SRC_URI` statement from your append file, you need to be 8079 sure to extend the :term:`FILESPATH` variable by also using the 8080 :term:`FILESEXTRAPATHS` variable from within your append file. 8081 8082 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` 8083 By default, the OpenEmbedded build system automatically detects 8084 whether :term:`SRC_URI` contains files that are machine-specific. If so, 8085 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this 8086 variable to "0" disables this behavior. 8087 8088 :term:`SRCDATE` 8089 The date of the source code used to build the package. This variable 8090 applies only if the source was fetched from a Source Code Manager 8091 (SCM). 8092 8093 :term:`SRCPV` 8094 Returns the version string of the current package. This string is 8095 used to help define the value of :term:`PV`. 8096 8097 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` 8098 configuration file in the :term:`Source Directory` as 8099 follows:: 8100 8101 SRCPV = "${@bb.fetch2.get_srcrev(d)}" 8102 8103 Recipes that need to define :term:`PV` do so with the help of the 8104 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) 8105 located in ``meta/recipes-connectivity`` in the Source Directory 8106 defines :term:`PV` as follows:: 8107 8108 PV = "0.12-git${SRCPV}" 8109 8110 :term:`SRCREV` 8111 The revision of the source code used to build the package. This 8112 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note 8113 that if you want to build a fixed revision and you want to avoid 8114 performing a query on the remote repository every time BitBake parses 8115 your recipe, you should specify a :term:`SRCREV` that is a full revision 8116 identifier (e.g. the full SHA hash in git) and not just a tag. 8117 8118 .. note:: 8119 8120 For information on limitations when inheriting the latest revision 8121 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable 8122 description and the 8123 ":ref:`dev-manual/packages:automatically incrementing a package version number`" 8124 section, which is in the Yocto Project Development Tasks Manual. 8125 8126 :term:`SRCTREECOVEREDTASKS` 8127 A list of tasks that are typically not relevant (and therefore skipped) 8128 when building using the :ref:`ref-classes-externalsrc` 8129 class. The default value as set in that class file is the set of tasks 8130 that are rarely needed when using external source:: 8131 8132 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch" 8133 8134 The notable exception is when processing external kernel source as 8135 defined in the :ref:`ref-classes-kernel-yocto` class file (formatted for 8136 aesthetics):: 8137 8138 SRCTREECOVEREDTASKS += "\ 8139 do_validate_branches \ 8140 do_kernel_configcheck \ 8141 do_kernel_checkout \ 8142 do_fetch \ 8143 do_unpack \ 8144 do_patch \ 8145 " 8146 8147 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD` 8148 variables for more information. 8149 8150 :term:`SSTATE_DIR` 8151 The directory for the shared state cache. 8152 8153 :term:`SSTATE_EXCLUDEDEPS_SYSROOT` 8154 This variable allows to specify indirect dependencies to exclude 8155 from sysroots, for example to avoid the situations when a dependency on 8156 any ``-native`` recipe will pull in all dependencies of that recipe 8157 in the recipe sysroot. This behaviour might not always be wanted, 8158 for example when that ``-native`` recipe depends on build tools 8159 that are not relevant for the current recipe. 8160 8161 This way, irrelevant dependencies are ignored, which could have 8162 prevented the reuse of prebuilt artifacts stored in the Shared 8163 State Cache. 8164 8165 :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular 8166 expressions of recipe and dependency to ignore. An example 8167 is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`:: 8168 8169 # Nothing needs to depend on libc-initial 8170 # base-passwd/shadow-sysroot don't need their dependencies 8171 SSTATE_EXCLUDEDEPS_SYSROOT += "\ 8172 .*->.*-initial.* \ 8173 .*(base-passwd|shadow-sysroot)->.* \ 8174 " 8175 8176 The ``->`` substring represents the dependency between 8177 the two regular expressions. 8178 8179 :term:`SSTATE_MIRROR_ALLOW_NETWORK` 8180 If set to "1", allows fetches from mirrors that are specified in 8181 :term:`SSTATE_MIRRORS` to work even when 8182 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to 8183 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if 8184 you have set :term:`SSTATE_MIRRORS` to point to an internal server for 8185 your shared state cache, but you want to disable any other fetching 8186 from the network. 8187 8188 :term:`SSTATE_MIRRORS` 8189 Configures the OpenEmbedded build system to search other mirror 8190 locations for prebuilt cache data objects before building out the 8191 data. This variable works like fetcher :term:`MIRRORS` 8192 and :term:`PREMIRRORS` and points to the cache 8193 locations to check for the shared state (sstate) objects. 8194 8195 You can specify a filesystem directory or a remote URL such as HTTP 8196 or FTP. The locations you specify need to contain the shared state 8197 cache (sstate-cache) results from previous builds. The sstate-cache 8198 you point to can also be from builds on other machines. 8199 8200 When pointing to sstate build artifacts on another machine that uses 8201 a different GCC version for native builds, you must configure 8202 :term:`SSTATE_MIRRORS` with a regular expression that maps local search 8203 paths to server paths. The paths need to take into account 8204 :term:`NATIVELSBSTRING` set by the :ref:`ref-classes-uninative` class. 8205 For example, the following maps the local search path ``universal-4.9`` 8206 to the server-provided path server_url_sstate_path:: 8207 8208 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1" 8209 8210 If a mirror uses the same structure as 8211 :term:`SSTATE_DIR`, you need to add "PATH" at the 8212 end as shown in the examples below. The build system substitutes the 8213 correct path within the directory structure:: 8214 8215 SSTATE_MIRRORS ?= "\ 8216 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \ 8217 file://.* file:///some-local-dir/sstate/PATH" 8218 8219 The Yocto Project actually shares the cache data objects built by its 8220 autobuilder:: 8221 8222 SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH" 8223 8224 As such binary artifacts are built for the generic QEMU machines 8225 supported by the various Poky releases, they are less likely to be 8226 reusable in real projects building binaries optimized for a specific 8227 CPU family. 8228 8229 :term:`SSTATE_SCAN_FILES` 8230 Controls the list of files the OpenEmbedded build system scans for 8231 hardcoded installation paths. The variable uses a space-separated 8232 list of filenames (not paths) with standard wildcard characters 8233 allowed. 8234 8235 During a build, the OpenEmbedded build system creates a shared state 8236 (sstate) object during the first stage of preparing the sysroots. 8237 That object is scanned for hardcoded paths for original installation 8238 locations. The list of files that are scanned for paths is controlled 8239 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files 8240 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather 8241 than the variable being comprehensively set. The 8242 :ref:`ref-classes-sstate` class specifies the default list of files. 8243 8244 For details on the process, see the :ref:`ref-classes-staging` class. 8245 8246 :term:`STAGING_BASE_LIBDIR_NATIVE` 8247 Specifies the path to the ``/lib`` subdirectory of the sysroot 8248 directory for the build host. 8249 8250 :term:`STAGING_BASELIBDIR` 8251 Specifies the path to the ``/lib`` subdirectory of the sysroot 8252 directory for the target for which the current recipe is being built 8253 (:term:`STAGING_DIR_HOST`). 8254 8255 :term:`STAGING_BINDIR` 8256 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot 8257 directory for the target for which the current recipe is being built 8258 (:term:`STAGING_DIR_HOST`). 8259 8260 :term:`STAGING_BINDIR_CROSS` 8261 Specifies the path to the directory containing binary configuration 8262 scripts. These scripts provide configuration information for other 8263 software that wants to make use of libraries or include files 8264 provided by the software associated with the script. 8265 8266 .. note:: 8267 8268 This style of build configuration has been largely replaced by 8269 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the 8270 library to which you are linking, it is recommended you use 8271 ``pkg-config`` instead of a provided configuration script. 8272 8273 :term:`STAGING_BINDIR_NATIVE` 8274 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot 8275 directory for the build host. 8276 8277 :term:`STAGING_DATADIR` 8278 Specifies the path to the ``/usr/share`` subdirectory of the sysroot 8279 directory for the target for which the current recipe is being built 8280 (:term:`STAGING_DIR_HOST`). 8281 8282 :term:`STAGING_DATADIR_NATIVE` 8283 Specifies the path to the ``/usr/share`` subdirectory of the sysroot 8284 directory for the build host. 8285 8286 :term:`STAGING_DIR` 8287 Helps construct the ``recipe-sysroots`` directory, which is used 8288 during packaging. 8289 8290 For information on how staging for recipe-specific sysroots occurs, 8291 see the :ref:`ref-tasks-populate_sysroot` 8292 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`" 8293 section in the Yocto Project Development Tasks Manual, the 8294 ":ref:`overview-manual/concepts:configuration, compilation, and staging`" 8295 section in the Yocto Project Overview and Concepts Manual, and the 8296 :term:`SYSROOT_DIRS` variable. 8297 8298 .. note:: 8299 8300 Recipes should never write files directly under the :term:`STAGING_DIR` 8301 directory because the OpenEmbedded build system manages the 8302 directory automatically. Instead, files should be installed to 8303 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install` 8304 task and then the OpenEmbedded build system will stage a subset of 8305 those files into the sysroot. 8306 8307 :term:`STAGING_DIR_HOST` 8308 Specifies the path to the sysroot directory for the system on which 8309 the component is built to run (the system that hosts the component). 8310 For most recipes, this sysroot is the one in which that recipe's 8311 :ref:`ref-tasks-populate_sysroot` task copies 8312 files. Exceptions include ``-native`` recipes, where the 8313 :ref:`ref-tasks-populate_sysroot` task instead uses 8314 :term:`STAGING_DIR_NATIVE`. Depending on 8315 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can 8316 have the following values: 8317 8318 - For recipes building for the target machine, the value is 8319 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}". 8320 8321 - For native recipes building for the build host, the value is empty 8322 given the assumption that when building for the build host, the 8323 build host's own directories should be used. 8324 8325 .. note:: 8326 8327 ``-native`` recipes are not installed into host paths like such 8328 as ``/usr``. Rather, these recipes are installed into 8329 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes, 8330 standard build environment variables such as 8331 :term:`CPPFLAGS` and 8332 :term:`CFLAGS` are set up so that both host paths 8333 and :term:`STAGING_DIR_NATIVE` are searched for libraries and 8334 headers using, for example, GCC's ``-isystem`` option. 8335 8336 Thus, the emphasis is that the ``STAGING_DIR*`` variables 8337 should be viewed as input variables by tasks such as 8338 :ref:`ref-tasks-configure`, 8339 :ref:`ref-tasks-compile`, and 8340 :ref:`ref-tasks-install`. Having the real system 8341 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense 8342 for ``-native`` recipes, as they make use of host headers and 8343 libraries. 8344 8345 Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`. 8346 8347 :term:`STAGING_DIR_NATIVE` 8348 Specifies the path to the sysroot directory used when building 8349 components that run on the build host itself. 8350 8351 The default value is ``"${RECIPE_SYSROOT_NATIVE}"``, 8352 check :term:`RECIPE_SYSROOT_NATIVE`. 8353 8354 :term:`STAGING_DIR_TARGET` 8355 Specifies the path to the sysroot used for the system for which the 8356 component generates code. For components that do not generate code, 8357 which is the majority, :term:`STAGING_DIR_TARGET` is set to match 8358 :term:`STAGING_DIR_HOST`. 8359 8360 Some recipes build binaries that can run on the target system but those 8361 binaries in turn generate code for another different system (e.g. 8362 :ref:`ref-classes-cross-canadian` recipes). Using terminology from GNU, 8363 the primary system is referred to as the "HOST" and the secondary, or 8364 different, system is referred to as the "TARGET". Thus, the binaries 8365 run on the "HOST" system and generate binaries for the "TARGET" 8366 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used 8367 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the 8368 sysroot used for the "TARGET" system. 8369 8370 :term:`STAGING_ETCDIR_NATIVE` 8371 Specifies the path to the ``/etc`` subdirectory of the sysroot 8372 directory for the build host. 8373 8374 :term:`STAGING_EXECPREFIXDIR` 8375 Specifies the path to the ``/usr`` subdirectory of the sysroot 8376 directory for the target for which the current recipe is being built 8377 (:term:`STAGING_DIR_HOST`). 8378 8379 :term:`STAGING_INCDIR` 8380 Specifies the path to the ``/usr/include`` subdirectory of the 8381 sysroot directory for the target for which the current recipe being 8382 built (:term:`STAGING_DIR_HOST`). 8383 8384 :term:`STAGING_INCDIR_NATIVE` 8385 Specifies the path to the ``/usr/include`` subdirectory of the 8386 sysroot directory for the build host. 8387 8388 :term:`STAGING_KERNEL_BUILDDIR` 8389 Points to the directory containing the kernel build artifacts. 8390 Recipes building software that needs to access kernel build artifacts 8391 (e.g. ``systemtap-uprobes``) can look in the directory specified with 8392 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts 8393 after the kernel has been built. 8394 8395 :term:`STAGING_KERNEL_DIR` 8396 The directory with kernel headers that are required to build 8397 out-of-tree modules. 8398 8399 :term:`STAGING_LIBDIR` 8400 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot 8401 directory for the target for which the current recipe is being built 8402 (:term:`STAGING_DIR_HOST`). 8403 8404 :term:`STAGING_LIBDIR_NATIVE` 8405 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot 8406 directory for the build host. 8407 8408 :term:`STAMP` 8409 Specifies the base path used to create recipe stamp files. The path 8410 to an actual stamp file is constructed by evaluating this string and 8411 then appending additional information. Currently, the default 8412 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf`` 8413 file is:: 8414 8415 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" 8416 8417 For information on how BitBake uses stamp files to determine if a 8418 task should be rerun, see the 8419 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`" 8420 section in the Yocto Project Overview and Concepts Manual. 8421 8422 See :term:`STAMPS_DIR`, 8423 :term:`MULTIMACH_TARGET_SYS`, 8424 :term:`PN`, :term:`EXTENDPE`, 8425 :term:`PV`, and :term:`PR` for related variable 8426 information. 8427 8428 :term:`STAMPCLEAN` 8429 See :term:`bitbake:STAMPCLEAN` in the BitBake manual. 8430 8431 :term:`STAMPS_DIR` 8432 Specifies the base directory in which the OpenEmbedded build system 8433 places stamps. The default directory is ``${TMPDIR}/stamps``. 8434 8435 :term:`STRIP` 8436 The minimal command and arguments to run ``strip``, which is used to 8437 strip symbols. 8438 8439 :term:`SUMMARY` 8440 The short (72 characters or less) summary of the binary package for 8441 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default, 8442 :term:`SUMMARY` is used to define the 8443 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is 8444 not set in the recipe. 8445 8446 :term:`SVNDIR` 8447 The directory in which files checked out of a Subversion system are 8448 stored. 8449 8450 :term:`SYSLINUX_DEFAULT_CONSOLE` 8451 Specifies the kernel boot default console. If you want to use a 8452 console other than the default, set this variable in your recipe as 8453 follows where "X" is the console number you want to use:: 8454 8455 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" 8456 8457 The :ref:`ref-classes-syslinux` class initially sets 8458 this variable to null but then checks for a value later. 8459 8460 :term:`SYSLINUX_OPTS` 8461 Lists additional options to add to the syslinux file. You need to set 8462 this variable in your recipe. If you want to list multiple options, 8463 separate the options with a semicolon character (``;``). 8464 8465 The :ref:`ref-classes-syslinux` class uses this variable 8466 to create a set of options. 8467 8468 :term:`SYSLINUX_SERIAL` 8469 Specifies the alternate serial port or turns it off. To turn off 8470 serial, set this variable to an empty string in your recipe. The 8471 variable's default value is set in the 8472 :ref:`ref-classes-syslinux` class as follows:: 8473 8474 SYSLINUX_SERIAL ?= "0 115200" 8475 8476 The class checks for and uses the variable as needed. 8477 8478 :term:`SYSLINUX_SERIAL_TTY` 8479 Specifies the alternate console=tty... kernel boot argument. The 8480 variable's default value is set in the :ref:`ref-classes-syslinux` 8481 class as follows:: 8482 8483 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" 8484 8485 The class checks for and uses the variable as needed. 8486 8487 :term:`SYSLINUX_SPLASH` 8488 An ``.LSS`` file used as the background for the VGA boot menu when 8489 you use the boot menu. You need to set this variable in your recipe. 8490 8491 The :ref:`ref-classes-syslinux` class checks for this 8492 variable and if found, the OpenEmbedded build system installs the 8493 splash screen. 8494 8495 :term:`SYSROOT_DESTDIR` 8496 Points to the temporary directory under the work directory (default 8497 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``") 8498 where the files populated into the sysroot are assembled during the 8499 :ref:`ref-tasks-populate_sysroot` task. 8500 8501 :term:`SYSROOT_DIRS` 8502 Directories that are staged into the sysroot by the 8503 :ref:`ref-tasks-populate_sysroot` task. By 8504 default, the following directories are staged:: 8505 8506 SYSROOT_DIRS = " \ 8507 ${includedir} \ 8508 ${libdir} \ 8509 ${base_libdir} \ 8510 ${nonarch_base_libdir} \ 8511 ${datadir} \ 8512 /sysroot-only \ 8513 " 8514 8515 :term:`SYSROOT_DIRS_IGNORE` 8516 Directories that are not staged into the sysroot by the 8517 :ref:`ref-tasks-populate_sysroot` task. You 8518 can use this variable to exclude certain subdirectories of 8519 directories listed in :term:`SYSROOT_DIRS` from 8520 staging. By default, the following directories are not staged:: 8521 8522 SYSROOT_DIRS_IGNORE = " \ 8523 ${mandir} \ 8524 ${docdir} \ 8525 ${infodir} \ 8526 ${datadir}/X11/locale \ 8527 ${datadir}/applications \ 8528 ${datadir}/bash-completion \ 8529 ${datadir}/fonts \ 8530 ${datadir}/gtk-doc/html \ 8531 ${datadir}/installed-tests \ 8532 ${datadir}/locale \ 8533 ${datadir}/pixmaps \ 8534 ${datadir}/terminfo \ 8535 ${libdir}/${BPN}/ptest \ 8536 " 8537 8538 Consider the following example in which you need to manipulate this variable. 8539 Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is 8540 installed into a custom folder other than "``${libdir}``" 8541 or "``${base_libdir}``", let's say "``/opt/lib``". 8542 8543 .. note:: 8544 8545 This is not a recommended way to deal with shared libraries, but this 8546 is just to show the usefulness of setting :term:`SYSROOT_DIRS`. 8547 8548 When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in 8549 :term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B`` 8550 into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``". 8551 8552 Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to 8553 ``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So, 8554 the linking process will fail. 8555 8556 To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`:: 8557 8558 SYSROOT_DIRS:append = " /opt/lib" 8559 8560 .. note:: 8561 Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail 8562 because the linker does not know that location, since :term:`TARGET_LDFLAGS` 8563 doesn't contain it (if your recipe is for the target). Therefore, so you should add:: 8564 8565 TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib" 8566 8567 :term:`SYSROOT_DIRS_NATIVE` 8568 Extra directories staged into the sysroot by the 8569 :ref:`ref-tasks-populate_sysroot` task for 8570 ``-native`` recipes, in addition to those specified in 8571 :term:`SYSROOT_DIRS`. By default, the following 8572 extra directories are staged:: 8573 8574 SYSROOT_DIRS_NATIVE = " \ 8575 ${bindir} \ 8576 ${sbindir} \ 8577 ${base_bindir} \ 8578 ${base_sbindir} \ 8579 ${libexecdir} \ 8580 ${sysconfdir} \ 8581 ${localstatedir} \ 8582 " 8583 8584 .. note:: 8585 8586 Programs built by ``-native`` recipes run directly from the sysroot 8587 (:term:`STAGING_DIR_NATIVE`), which is why additional directories 8588 containing program executables and supporting files need to be staged. 8589 8590 :term:`SYSROOT_PREPROCESS_FUNCS` 8591 A list of functions to execute after files are staged into the 8592 sysroot. These functions are usually used to apply additional 8593 processing on the staged files, or to stage additional files. 8594 8595 :term:`SYSTEMD_AUTO_ENABLE` 8596 When inheriting the :ref:`ref-classes-systemd` class, 8597 this variable specifies whether the specified service in 8598 :term:`SYSTEMD_SERVICE` should start 8599 automatically or not. By default, the service is enabled to 8600 automatically start at boot time. The default setting is in the 8601 :ref:`ref-classes-systemd` class as follows:: 8602 8603 SYSTEMD_AUTO_ENABLE ??= "enable" 8604 8605 You can disable the service by setting the variable to "disable". 8606 8607 :term:`SYSTEMD_BOOT_CFG` 8608 When :term:`EFI_PROVIDER` is set to 8609 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the 8610 configuration file that should be used. By default, the 8611 :ref:`ref-classes-systemd-boot` class sets the 8612 :term:`SYSTEMD_BOOT_CFG` as follows:: 8613 8614 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf" 8615 8616 For information on Systemd-boot, see the `Systemd-boot 8617 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 8618 8619 :term:`SYSTEMD_BOOT_ENTRIES` 8620 When :term:`EFI_PROVIDER` is set to 8621 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a 8622 list of entry files (``*.conf``) to install that contain one boot 8623 entry per file. By default, the :ref:`ref-classes-systemd-boot` class 8624 sets the :term:`SYSTEMD_BOOT_ENTRIES` as follows:: 8625 8626 SYSTEMD_BOOT_ENTRIES ?= "" 8627 8628 For information on Systemd-boot, see the `Systemd-boot 8629 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 8630 8631 :term:`SYSTEMD_BOOT_TIMEOUT` 8632 When :term:`EFI_PROVIDER` is set to 8633 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the 8634 boot menu timeout in seconds. By default, the 8635 :ref:`ref-classes-systemd-boot` class sets the 8636 :term:`SYSTEMD_BOOT_TIMEOUT` as follows:: 8637 8638 SYSTEMD_BOOT_TIMEOUT ?= "10" 8639 8640 For information on Systemd-boot, see the `Systemd-boot 8641 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__. 8642 8643 :term:`SYSTEMD_DEFAULT_TARGET` 8644 8645 This variable allows to set the default unit that systemd starts at bootup. 8646 Usually, this is either ``multi-user.target`` or ``graphical.target``. 8647 This works by creating a ``default.target`` symbolic link to the chosen systemd 8648 target file. 8649 8650 See `systemd's documentation 8651 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__ 8652 for details. 8653 8654 For example, this variable is used in the :oe_git:`core-image-minimal-xfce.bb 8655 </meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>` 8656 recipe:: 8657 8658 SYSTEMD_DEFAULT_TARGET = "graphical.target" 8659 8660 :term:`SYSTEMD_PACKAGES` 8661 When inheriting the :ref:`ref-classes-systemd` class, 8662 this variable locates the systemd unit files when they are not found 8663 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES` 8664 variable is set such that the systemd unit files are assumed to 8665 reside in the recipes main package:: 8666 8667 SYSTEMD_PACKAGES ?= "${PN}" 8668 8669 If these unit files are not in this recipe's main package, you need 8670 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which 8671 the build system can find the systemd unit files. 8672 8673 :term:`SYSTEMD_SERVICE` 8674 When inheriting the :ref:`ref-classes-systemd` class, 8675 this variable specifies the systemd service name for a package. 8676 8677 Multiple services can be specified, each one separated by a space. 8678 8679 When you specify this file in your recipe, use a package name 8680 override to indicate the package to which the value applies. Here is 8681 an example from the connman recipe:: 8682 8683 SYSTEMD_SERVICE:${PN} = "connman.service" 8684 8685 The package overrides that can be specified are directly related to the value of 8686 :term:`SYSTEMD_PACKAGES`. Overrides not included in :term:`SYSTEMD_PACKAGES` 8687 will be silently ignored. 8688 8689 :term:`SYSVINIT_ENABLED_GETTYS` 8690 When using :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, 8691 specifies a space-separated list of the virtual terminals that should 8692 run a :wikipedia:`getty <Getty_(Unix)>` (allowing login), assuming 8693 :term:`USE_VT` is not set to "0". 8694 8695 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only 8696 run a getty on the first virtual terminal). 8697 8698 :term:`T` 8699 This variable points to a directory were BitBake places temporary 8700 files, which consist mostly of task logs and scripts, when building a 8701 particular recipe. The variable is typically set as follows:: 8702 8703 T = "${WORKDIR}/temp" 8704 8705 The :term:`WORKDIR` is the directory into which 8706 BitBake unpacks and builds the recipe. The default ``bitbake.conf`` 8707 file sets this variable. 8708 8709 The :term:`T` variable is not to be confused with the 8710 :term:`TMPDIR` variable, which points to the root of 8711 the directory tree where BitBake places the output of an entire 8712 build. 8713 8714 :term:`TARGET_ARCH` 8715 The target machine's architecture. The OpenEmbedded build system 8716 supports many architectures. Here is an example list of architectures 8717 supported. This list is by no means complete as the architecture is 8718 configurable: 8719 8720 - arm 8721 - i586 8722 - x86_64 8723 - powerpc 8724 - powerpc64 8725 - mips 8726 - mipsel 8727 8728 For additional information on machine architectures, see the 8729 :term:`TUNE_ARCH` variable. 8730 8731 :term:`TARGET_AS_ARCH` 8732 Specifies architecture-specific assembler flags for the target 8733 system. :term:`TARGET_AS_ARCH` is initialized from 8734 :term:`TUNE_ASARGS` by default in the BitBake 8735 configuration file (``meta/conf/bitbake.conf``):: 8736 8737 TARGET_AS_ARCH = "${TUNE_ASARGS}" 8738 8739 :term:`TARGET_CC_ARCH` 8740 Specifies architecture-specific C compiler flags for the target 8741 system. :term:`TARGET_CC_ARCH` is initialized from 8742 :term:`TUNE_CCARGS` by default. 8743 8744 .. note:: 8745 8746 It is a common workaround to append :term:`LDFLAGS` to 8747 :term:`TARGET_CC_ARCH` in recipes that build software for the target that 8748 would not otherwise respect the exported :term:`LDFLAGS` variable. 8749 8750 :term:`TARGET_CC_KERNEL_ARCH` 8751 This is a specific kernel compiler flag for a CPU or Application 8752 Binary Interface (ABI) tune. The flag is used rarely and only for 8753 cases where a userspace :term:`TUNE_CCARGS` is not 8754 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH` 8755 variable allows the kernel (and associated modules) to use a 8756 different configuration. See the 8757 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the 8758 :term:`Source Directory` for an example. 8759 8760 :term:`TARGET_CFLAGS` 8761 Specifies the flags to pass to the C compiler when building for the 8762 target. When building in the target context, 8763 :term:`CFLAGS` is set to the value of this variable by 8764 default. 8765 8766 Additionally, the SDK's environment setup script sets the :term:`CFLAGS` 8767 variable in the environment to the :term:`TARGET_CFLAGS` value so that 8768 executables built using the SDK also have the flags applied. 8769 8770 :term:`TARGET_CPPFLAGS` 8771 Specifies the flags to pass to the C pre-processor (i.e. to both the 8772 C and the C++ compilers) when building for the target. When building 8773 in the target context, :term:`CPPFLAGS` is set to the 8774 value of this variable by default. 8775 8776 Additionally, the SDK's environment setup script sets the 8777 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS` 8778 value so that executables built using the SDK also have the flags 8779 applied. 8780 8781 :term:`TARGET_CXXFLAGS` 8782 Specifies the flags to pass to the C++ compiler when building for the 8783 target. When building in the target context, 8784 :term:`CXXFLAGS` is set to the value of this variable 8785 by default. 8786 8787 Additionally, the SDK's environment setup script sets the 8788 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS` 8789 value so that executables built using the SDK also have the flags 8790 applied. 8791 8792 :term:`TARGET_FPU` 8793 Specifies the method for handling FPU code. For FPU-less targets, 8794 which include most ARM CPUs, the variable must be set to "soft". If 8795 not, the kernel emulation gets used, which results in a performance 8796 penalty. 8797 8798 :term:`TARGET_LD_ARCH` 8799 Specifies architecture-specific linker flags for the target system. 8800 :term:`TARGET_LD_ARCH` is initialized from 8801 :term:`TUNE_LDARGS` by default in the BitBake 8802 configuration file (``meta/conf/bitbake.conf``):: 8803 8804 TARGET_LD_ARCH = "${TUNE_LDARGS}" 8805 8806 :term:`TARGET_LDFLAGS` 8807 Specifies the flags to pass to the linker when building for the 8808 target. When building in the target context, 8809 :term:`LDFLAGS` is set to the value of this variable 8810 by default. 8811 8812 Additionally, the SDK's environment setup script sets the 8813 :term:`LDFLAGS` variable in the environment to the 8814 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also 8815 have the flags applied. 8816 8817 :term:`TARGET_OS` 8818 Specifies the target's operating system. The variable can be set to 8819 "linux" for glibc-based systems (GNU C Library) and to "linux-musl" 8820 for musl libc. For ARM/EABI targets, the possible values are 8821 "linux-gnueabi" and "linux-musleabi". 8822 8823 :term:`TARGET_PREFIX` 8824 Specifies the prefix used for the toolchain binary target tools. 8825 8826 Depending on the type of recipe and the build target, 8827 :term:`TARGET_PREFIX` is set as follows: 8828 8829 - For recipes building for the target machine, the value is 8830 "${:term:`TARGET_SYS`}-". 8831 8832 - For native recipes, the build system sets the variable to the 8833 value of :term:`BUILD_PREFIX`. 8834 8835 - For native SDK recipes (:ref:`ref-classes-nativesdk`), 8836 the build system sets the variable to the value of :term:`SDK_PREFIX`. 8837 8838 :term:`TARGET_SYS` 8839 Specifies the system, including the architecture and the operating 8840 system, for which the build is occurring in the context of the 8841 current recipe. 8842 8843 The OpenEmbedded build system automatically sets this variable based 8844 on :term:`TARGET_ARCH`, 8845 :term:`TARGET_VENDOR`, and 8846 :term:`TARGET_OS` variables. 8847 8848 .. note:: 8849 8850 You do not need to set the :term:`TARGET_SYS` variable yourself. 8851 8852 Consider these two examples: 8853 8854 - Given a native recipe on a 32-bit, x86 machine running Linux, the 8855 value is "i686-linux". 8856 8857 - Given a recipe being built for a little-endian, MIPS target 8858 running Linux, the value might be "mipsel-linux". 8859 8860 :term:`TARGET_VENDOR` 8861 Specifies the name of the target vendor. 8862 8863 :term:`TCLIBC` 8864 Specifies the GNU standard C library (``libc``) variant to use during 8865 the build process. 8866 8867 You can select "glibc", "musl", "newlib", or "baremetal". 8868 8869 :term:`TCLIBCAPPEND` 8870 Specifies a suffix to be appended onto the :term:`TMPDIR` value. The 8871 suffix identifies the ``libc`` variant for building. When you are 8872 building for multiple variants with the same :term:`Build Directory`, 8873 this mechanism ensures that output for different ``libc`` variants is 8874 kept separate to avoid potential conflicts. 8875 8876 In the ``defaultsetup.conf`` file, the default value of 8877 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky, 8878 which normally only support one ``libc`` variant, set 8879 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting 8880 in no suffix being applied. 8881 8882 :term:`TCMODE` 8883 Specifies the toolchain selector. :term:`TCMODE` controls the 8884 characteristics of the generated packages and images by telling the 8885 OpenEmbedded build system which toolchain profile to use. By default, 8886 the OpenEmbedded build system builds its own internal toolchain. The 8887 variable's default value is "default", which uses that internal 8888 toolchain. 8889 8890 .. note:: 8891 8892 If :term:`TCMODE` is set to a value other than "default", then it is your 8893 responsibility to ensure that the toolchain is compatible with the 8894 default toolchain. Using older or newer versions of these 8895 components might cause build problems. See 8896 :doc:`Release Information </migration-guides/index>` for your 8897 version of the Yocto Project, to find the specific components with 8898 which the toolchain must be compatible. 8899 8900 The :term:`TCMODE` variable is similar to :term:`TCLIBC`, 8901 which controls the variant of the GNU standard C library (``libc``) 8902 used during the build process: ``glibc`` or ``musl``. 8903 8904 With additional layers, it is possible to use a pre-compiled external 8905 toolchain. One example is the Sourcery G++ Toolchain. The support for 8906 this toolchain resides in the separate Mentor Graphics 8907 ``meta-sourcery`` layer at 8908 https://github.com/MentorEmbedded/meta-sourcery/. 8909 8910 The layer's ``README`` file contains information on how to use the 8911 Sourcery G++ Toolchain as an external toolchain. You will have to 8912 add the layer to your ``bblayers.conf`` file and then set the 8913 :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to 8914 the location of the toolchain. 8915 8916 The fundamentals used for this example apply to any external 8917 toolchain. You can use ``meta-sourcery`` as a template for adding 8918 support for other external toolchains. 8919 8920 In addition to toolchain configuration, you will also need a 8921 corresponding toolchain recipe file. This recipe file needs to package 8922 up any pre-built objects in the toolchain such as ``libgcc``, 8923 ``libstdcc++``, any locales, and ``libc``. 8924 8925 :term:`TC_CXX_RUNTIME` 8926 Specifies the C/C++ STL and runtime variant to use during 8927 the build process. Default value is 'gnu' 8928 8929 You can select "gnu", "llvm", or "android". 8930 8931 :term:`TEMPLATECONF` 8932 Specifies the directory used by the build system to find templates 8933 from which to build the ``bblayers.conf`` and ``local.conf`` files. 8934 Use this variable if you wish to customize such files, and the default 8935 BitBake targets shown when sourcing the ``oe-init-build-env`` script. 8936 8937 For details, see the 8938 :ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory` 8939 section in the Yocto Project Development Tasks manual. 8940 8941 .. note:: 8942 8943 You must set this variable in the external environment in order 8944 for it to work. 8945 8946 :term:`TEST_EXPORT_DIR` 8947 The location the OpenEmbedded build system uses to export tests when 8948 the :term:`TEST_EXPORT_ONLY` variable is set 8949 to "1". 8950 8951 The :term:`TEST_EXPORT_DIR` variable defaults to 8952 ``"${TMPDIR}/testimage/${PN}"``. 8953 8954 :term:`TEST_EXPORT_ONLY` 8955 Specifies to export the tests only. Set this variable to "1" if you 8956 do not want to run the tests but you want them to be exported in a 8957 manner that you to run them outside of the build system. 8958 8959 :term:`TEST_LOG_DIR` 8960 Holds the SSH log and the boot log for QEMU machines. The 8961 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``. 8962 8963 .. note:: 8964 8965 Actual test results reside in the task log (``log.do_testimage``), 8966 which is in the ``${WORKDIR}/temp/`` directory. 8967 8968 :term:`TEST_POWERCONTROL_CMD` 8969 For automated hardware testing, specifies the command to use to 8970 control the power of the target machine under test. Typically, this 8971 command would point to a script that performs the appropriate action 8972 (e.g. interacting with a web-enabled power strip). The specified 8973 command should expect to receive as the last argument "off", "on" or 8974 "cycle" specifying to power off, on, or cycle (power off and then 8975 power on) the device, respectively. 8976 8977 :term:`TEST_POWERCONTROL_EXTRA_ARGS` 8978 For automated hardware testing, specifies additional arguments to 8979 pass through to the command specified in 8980 :term:`TEST_POWERCONTROL_CMD`. Setting 8981 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you 8982 wish, for example, to separate the machine-specific and 8983 non-machine-specific parts of the arguments. 8984 8985 :term:`TEST_QEMUBOOT_TIMEOUT` 8986 The time in seconds allowed for an image to boot before automated 8987 runtime tests begin to run against an image. The default timeout 8988 period to allow the boot process to reach the login prompt is 500 8989 seconds. You can specify a different value in the ``local.conf`` 8990 file. 8991 8992 For more information on testing images, see the 8993 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 8994 section in the Yocto Project Development Tasks Manual. 8995 8996 :term:`TEST_SERIALCONTROL_CMD` 8997 For automated hardware testing, specifies the command to use to 8998 connect to the serial console of the target machine under test. This 8999 command simply needs to connect to the serial console and forward 9000 that connection to standard input and output as any normal terminal 9001 program does. 9002 9003 For example, to use the Picocom terminal program on serial device 9004 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: 9005 9006 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" 9007 9008 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` 9009 For automated hardware testing, specifies additional arguments to 9010 pass through to the command specified in 9011 :term:`TEST_SERIALCONTROL_CMD`. Setting 9012 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you 9013 wish, for example, to separate the machine-specific and 9014 non-machine-specific parts of the command. 9015 9016 :term:`TEST_SERVER_IP` 9017 The IP address of the build machine (host machine). This IP address 9018 is usually automatically detected. However, if detection fails, this 9019 variable needs to be set to the IP address of the build machine (i.e. 9020 where the build is taking place). 9021 9022 .. note:: 9023 9024 The :term:`TEST_SERVER_IP` variable is only used for a small number of 9025 tests such as the "dnf" test suite, which needs to download packages 9026 from ``WORKDIR/oe-rootfs-repo``. 9027 9028 :term:`TEST_SUITES` 9029 An ordered list of tests (modules) to run against an image when 9030 performing automated runtime testing. 9031 9032 The OpenEmbedded build system provides a core set of tests that can 9033 be used against images. 9034 9035 .. note:: 9036 9037 Currently, there is only support for running these tests under 9038 QEMU. 9039 9040 Tests include ``ping``, ``ssh``, ``df`` among others. You can add 9041 your own tests to the list of tests by appending :term:`TEST_SUITES` as 9042 follows:: 9043 9044 TEST_SUITES:append = " mytest" 9045 9046 Alternatively, you can 9047 provide the "auto" option to have all applicable tests run against 9048 the image:: 9049 9050 TEST_SUITES:append = " auto" 9051 9052 Using this option causes the 9053 build system to automatically run tests that are applicable to the 9054 image. Tests that are not applicable are skipped. 9055 9056 The order in which tests are run is important. Tests that depend on 9057 another test must appear later in the list than the test on which 9058 they depend. For example, if you append the list of tests with two 9059 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on 9060 ``test_A``, then you must order the tests as follows:: 9061 9062 TEST_SUITES = "test_A test_B" 9063 9064 For more information on testing images, see the 9065 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 9066 section in the Yocto Project Development Tasks Manual. 9067 9068 :term:`TEST_TARGET` 9069 Specifies the target controller to use when running tests against a 9070 test image. The default controller to use is "qemu":: 9071 9072 TEST_TARGET = "qemu" 9073 9074 A target controller is a class that defines how an image gets 9075 deployed on a target and how a target is started. A layer can extend 9076 the controllers by adding a module in the layer's 9077 ``/lib/oeqa/controllers`` directory and by inheriting the 9078 ``BaseTarget`` class, which is an abstract class that cannot be used 9079 as a value of :term:`TEST_TARGET`. 9080 9081 You can provide the following arguments with :term:`TEST_TARGET`: 9082 9083 - *"qemu":* Boots a QEMU image and runs the tests. See the 9084 ":ref:`dev-manual/runtime-testing:enabling runtime tests on qemu`" section 9085 in the Yocto Project Development Tasks Manual for more 9086 information. 9087 9088 - *"simpleremote":* Runs the tests on target hardware that is 9089 already up and running. The hardware can be on the network or it 9090 can be a device running an image on QEMU. You must also set 9091 :term:`TEST_TARGET_IP` when you use 9092 "simpleremote". 9093 9094 .. note:: 9095 9096 This argument is defined in 9097 ``meta/lib/oeqa/controllers/simpleremote.py``. 9098 9099 For information on running tests on hardware, see the 9100 ":ref:`dev-manual/runtime-testing:enabling runtime tests on hardware`" 9101 section in the Yocto Project Development Tasks Manual. 9102 9103 :term:`TEST_TARGET_IP` 9104 The IP address of your hardware under test. The :term:`TEST_TARGET_IP` 9105 variable has no effect when :term:`TEST_TARGET` is 9106 set to "qemu". 9107 9108 When you specify the IP address, you can also include a port. Here is 9109 an example:: 9110 9111 TEST_TARGET_IP = "192.168.1.4:2201" 9112 9113 Specifying a port is 9114 useful when SSH is started on a non-standard port or in cases when 9115 your hardware under test is behind a firewall or network that is not 9116 directly accessible from your host and you need to do port address 9117 translation. 9118 9119 :term:`TESTIMAGE_AUTO` 9120 Automatically runs the series of automated tests for images when an 9121 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes 9122 any image that successfully builds to automatically boot under QEMU. 9123 Using the variable also adds in dependencies so that any SDK for 9124 which testing is requested is automatically built first. 9125 9126 These tests are written in Python making use of the ``unittest`` 9127 module, and the majority of them run commands on the target system 9128 over ``ssh``. You can set this variable to "1" in your ``local.conf`` 9129 file in the :term:`Build Directory` to have the 9130 OpenEmbedded build system automatically run these tests after an 9131 image successfully builds: 9132 9133 TESTIMAGE_AUTO = "1" 9134 9135 For more information 9136 on enabling, running, and writing these tests, see the 9137 ":ref:`dev-manual/runtime-testing:performing automated runtime testing`" 9138 section in the Yocto Project Development Tasks Manual and the 9139 ":ref:`ref-classes-testimage`" section. 9140 9141 :term:`THISDIR` 9142 The directory in which the file BitBake is currently parsing is 9143 located. Do not manually set this variable. 9144 9145 :term:`TIME` 9146 The time the build was started. Times appear using the hour, minute, 9147 and second (HMS) format (e.g. "140159" for one minute and fifty-nine 9148 seconds past 1400 hours). 9149 9150 :term:`TMPDIR` 9151 This variable is the base directory the OpenEmbedded build system 9152 uses for all build output and intermediate files (other than the 9153 shared state cache). By default, the :term:`TMPDIR` variable points to 9154 ``tmp`` within the :term:`Build Directory`. 9155 9156 If you want to establish this directory in a location other than the 9157 default, you can uncomment and edit the following statement in the 9158 ``conf/local.conf`` file in the :term:`Source Directory`:: 9159 9160 #TMPDIR = "${TOPDIR}/tmp" 9161 9162 An example use for this scenario is to set :term:`TMPDIR` to a local disk, 9163 which does not use NFS, while having the :term:`Build Directory` use NFS. 9164 9165 The filesystem used by :term:`TMPDIR` must have standard filesystem 9166 semantics (i.e. mixed-case files are unique, POSIX file locking, and 9167 persistent inodes). Due to various issues with NFS and bugs in some 9168 implementations, NFS does not meet this minimum requirement. 9169 Consequently, :term:`TMPDIR` cannot be on NFS. 9170 9171 :term:`TOOLCHAIN_HOST_TASK` 9172 This variable lists packages the OpenEmbedded build system uses when 9173 building an SDK, which contains a cross-development environment. The 9174 packages specified by this variable are part of the toolchain set 9175 that runs on the :term:`SDKMACHINE`, and each 9176 package should usually have the prefix ``nativesdk-``. For example, 9177 consider the following command when building an SDK:: 9178 9179 $ bitbake -c populate_sdk imagename 9180 9181 In this case, a default list of packages is 9182 set in this variable, but you can add additional packages to the 9183 list. See the 9184 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section 9185 in the Yocto Project Application Development and the Extensible 9186 Software Development Kit (eSDK) manual for more information. 9187 9188 For background information on cross-development toolchains in the 9189 Yocto Project development environment, see the 9190 ":ref:`sdk-manual/intro:the cross-development toolchain`" 9191 section in the Yocto Project Overview and Concepts Manual. For 9192 information on setting up a cross-development environment, see the 9193 :doc:`/sdk-manual/index` manual. 9194 9195 Note that this variable applies to building an SDK, not an eSDK, 9196 in which case the :term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be 9197 used instead. 9198 9199 :term:`TOOLCHAIN_HOST_TASK_ESDK` 9200 This variable allows to extend what is installed in the host 9201 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK` 9202 applying to SDKs. 9203 9204 :term:`TOOLCHAIN_OPTIONS` 9205 This variable holds extra options passed to the compiler and the linker 9206 for non ``-native`` recipes as they have to point to their custom 9207 ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`:: 9208 9209 TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}" 9210 9211 Native recipes don't need this variable to be set, as they are 9212 built for the host machine with the native compiler. 9213 9214 :term:`TOOLCHAIN_OUTPUTNAME` 9215 This variable defines the name used for the toolchain output. The 9216 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets 9217 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows:: 9218 9219 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" 9220 9221 See 9222 the :term:`SDK_NAME` and 9223 :term:`SDK_VERSION` variables for additional 9224 information. 9225 9226 :term:`TOOLCHAIN_TARGET_TASK` 9227 This variable lists packages the OpenEmbedded build system uses when 9228 it creates the target part of an SDK (i.e. the part built for the 9229 target hardware), which includes libraries and headers. Use this 9230 variable to add individual packages to the part of the SDK that runs 9231 on the target. See the 9232 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section 9233 in the Yocto Project Application Development and the Extensible 9234 Software Development Kit (eSDK) manual for more information. 9235 9236 For background information on cross-development toolchains in the 9237 Yocto Project development environment, see the 9238 ":ref:`sdk-manual/intro:the cross-development toolchain`" 9239 section in the Yocto Project Overview and Concepts Manual. For 9240 information on setting up a cross-development environment, see the 9241 :doc:`/sdk-manual/index` manual. 9242 9243 :term:`TOPDIR` 9244 See :term:`bitbake:TOPDIR` in the BitBake manual. 9245 9246 :term:`TRANSLATED_TARGET_ARCH` 9247 A sanitized version of :term:`TARGET_ARCH`. This 9248 variable is used where the architecture is needed in a value where 9249 underscores are not allowed, for example within package filenames. In 9250 this case, dash characters replace any underscore characters used in 9251 :term:`TARGET_ARCH`. 9252 9253 Do not edit this variable. 9254 9255 :term:`TUNE_ARCH` 9256 The GNU canonical architecture for a specific architecture (i.e. 9257 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses 9258 this value to setup configuration. 9259 9260 :term:`TUNE_ARCH` definitions are specific to a given architecture. The 9261 definitions can be a single static definition, or can be dynamically 9262 adjusted. You can see details for a given CPU family by looking at 9263 the architecture's ``README`` file. For example, the 9264 ``meta/conf/machine/include/mips/README`` file in the 9265 :term:`Source Directory` provides information for 9266 :term:`TUNE_ARCH` specific to the ``mips`` architecture. 9267 9268 :term:`TUNE_ARCH` is tied closely to 9269 :term:`TARGET_ARCH`, which defines the target 9270 machine's architecture. The BitBake configuration file 9271 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows:: 9272 9273 TARGET_ARCH = "${TUNE_ARCH}" 9274 9275 The following list, which is by no means complete since architectures 9276 are configurable, shows supported machine architectures: 9277 9278 - arm 9279 - i586 9280 - x86_64 9281 - powerpc 9282 - powerpc64 9283 - mips 9284 - mipsel 9285 9286 :term:`TUNE_ASARGS` 9287 Specifies architecture-specific assembler flags for the target 9288 system. The set of flags is based on the selected tune features. 9289 :term:`TUNE_ASARGS` is set using the tune include files, which are 9290 typically under ``meta/conf/machine/include/`` and are influenced 9291 through :term:`TUNE_FEATURES`. For example, the 9292 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags 9293 for the x86 architecture as follows:: 9294 9295 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" 9296 9297 .. note:: 9298 9299 Board Support Packages (BSPs) select the tune. The selected tune, 9300 in turn, affects the tune variables themselves (i.e. the tune can 9301 supply its own set of flags). 9302 9303 :term:`TUNE_CCARGS` 9304 Specifies architecture-specific C compiler flags for the target 9305 system. The set of flags is based on the selected tune features. 9306 :term:`TUNE_CCARGS` is set using the tune include files, which are 9307 typically under ``meta/conf/machine/include/`` and are influenced 9308 through :term:`TUNE_FEATURES`. 9309 9310 .. note:: 9311 9312 Board Support Packages (BSPs) select the tune. The selected tune, 9313 in turn, affects the tune variables themselves (i.e. the tune can 9314 supply its own set of flags). 9315 9316 :term:`TUNE_FEATURES` 9317 Features used to "tune" a compiler for optimal use given a specific 9318 processor. The features are defined within the tune files and allow 9319 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on 9320 the features. 9321 9322 The OpenEmbedded build system verifies the features to be sure they 9323 are not conflicting and that they are supported. 9324 9325 The BitBake configuration file (``meta/conf/bitbake.conf``) defines 9326 :term:`TUNE_FEATURES` as follows:: 9327 9328 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}" 9329 9330 See the :term:`DEFAULTTUNE` variable for more information. 9331 9332 :term:`TUNE_LDARGS` 9333 Specifies architecture-specific linker flags for the target system. 9334 The set of flags is based on the selected tune features. 9335 :term:`TUNE_LDARGS` is set using the tune include files, which are 9336 typically under ``meta/conf/machine/include/`` and are influenced 9337 through :term:`TUNE_FEATURES`. For example, the 9338 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags 9339 for the x86 architecture as follows:: 9340 9341 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" 9342 9343 .. note:: 9344 9345 Board Support Packages (BSPs) select the tune. The selected tune, 9346 in turn, affects the tune variables themselves (i.e. the tune can 9347 supply its own set of flags). 9348 9349 :term:`TUNE_PKGARCH` 9350 The package architecture understood by the packaging system to define 9351 the architecture, ABI, and tuning of output packages. The specific 9352 tune is defined using the "_tune" override as follows:: 9353 9354 TUNE_PKGARCH:tune-tune = "tune" 9355 9356 These tune-specific package architectures are defined in the machine 9357 include files. Here is an example of the "core2-32" tuning as used in 9358 the ``meta/conf/machine/include/x86/tune-core2.inc`` file:: 9359 9360 TUNE_PKGARCH:tune-core2-32 = "core2-32" 9361 9362 :term:`TUNECONFLICTS[feature]` 9363 Specifies CPU or Application Binary Interface (ABI) tuning features 9364 that conflict with feature. 9365 9366 Known tuning conflicts are specified in the machine include files in 9367 the :term:`Source Directory`. Here is an example from 9368 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file 9369 that lists the "o32" and "n64" features as conflicting with the "n32" 9370 feature:: 9371 9372 TUNECONFLICTS[n32] = "o32 n64" 9373 9374 :term:`TUNEVALID[feature]` 9375 Specifies a valid CPU or Application Binary Interface (ABI) tuning 9376 feature. The specified feature is stored as a flag. Valid features 9377 are specified in the machine include files (e.g. 9378 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example 9379 from that file:: 9380 9381 TUNEVALID[bigendian] = "Enable big-endian mode." 9382 9383 See the machine include files in the :term:`Source Directory` 9384 for these features. 9385 9386 :term:`UBOOT_BINARY` 9387 Specifies the name of the binary build by U-Boot. 9388 9389 :term:`UBOOT_CONFIG` 9390 Configures one or more U-Boot configurations to build. Each 9391 configuration can define the :term:`UBOOT_MACHINE` and optionally the 9392 :term:`IMAGE_FSTYPES` and the :term:`UBOOT_BINARY`. 9393 9394 Following is an example from the ``meta-freescale`` layer. :: 9395 9396 UBOOT_CONFIG ??= "sdcard-ifc-secure-boot sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor" 9397 UBOOT_CONFIG[nor] = "ls1021atwr_nor_defconfig" 9398 UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_defconfig,,u-boot-with-spl-pbl.bin" 9399 UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_defconfig,,u-boot-with-spl-pbl.bin" 9400 UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_defconfig" 9401 UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_defconfig" 9402 UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_defconfig" 9403 UBOOT_CONFIG[sdcard-ifc-secure-boot] = "ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin" 9404 9405 In this example, all possible seven configurations are selected. Each 9406 configuration specifies "..._defconfig" as :term:`UBOOT_MACHINE`, and 9407 the "sd..." configurations define an individual name for 9408 :term:`UBOOT_BINARY`. No configuration defines a second parameter for 9409 :term:`IMAGE_FSTYPES` to use for the U-Boot image. 9410 9411 For more information on how the :term:`UBOOT_CONFIG` is handled, see the 9412 :ref:`ref-classes-uboot-config` class. 9413 9414 :term:`UBOOT_DTB_LOADADDRESS` 9415 Specifies the load address for the dtb image used by U-Boot. During FIT 9416 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in 9417 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be 9418 used in creating the dtb sections of Image Tree Source for the FIT image. 9419 9420 :term:`UBOOT_DTBO_LOADADDRESS` 9421 Specifies the load address for the dtbo image used by U-Boot. During FIT 9422 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in 9423 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be 9424 used in creating the dtbo sections of Image Tree Source for the FIT image. 9425 9426 :term:`UBOOT_ENTRYPOINT` 9427 Specifies the entry point for the U-Boot image. During U-Boot image 9428 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a 9429 command-line parameter to the ``uboot-mkimage`` utility. 9430 9431 To pass a 64 bit address for FIT image creation, you will need to set: 9432 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. 9433 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. 9434 9435 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 9436 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, 9437 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 9438 classes. 9439 9440 :term:`UBOOT_FIT_ADDRESS_CELLS` 9441 Specifies the value of the ``#address-cells`` value for the 9442 description of the U-Boot FIT image. 9443 9444 The default value is set to "1" by the :ref:`ref-classes-uboot-sign` 9445 class, which corresponds to 32 bit addresses. 9446 9447 For platforms that need to set 64 bit addresses in 9448 :term:`UBOOT_LOADADDRESS` and :term:`UBOOT_ENTRYPOINT`, you need to 9449 set this value to "2", as two 32 bit values (cells) will be needed 9450 to represent such addresses. 9451 9452 Here is an example setting "0x400000000" as a load address:: 9453 9454 UBOOT_FIT_ADDRESS_CELLS = "2" 9455 UBOOT_LOADADDRESS= "0x04 0x00000000" 9456 9457 See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__. 9458 9459 :term:`UBOOT_FIT_DESC` 9460 Specifies the description string encoded into a U-Boot fitImage. The default 9461 value is set by the :ref:`ref-classes-uboot-sign` class as follows:: 9462 9463 UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 9464 9465 :term:`UBOOT_FIT_GENERATE_KEYS` 9466 Decides whether to generate the keys for signing the U-Boot fitImage if 9467 they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`. 9468 The default value is "0". 9469 9470 Enable this as follows:: 9471 9472 UBOOT_FIT_GENERATE_KEYS = "1" 9473 9474 This variable is used in the :ref:`ref-classes-uboot-sign` class. 9475 9476 :term:`UBOOT_FIT_HASH_ALG` 9477 Specifies the hash algorithm used in creating the U-Boot FIT Image. 9478 It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign` 9479 class. 9480 9481 :term:`UBOOT_FIT_KEY_GENRSA_ARGS` 9482 Arguments to ``openssl genrsa`` for generating a RSA private key for 9483 signing the U-Boot FIT image. The default value of this variable 9484 is set to "-F4" by the :ref:`ref-classes-uboot-sign` class. 9485 9486 :term:`UBOOT_FIT_KEY_REQ_ARGS` 9487 Arguments to ``openssl req`` for generating a certificate for signing 9488 the U-Boot FIT image. The default value is "-batch -new" by the 9489 :ref:`ref-classes-uboot-sign` class, "batch" for 9490 non interactive mode and "new" for generating new keys. 9491 9492 :term:`UBOOT_FIT_KEY_SIGN_PKCS` 9493 Format for the public key certificate used for signing the U-Boot FIT 9494 image. The default value is set to "x509" by the 9495 :ref:`ref-classes-uboot-sign` class. 9496 9497 :term:`UBOOT_FIT_SIGN_ALG` 9498 Specifies the signature algorithm used in creating the U-Boot FIT Image. 9499 This variable is set by default to "rsa2048" by the 9500 :ref:`ref-classes-uboot-sign` class. 9501 9502 :term:`UBOOT_FIT_SIGN_NUMBITS` 9503 Size of the private key used in signing the U-Boot FIT image, in number 9504 of bits. The default value for this variable is set to "2048" 9505 by the :ref:`ref-classes-uboot-sign` class. 9506 9507 :term:`UBOOT_FITIMAGE_ENABLE` 9508 This variable allows to generate a FIT image for U-Boot, which is one 9509 of the ways to implement a verified boot process. 9510 9511 Its default value is "0", so set it to "1" to enable this functionality:: 9512 9513 UBOOT_FITIMAGE_ENABLE = "1" 9514 9515 See the :ref:`ref-classes-uboot-sign` class for details. 9516 9517 :term:`UBOOT_LOADADDRESS` 9518 Specifies the load address for the U-Boot image. During U-Boot image 9519 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a 9520 command-line parameter to the ``uboot-mkimage`` utility. 9521 9522 To pass a 64 bit address, you will also need to set: 9523 9524 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. 9525 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. 9526 9527 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 9528 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, 9529 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 9530 classes. 9531 9532 :term:`UBOOT_LOCALVERSION` 9533 Appends a string to the name of the local version of the U-Boot 9534 image. For example, assuming the version of the U-Boot image built 9535 was "2013.10", the full version string reported by U-Boot would be 9536 "2013.10-yocto" given the following statement:: 9537 9538 UBOOT_LOCALVERSION = "-yocto" 9539 9540 :term:`UBOOT_MACHINE` 9541 Specifies the value passed on the ``make`` command line when building 9542 a U-Boot image. The value indicates the target platform 9543 configuration. You typically set this variable from the machine 9544 configuration file (i.e. ``conf/machine/machine_name.conf``). 9545 9546 Please see the "Selection of Processor Architecture and Board Type" 9547 section in the U-Boot README for valid values for this variable. 9548 9549 :term:`UBOOT_MAKE_TARGET` 9550 Specifies the target called in the ``Makefile``. The default target 9551 is "all". 9552 9553 :term:`UBOOT_MKIMAGE` 9554 Specifies the name of the mkimage command as used by the 9555 :ref:`ref-classes-kernel-fitimage` class to assemble 9556 the FIT image. This can be used to substitute an alternative command, wrapper 9557 script or function if desired. The default is "uboot-mkimage". 9558 9559 :term:`UBOOT_MKIMAGE_DTCOPTS` 9560 Options for the device tree compiler passed to ``mkimage -D`` feature 9561 while creating a FIT image with the :ref:`ref-classes-kernel-fitimage` 9562 class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the 9563 :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option 9564 to ``mkimage``. 9565 9566 This variable is also used by the :ref:`ref-classes-uboot-sign` class. 9567 9568 :term:`UBOOT_MKIMAGE_KERNEL_TYPE` 9569 Specifies the type argument for the kernel as passed to ``uboot-mkimage``. 9570 The default value is "kernel". 9571 9572 :term:`UBOOT_MKIMAGE_SIGN` 9573 Specifies the name of the mkimage command as used by the 9574 :ref:`ref-classes-kernel-fitimage` class to sign 9575 the FIT image after it has been assembled (if enabled). This can be used 9576 to substitute an alternative command, wrapper script or function if 9577 desired. The default is "${:term:`UBOOT_MKIMAGE`}". 9578 9579 :term:`UBOOT_MKIMAGE_SIGN_ARGS` 9580 Optionally specifies additional arguments for the 9581 :ref:`ref-classes-kernel-fitimage` class to pass to the 9582 mkimage command when signing the FIT image. 9583 9584 :term:`UBOOT_RD_ENTRYPOINT` 9585 Specifies the entrypoint for the RAM disk image. During FIT image 9586 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in 9587 :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be 9588 used in creating the Image Tree Source for the FIT image. 9589 9590 :term:`UBOOT_RD_LOADADDRESS` 9591 Specifies the load address for the RAM disk image. During FIT image 9592 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in 9593 :ref:`ref-classes-kernel-fitimage` class to specify the load address to 9594 be used in creating the Image Tree Source for the FIT image. 9595 9596 :term:`UBOOT_SIGN_ENABLE` 9597 Enable signing of FIT image. The default value is "0". 9598 9599 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 9600 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 9601 classes. 9602 9603 :term:`UBOOT_SIGN_KEYDIR` 9604 Location of the directory containing the RSA key and certificate used for 9605 signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and 9606 :ref:`ref-classes-uboot-sign` classes. 9607 9608 :term:`UBOOT_SIGN_KEYNAME` 9609 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class 9610 for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR` 9611 directory. If we have for example a ``dev.key`` key and a ``dev.crt`` 9612 certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will 9613 have to set :term:`UBOOT_SIGN_KEYNAME` to ``dev``. 9614 9615 :term:`UBOOT_SUFFIX` 9616 Points to the generated U-Boot extension. For example, ``u-boot.sb`` 9617 has a ``.sb`` extension. 9618 9619 The default U-Boot extension is ``.bin`` 9620 9621 :term:`UBOOT_TARGET` 9622 Specifies the target used for building U-Boot. The target is passed 9623 directly as part of the "make" command (e.g. SPL and AIS). If you do 9624 not specifically set this variable, the OpenEmbedded build process 9625 passes and uses "all" for the target during the U-Boot building 9626 process. 9627 9628 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` 9629 Specifies a list of options that, if reported by the configure script 9630 as being invalid, should not generate a warning during the 9631 :ref:`ref-tasks-configure` task. Normally, invalid 9632 configure options are simply not passed to the configure script (e.g. 9633 should be removed from :term:`EXTRA_OECONF` or 9634 :term:`PACKAGECONFIG_CONFARGS`). 9635 However, there are common options that are passed to all 9636 configure scripts at a class level, but might not be valid for some 9637 configure scripts. Therefore warnings about these options are useless. 9638 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`. 9639 9640 The configure arguments check that uses 9641 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the 9642 :ref:`ref-classes-insane` class and is only enabled if the 9643 recipe inherits the :ref:`ref-classes-autotools` class. 9644 9645 :term:`UPDATERCPN` 9646 For recipes inheriting the 9647 :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN` 9648 specifies the package that contains the initscript that is enabled. 9649 9650 The default value is "${PN}". Given that almost all recipes that 9651 install initscripts package them in the main package for the recipe, 9652 you rarely need to set this variable in individual recipes. 9653 9654 :term:`UPSTREAM_CHECK_COMMITS` 9655 You can perform a per-recipe check for what the latest upstream 9656 source code version is by calling ``devtool latest-version recipe``. If 9657 the recipe source code is provided from Git repositories, but 9658 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS` 9659 to ``1`` in the recipe, and the OpenEmbedded build system 9660 will compare the latest commit with the one currently specified 9661 by the recipe (:term:`SRCREV`):: 9662 9663 UPSTREAM_CHECK_COMMITS = "1" 9664 9665 :term:`UPSTREAM_CHECK_GITTAGREGEX` 9666 You can perform a per-recipe check for what the latest upstream 9667 source code version is by calling ``devtool latest-version recipe``. If 9668 the recipe source code is provided from Git repositories, the 9669 OpenEmbedded build system determines the latest upstream version by 9670 picking the latest tag from the list of all repository tags. 9671 9672 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a 9673 regular expression to filter only the relevant tags should the 9674 default filter not work correctly:: 9675 9676 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex" 9677 9678 :term:`UPSTREAM_CHECK_REGEX` 9679 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different 9680 regular expression instead of the default one when the package 9681 checking system is parsing the page found using 9682 :term:`UPSTREAM_CHECK_URI`:: 9683 9684 UPSTREAM_CHECK_REGEX = "package_regex" 9685 9686 :term:`UPSTREAM_CHECK_URI` 9687 You can perform a per-recipe check for what the latest upstream 9688 source code version is by calling ``devtool latest-version recipe``. If 9689 the source code is provided from tarballs, the latest version is 9690 determined by fetching the directory listing where the tarball is and 9691 attempting to find a later tarball. When this approach does not work, 9692 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that 9693 contains the link to the latest tarball:: 9694 9695 UPSTREAM_CHECK_URI = "recipe_url" 9696 9697 :term:`UPSTREAM_VERSION_UNKNOWN` 9698 You can perform a per-recipe check for what the latest upstream 9699 source code version is by calling ``devtool latest-version recipe``. 9700 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`, 9701 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in 9702 the recipe allows to determine what the latest upstream version is, 9703 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe 9704 to acknowledge that the check cannot be performed:: 9705 9706 UPSTREAM_VERSION_UNKNOWN = "1" 9707 9708 :term:`USE_DEVFS` 9709 Determines if ``devtmpfs`` is used for ``/dev`` population. The 9710 default value used for :term:`USE_DEVFS` is "1" when no value is 9711 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a 9712 statically populated ``/dev`` directory. 9713 9714 See the ":ref:`dev-manual/device-manager:selecting a device manager`" section in 9715 the Yocto Project Development Tasks Manual for information on how to 9716 use this variable. 9717 9718 :term:`USE_VT` 9719 When using 9720 :ref:`SysVinit <dev-manual/new-recipe:enabling system services>`, 9721 determines whether or not to run a :wikipedia:`getty <Getty_(Unix)>` 9722 on any virtual terminals in order to enable logging in through those 9723 terminals. 9724 9725 The default value used for :term:`USE_VT` is "1" when no default value is 9726 specifically set. Typically, you would set :term:`USE_VT` to "0" in the 9727 machine configuration file for machines that do not have a graphical 9728 display attached and therefore do not need virtual terminal 9729 functionality. 9730 9731 :term:`USER_CLASSES` 9732 A list of classes to globally inherit. These classes are used by the 9733 OpenEmbedded build system to enable extra features. 9734 9735 Classes inherited using :term:`USER_CLASSES` must be located in the 9736 ``classes-global/`` or ``classes/`` subdirectories. 9737 9738 The default list is set in your ``local.conf`` file:: 9739 9740 USER_CLASSES ?= "buildstats" 9741 9742 For more information, see 9743 ``meta-poky/conf/templates/default/local.conf.sample`` in the 9744 :term:`Source Directory`. 9745 9746 :term:`USERADD_ERROR_DYNAMIC` 9747 If set to ``error``, forces the OpenEmbedded build system to produce 9748 an error if the user identification (``uid``) and group 9749 identification (``gid``) values are not defined in any of the files 9750 listed in :term:`USERADD_UID_TABLES` and 9751 :term:`USERADD_GID_TABLES`. If set to 9752 ``warn``, a warning will be issued instead. 9753 9754 The default behavior for the build system is to dynamically apply 9755 ``uid`` and ``gid`` values. Consequently, the 9756 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan 9757 on using statically assigned ``gid`` and ``uid`` values, you should 9758 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf`` 9759 file as follows:: 9760 9761 USERADD_ERROR_DYNAMIC = "error" 9762 9763 Overriding the 9764 default behavior implies you are going to also take steps to set 9765 static ``uid`` and ``gid`` values through use of the 9766 :term:`USERADDEXTENSION`, 9767 :term:`USERADD_UID_TABLES`, and 9768 :term:`USERADD_GID_TABLES` variables. 9769 9770 .. note:: 9771 9772 There is a difference in behavior between setting 9773 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``. 9774 When it is set to ``warn``, the build system will report a warning for 9775 every undefined ``uid`` and ``gid`` in any recipe. But when it is set 9776 to ``error``, it will only report errors for recipes that are actually 9777 built. 9778 This saves you from having to add static IDs for recipes that you 9779 know will never be built. 9780 9781 :term:`USERADD_GID_TABLES` 9782 Specifies a password file to use for obtaining static group 9783 identification (``gid``) values when the OpenEmbedded build system 9784 adds a group to the system during package installation. 9785 9786 When applying static group identification (``gid``) values, the 9787 OpenEmbedded build system looks in :term:`BBPATH` for a 9788 ``files/group`` file and then applies those ``uid`` values. Set the 9789 variable as follows in your ``local.conf`` file:: 9790 9791 9792 USERADD_GID_TABLES = "files/group" 9793 9794 .. note:: 9795 9796 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" 9797 causes the build system to use static ``gid`` values. 9798 9799 :term:`USERADD_PACKAGES` 9800 When inheriting the :ref:`ref-classes-useradd` class, 9801 this variable specifies the individual packages within the recipe 9802 that require users and/or groups to be added. 9803 9804 You must set this variable if the recipe inherits the class. For 9805 example, the following enables adding a user for the main package in 9806 a recipe:: 9807 9808 USERADD_PACKAGES = "${PN}" 9809 9810 .. note:: 9811 9812 It follows that if you are going to use the :term:`USERADD_PACKAGES` 9813 variable, you need to set one or more of the :term:`USERADD_PARAM`, 9814 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables. 9815 9816 :term:`USERADD_PARAM` 9817 When inheriting the :ref:`ref-classes-useradd` class, 9818 this variable specifies for a package what parameters should pass to 9819 the ``useradd`` command if you add a user to the system when the 9820 package is installed. 9821 9822 Here is an example from the ``dbus`` recipe:: 9823 9824 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \ 9825 --no-create-home --shell /bin/false \ 9826 --user-group messagebus" 9827 9828 For information on the 9829 standard Linux shell command ``useradd``, see 9830 https://linux.die.net/man/8/useradd. 9831 9832 :term:`USERADD_UID_TABLES` 9833 Specifies a password file to use for obtaining static user 9834 identification (``uid``) values when the OpenEmbedded build system 9835 adds a user to the system during package installation. 9836 9837 When applying static user identification (``uid``) values, the 9838 OpenEmbedded build system looks in :term:`BBPATH` for a 9839 ``files/passwd`` file and then applies those ``uid`` values. Set the 9840 variable as follows in your ``local.conf`` file:: 9841 9842 USERADD_UID_TABLES = "files/passwd" 9843 9844 .. note:: 9845 9846 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids" 9847 causes the build system to use static ``uid`` values. 9848 9849 :term:`USERADDEXTENSION` 9850 When set to "useradd-staticids", causes the OpenEmbedded build system 9851 to base all user and group additions on a static ``passwd`` and 9852 ``group`` files found in :term:`BBPATH`. 9853 9854 To use static user identification (``uid``) and group identification 9855 (``gid``) values, set the variable as follows in your ``local.conf`` 9856 file: USERADDEXTENSION = "useradd-staticids" 9857 9858 .. note:: 9859 9860 Setting this variable to use static ``uid`` and ``gid`` 9861 values causes the OpenEmbedded build system to employ the 9862 :ref:`ref-classes-useradd` class. 9863 9864 If you use static ``uid`` and ``gid`` information, you must also 9865 specify the ``files/passwd`` and ``files/group`` files by setting the 9866 :term:`USERADD_UID_TABLES` and 9867 :term:`USERADD_GID_TABLES` variables. 9868 Additionally, you should also set the 9869 :term:`USERADD_ERROR_DYNAMIC` variable. 9870 9871 :term:`VOLATILE_LOG_DIR` 9872 Specifies the persistence of the target's ``/var/log`` directory, 9873 which is used to house postinstall target log files. 9874 9875 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the 9876 file is not persistent. You can override this setting by setting the 9877 variable to "no" to make the log directory persistent. 9878 9879 :term:`VOLATILE_TMP_DIR` 9880 Specifies the persistence of the target's ``/tmp`` directory. 9881 9882 By default, :term:`VOLATILE_TMP_DIR` is set to "yes", in which case 9883 ``/tmp`` links to a directory which resides in RAM in a ``tmpfs`` 9884 filesystem. 9885 9886 If instead, you want the ``/tmp`` directory to be persistent, set the 9887 variable to "no" to make it a regular directory in the root filesystem. 9888 9889 This supports both sysvinit and systemd based systems. 9890 9891 :term:`WARN_QA` 9892 Specifies the quality assurance checks whose failures are reported as 9893 warnings by the OpenEmbedded build system. You set this variable in 9894 your distribution configuration file. For a list of the checks you 9895 can control with this variable, see the 9896 ":ref:`ref-classes-insane`" section. 9897 9898 :term:`WATCHDOG_TIMEOUT` 9899 Specifies the timeout in seconds used by the ``watchdog`` recipe and 9900 also by ``systemd`` during reboot. The default is 60 seconds. 9901 9902 :term:`WIRELESS_DAEMON` 9903 For ``connman`` and ``packagegroup-base``, specifies the wireless 9904 daemon to use. The default is "wpa-supplicant" (note that the value 9905 uses a dash and not an underscore). 9906 9907 :term:`WKS_FILE` 9908 Specifies the location of the Wic kickstart file that is used by the 9909 OpenEmbedded build system to create a partitioned image 9910 (``image.wic``). For information on how to create a partitioned 9911 image, see the 9912 ":ref:`dev-manual/wic:creating partitioned images using wic`" 9913 section in the Yocto Project Development Tasks Manual. For details on 9914 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter. 9915 9916 :term:`WKS_FILE_DEPENDS` 9917 When placed in the recipe that builds your image, this variable lists 9918 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only 9919 applicable when Wic images are active (i.e. when 9920 :term:`IMAGE_FSTYPES` contains entries related 9921 to Wic). If your recipe does not create Wic images, the variable has 9922 no effect. 9923 9924 The :term:`WKS_FILE_DEPENDS` variable is similar to the 9925 :term:`DEPENDS` variable. When you use the variable in 9926 your recipe that builds the Wic image, dependencies you list in the 9927 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable. 9928 9929 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to 9930 specify a list of additional dependencies (e.g. native tools, 9931 bootloaders, and so forth), that are required to build Wic images. 9932 Following is an example:: 9933 9934 WKS_FILE_DEPENDS = "some-native-tool" 9935 9936 In the 9937 previous example, some-native-tool would be replaced with an actual 9938 native tool on which the build would depend. 9939 9940 :term:`WKS_FILES` 9941 Specifies a list of candidate Wic kickstart files to be used by the 9942 OpenEmbedded build system to create a partitioned image. Only the 9943 first one that is found, from left to right, will be used. 9944 9945 This is only useful when there are multiple ``.wks`` files that can be 9946 used to produce an image. A typical case is when multiple layers are 9947 used for different hardware platforms, each supplying a different 9948 ``.wks`` file. In this case, you specify all possible ones through 9949 :term:`WKS_FILES`. 9950 9951 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead. 9952 9953 :term:`WORKDIR` 9954 The pathname of the work directory in which the OpenEmbedded build 9955 system builds a recipe. This directory is located within the 9956 :term:`TMPDIR` directory structure and is specific to 9957 the recipe being built and the system for which it is being built. 9958 9959 The :term:`WORKDIR` directory is defined as follows:: 9960 9961 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} 9962 9963 The actual directory depends on several things: 9964 9965 - :term:`TMPDIR`: The top-level build output directory 9966 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier 9967 - :term:`PN`: The recipe name 9968 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which 9969 is usually the case for most recipes, then :term:`EXTENDPE` is blank. 9970 - :term:`PV`: The recipe version 9971 - :term:`PR`: The recipe revision 9972 9973 As an example, assume a Source Directory top-level folder name 9974 ``poky``, a default :term:`Build Directory` at ``poky/build``, and a 9975 ``qemux86-poky-linux`` machine target system. Furthermore, suppose 9976 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work 9977 directory the build system uses to build the package would be as 9978 follows:: 9979 9980 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 9981 9982 :term:`XSERVER` 9983 Specifies the packages that should be installed to provide an X 9984 server and drivers for the current machine, assuming your image 9985 directly includes ``packagegroup-core-x11-xserver`` or, perhaps 9986 indirectly, includes "x11-base" in 9987 :term:`IMAGE_FEATURES`. 9988 9989 The default value of :term:`XSERVER`, if not specified in the machine 9990 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev". 9991 9992 :term:`XZ_THREADS` 9993 Specifies the number of parallel threads that should be used when 9994 using xz compression. 9995 9996 By default this scales with core count, but is never set less than 2 9997 to ensure that multi-threaded mode is always used so that the output 9998 file contents are deterministic. Builds will work with a value of 1 9999 but the output will differ compared to the output from the compression 10000 generated when more than one thread is used. 10001 10002 On systems where many tasks run in parallel, setting a limit to this 10003 can be helpful in controlling system resource usage. 10004 10005 :term:`XZ_MEMLIMIT` 10006 Specifies the maximum memory the xz compression should use as a percentage 10007 of system memory. If unconstrained the xz compressor can use large amounts of 10008 memory and become problematic with parallelism elsewhere in the build. 10009 "50%" has been found to be a good value. 10010 10011 :term:`ZSTD_THREADS` 10012 Specifies the number of parallel threads that should be used when 10013 using ZStandard compression. 10014 10015 By default this scales with core count, but is never set less than 2 10016 to ensure that multi-threaded mode is always used so that the output 10017 file contents are deterministic. Builds will work with a value of 1 10018 but the output will differ compared to the output from the compression 10019 generated when more than one thread is used. 10020 10021 On systems where many tasks run in parallel, setting a limit to this 10022 can be helpful in controlling system resource usage. 10023