blob: 71c2e11d9b05b36dabe261d6e82d90b930c38f09 [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
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
Andrew Geisslerf0343792020-11-18 10:42:21 -060010: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>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050018
19.. glossary::
20
Andrew Geisslerf0343792020-11-18 10:42:21 -060021 :term:`ABIEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050022 Extension to the Application Binary Interface (ABI) field of the GNU
23 canonical architecture name (e.g. "eabi").
24
25 ABI extensions are set in the machine include files. For example, the
26 ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the
Andrew Geisslerc926e172021-05-07 16:11:35 -050027 following extension::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050028
29 ABIEXTENSION = "eabi"
30
Andrew Geisslerf0343792020-11-18 10:42:21 -060031 :term:`ALLOW_EMPTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050032 Specifies whether to produce an output package even if it is empty.
33 By default, BitBake does not produce empty packages. This default
34 behavior can cause issues when there is an
35 :term:`RDEPENDS` or some other hard runtime
36 requirement on the existence of the package.
37
38 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -050039 conjunction with a package name override, as in::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050040
41 ALLOW_EMPTY_${PN} = "1"
42 ALLOW_EMPTY_${PN}-dev = "1"
43 ALLOW_EMPTY_${PN}-staticdev = "1"
44
Andrew Geisslerf0343792020-11-18 10:42:21 -060045 :term:`ALTERNATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050046 Lists commands in a package that need an alternative binary naming
47 scheme. Sometimes the same command is provided in multiple packages.
48 When this occurs, the OpenEmbedded build system needs to use the
49 alternatives system to create a different binary naming scheme so the
50 commands can co-exist.
51
William A. Kennington IIIac69b482021-06-02 12:28:27 -070052 To use the variable, list out the package's commands that are also
53 provided by another package. For example, if the ``busybox`` package
54 has four such commands, you identify them as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050055
56 ALTERNATIVE_busybox = "sh sed test bracket"
57
58 For more information on the alternatives system, see the
59 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
60 section.
61
Andrew Geisslerf0343792020-11-18 10:42:21 -060062 :term:`ALTERNATIVE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050063 Used by the alternatives system to map duplicated commands to actual
64 locations. For example, if the ``bracket`` command provided by the
65 ``busybox`` package is duplicated through another package, you must
Andrew Geissler09036742021-06-25 14:25:14 -050066 use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual
Andrew Geisslerc926e172021-05-07 16:11:35 -050067 location::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050068
69 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
70
71 In this example, the binary for the ``bracket`` command (i.e. ``[``)
72 from the ``busybox`` package resides in ``/usr/bin/``.
73
74 .. note::
75
Andrew Geissler09036742021-06-25 14:25:14 -050076 If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050077
78 For more information on the alternatives system, see the
79 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
80 section.
81
Andrew Geisslerf0343792020-11-18 10:42:21 -060082 :term:`ALTERNATIVE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050083 Used by the alternatives system to create default priorities for
84 duplicated commands. You can use the variable to create a single
85 default regardless of the command name or package, a default for
86 specific duplicated commands regardless of the package, or a default
87 for specific commands tied to particular packages. Here are the
Andrew Geisslerc926e172021-05-07 16:11:35 -050088 available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050089
90 ALTERNATIVE_PRIORITY = "priority"
91 ALTERNATIVE_PRIORITY[name] = "priority"
92 ALTERNATIVE_PRIORITY_pkg[name] = "priority"
93
94 For more information on the alternatives system, see the
95 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
96 section.
97
Andrew Geisslerf0343792020-11-18 10:42:21 -060098 :term:`ALTERNATIVE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050099 Used by the alternatives system to create default link locations for
100 duplicated commands. You can use the variable to create a single
101 default location for all duplicated commands regardless of the
102 command name or package, a default for specific duplicated commands
103 regardless of the package, or a default for specific commands tied to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500104 particular packages. Here are the available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500105
106 ALTERNATIVE_TARGET = "target"
107 ALTERNATIVE_TARGET[name] = "target"
108 ALTERNATIVE_TARGET_pkg[name] = "target"
109
110 .. note::
111
Andrew Geissler09036742021-06-25 14:25:14 -0500112 If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500113 from the :term:`ALTERNATIVE_LINK_NAME` variable.
114
Andrew Geissler09036742021-06-25 14:25:14 -0500115 If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the
116 same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500117 appended to it.
118
119 Finally, if the file referenced has not been renamed, the
120 alternatives system will rename it to avoid the need to rename
121 alternative files in the :ref:`ref-tasks-install`
122 task while retaining support for the command if necessary.
123
124 For more information on the alternatives system, see the
125 ":ref:`update-alternatives.bbclass <ref-classes-update-alternatives>`"
126 section.
127
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600128 :term:`ANY_OF_DISTRO_FEATURES`
129 When inheriting the
130 :ref:`features_check <ref-classes-features_check>`
131 class, this variable identifies a list of distribution features where
132 at least one must be enabled in the current configuration in order
133 for the OpenEmbedded build system to build the recipe. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -0500134 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
135 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600136 the recipe will be skipped, and if the build system attempts to build
137 the recipe then an error will be triggered.
138
139
Andrew Geisslerf0343792020-11-18 10:42:21 -0600140 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500141 An override list of append strings for each target specified with
142 :term:`LABELS`.
143
144 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
145 information on how this variable is used.
146
Andrew Geisslerf0343792020-11-18 10:42:21 -0600147 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500148 The minimal command and arguments used to run ``ar``.
149
Andrew Geisslerf0343792020-11-18 10:42:21 -0600150 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500151 When used with the :ref:`archiver <ref-classes-archiver>` class,
152 determines the type of information used to create a released archive.
153 You can use this variable to create archives of patched source,
154 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500155 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500156
157 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
158 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
159 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
160 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
161 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
162 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
163 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
164 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
165
166 For information on how the variable works, see the
167 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
168
Andrew Geisslerf0343792020-11-18 10:42:21 -0600169 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500170 Minimal command and arguments needed to run the assembler.
171
Andrew Geisslerf0343792020-11-18 10:42:21 -0600172 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500173 Lists recipe names (:term:`PN` values) BitBake does not
174 attempt to build. Instead, BitBake assumes these recipes have already
175 been built.
176
Andrew Geissler09036742021-06-25 14:25:14 -0500177 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500178 tools that should not be built. An example is ``git-native``, which
179 when specified, allows for the Git binary from the host to be used
180 rather than building ``git-native``.
181
Andrew Geisslerf0343792020-11-18 10:42:21 -0600182 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500183 Provides additional ``shlibs`` provider mapping information, which
184 adds to or overwrites the information provided automatically by the
185 system. Separate multiple entries using spaces.
186
187 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500188 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500189
190 shlibname:packagename[_version]
191
192 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500193 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500194
195 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
196
Andrew Geisslerf0343792020-11-18 10:42:21 -0600197 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500198 The email address used to contact the original author or authors in
199 order to send patches and forward bugs.
200
Andrew Geisslerf0343792020-11-18 10:42:21 -0600201 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500202 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500203 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500204 packages should be checked for libraries and renamed according to
205 Debian library package naming.
206
207 The default value is "${PACKAGES}", which causes the debian class to
208 act on all packages that are explicitly generated by the recipe.
209
Andrew Geisslerf0343792020-11-18 10:42:21 -0600210 :term:`AUTO_SYSLINUXMENU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500211 Enables creating an automatic menu for the syslinux bootloader. You
212 must set this variable in your recipe. The
213 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
214
Andrew Geisslerf0343792020-11-18 10:42:21 -0600215 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500216 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500217 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500218
219 SRCREV = "${AUTOREV}"
220
221 If you use the previous statement to retrieve the latest version of
222 software, you need to be sure :term:`PV` contains
223 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
224 have a kernel recipe that inherits the
225 :ref:`kernel <ref-classes-kernel>` class and you use the previous
226 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500227 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500228 so that it does contain ``${SRCPV}``.
229
230 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600231 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500232 section in the Yocto Project Development Tasks Manual.
233
Andrew Geisslerf0343792020-11-18 10:42:21 -0600234 :term:`AVAILABLE_LICENSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500235 List of licenses found in the directories specified by
236 :term:`COMMON_LICENSE_DIR` and
237 :term:`LICENSE_PATH`.
238
239 .. note::
240
Andrew Geissler09036742021-06-25 14:25:14 -0500241 It is assumed that all changes to :term:`COMMON_LICENSE_DIR` and
242 :term:`LICENSE_PATH` have been done before :term:`AVAILABLE_LICENSES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500243 is defined (in :ref:`ref-classes-license`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500244
Andrew Geisslerf0343792020-11-18 10:42:21 -0600245 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500246 The list of defined CPU and Application Binary Interface (ABI)
247 tunings (i.e. "tunes") available for use by the OpenEmbedded build
248 system.
249
250 The list simply presents the tunes that are available. Not all tunes
251 may be compatible with a particular machine configuration, or with
252 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600253 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500254 configuration.
255
256 To add a tune to the list, be sure to append it with spaces using the
257 "+=" BitBake operator. Do not simply replace the list by using the
258 "=" operator. See the
259 ":ref:`Basic Syntax <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax>`" section in the BitBake
260 User Manual for more information.
261
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500262 :term:`AZ_SAS`
263 Azure Storage Shared Access Signature, when using the
264 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
265 This variable can be defined to be used by the fetcher to authenticate
266 and gain access to non-public artifacts.
267 ::
268
269 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
270
271 For more information see Microsoft's Azure Storage documentation at
272 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
273
Andrew Geisslerf0343792020-11-18 10:42:21 -0600274 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275 The directory within the :term:`Build Directory` in
276 which the OpenEmbedded build system places generated objects during a
277 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500278 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500279
280 S = "${WORKDIR}/${BP}"
281
Andrew Geissler09036742021-06-25 14:25:14 -0500282 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500283 by the ``B`` variable. Most Autotools-based recipes support
284 separating these directories. The build system defaults to using
285 separate directories for ``gcc`` and some kernel recipes.
286
Andrew Geisslerf0343792020-11-18 10:42:21 -0600287 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500288 Lists "recommended-only" packages to not install. Recommended-only
289 packages are packages installed only through the
290 :term:`RRECOMMENDS` variable. You can prevent any
291 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500292 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500293
294 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
295
296 You can set this variable globally in your ``local.conf`` file or you
297 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500298 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500299
300 BAD_RECOMMENDATIONS_pn-target_image = "package_name"
301
302 It is important to realize that if you choose to not install packages
303 using this variable and some other packages are dependent on them
304 (i.e. listed in a recipe's :term:`RDEPENDS`
305 variable), the OpenEmbedded build system ignores your request and
306 will install the packages to avoid dependency errors.
307
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700308 This variable is supported only when using the IPK and RPM
309 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500310
311 See the :term:`NO_RECOMMENDATIONS` and the
312 :term:`PACKAGE_EXCLUDE` variables for related
313 information.
314
Andrew Geisslerf0343792020-11-18 10:42:21 -0600315 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500316 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500317 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600318 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500319 section in the Yocto Project Development Tasks Manual for information
320 on Multilib.
321
Andrew Geissler09036742021-06-25 14:25:14 -0500322 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500323 the :term:`Source Directory`. If Multilib is not
324 being used, the value defaults to "lib".
325
Andrew Geisslerf0343792020-11-18 10:42:21 -0600326 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500327 Points to the base of the work directory for all recipes. The default
328 value is "${TMPDIR}/work".
329
Andrew Geisslerf0343792020-11-18 10:42:21 -0600330 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500331 Specifies a space-delimited list of hosts that the fetcher is allowed
332 to use to obtain the required source code. Following are
333 considerations surrounding this variable:
334
Andrew Geissler09036742021-06-25 14:25:14 -0500335 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500336 or set to "0".
337
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700338 - There is limited support for wildcard matching against the beginning of
339 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500340 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
341 ::
342
343 BB_ALLOWED_NETWORKS = "*.gnu.org"
344
345 .. note::
346
347 The use of the "``*``" character only works at the beginning of
348 a host name and it must be isolated from the remainder of the
349 host name. You cannot use the wildcard character in any other
350 location of the name or combined with the front part of the
351 name.
352
353 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
354 is not.
355
356 - Mirrors not in the host list are skipped and logged in debug.
357
358 - Attempts to access networks not in the host list cause a failure.
359
Andrew Geissler09036742021-06-25 14:25:14 -0500360 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500361 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500362 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500363 fetched from an allowed location and avoids raising an error when a
364 host that is not allowed is in a :term:`SRC_URI`
365 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500366 host listed in :term:`SRC_URI` after a successful fetch from the
367 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500368
Andrew Geisslerf0343792020-11-18 10:42:21 -0600369 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500370 Defines how BitBake handles situations where an append file
371 (``.bbappend``) has no corresponding recipe file (``.bb``). This
372 condition often occurs when layers get out of sync (e.g. ``oe-core``
373 bumps a recipe version and the old recipe no longer exists and the
374 other layer has not been updated to the new version of the recipe
375 yet).
376
377 The default fatal behavior is safest because it is the sane reaction
378 given something is out of sync. It is important to realize when your
379 changes are no longer being applied.
380
381 You can change the default behavior by setting this variable to "1",
382 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500383 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384
385 BB_DANGLINGAPPENDS_WARNONLY = "1"
386
Andrew Geisslerf0343792020-11-18 10:42:21 -0600387 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500388 Monitors disk space and available inodes during the build and allows
389 you to control the build based on these parameters.
390
391 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500392 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500393 found in the :term:`Build Directory`. Use the
394 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500395
396 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500397
398 BB_DISKMON_DIRS = "action,dir,threshold [...]"
399
400 where:
401
402 action is:
403 ABORT: Immediately abort the build when
404 a threshold is broken.
405 STOPTASKS: Stop the build after the currently
406 executing tasks have finished when
407 a threshold is broken.
408 WARN: Issue a warning but continue the
409 build when a threshold is broken.
410 Subsequent warnings are issued as
411 defined by the BB_DISKMON_WARNINTERVAL
412 variable, which must be defined in
413 the conf/local.conf file.
414
415 dir is:
416 Any directory you choose. You can specify one or
417 more directories to monitor by separating the
418 groupings with a space. If two directories are
419 on the same device, only the first directory
420 is monitored.
421
422 threshold is:
423 Either the minimum available disk space,
424 the minimum number of free inodes, or
425 both. You must specify at least one. To
426 omit one or the other, simply omit the value.
427 Specify the threshold using G, M, K for Gbytes,
428 Mbytes, and Kbytes, respectively. If you do
429 not specify G, M, or K, Kbytes is assumed by
430 default. Do not use GB, MB, or KB.
431
Andrew Geisslerc926e172021-05-07 16:11:35 -0500432 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500433
434 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
435 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
436 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
437
438 The first example works only if you also provide the
439 :term:`BB_DISKMON_WARNINTERVAL`
440 variable in the ``conf/local.conf``. This example causes the build
441 system to immediately abort when either the disk space in
442 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
443 below 100 Kbytes. Because two directories are provided with the
444 variable, the build system also issue a warning when the disk space
445 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
446 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500447 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 variable.
449
450 The second example stops the build after all currently executing
451 tasks complete when the minimum disk space in the ``${TMPDIR}``
452 directory drops below 1 Gbyte. No disk monitoring occurs for the free
453 inodes in this case.
454
455 The final example immediately aborts the build when the number of
456 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
457 disk space monitoring for the directory itself occurs in this case.
458
Andrew Geisslerf0343792020-11-18 10:42:21 -0600459 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500460 Defines the disk space and free inode warning intervals. To set these
461 intervals, define the variable in your ``conf/local.conf`` file in
462 the :term:`Build Directory`.
463
Andrew Geissler09036742021-06-25 14:25:14 -0500464 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500465 must also use the :term:`BB_DISKMON_DIRS`
466 variable and define its action as "WARN". During the build,
467 subsequent warnings are issued each time disk space or number of free
468 inodes further reduces by the respective interval.
469
Andrew Geissler09036742021-06-25 14:25:14 -0500470 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
471 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500472 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500473
474 BB_DISKMON_WARNINTERVAL = "50M,5K"
475
476 When specifying the variable in your configuration file, use the
477 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500478
479 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500480
481 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
482
483 where:
484
485 disk_space_interval is:
486 An interval of memory expressed in either
487 G, M, or K for Gbytes, Mbytes, or Kbytes,
488 respectively. You cannot use GB, MB, or KB.
489
490 disk_inode_interval is:
491 An interval of free inodes expressed in either
492 G, M, or K for Gbytes, Mbytes, or Kbytes,
493 respectively. You cannot use GB, MB, or KB.
494
Andrew Geisslerc926e172021-05-07 16:11:35 -0500495 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500496
497 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
498 BB_DISKMON_WARNINTERVAL = "50M,5K"
499
500 These variables cause the
501 OpenEmbedded build system to issue subsequent warnings each time the
502 available disk space further reduces by 50 Mbytes or the number of
503 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
504 directory. Subsequent warnings based on the interval occur each time
505 a respective interval is reached beyond the initial warning (i.e. 1
506 Gbytes and 100 Kbytes).
507
Andrew Geisslerf0343792020-11-18 10:42:21 -0600508 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500509 Causes tarballs of the source control repositories (e.g. Git
510 repositories), including metadata, to be placed in the
511 :term:`DL_DIR` directory.
512
513 For performance reasons, creating and placing tarballs of these
514 repositories is not the default action by the OpenEmbedded build
515 system.
516 ::
517
518 BB_GENERATE_MIRROR_TARBALLS = "1"
519
520 Set this variable in your
521 ``local.conf`` file in the :term:`Build Directory`.
522
523 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500524 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500525 source control work directories.
526
Andrew Geisslerf0343792020-11-18 10:42:21 -0600527 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500528 The maximum number of tasks BitBake should run in parallel at any one
529 time. The OpenEmbedded build system automatically configures this
530 variable to be equal to the number of cores on the build system. For
531 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500532 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500533 to "4".
534
535 For single socket systems (i.e. one CPU), you should not have to
536 override this variable to gain optimal parallelism during builds.
537 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500538 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500539 is not set higher than "20".
540
541 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600542 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500543 section in the Yocto Project Development Tasks Manual.
544
Andrew Geisslerf0343792020-11-18 10:42:21 -0600545 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500546 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500547 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500548 long the BitBake server stays resident between invocations.
549
550 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500551 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500552
553 BB_SERVER_TIMEOUT = "20"
554
555 If you want the server to never be unloaded,
556 set ``BB_SERVER_TIMEOUT`` to "-1".
557
Andrew Geisslerf0343792020-11-18 10:42:21 -0600558 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500559 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700560 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500561 ``quilt-native``, which is a copy of Quilt built to run on the build
562 system; "crosses" such as ``gcc-cross``, which is a compiler built to
563 run on the build machine but produces binaries that run on the target
564 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500565 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500566 "``multilib:``\ multilib_name".
567
568 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500569 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500570
571 BBCLASSEXTEND =+ "native nativesdk"
572 BBCLASSEXTEND =+ "multilib:multilib_name"
573
574 .. note::
575
Andrew Geissler09036742021-06-25 14:25:14 -0500576 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500577 variants by rewriting variable values and applying overrides such
578 as ``_class-native``. For example, to generate a native version of
579 a recipe, a :term:`DEPENDS` on "foo" is rewritten
580 to a ``DEPENDS`` on "foo-native".
581
Andrew Geissler09036742021-06-25 14:25:14 -0500582 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500583 Parsing once adds some limitations. For example, it is not
584 possible to include a different file depending on the variant,
585 since ``include`` statements are processed when the recipe is
586 parsed.
587
Andrew Geisslerf0343792020-11-18 10:42:21 -0600588 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 Lists the names of configured layers. These names are used to find
590 the other ``BBFILE_*`` variables. Typically, each layer will append
591 its name to this variable in its ``conf/layer.conf`` file.
592
Andrew Geisslerf0343792020-11-18 10:42:21 -0600593 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 Variable that expands to match files from
595 :term:`BBFILES` in a particular layer. This variable
596 is used in the ``conf/layer.conf`` file and must be suffixed with the
597 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
598
Andrew Geisslerf0343792020-11-18 10:42:21 -0600599 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500600 Assigns the priority for recipe files in each layer.
601
602 This variable is useful in situations where the same recipe appears
603 in more than one layer. Setting this variable allows you to
604 prioritize a layer against other layers that contain the same recipe
605 - effectively letting you control the precedence for the multiple
606 layers. The precedence established through this variable stands
607 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500608 example, a layer that has a recipe with a higher :term:`PV` value but for
609 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500610 has a lower precedence.
611
Andrew Geissler09036742021-06-25 14:25:14 -0500612 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500613 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500614 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
615 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500616 for more information. The default priority, if unspecified for a
617 layer with no dependencies, is the lowest defined priority + 1 (or 1
618 if no priorities are defined).
619
620 .. tip::
621
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500622 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500623 to list all configured layers along with their priorities.
624
Andrew Geisslerf0343792020-11-18 10:42:21 -0600625 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500626 A space-separated list of recipe files BitBake uses to build
627 software.
628
629 When specifying recipe files, you can pattern match using Python's
630 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
631 For details on the syntax, see the documentation by following the
632 previous link.
633
Andrew Geisslerf0343792020-11-18 10:42:21 -0600634 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500635 Activates content when identified layers are present. You identify
636 the layers by the collections that the layers define.
637
Andrew Geissler09036742021-06-25 14:25:14 -0500638 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500639 whose corresponding ``.bb`` file is in a layer that attempts to
640 modify other layers through ``.bbappend`` but does not want to
641 introduce a hard dependency on those other layers.
642
Andrew Geissler09036742021-06-25 14:25:14 -0500643 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500644 collection_name:filename_pattern The following example identifies two
Andrew Geisslerc926e172021-05-07 16:11:35 -0500645 collection names and two filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500646
647 BBFILES_DYNAMIC += " \
648 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
649 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
650 "
651
652 This next example shows an error message that occurs because invalid
653 entries are found, which cause parsing to abort:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500654
655 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500656
657 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
658 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
659 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
660
Andrew Geisslerf0343792020-11-18 10:42:21 -0600661 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500662 Variable that controls how BitBake displays logs on build failure.
663
Andrew Geisslerf0343792020-11-18 10:42:21 -0600664 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500665 If :term:`BBINCLUDELOGS` is set, specifies the
666 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500667 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500668 the entire log is printed.
669
Andrew Geisslerf0343792020-11-18 10:42:21 -0600670 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500671 Lists the layers to enable during the build. This variable is defined
672 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500673 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500674
675 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500676 /home/scottrif/poky/meta \
677 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500678 /home/scottrif/poky/meta-yocto-bsp \
679 /home/scottrif/poky/meta-mykernel \
680 "
681
682 This example enables four layers, one of which is a custom,
683 user-defined layer named ``meta-mykernel``.
684
Andrew Geisslerf0343792020-11-18 10:42:21 -0600685 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500686 Prevents BitBake from processing recipes and recipe append files.
687
Andrew Geissler09036742021-06-25 14:25:14 -0500688 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500689 ``.bbappend`` files. BitBake ignores any recipe or recipe append
690 files that match any of the expressions. It is as if BitBake does not
691 see them at all. Consequently, matching files are not parsed or
692 otherwise used by BitBake.
693
694 The values you provide are passed to Python's regular expression
695 compiler. Consequently, the syntax follows Python's Regular
696 Expression (re) syntax. The expressions are compared against the full
697 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500698 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500699
700 The following example uses a complete regular expression to tell
701 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500702 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500703
704 BBMASK = "meta-ti/recipes-misc/"
705
706 If you want to mask out multiple directories or recipes, you can
707 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500708 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500709
710 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
711 BBMASK += "/meta-oe/recipes-support/"
712 BBMASK += "/meta-foo/.*/openldap"
713 BBMASK += "opencv.*\.bbappend"
714 BBMASK += "lzma"
715
716 .. note::
717
718 When specifying a directory name, use the trailing slash character
719 to ensure you match just that directory name.
720
Andrew Geisslerf0343792020-11-18 10:42:21 -0600721 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500722 Specifies each additional separate configuration when you are
723 building targets with multiple configurations. Use this variable in
724 your ``conf/local.conf`` configuration file. Specify a
725 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500726 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500727
728 BBMULTICONFIG = "configA configB configC"
729
730 Each configuration file you
731 use must reside in the :term:`Build Directory`
732 ``conf/multiconfig`` directory (e.g.
733 build_directory\ ``/conf/multiconfig/configA.conf``).
734
Andrew Geissler09036742021-06-25 14:25:14 -0500735 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500736 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600737 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500738 section in the Yocto Project Development Tasks Manual.
739
Andrew Geisslerf0343792020-11-18 10:42:21 -0600740 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500741 Used by BitBake to locate ``.bbclass`` and configuration files. This
742 variable is analogous to the ``PATH`` variable.
743
744 .. note::
745
746 If you run BitBake from a directory outside of the
Andrew Geissler09036742021-06-25 14:25:14 -0500747 :term:`Build Directory`, you must be sure to set :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500748 to point to the Build Directory. Set the variable as you would any
Andrew Geisslerc926e172021-05-07 16:11:35 -0500749 environment variable and then run BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750
751 $ BBPATH = "build_directory"
752 $ export BBPATH
753 $ bitbake target
754
755
Andrew Geisslerf0343792020-11-18 10:42:21 -0600756 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500757 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500758 BitBake remote server.
759
760 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500761 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500762
763 export BBSERVER=localhost:$port
764
Andrew Geissler09036742021-06-25 14:25:14 -0500765 By default, :term:`BBSERVER` also appears in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500766 :term:`bitbake:BB_HASHBASE_WHITELIST`.
Andrew Geissler09036742021-06-25 14:25:14 -0500767 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500768 data.
769
Andrew Geisslerf0343792020-11-18 10:42:21 -0600770 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500771 When inheriting the
772 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
773 this variable specifies binary configuration scripts to disable in
774 favor of using ``pkg-config`` to query the information. The
775 ``binconfig-disabled`` class will modify the specified scripts to
776 return an error so that calls to them can be easily found and
777 replaced.
778
779 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500780 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500781
782 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
783
Andrew Geisslerf0343792020-11-18 10:42:21 -0600784 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500785 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
786 this variable specifies a wildcard for configuration scripts that
787 need editing. The scripts are edited to correct any paths that have
788 been set up during compilation so that they are correct for use when
789 installed into the sysroot and called by the build processes of other
790 recipes.
791
792 .. note::
793
Andrew Geissler09036742021-06-25 14:25:14 -0500794 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500795 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
796 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500797 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500798 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
799 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500800
801 For more information on how this variable works, see
802 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
803 You can also find general
804 information on the class in the
805 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
806
Andrew Geisslerf0343792020-11-18 10:42:21 -0600807 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500808 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500809 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500810 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500811
812 ${BPN}-${PV}
813
Andrew Geisslerf0343792020-11-18 10:42:21 -0600814 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500815 This variable is a version of the :term:`PN` variable with
816 common prefixes and suffixes removed, such as ``nativesdk-``,
817 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
818 The exact lists of prefixes and suffixes removed are specified by the
819 :term:`MLPREFIX` and
820 :term:`SPECIAL_PKGSUFFIX` variables,
821 respectively.
822
Andrew Geisslerf0343792020-11-18 10:42:21 -0600823 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500824 Specifies a URL for an upstream bug tracking website for a recipe.
825 The OpenEmbedded build system does not use this variable. Rather, the
826 variable is a useful pointer in case a bug in the software being
827 built needs to be manually reported.
828
Andrew Geisslerf0343792020-11-18 10:42:21 -0600829 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500830 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500831 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500832 machine name reported by the ``uname`` command.
833
Andrew Geisslerf0343792020-11-18 10:42:21 -0600834 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500835 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500836 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500837
Andrew Geisslerf0343792020-11-18 10:42:21 -0600838 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500839 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500840 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500841
Andrew Geisslerf0343792020-11-18 10:42:21 -0600842 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500843 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500844 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500845 points to GCC and passes as arguments the value of
846 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500847 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500848
Andrew Geisslerf0343792020-11-18 10:42:21 -0600849 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500850 Specifies the flags to pass to the C compiler when building for the
851 build host. When building in the ``-native`` context,
852 :term:`CFLAGS` is set to the value of this variable by
853 default.
854
Andrew Geisslerf0343792020-11-18 10:42:21 -0600855 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500856 Specifies the flags to pass to the C preprocessor (i.e. to both the C
857 and the C++ compilers) when building for the build host. When
858 building in the ``-native`` context, :term:`CPPFLAGS`
859 is set to the value of this variable by default.
860
Andrew Geisslerf0343792020-11-18 10:42:21 -0600861 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500862 Specifies the flags to pass to the C++ compiler when building for the
863 build host. When building in the ``-native`` context,
864 :term:`CXXFLAGS` is set to the value of this variable
865 by default.
866
Andrew Geisslerf0343792020-11-18 10:42:21 -0600867 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500868 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500869 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500870 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500871 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500872
Andrew Geisslerf0343792020-11-18 10:42:21 -0600873 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500874 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500875 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500876 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500877 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500878
Andrew Geisslerf0343792020-11-18 10:42:21 -0600879 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500880 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500881 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500882
Andrew Geisslerf0343792020-11-18 10:42:21 -0600883 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500884 Specifies the flags to pass to the linker when building for the build
885 host. When building in the ``-native`` context,
886 :term:`LDFLAGS` is set to the value of this variable
887 by default.
888
Andrew Geisslerf0343792020-11-18 10:42:21 -0600889 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500890 Specifies the optimization flags passed to the C compiler when
891 building for the build host or the SDK. The flags are passed through
892 the :term:`BUILD_CFLAGS` and
893 :term:`BUILDSDK_CFLAGS` default values.
894
895 The default value of the ``BUILD_OPTIMIZATION`` variable is "-O2
896 -pipe".
897
Andrew Geisslerf0343792020-11-18 10:42:21 -0600898 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500899 Specifies the operating system in use on the build host (e.g.
900 "linux"). The OpenEmbedded build system sets the value of
901 ``BUILD_OS`` from the OS reported by the ``uname`` command - the
902 first word, converted to lower-case characters.
903
Andrew Geisslerf0343792020-11-18 10:42:21 -0600904 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500905 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500906 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500907 :term:`TARGET_PREFIX` when building for
908 ``native`` recipes.
909
Andrew Geisslerf0343792020-11-18 10:42:21 -0600910 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500911 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500912 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500913 points to
914 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
915
Andrew Geisslerf0343792020-11-18 10:42:21 -0600916 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500917 Specifies the system, including the architecture and the operating
918 system, to use when building for the build host (i.e. when building
919 ``native`` recipes).
920
921 The OpenEmbedded build system automatically sets this variable based
922 on :term:`BUILD_ARCH`,
923 :term:`BUILD_VENDOR`, and
924 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500925 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500926
Andrew Geisslerf0343792020-11-18 10:42:21 -0600927 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500928 Specifies the vendor name to use when building for the build host.
929 The default value is an empty string ("").
930
Andrew Geisslerf0343792020-11-18 10:42:21 -0600931 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500932 Points to the location of the :term:`Build Directory`.
933 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500934 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500935 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500936 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500937 ``build`` in the current directory.
938
Andrew Geisslerf0343792020-11-18 10:42:21 -0600939 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500940 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
941 class, this variable specifies whether or not to commit the build
942 history output in a local Git repository. If set to "1", this local
943 repository will be maintained automatically by the ``buildhistory``
944 class and a commit will be created on every build for changes to each
945 top-level subdirectory of the build history output (images, packages,
946 and sdk). If you want to track changes to build history over time,
947 you should set this value to "1".
948
949 By default, the ``buildhistory`` class does not commit the build
Andrew Geisslerc926e172021-05-07 16:11:35 -0500950 history output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500951
952 BUILDHISTORY_COMMIT ?= "0"
953
Andrew Geisslerf0343792020-11-18 10:42:21 -0600954 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500955 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
956 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500957 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500958 :term:`BUILDHISTORY_COMMIT` variable must
959 be set to "1".
960
961 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500962 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500963 email@host". Providing an email address or host that is not valid
964 does not produce an error.
965
Andrew Geisslerc926e172021-05-07 16:11:35 -0500966 By default, the ``buildhistory`` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500967
968 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
969
Andrew Geisslerf0343792020-11-18 10:42:21 -0600970 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500971 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
972 class, this variable specifies the directory in which build history
973 information is kept. For more information on how the variable works,
974 see the ``buildhistory.class``.
975
Andrew Geisslerc926e172021-05-07 16:11:35 -0500976 By default, the ``buildhistory`` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500977
978 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
979
Andrew Geisslerf0343792020-11-18 10:42:21 -0600980 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500981 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
982 class, this variable specifies the build history features to be
983 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600984 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500985 section in the Yocto Project Development Tasks Manual.
986
987 You can specify these features in the form of a space-separated list:
988
989 - *image:* Analysis of the contents of images, which includes the
990 list of installed packages among other things.
991
992 - *package:* Analysis of the contents of individual packages.
993
994 - *sdk:* Analysis of the contents of the software development kit
995 (SDK).
996
997 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600998 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500999 (sstate) tasks.
1000 This saves one file per task and lists the SHA-256 checksums for
1001 each file staged (i.e. the output of the task).
1002
1003 By default, the ``buildhistory`` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001004 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001005
1006 BUILDHISTORY_FEATURES ?= "image package sdk"
1007
Andrew Geisslerf0343792020-11-18 10:42:21 -06001008 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001009 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1010 class, this variable specifies a list of paths to files copied from
1011 the image contents into the build history directory under an
1012 "image-files" directory in the directory for the image, so that you
1013 can track the contents of each file. The default is to copy
1014 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1015 changes in user and group entries. You can modify the list to include
1016 any file. Specifying an invalid path does not produce an error.
1017 Consequently, you can include files that might not always be present.
1018
1019 By default, the ``buildhistory`` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001020 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001021
1022 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1023
Andrew Geisslerf0343792020-11-18 10:42:21 -06001024 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001025 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1026 class, this variable optionally specifies a remote repository to
1027 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001028 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001029 :term:`BUILDHISTORY_COMMIT` must be set to
1030 "1".
1031
1032 The repository should correspond to a remote address that specifies a
1033 repository as understood by Git, or alternatively to a remote name
1034 that you have set up manually using ``git remote`` within the local
1035 repository.
1036
Andrew Geisslerc926e172021-05-07 16:11:35 -05001037 By default, the ``buildhistory`` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001038
1039 BUILDHISTORY_PUSH_REPO ?= ""
1040
Andrew Geisslerf0343792020-11-18 10:42:21 -06001041 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042 Specifies the flags to pass to the C compiler when building for the
1043 SDK. When building in the ``nativesdk-`` context,
1044 :term:`CFLAGS` is set to the value of this variable by
1045 default.
1046
Andrew Geisslerf0343792020-11-18 10:42:21 -06001047 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001048 Specifies the flags to pass to the C pre-processor (i.e. to both the
1049 C and the C++ compilers) when building for the SDK. When building in
1050 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1051 to the value of this variable by default.
1052
Andrew Geisslerf0343792020-11-18 10:42:21 -06001053 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001054 Specifies the flags to pass to the C++ compiler when building for the
1055 SDK. When building in the ``nativesdk-`` context,
1056 :term:`CXXFLAGS` is set to the value of this variable
1057 by default.
1058
Andrew Geisslerf0343792020-11-18 10:42:21 -06001059 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001060 Specifies the flags to pass to the linker when building for the SDK.
1061 When building in the ``nativesdk-`` context,
1062 :term:`LDFLAGS` is set to the value of this variable
1063 by default.
1064
Andrew Geisslerf0343792020-11-18 10:42:21 -06001065 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001066 Points to the location of the directory that holds build statistics
1067 when you use and enable the
1068 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001069 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001070 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1071
Andrew Geisslerf0343792020-11-18 10:42:21 -06001072 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001073 For the BusyBox recipe, specifies whether to split the output
1074 executable file into two parts: one for features that require
1075 ``setuid root``, and one for the remaining features (i.e. those that
1076 do not require ``setuid root``).
1077
Andrew Geissler09036742021-06-25 14:25:14 -05001078 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001079 splitting the output executable file. Set the variable to "0" to get
1080 a single output executable file.
1081
Andrew Geisslerf0343792020-11-18 10:42:21 -06001082 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001083 Specifies the directory BitBake uses to store a cache of the
1084 :term:`Metadata` so it does not need to be parsed every time
1085 BitBake is started.
1086
Andrew Geisslerf0343792020-11-18 10:42:21 -06001087 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001088 The minimal command and arguments used to run the C compiler.
1089
Andrew Geisslerf0343792020-11-18 10:42:21 -06001090 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001091 Specifies the flags to pass to the C compiler. This variable is
1092 exported to an environment variable and thus made visible to the
1093 software being built during the compilation step.
1094
Andrew Geissler09036742021-06-25 14:25:14 -05001095 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 being built:
1097
1098 - :term:`TARGET_CFLAGS` when building for the
1099 target
1100
1101 - :term:`BUILD_CFLAGS` when building for the
1102 build host (i.e. ``-native``)
1103
1104 - :term:`BUILDSDK_CFLAGS` when building for
1105 an SDK (i.e. ``nativesdk-``)
1106
Andrew Geisslerf0343792020-11-18 10:42:21 -06001107 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001108 An internal variable specifying the special class override that
1109 should currently apply (e.g. "class-target", "class-native", and so
1110 forth). The classes that use this variable (e.g.
1111 :ref:`native <ref-classes-native>`,
1112 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1113 variable to appropriate values.
1114
1115 .. note::
1116
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001117 ``CLASSOVERRIDE`` gets its default "class-target" value from the
1118 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001119
1120 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001121 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001122
1123 do_install_append_class-target() {
1124 install my-extra-file ${D}${sysconfdir}
1125 }
1126
1127 Here is an example where ``FOO`` is set to
1128 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001129 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001130
1131 FOO_class-native = "native"
1132 FOO = "other"
1133
Andrew Geissler09036742021-06-25 14:25:14 -05001134 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001135 that it is included in the default value of
1136 :term:`OVERRIDES`.
1137
Andrew Geisslerf0343792020-11-18 10:42:21 -06001138 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001139 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001140 ``make clean`` command does not work for the software being built.
1141 Consequently, the OpenEmbedded build system will not try to run
1142 ``make clean`` during the :ref:`ref-tasks-configure`
1143 task, which is the default behavior.
1144
Andrew Geisslerf0343792020-11-18 10:42:21 -06001145 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001146 Provides a list of hardware features that are enabled in both
1147 :term:`MACHINE_FEATURES` and
1148 :term:`DISTRO_FEATURES`. This select list of
1149 features contains features that make sense to be controlled both at
1150 the machine and distribution configuration level. For example, the
1151 "bluetooth" feature requires hardware support but should also be
1152 optional at the distribution level, in case the hardware supports
1153 Bluetooth but you do not ever intend to use it.
1154
Andrew Geisslerf0343792020-11-18 10:42:21 -06001155 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001156 Points to ``meta/files/common-licenses`` in the
1157 :term:`Source Directory`, which is where generic license
1158 files reside.
1159
Andrew Geisslerf0343792020-11-18 10:42:21 -06001160 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001161 A regular expression that resolves to one or more hosts (when the
1162 recipe is native) or one or more targets (when the recipe is
1163 non-native) with which a recipe is compatible. The regular expression
1164 is matched against :term:`HOST_SYS`. You can use the
1165 variable to stop recipes from being built for classes of systems with
1166 which the recipes are not compatible. Stopping these builds is
1167 particularly useful with kernels. The variable also helps to increase
1168 parsing speed since the build system skips parsing recipes not
1169 compatible with the current system.
1170
Andrew Geisslerf0343792020-11-18 10:42:21 -06001171 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001172 A regular expression that resolves to one or more target machines
1173 with which a recipe is compatible. The regular expression is matched
1174 against :term:`MACHINEOVERRIDES`. You can use
1175 the variable to stop recipes from being built for machines with which
1176 the recipes are not compatible. Stopping these builds is particularly
1177 useful with kernels. The variable also helps to increase parsing
1178 speed since the build system skips parsing recipes not compatible
1179 with the current machine.
1180
Andrew Geisslerf0343792020-11-18 10:42:21 -06001181 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001182 Defines wildcards to match when installing a list of complementary
1183 packages for all the packages explicitly (or implicitly) installed in
1184 an image.
1185
1186 .. note::
1187
Andrew Geissler09036742021-06-25 14:25:14 -05001188 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001189 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1190 which is similar to the Unix style pathname pattern expansion
1191 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001192
1193 The resulting list of complementary packages is associated with an
1194 item that can be added to
1195 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001196 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001197 will install -dev packages (containing headers and other development
1198 files) for every package in the image.
1199
1200 To add a new feature item pointing to a wildcard, use a variable flag
1201 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001202 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001203
1204 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1205
Andrew Geisslerf0343792020-11-18 10:42:21 -06001206 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207 Stores sysroot components for each recipe. The OpenEmbedded build
1208 system uses ``COMPONENTS_DIR`` when constructing recipe-specific
1209 sysroots for other recipes.
1210
1211 The default is
1212 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1213 (i.e.
1214 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1215
Andrew Geisslerf0343792020-11-18 10:42:21 -06001216 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001217 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001218 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001219 ``build/conf/`` compatibility changes.
1220
Andrew Geisslerf0343792020-11-18 10:42:21 -06001221 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001222 Identifies editable or configurable files that are part of a package.
1223 If the Package Management System (PMS) is being used to update
1224 packages on the target system, it is possible that configuration
1225 files you have changed after the original installation and that you
1226 now want to remain unchanged are overwritten. In other words,
1227 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001228 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001229 variable to list the files in the package that you wish to prevent
1230 the PMS from overwriting during this update process.
1231
Andrew Geissler09036742021-06-25 14:25:14 -05001232 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001233 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001234 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001235
1236 CONFFILES_${PN} += "${sysconfdir}/file1 \
1237 ${sysconfdir}/file2 ${sysconfdir}/file3"
1238
Andrew Geissler09036742021-06-25 14:25:14 -05001239 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1240 variables. The files listed within :term:`CONFFILES` must be a subset of
1241 the files listed within :term:`FILES`. Because the configuration files
1242 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001243 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001244 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001245 variable.
1246
1247 .. note::
1248
Andrew Geissler09036742021-06-25 14:25:14 -05001249 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001250 good practice to use appropriate path variables.
1251 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1252 rather than ``/usr/bin``. You can find a list of these variables at
1253 the top of the ``meta/conf/bitbake.conf`` file in the
1254 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001255
Andrew Geisslerf0343792020-11-18 10:42:21 -06001256 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001257 Identifies the initial RAM filesystem (initramfs) source files. The
1258 OpenEmbedded build system receives and uses this kernel Kconfig
1259 variable as an environment variable. By default, the variable is set
1260 to null ("").
1261
Andrew Geissler09036742021-06-25 14:25:14 -05001262 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001263 with a ``.cpio`` suffix or a space-separated list of directories and
1264 files for building the initramfs image. A cpio archive should contain
1265 a filesystem archive to be used as an initramfs image. Directories
1266 should contain a filesystem layout to be included in the initramfs
1267 image. Files should contain entries according to the format described
1268 by the ``usr/gen_init_cpio`` program in the kernel tree.
1269
1270 If you specify multiple directories and files, the initramfs image
1271 will be the aggregate of all of them.
1272
1273 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001274 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001275 in the Yocto Project Development Tasks Manual.
1276
Andrew Geisslerf0343792020-11-18 10:42:21 -06001277 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001278 A list of files that contains ``autoconf`` test results relevant to
1279 the current build. This variable is used by the Autotools utilities
1280 when running ``configure``.
1281
Andrew Geisslerf0343792020-11-18 10:42:21 -06001282 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001283 The minimal arguments for GNU configure.
1284
Andrew Geisslerf0343792020-11-18 10:42:21 -06001285 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001286 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001287 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001288 class, this variable identifies distribution features that would be
1289 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001290 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1291 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001292 the recipe will be skipped, and if the build system attempts to build
1293 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001294
Andrew Geisslerf0343792020-11-18 10:42:21 -06001295 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001296 A space-separated list of licenses to exclude from the source
1297 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1298 other words, if a license in a recipe's
1299 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001300 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001301 class.
1302
1303 .. note::
1304
Andrew Geissler09036742021-06-25 14:25:14 -05001305 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001306 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001307
1308 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001309 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001310 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1311 is inherited by the ``archiver`` class.
1312
Andrew Geisslerf0343792020-11-18 10:42:21 -06001313 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001314 A space-separated list of licenses to include in the source archived
1315 by the :ref:`archiver <ref-classes-archiver>` class. In other
1316 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001317 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001318 source is archived by the class.
1319
1320 The default value is set by the
1321 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1322 is inherited by the ``archiver`` class. The default value includes
1323 "GPL*", "LGPL*", and "AGPL*".
1324
Andrew Geisslerf0343792020-11-18 10:42:21 -06001325 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001326 A list of recipes to exclude in the source archived by the
1327 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001328 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001329 exclusion caused through the
1330 :term:`COPYLEFT_LICENSE_INCLUDE` and
1331 :term:`COPYLEFT_LICENSE_EXCLUDE`
1332 variables, respectively.
1333
1334 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001335 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001336 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1337 is inherited by the ``archiver`` class.
1338
Andrew Geisslerf0343792020-11-18 10:42:21 -06001339 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001340 A list of recipes to include in the source archived by the
1341 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001342 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001343 exclusion caused through the
1344 :term:`COPYLEFT_LICENSE_INCLUDE` and
1345 :term:`COPYLEFT_LICENSE_EXCLUDE`
1346 variables, respectively.
1347
1348 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001349 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1351 is inherited by the ``archiver`` class.
1352
Andrew Geisslerf0343792020-11-18 10:42:21 -06001353 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001354 A space-separated list of recipe types to include in the source
1355 archived by the :ref:`archiver <ref-classes-archiver>` class.
1356 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1357 ``crosssdk``, and ``cross-canadian``.
1358
Andrew Geissler09036742021-06-25 14:25:14 -05001359 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001360 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
1361 class, which is inherited by the ``archiver`` class.
1362
Andrew Geisslerf0343792020-11-18 10:42:21 -06001363 :term:`COPY_LIC_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364 If set to "1" along with the
1365 :term:`COPY_LIC_MANIFEST` variable, the
1366 OpenEmbedded build system copies into the image the license files,
1367 which are located in ``/usr/share/common-licenses``, for each
1368 package. The license files are placed in directories within the image
1369 itself during build time.
1370
1371 .. note::
1372
Andrew Geissler09036742021-06-25 14:25:14 -05001373 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001374 newly installed packages to an image, which might be most suitable for
1375 read-only filesystems that cannot be upgraded. See the
1376 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001377 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001378 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001379 information on providing license text.
1380
Andrew Geisslerf0343792020-11-18 10:42:21 -06001381 :term:`COPY_LIC_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001382 If set to "1", the OpenEmbedded build system copies the license
1383 manifest for the image to
1384 ``/usr/share/common-licenses/license.manifest`` within the image
1385 itself during build time.
1386
1387 .. note::
1388
Andrew Geissler09036742021-06-25 14:25:14 -05001389 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001390 newly installed packages to an image, which might be most suitable for
1391 read-only filesystems that cannot be upgraded. See the
1392 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001393 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001394 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001395 information on providing license text.
1396
Andrew Geisslerf0343792020-11-18 10:42:21 -06001397 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001398 Specifies the list of packages to be added to the image. You should
1399 only set this variable in the ``local.conf`` configuration file found
1400 in the :term:`Build Directory`.
1401
1402 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1403 supported.
1404
Andrew Geisslerf0343792020-11-18 10:42:21 -06001405 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001406 Specifies the parent directory of the OpenEmbedded-Core Metadata
1407 layer (i.e. ``meta``).
1408
Andrew Geissler09036742021-06-25 14:25:14 -05001409 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001410 of this layer and not the layer itself. Consider an example where you
1411 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001412 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001413 points to the ``poky`` folder because it is the parent directory of
1414 the ``poky/meta`` layer.
1415
Andrew Geisslerf0343792020-11-18 10:42:21 -06001416 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001417 Lists files from the :term:`COREBASE` directory that
1418 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001419 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001420 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001421 into the extensible SDK.
1422
Andrew Geissler09036742021-06-25 14:25:14 -05001423 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001424 typically contains build directories and other files that should not
1425 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001426 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001427 are actually needed.
1428
Andrew Geisslerf0343792020-11-18 10:42:21 -06001429 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001430 The minimal command and arguments used to run the C preprocessor.
1431
Andrew Geisslerf0343792020-11-18 10:42:21 -06001432 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001433 Specifies the flags to pass to the C pre-processor (i.e. to both the
1434 C and the C++ compilers). This variable is exported to an environment
1435 variable and thus made visible to the software being built during the
1436 compilation step.
1437
Andrew Geissler09036742021-06-25 14:25:14 -05001438 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001439 being built:
1440
1441 - :term:`TARGET_CPPFLAGS` when building for
1442 the target
1443
1444 - :term:`BUILD_CPPFLAGS` when building for the
1445 build host (i.e. ``-native``)
1446
1447 - :term:`BUILDSDK_CPPFLAGS` when building
1448 for an SDK (i.e. ``nativesdk-``)
1449
Andrew Geisslerf0343792020-11-18 10:42:21 -06001450 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001451 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001452 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001453 :term:`TARGET_PREFIX` variable.
1454
1455 .. note::
1456
Andrew Geissler09036742021-06-25 14:25:14 -05001457 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001458 variable only in certain contexts (e.g. when building for kernel
1459 and kernel module recipes).
1460
Andrew Geisslerf0343792020-11-18 10:42:21 -06001461 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001462 The directory in which files checked out under the CVS system are
1463 stored.
1464
Andrew Geisslerf0343792020-11-18 10:42:21 -06001465 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001466 The minimal command and arguments used to run the C++ compiler.
1467
Andrew Geisslerf0343792020-11-18 10:42:21 -06001468 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001469 Specifies the flags to pass to the C++ compiler. This variable is
1470 exported to an environment variable and thus made visible to the
1471 software being built during the compilation step.
1472
Andrew Geissler09036742021-06-25 14:25:14 -05001473 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001474 being built:
1475
1476 - :term:`TARGET_CXXFLAGS` when building for
1477 the target
1478
1479 - :term:`BUILD_CXXFLAGS` when building for the
1480 build host (i.e. ``-native``)
1481
1482 - :term:`BUILDSDK_CXXFLAGS` when building
1483 for an SDK (i.e. ``nativesdk-``)
1484
Andrew Geisslerf0343792020-11-18 10:42:21 -06001485 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001486 The destination directory. The location in the :term:`Build Directory`
1487 where components are installed by the
1488 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001489 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001490
1491 ${WORKDIR}/image
1492
1493 .. note::
1494
1495 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001496 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001497
Andrew Geisslerf0343792020-11-18 10:42:21 -06001498 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001499 The date the build was started. Dates appear using the year, month,
1500 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1501
Andrew Geisslerf0343792020-11-18 10:42:21 -06001502 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001503 The date and time on which the current build started. The format is
1504 suitable for timestamps.
1505
Andrew Geisslerf0343792020-11-18 10:42:21 -06001506 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001507 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001508 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001509 particular package should not be renamed according to Debian library
1510 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001511 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001512
1513 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
1514
Andrew Geisslerf0343792020-11-18 10:42:21 -06001515 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001516 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001517 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001518 the library name for an individual package. Overriding the library
1519 name in these cases is rare. You must use the package name as an
1520 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001521 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001522
1523 DEBIANNAME_${PN} = "dbus-1"
1524
Andrew Geisslerf0343792020-11-18 10:42:21 -06001525 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001526 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001527 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001528
Andrew Geisslerf0343792020-11-18 10:42:21 -06001529 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001530 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001531 compiling a system for debugging. This variable defaults to "-O
1532 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1533
Andrew Geisslerf0343792020-11-18 10:42:21 -06001534 :term:`DEFAULT_PREFERENCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001535 Specifies a weak bias for recipe selection priority.
1536
1537 The most common usage of this is variable is to set it to "-1" within
1538 a recipe for a development version of a piece of software. Using the
1539 variable in this way causes the stable version of the recipe to build
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001540 by default in the absence of :term:`PREFERRED_VERSION` being used to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001541 build the development version.
1542
1543 .. note::
1544
Andrew Geissler09036742021-06-25 14:25:14 -05001545 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001546 by :term:`BBFILE_PRIORITY` if that variable is different between two
1547 layers that contain different versions of the same recipe.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001548
Andrew Geisslerf0343792020-11-18 10:42:21 -06001549 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001550 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1551 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001552 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001553 :term:`TUNE_FEATURES`.
1554
1555 The default tune is either implicitly or explicitly set by the
1556 machine (:term:`MACHINE`). However, you can override
1557 the setting using available tunes as defined with
1558 :term:`AVAILTUNES`.
1559
Andrew Geisslerf0343792020-11-18 10:42:21 -06001560 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001561 Lists a recipe's build-time dependencies. These are dependencies on
1562 other recipes whose contents (e.g. headers and shared libraries) are
1563 needed by the recipe at build time.
1564
1565 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001566 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001567
1568 DEPENDS = "bar"
1569
1570 The practical effect of the previous
1571 assignment is that all files installed by bar will be available in
1572 the appropriate staging sysroot, given by the
1573 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1574 :ref:`ref-tasks-configure` task for ``foo`` runs.
1575 This mechanism is implemented by having ``do_configure`` depend on
1576 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001577 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001578 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1579 declaration in the :ref:`base <ref-classes-base>` class.
1580
1581 .. note::
1582
Andrew Geissler09036742021-06-25 14:25:14 -05001583 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001584 explicitly. The standard classes and build-related variables are
1585 configured to automatically use the appropriate staging sysroots.
1586
Andrew Geissler09036742021-06-25 14:25:14 -05001587 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001588 that run on the build machine during the build. For example, a recipe
1589 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001590 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001591
1592 DEPENDS = "codegen-native"
1593
1594 For more
1595 information, see the :ref:`native <ref-classes-native>` class and
1596 the :term:`EXTRANATIVEPATH` variable.
1597
1598 .. note::
1599
Andrew Geissler09036742021-06-25 14:25:14 -05001600 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001601 it is a list of :term:`PROVIDES` names, which
1602 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001603 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001604 instead, as this will put files from all the packages that make
1605 up ``foo``, which includes those from ``foo-dev``, into the
1606 sysroot.
1607
Andrew Geissler09036742021-06-25 14:25:14 -05001608 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001609 itself add any runtime dependencies between the packages
1610 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001611 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001612 section in the Yocto Project Overview and Concepts Manual,
1613 runtime dependencies will often be added automatically, meaning
1614 ``DEPENDS`` alone is sufficient for most recipes.
1615
Andrew Geissler09036742021-06-25 14:25:14 -05001616 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001617 recipes that install precompiled components. For example, if
1618 ``libfoo`` is a precompiled library that links against
1619 ``libbar``, then linking against ``libfoo`` requires both
1620 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001621 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001622 to the recipe that installs ``libbar``, other recipes might
1623 fail to link against ``libfoo``.
1624
1625 For information on runtime dependencies, see the
1626 :term:`RDEPENDS` variable. You can also see the
1627 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
1628 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
1629 BitBake User Manual for additional information on tasks and
1630 dependencies.
1631
Andrew Geisslerf0343792020-11-18 10:42:21 -06001632 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001633 Points to the general area that the OpenEmbedded build system uses to
1634 place images, packages, SDKs, and other output files that are ready
1635 to be used outside of the build system. By default, this directory
1636 resides within the :term:`Build Directory` as
1637 ``${TMPDIR}/deploy``.
1638
1639 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001640 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001641 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001642 ":ref:`overview-manual/concepts:images`",
1643 ":ref:`overview-manual/concepts:package feeds`", and
1644 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001645 Yocto Project Overview and Concepts Manual.
1646
Andrew Geisslerf0343792020-11-18 10:42:21 -06001647 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001648 Points to the area that the OpenEmbedded build system uses to place
1649 Debian packages that are ready to be used outside of the build
1650 system. This variable applies only when
1651 :term:`PACKAGE_CLASSES` contains
1652 "package_deb".
1653
1654 The BitBake configuration file initially defines the
1655 ``DEPLOY_DIR_DEB`` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001656 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001657
1658 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1659
1660 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001661 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001662 :ref:`ref-tasks-package_write_deb` task
1663 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001664 information on how packaging works, see the
1665 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001666 in the Yocto Project Overview and Concepts Manual.
1667
Andrew Geisslerf0343792020-11-18 10:42:21 -06001668 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001669 Points to the area that the OpenEmbedded build system uses to place
1670 images and other associated output files that are ready to be
1671 deployed onto the target machine. The directory is machine-specific
1672 as it contains the ``${MACHINE}`` name. By default, this directory
1673 resides within the :term:`Build Directory` as
1674 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1675
Andrew Geissler09036742021-06-25 14:25:14 -05001676 It must not be used directly in recipes when deploying files. Instead,
1677 it's only useful when a recipe needs to "read" a file already deployed
1678 by a dependency. So, it should be filled with the contents of
1679 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1680 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1681 <ref-classes-image>` class.
1682
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001683 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001684 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001685 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001686 ":ref:`overview-manual/concepts:images`" and
1687 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001688 the Yocto Project Overview and Concepts Manual.
1689
Andrew Geisslerf0343792020-11-18 10:42:21 -06001690 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001691 Points to the area that the OpenEmbedded build system uses to place
1692 IPK packages that are ready to be used outside of the build system.
1693 This variable applies only when
1694 :term:`PACKAGE_CLASSES` contains
1695 "package_ipk".
1696
1697 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001698 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001699
1700 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1701
1702 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001703 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001704 :ref:`ref-tasks-package_write_ipk` task
1705 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001706 on how packaging works, see the
1707 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001708 in the Yocto Project Overview and Concepts Manual.
1709
Andrew Geisslerf0343792020-11-18 10:42:21 -06001710 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001711 Points to the area that the OpenEmbedded build system uses to place
1712 RPM packages that are ready to be used outside of the build system.
1713 This variable applies only when
1714 :term:`PACKAGE_CLASSES` contains
1715 "package_rpm".
1716
1717 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001718 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001719
1720 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1721
1722 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001723 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001724 :ref:`ref-tasks-package_write_rpm` task
1725 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001726 on how packaging works, see the
1727 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001728 in the Yocto Project Overview and Concepts Manual.
1729
Andrew Geisslerf0343792020-11-18 10:42:21 -06001730 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001731 Points to the area that the OpenEmbedded build system uses to place
1732 tarballs that are ready to be used outside of the build system. This
1733 variable applies only when
1734 :term:`PACKAGE_CLASSES` contains
1735 "package_tar".
1736
1737 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001738 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001739
1740 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1741
1742 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001743 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001744 :ref:`ref-tasks-package_write_tar` task
1745 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001746 on how packaging works, see the
1747 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001748 in the Yocto Project Overview and Concepts Manual.
1749
Andrew Geisslerf0343792020-11-18 10:42:21 -06001750 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001751 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001752 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geisslerc926e172021-05-07 16:11:35 -05001753 is set in the ``deploy`` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001754
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001755 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001756
1757 Recipes inheriting the ``deploy`` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001758 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001759 them into :term:`DEPLOY_DIR_IMAGE`
1760 afterwards.
1761
Andrew Geisslerf0343792020-11-18 10:42:21 -06001762 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001763 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001764 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001765 variable.
1766
Andrew Geisslerf0343792020-11-18 10:42:21 -06001767 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001768 The short name of the distribution. For information on the long name
1769 of the distribution, see the :term:`DISTRO_NAME`
1770 variable.
1771
Andrew Geissler09036742021-06-25 14:25:14 -05001772 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001773 file whose root name is the same as the variable's argument and whose
1774 filename extension is ``.conf``. For example, the distribution
1775 configuration file for the Poky distribution is named ``poky.conf``
1776 and resides in the ``meta-poky/conf/distro`` directory of the
1777 :term:`Source Directory`.
1778
Andrew Geissler09036742021-06-25 14:25:14 -05001779 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001780 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001781
1782 DISTRO = "poky"
1783
1784 Distribution configuration files are located in a ``conf/distro``
1785 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001786 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001787 spaces, and is typically all lower-case.
1788
1789 .. note::
1790
Andrew Geissler09036742021-06-25 14:25:14 -05001791 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001792 are used, which are specified within
1793 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001794
Andrew Geisslerf0343792020-11-18 10:42:21 -06001795 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001796 Specifies a codename for the distribution being built.
1797
Andrew Geisslerf0343792020-11-18 10:42:21 -06001798 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001799 Specifies a list of distro-specific packages to add to all images.
1800 This variable takes affect through ``packagegroup-base`` so the
1801 variable only really applies to the more full-featured images that
1802 include ``packagegroup-base``. You can use this variable to keep
1803 distro policy out of generic images. As with all other distro
1804 variables, you set this variable in the distro ``.conf`` file.
1805
Andrew Geisslerf0343792020-11-18 10:42:21 -06001806 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001807 Specifies a list of distro-specific packages to add to all images if
1808 the packages exist. The packages might not exist or be empty (e.g.
1809 kernel modules). The list of packages are automatically installed but
1810 you can remove them.
1811
Andrew Geisslerf0343792020-11-18 10:42:21 -06001812 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001813 The software support you want in your distribution for various
1814 features. You define your distribution features in the distribution
1815 configuration file.
1816
1817 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001818 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001819 to the configure script during the
1820 :ref:`ref-tasks-configure` task for recipes that
1821 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001822 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001823 target that can optionally support X11 to have its X11 support
1824 enabled.
1825
1826 Two more examples are Bluetooth and NFS support. For a more complete
1827 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001828 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001829
Andrew Geisslerf0343792020-11-18 10:42:21 -06001830 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001831 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1832 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001833
1834 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1835 not intended to be user-configurable. It is best to just reference
1836 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001837 all distro configurations. See the ":ref:`ref-features-backfill`" section
1838 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001839
Andrew Geisslerf0343792020-11-18 10:42:21 -06001840 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001841 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1842 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001843 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001844
Andrew Geisslerf0343792020-11-18 10:42:21 -06001845 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001846 A convenience variable that gives you the default list of distro
1847 features with the exception of any features specific to the C library
1848 (``libc``).
1849
1850 When creating a custom distribution, you might find it useful to be
1851 able to reuse the default
1852 :term:`DISTRO_FEATURES` options without the
1853 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001854 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001855
1856 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1857
Andrew Geisslerf0343792020-11-18 10:42:21 -06001858 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001859 Specifies a list of features that if present in the target
1860 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001861 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001862 variable is used in addition to the features filtered using the
1863 :term:`DISTRO_FEATURES_NATIVE`
1864 variable.
1865
Andrew Geisslerf0343792020-11-18 10:42:21 -06001866 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001867 Specifies a list of features that if present in the target
1868 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001869 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001870 variable is used in addition to the features filtered using the
1871 :term:`DISTRO_FEATURES_NATIVESDK`
1872 variable.
1873
Andrew Geisslerf0343792020-11-18 10:42:21 -06001874 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001875 Specifies a list of features that should be included in
1876 :term:`DISTRO_FEATURES` when building native
1877 recipes. This variable is used in addition to the features filtered
1878 using the
1879 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1880 variable.
1881
Andrew Geisslerf0343792020-11-18 10:42:21 -06001882 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883 Specifies a list of features that should be included in
1884 :term:`DISTRO_FEATURES` when building
1885 nativesdk recipes. This variable is used in addition to the features
1886 filtered using the
1887 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1888 variable.
1889
Andrew Geisslerf0343792020-11-18 10:42:21 -06001890 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001891 The long name of the distribution. For information on the short name
1892 of the distribution, see the :term:`DISTRO` variable.
1893
Andrew Geissler09036742021-06-25 14:25:14 -05001894 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001895 configuration file whose root name is the same as the variable's
1896 argument and whose filename extension is ``.conf``. For example, the
1897 distribution configuration file for the Poky distribution is named
1898 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1899 of the :term:`Source Directory`.
1900
Andrew Geissler09036742021-06-25 14:25:14 -05001901 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001902 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001903
1904 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1905
1906 Distribution configuration files are located in a ``conf/distro``
1907 directory within the :term:`Metadata` that contains the
1908 distribution configuration.
1909
1910 .. note::
1911
Andrew Geissler09036742021-06-25 14:25:14 -05001912 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001913 configurations are used, which are specified within
1914 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001915
Andrew Geisslerf0343792020-11-18 10:42:21 -06001916 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001917 The version of the distribution.
1918
Andrew Geisslerf0343792020-11-18 10:42:21 -06001919 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001920 A colon-separated list of overrides specific to the current
1921 distribution. By default, this list includes the value of
1922 :term:`DISTRO`.
1923
Andrew Geissler09036742021-06-25 14:25:14 -05001924 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001925 apply to the distribution.
1926
Andrew Geissler09036742021-06-25 14:25:14 -05001927 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001928 is included in the default value of
1929 :term:`OVERRIDES`.
1930
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001931 :term:`DISTUTILS_SETUP_PATH`
1932 When used by recipes that inherit the
1933 :ref:`distutils3 <ref-classes-distutils3>` or
1934 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
1935 be used to specify the directory in which the ``setup.py`` file is
1936 located if it is not at the root of the source tree (as specified by
1937 :term:`S`). For example, in a recipe where the sources are fetched from
1938 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
1939 subdirectory, you would have this::
1940
1941 S = "${WORKDIR}/git"
1942 DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule"
1943
Andrew Geisslerf0343792020-11-18 10:42:21 -06001944 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001945 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05001946 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001947 for everything except Git repositories. If you want tarballs of Git
1948 repositories, use the
1949 :term:`BB_GENERATE_MIRROR_TARBALLS`
1950 variable.
1951
Andrew Geissler09036742021-06-25 14:25:14 -05001952 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001953 ``conf/local.conf`` file. This directory is self-maintaining and you
1954 should not have to touch it. By default, the directory is
1955 ``downloads`` in the :term:`Build Directory`.
1956 ::
1957
1958 #DL_DIR ?= "${TOPDIR}/downloads"
1959
1960 To specify a different download directory,
1961 simply remove the comment from the line and provide your directory.
1962
1963 During a first build, the system downloads many different source code
1964 tarballs from various upstream projects. Downloading can take a
1965 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05001966 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001967 system looks there first to find source tarballs.
1968
1969 .. note::
1970
1971 When wiping and rebuilding, you can preserve this directory to
1972 speed up this part of subsequent builds.
1973
1974 You can safely share this directory between multiple builds on the
1975 same development machine. For additional information on how the build
1976 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001977 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001978 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001979 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001980 Wiki page.
1981
Andrew Geisslerf0343792020-11-18 10:42:21 -06001982 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001983 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
1984 class, this variable sets the compression policy used when the
1985 OpenEmbedded build system compresses man pages and info pages. By
1986 default, the compression method used is gz (gzip). Other policies
1987 available are xz and bz2.
1988
1989 For information on policies and on how to use this variable, see the
1990 comments in the ``meta/classes/compress_doc.bbclass`` file.
1991
Andrew Geisslerf0343792020-11-18 10:42:21 -06001992 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001993 When building bootable images (i.e. where ``hddimg``, ``iso``, or
1994 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05001995 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001996 default is "grub-efi", but "systemd-boot" can be used instead.
1997
1998 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
1999 :ref:`image-live <ref-classes-image-live>` classes for more
2000 information.
2001
Andrew Geisslerf0343792020-11-18 10:42:21 -06002002 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002003 Variable that controls which locales for ``glibc`` are generated
2004 during the build (useful if the target device has 64Mbytes of RAM or
2005 less).
2006
Andrew Geisslerf0343792020-11-18 10:42:21 -06002007 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002008 When used with the :ref:`report-error <ref-classes-report-error>`
2009 class, specifies the path used for storing the debug files created by
2010 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002011 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002012 allows you to submit build errors you encounter to a central
2013 database. By default, the value of this variable is
2014 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2015
Andrew Geissler09036742021-06-25 14:25:14 -05002016 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002017 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002018 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002019
2020 ERR_REPORT_DIR = "path"
2021
Andrew Geisslerf0343792020-11-18 10:42:21 -06002022 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002023 Specifies the quality assurance checks whose failures are reported as
2024 errors by the OpenEmbedded build system. You set this variable in
2025 your distribution configuration file. For a list of the checks you
2026 can control with this variable, see the
2027 ":ref:`insane.bbclass <ref-classes-insane>`" section.
2028
Andrew Geisslerf0343792020-11-18 10:42:21 -06002029 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002030 Triggers the OpenEmbedded build system's shared libraries resolver to
2031 exclude an entire package when scanning for shared libraries.
2032
2033 .. note::
2034
2035 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002036 the internal function ``package_do_shlibs``, which is part of the
2037 :ref:`ref-tasks-package` task. You should be aware that the shared
2038 libraries resolver might implicitly define some dependencies between
2039 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002040
Andrew Geissler09036742021-06-25 14:25:14 -05002041 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002042 :term:`PRIVATE_LIBS` variable, which excludes a
2043 package's particular libraries only and not the whole package.
2044
Andrew Geissler09036742021-06-25 14:25:14 -05002045 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002046 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002047
2048 EXCLUDE_FROM_SHLIBS = "1"
2049
Andrew Geisslerf0343792020-11-18 10:42:21 -06002050 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002051 Directs BitBake to exclude a recipe from world builds (i.e.
2052 ``bitbake world``). During world builds, BitBake locates, parses and
2053 builds all recipes found in every layer exposed in the
2054 ``bblayers.conf`` configuration file.
2055
2056 To exclude a recipe from a world build using this variable, set the
2057 variable to "1" in the recipe.
2058
2059 .. note::
2060
Andrew Geissler09036742021-06-25 14:25:14 -05002061 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002062 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002063 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002064 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002065
Andrew Geisslerf0343792020-11-18 10:42:21 -06002066 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002067 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002068 version based on the recipe's :term:`PE` value. If :term:`PE`
2069 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2070 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2071 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2072 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002073
2074 See the :term:`STAMP` variable for an example.
2075
Andrew Geisslerf0343792020-11-18 10:42:21 -06002076 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002077 The full package version specification as it appears on the final
2078 packages produced by a recipe. The variable's value is normally used
2079 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002080 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002081
2082 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2083
2084 The dependency relationships are intended to force the package
2085 manager to upgrade these types of packages in lock-step.
2086
Andrew Geisslerf0343792020-11-18 10:42:21 -06002087 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002088 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002089 tools are not in the source tree.
2090
2091 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002092 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002093 variable tells the OpenEmbedded build system to prefer the installed
2094 external tools. See the
2095 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2096 ``meta/classes`` to see how the variable is used.
2097
Andrew Geisslerf0343792020-11-18 10:42:21 -06002098 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002099 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2100 class, this variable points to the source tree, which is outside of
2101 the OpenEmbedded build system. When set, this variable sets the
2102 :term:`S` variable, which is what the OpenEmbedded build
2103 system uses to locate unpacked recipe source code.
2104
2105 For more information on ``externalsrc.bbclass``, see the
2106 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2107 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002108 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002109 section in the Yocto Project Development Tasks Manual.
2110
Andrew Geisslerf0343792020-11-18 10:42:21 -06002111 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002112 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2113 class, this variable points to the directory in which the recipe's
2114 source code is built, which is outside of the OpenEmbedded build
2115 system. When set, this variable sets the :term:`B` variable,
2116 which is what the OpenEmbedded build system uses to locate the Build
2117 Directory.
2118
2119 For more information on ``externalsrc.bbclass``, see the
2120 ":ref:`externalsrc.bbclass <ref-classes-externalsrc>`" section. You
2121 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002122 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002123 section in the Yocto Project Development Tasks Manual.
2124
Andrew Geisslerf0343792020-11-18 10:42:21 -06002125 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002126 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002127 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002128 pass to the ``autoreconf`` command that is executed during the
2129 :ref:`ref-tasks-configure` task.
2130
2131 The default value is "--exclude=autopoint".
2132
Andrew Geisslerf0343792020-11-18 10:42:21 -06002133 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002134 A list of additional features to include in an image. When listing
2135 more than one feature, separate them with a space.
2136
2137 Typically, you configure this variable in your ``local.conf`` file,
2138 which is found in the :term:`Build Directory`.
2139 Although you can use this variable from within a recipe, best
2140 practices dictate that you do not.
2141
2142 .. note::
2143
2144 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002145 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002146
2147 Here are some examples of features you can add:
2148
2149 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2150 symbol information for debugging and profiling.
2151
2152 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2153 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002154 'post-install-logging' features in the ":ref:`ref-features-image`"
2155 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002156 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2157 useful if you want to develop against the libraries in the image.
2158 - "read-only-rootfs" - Creates an image whose root filesystem is
2159 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002160 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002161 section in the Yocto Project Development Tasks Manual for more
2162 information
2163 - "tools-debug" - Adds debugging tools such as gdb and strace.
2164 - "tools-sdk" - Adds development tools such as gcc, make,
2165 pkgconfig and so forth.
2166 - "tools-testapps" - Adds useful testing tools
2167 such as ts_print, aplay, arecord and so forth.
2168
2169 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002170 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002171
2172 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002173 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002174 section in the Yocto Project Development Tasks Manual.
2175
Andrew Geisslerf0343792020-11-18 10:42:21 -06002176 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002177 Specifies additional options for the image creation command that has
2178 been specified in :term:`IMAGE_CMD`. When setting
2179 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002180 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002181
2182 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
2183
Andrew Geisslerf0343792020-11-18 10:42:21 -06002184 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002185 A list of recipes to build that do not provide packages for
2186 installing into the root filesystem.
2187
2188 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002189 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002190 variable to list these recipes and thus specify the dependencies. A
2191 typical example is a required bootloader in a machine configuration.
2192
2193 .. note::
2194
2195 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002196 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002197
Andrew Geisslerf0343792020-11-18 10:42:21 -06002198 :term:`EXTRANATIVEPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002199 A list of subdirectories of
2200 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2201 added to the beginning of the environment variable ``PATH``. As an
2202 example, the following prepends
2203 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
Andrew Geisslerc926e172021-05-07 16:11:35 -05002204 ``PATH``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002205
2206 EXTRANATIVEPATH = "foo bar"
2207
Andrew Geisslerf0343792020-11-18 10:42:21 -06002208 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002209 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2210 :ref:`cmake <ref-classes-cmake>` class for additional information.
2211
Andrew Geisslerf0343792020-11-18 10:42:21 -06002212 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002213 Additional ``configure`` script options. See
2214 :term:`PACKAGECONFIG_CONFARGS` for
2215 additional information on passing configure script options.
2216
Andrew Geisslerf0343792020-11-18 10:42:21 -06002217 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002218 Additional GNU ``make`` options.
2219
Andrew Geissler09036742021-06-25 14:25:14 -05002220 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002221 variable to specify any required GNU options.
2222
2223 :term:`PARALLEL_MAKE` and
2224 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002225 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002226
Andrew Geisslerf0343792020-11-18 10:42:21 -06002227 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002228 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2229 variable specifies additional configuration options you want to pass
2230 to the ``scons`` command line.
2231
Andrew Geisslerf0343792020-11-18 10:42:21 -06002232 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002233 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2234 class, this variable provides image level user and group operations.
2235 This is a more global method of providing user and group
2236 configuration as compared to using the
2237 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2238 group configurations to a specific recipe.
2239
2240 The set list of commands you can configure using the
Andrew Geissler09036742021-06-25 14:25:14 -05002241 :term:`EXTRA_USERS_PARAMS` is shown in the ``extrausers`` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002242 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002243
2244 # EXTRA_USERS_PARAMS = "\
2245 # useradd -p '' tester; \
2246 # groupadd developers; \
2247 # userdel nobody; \
2248 # groupdel -g video; \
2249 # groupmod -g 1020 developers; \
2250 # usermod -s /bin/sh tester; \
2251 # "
2252
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002253 Additionally there is a special ``passwd-expire`` command that will
2254 cause the password for a user to be expired and thus force changing it
2255 on first login, for example::
2256
2257 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2258
2259 .. note::
2260
2261 At present, ``passwd-expire`` may only work for remote logins when
2262 using OpenSSH and not dropbear as an SSH server.
2263
Andrew Geisslerf0343792020-11-18 10:42:21 -06002264 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002265 Defines one or more packages to include in an image when a specific
2266 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002267 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002268 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002269
2270 FEATURE_PACKAGES_widget = "package1 package2"
2271
Andrew Geissler09036742021-06-25 14:25:14 -05002272 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002273 package1 and package2 would be included in the image.
2274
2275 .. note::
2276
Andrew Geissler09036742021-06-25 14:25:14 -05002277 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002278 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002279 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002280 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002281
Andrew Geisslerf0343792020-11-18 10:42:21 -06002282 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002283 Points to the base URL of the server and location within the
2284 document-root that provides the metadata and packages required by
2285 OPKG to support runtime package management of IPK packages. You set
2286 this variable in your ``local.conf`` file.
2287
Andrew Geisslerc926e172021-05-07 16:11:35 -05002288 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002289
2290 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2291
2292 This example assumes you are serving
2293 your packages over HTTP and your databases are located in a directory
2294 named ``BOARD-dir``, which is underneath your HTTP server's
2295 document-root. In this case, the OpenEmbedded build system generates
2296 a set of configuration files for you in your target that work with
2297 the feed.
2298
Andrew Geisslerf0343792020-11-18 10:42:21 -06002299 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002300 The list of files and directories that are placed in a package. The
2301 :term:`PACKAGES` variable lists the packages
2302 generated by a recipe.
2303
Andrew Geissler09036742021-06-25 14:25:14 -05002304 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002305 identifies the resulting package. Then, provide a space-separated
2306 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002307 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002308
2309 FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
2310
2311 .. note::
2312
2313 - When specifying files or paths, you can pattern match using
2314 Python's
2315 `glob <https://docs.python.org/3/library/glob.html>`_
2316 syntax. For details on the syntax, see the documentation by
2317 following the previous link.
2318
Andrew Geissler09036742021-06-25 14:25:14 -05002319 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002320 good practice to use appropriate path variables. For example,
2321 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2322 rather than ``/usr/bin``. You can find a list of these
2323 variables at the top of the ``meta/conf/bitbake.conf`` file in
2324 the :term:`Source Directory`. You will also
2325 find the default values of the various ``FILES_*`` variables in
2326 this file.
2327
Andrew Geissler09036742021-06-25 14:25:14 -05002328 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002329 editable and you know they should not be overwritten during the
2330 package update process by the Package Management System (PMS), you
2331 can identify these files so that the PMS will not overwrite them. See
2332 the :term:`CONFFILES` variable for information on
2333 how to identify these files to the PMS.
2334
Andrew Geisslerf0343792020-11-18 10:42:21 -06002335 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002336 Defines the file specification to match
2337 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002338 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002339 symbolic link (symlink) for shared libraries on the target platform.
2340
2341 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002342 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002343
2344 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2345
Andrew Geisslerf0343792020-11-18 10:42:21 -06002346 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002347 Extends the search path the OpenEmbedded build system uses when
2348 looking for files and patches as it processes recipes and append
2349 files. The default directories BitBake uses when it processes recipes
2350 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002351 variable. You can extend :term:`FILESPATH` variable by using
2352 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002353
2354 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002355 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002356 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002357
2358 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2359
2360 In the above example, the build system first
2361 looks for files in a directory that has the same name as the
2362 corresponding append file.
2363
2364 .. note::
2365
Andrew Geissler09036742021-06-25 14:25:14 -05002366 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002367 expansion (``:=``) operator. Immediate expansion makes sure that
2368 BitBake evaluates :term:`THISDIR` at the time the
2369 directive is encountered rather than at some later time when
2370 expansion might result in a directory that does not contain the
2371 files you need.
2372
2373 Also, include the trailing separating colon character if you are
2374 prepending. The trailing colon character is necessary because you
2375 are directing BitBake to extend the path by prepending directories
2376 to the search path.
2377
Andrew Geisslerc926e172021-05-07 16:11:35 -05002378 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002379
2380 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2381
2382 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002383 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002384 in the same directory as the corresponding append file.
2385
Andrew Geisslerc926e172021-05-07 16:11:35 -05002386 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002387
2388 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2389
2390 A final example shows how you can extend the search path and include
2391 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002392 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002393
2394 FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2395
2396 The previous statement appears in the
2397 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002398 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002399 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2400 override is a special :term:`PACKAGE_ARCH`
2401 definition for multiple ``meta-intel`` machines.
2402
2403 .. note::
2404
2405 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002406 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002407
2408 By prepending paths in ``.bbappend`` files, you allow multiple append
2409 files that reside in different layers but are used for the same
2410 recipe to correctly extend the path.
2411
Andrew Geisslerf0343792020-11-18 10:42:21 -06002412 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002413 A subset of :term:`OVERRIDES` used by the
2414 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002415 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002416 uses overrides to automatically extend the
2417 :term:`FILESPATH` variable. For an example of how
2418 that works, see the :term:`FILESPATH` variable
2419 description. Additionally, you find more information on how overrides
2420 are handled in the
2421 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2422 section of the BitBake User Manual.
2423
Andrew Geissler09036742021-06-25 14:25:14 -05002424 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002425
2426 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2427
2428 .. note::
2429
Andrew Geissler09036742021-06-25 14:25:14 -05002430 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002431 with expected overrides and are used in an expected manner by the
2432 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002433
Andrew Geisslerf0343792020-11-18 10:42:21 -06002434 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002435 The default set of directories the OpenEmbedded build system uses
2436 when searching for patches and files.
2437
2438 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002439 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002440 patches specified by each ``file://`` URI in a recipe's
2441 :term:`SRC_URI` statements.
2442
Andrew Geissler09036742021-06-25 14:25:14 -05002443 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002444 ``base.bbclass`` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002445 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002446
2447 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2448 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2449
2450 The
Andrew Geissler09036742021-06-25 14:25:14 -05002451 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002452 from the :term:`FILESOVERRIDES` variable.
2453
2454 .. note::
2455
Andrew Geissler09036742021-06-25 14:25:14 -05002456 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002457 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002458 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002459 :term:`FILESEXTRAPATHS` variable.
2460
Andrew Geissler09036742021-06-25 14:25:14 -05002461 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002462 to directories in custom layers where append files
2463 (``.bbappend``) are used. If you want the build system to find
2464 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002465 to extend the :term:`FILESPATH` variable by using the
2466 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002467
2468 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002469 example, consider a case where there is the following directory structure
2470 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002471
2472 files/defconfig
2473 files/MACHINEA/defconfig
2474 files/MACHINEB/defconfig
2475
Andrew Geissler09036742021-06-25 14:25:14 -05002476 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002477 "file://defconfig". Given this scenario, you can set
2478 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002479 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002480 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2481 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2482 build system uses files from ``files/defconfig``.
2483
2484 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002485 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002487 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002488 the Yocto Project Development Tasks Manual. See the
2489 :ref:`ref-tasks-patch` task as well.
2490
Andrew Geisslerf0343792020-11-18 10:42:21 -06002491 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002492 Allows you to define your own file permissions settings table as part
2493 of your configuration for the packaging process. For example, suppose
2494 you need a consistent set of custom permissions for a set of groups
2495 and users across an entire work project. It is best to do this in the
2496 packages themselves but this is not always possible.
2497
2498 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2499 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2500 If you create your own file
2501 permissions setting table, you should place it in your layer or the
2502 distro's layer.
2503
Andrew Geissler09036742021-06-25 14:25:14 -05002504 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002505 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2506 to point to your custom
2507 ``fs-perms.txt``. You can specify more than a single file permissions
2508 setting table. The paths you specify to these files must be defined
2509 within the :term:`BBPATH` variable.
2510
2511 For guidance on how to create your own file permissions settings
2512 table file, examine the existing ``fs-perms.txt``.
2513
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002514 :term:`FIT_DESC`
2515 Specifies the description string encoded into a fitImage. The default
2516 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2517 class as follows::
2518
2519 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2520
Andrew Geisslerf0343792020-11-18 10:42:21 -06002521 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002522 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002523 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002524 The default value is 0.
2525
Andrew Geisslerf0343792020-11-18 10:42:21 -06002526 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002527 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2528
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002529 :term:`FIT_KERNEL_COMP_ALG`
2530 Compression algorithm to use for the kernel image inside the FIT Image.
2531 At present, the only supported values are "gzip" (default) or "none"
2532 If you set this variable to anything other than "none" you may also need
2533 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2534
2535 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2536 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2537 value is ".gz".
2538
Andrew Geisslerf0343792020-11-18 10:42:21 -06002539 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002540 Arguments to openssl genrsa for generating RSA private key for signing
2541 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2542 use.
2543
Andrew Geisslerf0343792020-11-18 10:42:21 -06002544 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002545 Arguments to openssl req for generating certificate for signing fitImage.
2546 The default value is "-batch -new". batch for non interactive mode
2547 and new for generating new keys.
2548
Andrew Geisslerf0343792020-11-18 10:42:21 -06002549 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002550 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002551 The default value is "x509".
2552
Andrew Geisslerf0343792020-11-18 10:42:21 -06002553 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002554 Specifies the signature algorithm used in creating the FIT Image.
2555 For e.g. rsa2048.
2556
Andrew Geisslerf0343792020-11-18 10:42:21 -06002557 :term:`FIT_SIGN_NUMBITS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002558 Size of private key in number of bits used in fitImage. The default
2559 value is "2048".
2560
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002561 :term:`FIT_SIGN_INDIVIDUAL`
2562 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2563 class will sign the kernel, dtb and ramdisk images individually in addition
2564 to signing the fitImage itself. This could be useful if you are
2565 intending to verify signatures in another context than booting via
2566 U-Boot.
2567
Andrew Geisslerf0343792020-11-18 10:42:21 -06002568 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002569 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2570 this variable specifies the runtime dependencies for font packages.
2571 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils".
2572
Andrew Geisslerf0343792020-11-18 10:42:21 -06002573 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002574 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2575 this variable identifies packages containing font files that need to
2576 be cached by Fontconfig. By default, the ``fontcache`` class assumes
2577 that fonts are in the recipe's main package (i.e.
2578 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2579 need are in a package other than that main package.
2580
Andrew Geisslerf0343792020-11-18 10:42:21 -06002581 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002582 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2583 during the generation of the root filesystem.
2584
2585 Set the variable to "1" to force the removal of these packages.
2586
Andrew Geisslerf0343792020-11-18 10:42:21 -06002587 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002588 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002589 compiling an optimized system. This variable defaults to "-O2 -pipe
2590 ${DEBUG_FLAGS}".
2591
Andrew Geisslerf0343792020-11-18 10:42:21 -06002592 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002593 Enables Position Independent Executables (PIE) within the GNU C
2594 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2595 Programming (ROP) attacks much more difficult to execute.
2596
2597 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002598 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002599
2600 GCCPIE ?= "--enable-default-pie"
2601
Andrew Geisslerf0343792020-11-18 10:42:21 -06002602 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002603 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002604 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002605 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002606
2607 GCCVERSION ?= "8.%"
2608
2609 You can override this value by setting it in a
2610 configuration file such as the ``local.conf``.
2611
Andrew Geisslerf0343792020-11-18 10:42:21 -06002612 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002613 The minimal command and arguments to run the GNU Debugger.
2614
Andrew Geisslerf0343792020-11-18 10:42:21 -06002615 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002616 The directory in which a local copy of a Git repository is stored
2617 when it is cloned.
2618
Andrew Geisslerf0343792020-11-18 10:42:21 -06002619 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002620 Specifies the list of GLIBC locales to generate should you not wish
2621 to generate all LIBC locals, which can be time consuming.
2622
2623 .. note::
2624
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002625 If you specifically remove the locale ``en_US.UTF-8``, you must set
2626 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002627
Andrew Geissler09036742021-06-25 14:25:14 -05002628 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002629 By default, all locales are generated.
2630 ::
2631
2632 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2633
Andrew Geisslerf0343792020-11-18 10:42:21 -06002634 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002635 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2636 this variable specifies for a package what parameters should be
2637 passed to the ``groupadd`` command if you wish to add a group to the
2638 system when the package is installed.
2639
Andrew Geisslerc926e172021-05-07 16:11:35 -05002640 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002641
2642 GROUPADD_PARAM_${PN} = "-r netdev"
2643
2644 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002645 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002646
Andrew Geisslerf0343792020-11-18 10:42:21 -06002647 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002648 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2649 this variable specifies for a package what parameters should be
2650 passed to the ``groupmems`` command if you wish to modify the members
2651 of a group when the package is installed.
2652
2653 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002654 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002655
Andrew Geisslerf0343792020-11-18 10:42:21 -06002656 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002657 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2658 and serial in the boot menu. Set this variable to "1" in your
2659 ``local.conf`` or distribution configuration file to enable graphics
2660 and serial in the menu.
2661
2662 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2663 information on how this variable is used.
2664
Andrew Geisslerf0343792020-11-18 10:42:21 -06002665 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002666 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2667 configuration. Use a semi-colon character (``;``) to separate
2668 multiple options.
2669
Andrew Geissler09036742021-06-25 14:25:14 -05002670 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002671 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2672 on how this variable is used.
2673
Andrew Geisslerf0343792020-11-18 10:42:21 -06002674 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002675 Specifies the timeout before executing the default ``LABEL`` in the
2676 GNU GRand Unified Bootloader (GRUB).
2677
Andrew Geissler09036742021-06-25 14:25:14 -05002678 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002679 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2680 on how this variable is used.
2681
Andrew Geisslerf0343792020-11-18 10:42:21 -06002682 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002683 When inheriting the
2684 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2685 this variable specifies the packages that contain the GTK+ input
2686 method modules being installed when the modules are in packages other
2687 than the main package.
2688
Andrew Geisslerf0343792020-11-18 10:42:21 -06002689 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002690 Website where more information about the software the recipe is
2691 building can be found.
2692
Andrew Geisslerf0343792020-11-18 10:42:21 -06002693 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002694 The name of the target architecture, which is normally the same as
2695 :term:`TARGET_ARCH`. The OpenEmbedded build system
2696 supports many architectures. Here is an example list of architectures
2697 supported. This list is by no means complete as the architecture is
2698 configurable:
2699
2700 - arm
2701 - i586
2702 - x86_64
2703 - powerpc
2704 - powerpc64
2705 - mips
2706 - mipsel
2707
Andrew Geisslerf0343792020-11-18 10:42:21 -06002708 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002709 Specifies architecture-specific compiler flags that are passed to the
2710 C compiler.
2711
Andrew Geissler09036742021-06-25 14:25:14 -05002712 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002713 is being built:
2714
2715 - :term:`TARGET_CC_ARCH` when building for the
2716 target
2717
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002718 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002719 ``-native``)
2720
2721 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2722 ``nativesdk-``)
2723
Andrew Geisslerf0343792020-11-18 10:42:21 -06002724 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002725 Specifies the name of the target operating system, which is normally
2726 the same as the :term:`TARGET_OS`. The variable can
2727 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2728 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2729 "linux-musleabi" values possible.
2730
Andrew Geisslerf0343792020-11-18 10:42:21 -06002731 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002732 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002733 is normally the same as :term:`TARGET_PREFIX`.
2734
Andrew Geisslerf0343792020-11-18 10:42:21 -06002735 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002736 Specifies the system, including the architecture and the operating
2737 system, for which the build is occurring in the context of the
2738 current recipe.
2739
2740 The OpenEmbedded build system automatically sets this variable based
2741 on :term:`HOST_ARCH`,
2742 :term:`HOST_VENDOR`, and
2743 :term:`HOST_OS` variables.
2744
2745 .. note::
2746
2747 You do not need to set the variable yourself.
2748
2749 Consider these two examples:
2750
2751 - Given a native recipe on a 32-bit x86 machine running Linux, the
2752 value is "i686-linux".
2753
2754 - Given a recipe being built for a little-endian MIPS target running
2755 Linux, the value might be "mipsel-linux".
2756
Andrew Geisslerf0343792020-11-18 10:42:21 -06002757 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002758 A space-separated list (filter) of tools on the build host that
2759 should be allowed to be called from within build tasks. Using this
2760 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002761 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002762 host, the OpenEmbedded build system produces an error and the build
2763 is not started.
2764
2765 For additional information, see
2766 :term:`HOSTTOOLS_NONFATAL`.
2767
Andrew Geisslerf0343792020-11-18 10:42:21 -06002768 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002769 A space-separated list (filter) of tools on the build host that
2770 should be allowed to be called from within build tasks. Using this
2771 filter helps reduce the possibility of host contamination. Unlike
2772 :term:`HOSTTOOLS`, the OpenEmbedded build system
2773 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002774 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2775 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002776
Andrew Geisslerf0343792020-11-18 10:42:21 -06002777 :term:`HOST_VENDOR`
Andrew Geissler09036742021-06-25 14:25:14 -05002778 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002779 same as :term:`TARGET_VENDOR`.
2780
Andrew Geisslerf0343792020-11-18 10:42:21 -06002781 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002782 Disables or enables the ``icecc`` (Icecream) function. For more
2783 information on this function and best practices for using this
2784 variable, see the ":ref:`icecc.bbclass <ref-classes-icecc>`"
2785 section.
2786
2787 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002788 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002789
2790 ICECC_DISABLED ??= "1"
2791
Andrew Geisslerc926e172021-05-07 16:11:35 -05002792 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002793
2794 ICECC_DISABLED = ""
2795
Andrew Geisslerf0343792020-11-18 10:42:21 -06002796 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002797 Points to the ``icecc-create-env`` script that you provide. This
2798 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2799 set this variable in your ``local.conf`` file.
2800
2801 If you do not point to a script that you provide, the OpenEmbedded
2802 build system uses the default script provided by the
2803 ``icecc-create-env.bb`` recipe, which is a modified version and not
2804 the one that comes with ``icecc``.
2805
Andrew Geisslerf0343792020-11-18 10:42:21 -06002806 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002807 Extra options passed to the ``make`` command during the
2808 :ref:`ref-tasks-compile` task that specify parallel
2809 compilation. This variable usually takes the form of "-j x", where x
2810 represents the maximum number of parallel threads ``make`` can run.
2811
2812 .. note::
2813
2814 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002815 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002816
2817 If your enabled machines support multiple cores, coming up with the
2818 maximum number of parallel threads that gives you the best
2819 performance could take some experimentation since machine speed,
2820 network lag, available memory, and existing machine loads can all
2821 affect build time. Consequently, unlike the
2822 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002823 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002824 performance.
2825
Andrew Geissler09036742021-06-25 14:25:14 -05002826 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002827 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002828 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002829
Andrew Geisslerf0343792020-11-18 10:42:21 -06002830 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002831 The location of the ``icecc`` binary. You can set this variable in
2832 your ``local.conf`` file. If your ``local.conf`` file does not define
2833 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2834 to define it by locating ``icecc`` using ``which``.
2835
Andrew Geisslerf0343792020-11-18 10:42:21 -06002836 :term:`ICECC_USER_CLASS_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002837 Identifies user classes that you do not want the Icecream distributed
2838 compile support to consider. This variable is used by the
2839 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2840 your ``local.conf`` file.
2841
2842 When you list classes using this variable, you are "blacklisting"
2843 them from distributed compilation across remote hosts. Any classes
2844 you list will be distributed and compiled locally.
2845
Andrew Geisslerf0343792020-11-18 10:42:21 -06002846 :term:`ICECC_USER_PACKAGE_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002847 Identifies user recipes that you do not want the Icecream distributed
2848 compile support to consider. This variable is used by the
2849 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2850 your ``local.conf`` file.
2851
2852 When you list packages using this variable, you are "blacklisting"
2853 them from distributed compilation across remote hosts. Any packages
2854 you list will be distributed and compiled locally.
2855
Andrew Geisslerf0343792020-11-18 10:42:21 -06002856 :term:`ICECC_USER_PACKAGE_WL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002857 Identifies user recipes that use an empty
2858 :term:`PARALLEL_MAKE` variable that you want to
2859 force remote distributed compilation on using the Icecream
2860 distributed compile support. This variable is used by the
2861 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2862 your ``local.conf`` file.
2863
Andrew Geisslerf0343792020-11-18 10:42:21 -06002864 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002865 The base name of image output files. This variable defaults to the
2866 recipe name (``${``\ :term:`PN`\ ``}``).
2867
Andrew Geisslerf0343792020-11-18 10:42:21 -06002868 :term:`IMAGE_EFI_BOOT_FILES`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002869 A space-separated list of files installed into the boot partition
2870 when preparing an image using the Wic tool with the
2871 ``bootimg-efi`` source plugin. By default,
2872 the files are
2873 installed under the same name as the source files. To change the
2874 installed name, separate it from the original name with a semi-colon
2875 (;). Source files need to be located in
2876 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002877 examples::
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002878
2879 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
2880 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
2881
2882 Alternatively, source files can be picked up using a glob pattern. In
2883 this case, the destination file must have the same name as the base
2884 name of the source file path. To install files into a directory
2885 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002886 Here are two examples::
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002887
2888 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
2889 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
2890
2891 The first example
2892 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
2893 into the root of the target partition. The second example installs
2894 the same files into a ``boot`` directory within the target partition.
2895
2896 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002897 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002898 section of the Yocto Project Development Tasks Manual. Reference
2899 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002900 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002901
Andrew Geisslerf0343792020-11-18 10:42:21 -06002902 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002903 A space-separated list of files installed into the boot partition
2904 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002905 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002906 the files are
2907 installed under the same name as the source files. To change the
2908 installed name, separate it from the original name with a semi-colon
2909 (;). Source files need to be located in
2910 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002911 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002912
2913 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2914 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2915
2916 Alternatively, source files can be picked up using a glob pattern. In
2917 this case, the destination file must have the same name as the base
2918 name of the source file path. To install files into a directory
2919 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002920 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002921
2922 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2923 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2924
2925 The first example
2926 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2927 into the root of the target partition. The second example installs
2928 the same files into a ``boot`` directory within the target partition.
2929
2930 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002931 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002932 section of the Yocto Project Development Tasks Manual. Reference
2933 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002934 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002935
Andrew Geisslerf0343792020-11-18 10:42:21 -06002936 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002937 A list of classes that all images should inherit. You typically use
2938 this variable to specify the list of classes that register the
2939 different types of images the OpenEmbedded build system creates.
2940
Andrew Geissler09036742021-06-25 14:25:14 -05002941 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002942 set this variable in your ``local.conf`` or in a distribution
2943 configuration file.
2944
2945 For more information, see ``meta/classes/image_types.bbclass`` in the
2946 :term:`Source Directory`.
2947
Andrew Geisslerf0343792020-11-18 10:42:21 -06002948 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002949 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002950 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002951 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
2952 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05002953 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002954
Andrew Geissler09036742021-06-25 14:25:14 -05002955 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
2956 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002957 ${EXTRA_IMAGECMD}"
2958
2959 You typically do not need to set this variable unless you are adding
2960 support for a new image type. For more examples on how to set this
2961 variable, see the :ref:`image_types <ref-classes-image_types>`
2962 class file, which is ``meta/classes/image_types.bbclass``.
2963
Andrew Geisslerf0343792020-11-18 10:42:21 -06002964 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002965 Specifies one or more files that contain custom device tables that
2966 are passed to the ``makedevs`` command as part of creating an image.
2967 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05002968 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002969 ``files/device_table-minimal.txt`` is used, which is located by
2970 :term:`BBPATH`. For details on how you should write
2971 device table files, see ``meta/files/device_table-minimal.txt`` as an
2972 example.
2973
Andrew Geisslerf0343792020-11-18 10:42:21 -06002974 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002975 The primary list of features to include in an image. Typically, you
2976 configure this variable in an image recipe. Although you can use this
2977 variable from your ``local.conf`` file, which is found in the
2978 :term:`Build Directory`, best practices dictate that you do
2979 not.
2980
2981 .. note::
2982
2983 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002984 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002985
2986 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002987 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002988
2989 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002990 variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002991 section in the Yocto Project Development Tasks Manual.
2992
Andrew Geisslerf0343792020-11-18 10:42:21 -06002993 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002994 Specifies the formats the OpenEmbedded build system uses during the
2995 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05002996 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05002997 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002998
2999 IMAGE_FSTYPES = "ext3 tar.bz2"
3000
3001 For the complete list of supported image formats from which you can
3002 choose, see :term:`IMAGE_TYPES`.
3003
3004 .. note::
3005
3006 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003007 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003008 ``IMAGE_FSTYPES`` prior to using the "inherit image" line.
3009
3010 - Due to the way the OpenEmbedded build system processes this
3011 variable, you cannot update its contents by using ``_append``
3012 or ``_prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003013 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003014
Andrew Geisslerf0343792020-11-18 10:42:21 -06003015 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003016 Used by recipes to specify the packages to install into an image
3017 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003018 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003019
Andrew Geissler09036742021-06-25 14:25:14 -05003020 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003021 install into an image through ``image.bbclass``. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003022 there are "helper" classes such as the
3023 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003024 take lists used with :term:`IMAGE_FEATURES` and turn them into
3025 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003026 default contents.
3027
Andrew Geisslerc926e172021-05-07 16:11:35 -05003028 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029
3030 IMAGE_INSTALL_append = " package-name"
3031
3032 Be sure to include the space
3033 between the quotation character and the start of the package name or
3034 names.
3035
3036 .. note::
3037
3038 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003039 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003040 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003041 packages for installation. Instead, use the
3042 :term:`PACKAGE_INSTALL` variable, which
3043 allows the initial RAM filesystem (initramfs) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003044 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003045 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003046 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003047 section in the Yocto Project Development Tasks Manual.
3048
Andrew Geissler09036742021-06-25 14:25:14 -05003049 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003050 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003051 BitBake operator within the ``/conf/local.conf`` file or from
3052 within an image recipe is not recommended. Use of this operator
3053 in these ways can cause ordering issues. Since
Andrew Geissler09036742021-06-25 14:25:14 -05003054 ``core-image.bbclass`` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003055 value using the
3056 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003057 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003058 results in unexpected behavior when used within
3059 ``conf/local.conf``. Furthermore, the same operation from
3060 within an image recipe may or may not succeed depending on the
3061 specific situation. In both these cases, the behavior is
3062 contrary to how most users expect the ``+=`` operator to work.
3063
Andrew Geisslerf0343792020-11-18 10:42:21 -06003064 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003065 Specifies the list of locales to install into the image during the
3066 root filesystem construction process. The OpenEmbedded build system
3067 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003068 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003069 ensures that any locale packages that correspond to packages already
3070 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003071 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003072
3073 IMAGE_LINGUAS = "pt-br de-de"
3074
3075 In this example, the build system ensures any Brazilian Portuguese
3076 and German locale files that correspond to packages in the image are
3077 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3078 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3079 only provide locale files by language and not by country-specific
3080 language).
3081
3082 See the :term:`GLIBC_GENERATE_LOCALES`
3083 variable for information on generating GLIBC locales.
3084
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003085
3086 :term:`IMAGE_LINK_NAME`
3087 The name of the output image symlink (which does not include
3088 the version part as :term:`IMAGE_NAME` does). The default value
3089 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003090 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003091
3092 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3093
3094
Andrew Geisslerf0343792020-11-18 10:42:21 -06003095 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003096 The manifest file for the image. This file lists all the installed
3097 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003098 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003099
3100 packagename packagearch version
3101
Andrew Geissler09036742021-06-25 14:25:14 -05003102 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003103 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003104
Andrew Geissler09036742021-06-25 14:25:14 -05003105 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003106
3107 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003108 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003109 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003110 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003111 section in the Yocto Project Overview and Concepts Manual.
3112
Andrew Geisslerf0343792020-11-18 10:42:21 -06003113 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003114 The name of the output image files minus the extension. This variable
3115 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003116 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003117 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003118
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003119 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3120
3121 :term:`IMAGE_NAME_SUFFIX`
3122 Suffix used for the image output file name - defaults to ``".rootfs"``
3123 to distinguish the image file from other files created during image
3124 building; however if this suffix is redundant or not desired you can
3125 clear the value of this variable (set the value to ""). For example,
3126 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003127
Andrew Geisslerf0343792020-11-18 10:42:21 -06003128 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003129 Defines a multiplier that the build system applies to the initial
3130 image size for cases when the multiplier times the returned disk
3131 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003132 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003133 the multiplier applied to the initial image size creates free disk
3134 space in the image as overhead. By default, the build process uses a
3135 multiplier of 1.3 for this variable. This default value results in
3136 30% free disk space added to the image when this method is used to
3137 determine the final generated image size. You should be aware that
3138 post install scripts and the package management system uses disk
3139 space inside this overhead area. Consequently, the multiplier does
3140 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003141 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003142 determines the overall image size.
3143
3144 The default 30% free disk space typically gives the image enough room
3145 to boot and allows for basic post installs while still leaving a
3146 small amount of free disk space. If 30% free space is inadequate, you
3147 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003148 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003149
3150 IMAGE_OVERHEAD_FACTOR = "1.5"
3151
3152 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003153 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003154 variable.
3155
Andrew Geisslerf0343792020-11-18 10:42:21 -06003156 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003157 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3158 OpenEmbedded build system. The variable is defined appropriately by
3159 the :ref:`package_deb <ref-classes-package_deb>`,
3160 :ref:`package_rpm <ref-classes-package_rpm>`,
3161 :ref:`package_ipk <ref-classes-package_ipk>`, or
3162 :ref:`package_tar <ref-classes-package_tar>` class.
3163
3164 .. note::
3165
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003166 The ``package_tar`` class is broken and is not supported. It is
3167 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003168
3169 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003170 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003171 for packaging up images and SDKs.
3172
Andrew Geissler09036742021-06-25 14:25:14 -05003173 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003174 variable is set indirectly through the appropriate
3175 :ref:`package_* <ref-classes-package>` class using the
3176 :term:`PACKAGE_CLASSES` variable. The
3177 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3178 or IPK) that appears with the variable
3179
3180 .. note::
3181
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003182 Files using the ``.tar`` format are never used as a substitute
3183 packaging format for DEB, RPM, and IPK formatted files for your image
3184 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003185
Andrew Geisslerf0343792020-11-18 10:42:21 -06003186 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003187 Specifies a list of functions to call once the OpenEmbedded build
3188 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003189 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003190
3191 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3192
3193 If you need to pass the root filesystem path to a command within the
3194 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3195 directory that becomes the root filesystem image. See the
3196 :term:`IMAGE_ROOTFS` variable for more
3197 information.
3198
Andrew Geisslerf0343792020-11-18 10:42:21 -06003199 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003200 Specifies a list of functions to call before the OpenEmbedded build
3201 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003202 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003203
3204 IMAGE_PREPROCESS_COMMAND += "function; ... "
3205
3206 If you need to pass the root filesystem path to a command within the
3207 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3208 directory that becomes the root filesystem image. See the
3209 :term:`IMAGE_ROOTFS` variable for more
3210 information.
3211
Andrew Geisslerf0343792020-11-18 10:42:21 -06003212 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003213 The location of the root filesystem while it is under construction
3214 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3215 variable is not configurable. Do not change it.
3216
Andrew Geisslerf0343792020-11-18 10:42:21 -06003217 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003218 Specifies the alignment for the output image file in Kbytes. If the
3219 size of the image is not a multiple of this value, then the size is
3220 rounded up to the nearest multiple of the value. The default value is
3221 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3222 additional information.
3223
Andrew Geisslerf0343792020-11-18 10:42:21 -06003224 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003225 Defines additional free disk space created in the image in Kbytes. By
3226 default, this variable is set to "0". This free disk space is added
3227 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003228 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003229
3230 This variable is particularly useful when you want to ensure that a
3231 specific amount of free disk space is available on a device after an
3232 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003233 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003234
3235 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3236
3237 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003238 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003239
3240 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3241
Andrew Geisslerf0343792020-11-18 10:42:21 -06003242 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003243 Defines the size in Kbytes for the generated image. The OpenEmbedded
3244 build system determines the final size for the generated image using
3245 an algorithm that takes into account the initial disk space used for
3246 the generated image, a requested size for the image, and requested
3247 additional free disk space to be added to the image. Programatically,
3248 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003249 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003250
3251 if (image-du * overhead) < rootfs-size:
3252 internal-rootfs-size = rootfs-size + xspace
3253 else:
3254 internal-rootfs-size = (image-du * overhead) + xspace
3255 where:
3256 image-du = Returned value of the du command on the image.
3257 overhead = IMAGE_OVERHEAD_FACTOR
3258 rootfs-size = IMAGE_ROOTFS_SIZE
3259 internal-rootfs-size = Initial root filesystem size before any modifications.
3260 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3261
3262 See the :term:`IMAGE_OVERHEAD_FACTOR`
3263 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3264 variables for related information.
3265
Andrew Geisslerf0343792020-11-18 10:42:21 -06003266 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003267 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003268 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003269
3270 IMAGE_TYPEDEP_live = "ext3"
3271
3272 In the previous example, the variable ensures that when "live" is
3273 listed with the :term:`IMAGE_FSTYPES` variable,
3274 the OpenEmbedded build system produces an ``ext3`` image first since
3275 one of the components of the live image is an ``ext3`` formatted
3276 partition containing the root filesystem.
3277
Andrew Geisslerf0343792020-11-18 10:42:21 -06003278 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003279 Specifies the complete list of supported image types by default:
3280
3281 - btrfs
3282 - container
3283 - cpio
3284 - cpio.gz
3285 - cpio.lz4
3286 - cpio.lzma
3287 - cpio.xz
3288 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003289 - erofs
3290 - erofs-lz4
3291 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003292 - ext2
3293 - ext2.bz2
3294 - ext2.gz
3295 - ext2.lzma
3296 - ext3
3297 - ext3.gz
3298 - ext4
3299 - ext4.gz
3300 - f2fs
3301 - hddimg
3302 - iso
3303 - jffs2
3304 - jffs2.sum
3305 - multiubi
3306 - squashfs
3307 - squashfs-lz4
3308 - squashfs-lzo
3309 - squashfs-xz
3310 - tar
3311 - tar.bz2
3312 - tar.gz
3313 - tar.lz4
3314 - tar.xz
3315 - tar.zst
3316 - ubi
3317 - ubifs
3318 - wic
3319 - wic.bz2
3320 - wic.gz
3321 - wic.lzma
3322
3323 For more information about these types of images, see
3324 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3325
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003326 :term:`IMAGE_VERSION_SUFFIX`
3327 Version suffix that is part of the default :term:`IMAGE_NAME` and
3328 :term:`KERNEL_ARTIFACT_NAME` values.
3329 Defaults to ``"-${DATETIME}"``, however you could set this to a
3330 version string that comes from your external build environment if
3331 desired, and this suffix would then be used consistently across
3332 the build artifacts.
3333
Andrew Geissler09036742021-06-25 14:25:14 -05003334 :term:`IMGDEPLOYDIR`
3335 When inheriting the :ref:`image <ref-classes-image>` class directly or
3336 through the :ref:`core-image <ref-classes-core-image>` class, the
3337 ``IMGDEPLOYDIR`` points to a temporary work area for deployed files
3338 that is set in the ``image`` class as follows::
3339
3340 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3341
3342 Recipes inheriting the ``image`` class should copy files to be
3343 deployed into ``IMGDEPLOYDIR``, and the class will take care of
3344 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3345
Andrew Geisslerf0343792020-11-18 10:42:21 -06003346 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003347 Helps define the recipe revision for recipes that share a common
3348 ``include`` file. You can think of this variable as part of the
3349 recipe revision as set from within an include file.
3350
3351 Suppose, for example, you have a set of recipes that are used across
3352 several projects. And, within each of those recipes the revision (its
3353 :term:`PR` value) is set accordingly. In this case, when
3354 the revision of those recipes changes, the burden is on you to find
3355 all those recipes and be sure that they get changed to reflect the
3356 updated version of the recipe. In this scenario, it can get
3357 complicated when recipes that are used in many places and provide
3358 common functionality are upgraded to a new revision.
3359
3360 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003361 :term:`INC_PR` variable inside the ``include`` files that the recipes
3362 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003363 help define the recipe revision.
3364
3365 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003366 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003367 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003368 can use the variable to set the :term:`PR` values in each recipe. You
3369 will notice that when you set a recipe's :term:`PR` you can provide more
3370 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003371
3372 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3373 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3374 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3375 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3376
3377 The
3378 first line of the example establishes the baseline revision to be
3379 used for all recipes that use the ``include`` file. The remaining
3380 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003381 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003382
Andrew Geisslerf0343792020-11-18 10:42:21 -06003383 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003384 Specifies a space-separated list of license names (as they would
3385 appear in :term:`LICENSE`) that should be excluded
3386 from the build. Recipes that provide no alternatives to listed
3387 incompatible licenses are not built. Packages that are individually
3388 licensed with the specified incompatible licenses will be deleted.
3389
3390 .. note::
3391
3392 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003393 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003394
3395 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3396
3397
3398 Although you can use other settings, you might be required to
3399 remove dependencies on or provide alternatives to components that
3400 are required to produce a functional system image.
3401
3402 .. note::
3403
3404 It is possible to define a list of licenses that are allowed to be
3405 used instead of the licenses that are excluded. To do this, define
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003406 a variable ``COMPATIBLE_LICENSES`` with the names of the licenses
Andrew Geissler09036742021-06-25 14:25:14 -05003407 that are allowed. Then define :term:`INCOMPATIBLE_LICENSE` as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003408
3409 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3410
3411
Andrew Geissler09036742021-06-25 14:25:14 -05003412 This will result in :term:`INCOMPATIBLE_LICENSE` containing the names of
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003413 all licenses from :term:`AVAILABLE_LICENSES` except the ones specified
3414 in ``COMPATIBLE_LICENSES``, thus only allowing the latter licenses to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003415 be used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003416
Andrew Geisslerf0343792020-11-18 10:42:21 -06003417 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003418 Causes the named class or classes to be inherited globally. Anonymous
3419 functions in the class or classes are not executed for the base
3420 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003421 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003422
Andrew Geissler09036742021-06-25 14:25:14 -05003423 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003424 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3425 section in the Bitbake User Manual.
3426
Andrew Geisslerf0343792020-11-18 10:42:21 -06003427 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003428 Lists classes that will be inherited at the distribution level. It is
3429 unlikely that you want to edit this variable.
3430
3431 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003432 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003433
3434 INHERIT_DISTRO ?= "debian devshell sstate license"
3435
Andrew Geisslerf0343792020-11-18 10:42:21 -06003436 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003437 Prevents the default dependencies, namely the C compiler and standard
3438 C library (libc), from being added to :term:`DEPENDS`.
3439 This variable is usually used within recipes that do not require any
3440 compilation using the C compiler.
3441
3442 Set the variable to "1" to prevent the default dependencies from
3443 being added.
3444
Andrew Geisslerf0343792020-11-18 10:42:21 -06003445 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003446 Prevents the OpenEmbedded build system from splitting out debug
3447 information during packaging. By default, the build system splits out
3448 debugging information during the
3449 :ref:`ref-tasks-package` task. For more information on
3450 how debug information is split out, see the
3451 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3452 variable.
3453
3454 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003455 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003456 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003457
3458 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3459
Andrew Geisslerf0343792020-11-18 10:42:21 -06003460 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003461 If set to "1", causes the build to not strip binaries in resulting
3462 packages and prevents the ``-dbg`` package from containing the source
3463 files.
3464
3465 By default, the OpenEmbedded build system strips binaries and puts
3466 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003467 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003468 plan to debug in general.
3469
Andrew Geisslerf0343792020-11-18 10:42:21 -06003470 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003471 If set to "1", causes the build to not strip binaries in the
3472 resulting sysroot.
3473
3474 By default, the OpenEmbedded build system strips binaries in the
3475 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003476 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003477 this stripping.
3478
3479 If you want to use this variable, include the
3480 :ref:`staging <ref-classes-staging>` class. This class uses a
3481 ``sys_strip()`` function to test for the variable and acts
3482 accordingly.
3483
3484 .. note::
3485
Andrew Geissler09036742021-06-25 14:25:14 -05003486 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003487 special circumstances. For example, suppose you are building
3488 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003489 even if the toolchain's binaries are strippable, there are other files
3490 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003491
Andrew Geisslerf0343792020-11-18 10:42:21 -06003492 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003493 Defines the format for the output image of an initial RAM filesystem
3494 (initramfs), which is used during boot. Supported formats are the
3495 same as those supported by the
3496 :term:`IMAGE_FSTYPES` variable.
3497
3498 The default value of this variable, which is set in the
3499 ``meta/conf/bitbake.conf`` configuration file in the
3500 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3501 initramfs mechanism, as opposed to the initial RAM filesystem
3502 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3503 an optionally compressed cpio archive.
3504
Andrew Geisslerf0343792020-11-18 10:42:21 -06003505 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003506 Specifies the :term:`PROVIDES` name of an image
3507 recipe that is used to build an initial RAM filesystem (initramfs)
Andrew Geissler09036742021-06-25 14:25:14 -05003508 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003509 additional recipe to be built as a dependency to whatever root
3510 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3511 initramfs image recipe you provide should set
3512 :term:`IMAGE_FSTYPES` to
3513 :term:`INITRAMFS_FSTYPES`.
3514
3515 An initramfs image provides a temporary root filesystem used for
3516 early system initialization (e.g. loading of modules needed to locate
3517 and mount the "real" root filesystem).
3518
3519 .. note::
3520
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003521 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3522 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003523 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler09036742021-06-25 14:25:14 -05003524 the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003525 to "core-image-minimal-initramfs".
3526
3527 You can also find more information by referencing the
3528 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3529 the Source Directory, the :ref:`image <ref-classes-image>` class,
3530 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
Andrew Geissler09036742021-06-25 14:25:14 -05003531 the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003532
Andrew Geissler09036742021-06-25 14:25:14 -05003533 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003534 initramfs image is built.
3535
3536 For more information, you can also see the
3537 :term:`INITRAMFS_IMAGE_BUNDLE`
3538 variable, which allows the generated image to be bundled inside the
3539 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003540 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003541 in the Yocto Project Development Tasks Manual.
3542
Andrew Geisslerf0343792020-11-18 10:42:21 -06003543 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003544 Controls whether or not the image recipe specified by
3545 :term:`INITRAMFS_IMAGE` is run through an
3546 extra pass
3547 (:ref:`ref-tasks-bundle_initramfs`) during
3548 kernel compilation in order to build a single binary that contains
3549 both the kernel image and the initial RAM filesystem (initramfs)
3550 image. This makes use of the
3551 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3552 feature.
3553
3554 .. note::
3555
3556 Using an extra compilation pass to bundle the initramfs avoids a
3557 circular dependency between the kernel recipe and the initramfs
3558 recipe should the initramfs include kernel modules. Should that be
3559 the case, the initramfs recipe depends on the kernel for the
3560 kernel modules, and the kernel depends on the initramfs recipe
3561 since the initramfs is bundled inside the kernel image.
3562
3563 The combined binary is deposited into the ``tmp/deploy`` directory,
3564 which is part of the :term:`Build Directory`.
3565
3566 Setting the variable to "1" in a configuration file causes the
3567 OpenEmbedded build system to generate a kernel image with the
Andrew Geissler09036742021-06-25 14:25:14 -05003568 initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003569
3570 INITRAMFS_IMAGE_BUNDLE = "1"
3571
3572 By default, the
3573 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003574 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003575
3576 INITRAMFS_IMAGE_BUNDLE ?= ""
3577
3578 .. note::
3579
Andrew Geissler09036742021-06-25 14:25:14 -05003580 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003581 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003582
3583 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003584 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003585 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003586 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003587 in the Yocto Project Development Tasks Manual.
3588
Andrew Geisslerf0343792020-11-18 10:42:21 -06003589 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003590 The link name of the initial RAM filesystem image. This variable is
3591 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003592 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003593
3594 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3595
3596 The value of the
3597 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003598 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003599
3600 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3601
3602 See the :term:`MACHINE` variable for additional
3603 information.
3604
Andrew Geisslerf0343792020-11-18 10:42:21 -06003605 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003606 The base name of the initial RAM filesystem image. This variable is
3607 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003608 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003609
3610 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3611
3612 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003613 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003614
3615 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3616
Andrew Geisslerf0343792020-11-18 10:42:21 -06003617 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003618 Indicates list of filesystem images to concatenate and use as an
3619 initial RAM disk (``initrd``).
3620
Andrew Geissler09036742021-06-25 14:25:14 -05003621 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003622 :ref:`image-live <ref-classes-image-live>` class.
3623
Andrew Geisslerf0343792020-11-18 10:42:21 -06003624 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003625 When building a "live" bootable image (i.e. when
3626 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003627 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003628 provide the initial RAM disk image. The default value is
3629 "core-image-minimal-initramfs".
3630
3631 See the :ref:`image-live <ref-classes-image-live>` class for more
3632 information.
3633
Andrew Geisslerf0343792020-11-18 10:42:21 -06003634 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003635 The filename of the initialization script as installed to
3636 ``${sysconfdir}/init.d``.
3637
3638 This variable is used in recipes when using ``update-rc.d.bbclass``.
3639 The variable is mandatory.
3640
Andrew Geisslerf0343792020-11-18 10:42:21 -06003641 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003642 A list of the packages that contain initscripts. If multiple packages
3643 are specified, you need to append the package name to the other
3644 ``INITSCRIPT_*`` as an override.
3645
3646 This variable is used in recipes when using ``update-rc.d.bbclass``.
3647 The variable is optional and defaults to the :term:`PN`
3648 variable.
3649
Andrew Geisslerf0343792020-11-18 10:42:21 -06003650 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003651 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003652
3653 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3654
3655 In this example, the script has a runlevel of 99, starts the script
3656 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3657
3658 The variable's default value is "defaults", which is set in the
3659 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3660
Andrew Geissler09036742021-06-25 14:25:14 -05003661 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003662 ``update-rc.d`` command. For more information on valid parameters,
3663 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003664 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003665
Andrew Geisslerf0343792020-11-18 10:42:21 -06003666 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003667 Specifies the QA checks to skip for a specific package within a
3668 recipe. For example, to skip the check for symbolic link ``.so``
3669 files in the main package of a recipe, add the following to the
3670 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003671 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003672
3673 INSANE_SKIP_${PN} += "dev-so"
3674
3675 See the ":ref:`insane.bbclass <ref-classes-insane>`" section for a
3676 list of the valid QA checks you can specify using this variable.
3677
Andrew Geisslerf0343792020-11-18 10:42:21 -06003678 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003679 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003680 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003681 configuration level to disable this behavior.
3682
Andrew Geisslerf0343792020-11-18 10:42:21 -06003683 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003684 When the IPK backend is in use and package management is enabled on
3685 the target, you can use this variable to set up ``opkg`` in the
3686 target image to point to package feeds on a nominated server. Once
3687 the feed is established, you can perform installations or upgrades
3688 using the package manager at runtime.
3689
Andrew Geisslerf0343792020-11-18 10:42:21 -06003690 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003691 Defines the kernel architecture used when assembling the
3692 configuration. Architectures supported for this release are:
3693
3694 - powerpc
3695 - i386
3696 - x86_64
3697 - arm
3698 - qemu
3699 - mips
3700
Andrew Geissler09209ee2020-12-13 08:44:15 -06003701 You define the ``KARCH`` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003702
Andrew Geisslerf0343792020-11-18 10:42:21 -06003703 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003704 A regular expression used by the build process to explicitly identify
3705 the kernel branch that is validated, patched, and configured during a
3706 build. You must set this variable to ensure the exact kernel branch
3707 you want is being used by the build process.
3708
3709 Values for this variable are set in the kernel's recipe file and the
3710 kernel's append file. For example, if you are using the
3711 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003712 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003713 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003714
3715 KBRANCH ?= "standard/base"
3716
3717 This variable is also used from the kernel's append file to identify
3718 the kernel branch specific to a particular machine or target
3719 hardware. Continuing with the previous kernel example, the kernel's
3720 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3721 BSP layer for a given machine. For example, the append file for the
3722 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3723 machines (``meta-yocto-bsp``) is named
3724 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003725 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003726
3727 KBRANCH_genericx86 = "standard/base"
3728 KBRANCH_genericx86-64 = "standard/base"
3729 KBRANCH_edgerouter = "standard/edgerouter"
3730 KBRANCH_beaglebone = "standard/beaglebone"
3731
Andrew Geissler09036742021-06-25 14:25:14 -05003732 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003733 identify the kernel branch to use when building for each supported
3734 BSP.
3735
Andrew Geisslerf0343792020-11-18 10:42:21 -06003736 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003737 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3738 class, specifies an "in-tree" kernel configuration file for use
3739 during a kernel build.
3740
3741 Typically, when using a ``defconfig`` to configure a kernel during a
3742 build, you place the file in your layer in the same manner as you
3743 would place patch files and configuration fragment files (i.e.
3744 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3745 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003746 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003747 :term:`KMACHINE` variable to point to the
3748 ``defconfig`` file.
3749
3750 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003751 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003752
3753 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3754
Andrew Geissler09036742021-06-25 14:25:14 -05003755 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003756 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003757
3758 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig"
3759
Andrew Geisslerc926e172021-05-07 16:11:35 -05003760 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003761
3762 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file
3763
3764 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003765 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003766 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003767 section in the Yocto Project Linux Kernel Development Manual.
3768
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003769 :term:`KCONFIG_MODE`
3770 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3771 class, specifies the kernel configuration values to use for options
3772 not specified in the provided ``defconfig`` file. Valid options are::
3773
3774 KCONFIG_MODE = "alldefconfig"
3775 KCONFIG_MODE = "allnoconfig"
3776
3777 In ``alldefconfig`` mode the options not explicitly specified will be
3778 assigned their Kconfig default value. In ``allnoconfig`` mode the
3779 options not explicitly specified will be disabled in the kernel
3780 config.
3781
Andrew Geissler09036742021-06-25 14:25:14 -05003782 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003783 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3784 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3785 in ``${WORKDIR}`` through a meta-layer will be handled in
3786 ``allnoconfig`` mode.
3787
3788 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003789 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003790 be explicitly set.
3791
3792 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3793 generated by copying the ``.config`` file from a working Linux kernel
3794 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05003795 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003796 not need to be explicitly set.
3797
3798 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3799 generated using the
3800 :ref:`ref-tasks-savedefconfig`
3801 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05003802 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003803
3804 KCONFIG_MODE = "alldefconfig"
3805
3806
Andrew Geisslerf0343792020-11-18 10:42:21 -06003807 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003808 Specifies an alternate kernel image type for creation in addition to
3809 the kernel image type specified using the
3810 :term:`KERNEL_IMAGETYPE` variable.
3811
Andrew Geisslerf0343792020-11-18 10:42:21 -06003812 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003813 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05003814 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003815 variable.
3816
Andrew Geissler09036742021-06-25 14:25:14 -05003817 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003818 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003819 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003820
3821 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3822
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003823 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
3824 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003825
Andrew Geisslerf0343792020-11-18 10:42:21 -06003826 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003827 A list of classes defining kernel image types that the
3828 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3829 typically append this variable to enable extended image types. An
3830 example is the "kernel-fitimage", which enables fitImage support and
3831 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
3832 custom kernel image types with the ``kernel`` class using this
3833 variable.
3834
Andrew Geisslerf0343792020-11-18 10:42:21 -06003835 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003836 Specifies the name of the generated Linux kernel device tree (i.e.
3837 the ``.dtb``) file.
3838
3839 .. note::
3840
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003841 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003842 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843
3844 In order to use this variable, the
3845 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3846 be inherited.
3847
Andrew Geisslerf0343792020-11-18 10:42:21 -06003848 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003849 The link name of the kernel device tree binary (DTB). This variable
3850 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003851 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003852
3853 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3854
3855 The
3856 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05003857 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003858
3859 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3860
3861 See the :term:`MACHINE` variable for additional
3862 information.
3863
Andrew Geisslerf0343792020-11-18 10:42:21 -06003864 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003865 The base name of the kernel device tree binary (DTB). This variable
3866 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003867 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003868
3869 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3870
3871 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003872 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003873
3874 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3875
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003876 :term:`KERNEL_DTC_FLAGS`
3877 Specifies the ``dtc`` flags that are passed to the Linux kernel build
3878 system when generating the device trees (via ``DTC_FLAGS`` environment
3879 variable).
3880
3881 In order to use this variable, the
3882 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3883 be inherited.
3884
Andrew Geisslerf0343792020-11-18 10:42:21 -06003885 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003886 Specifies additional ``make`` command-line arguments the OpenEmbedded
3887 build system passes on when compiling the kernel.
3888
Andrew Geisslerf0343792020-11-18 10:42:21 -06003889 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003890 Includes additional kernel metadata. In the OpenEmbedded build
3891 system, the default Board Support Packages (BSPs)
3892 :term:`Metadata` is provided through the
3893 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05003894 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003895 the kernel recipe or kernel append file to further add metadata for
3896 all BSPs or specific BSPs.
3897
3898 The metadata you add through this variable includes config fragments
3899 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05003900 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003901 variable for a specific machine. In this way, you can provide
3902 validated, but optional, sets of kernel configurations and features.
3903
3904 For example, the following example from the ``linux-yocto-rt_4.12``
3905 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3906 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003907 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003908
3909 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
3910 KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}"
3911 KERNEL_FEATURES_append_qemuall = "cfg/virtio.scc"
3912 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
3913 KERNEL_FEATURES_append_qemux86-64 = "cfg/sound.scc"
3914
Andrew Geisslerf0343792020-11-18 10:42:21 -06003915 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003916 The link name of the kernel flattened image tree (FIT) image. This
3917 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05003918 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003919
3920 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3921
3922 The value of the
3923 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003924 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003925
3926 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3927
3928 See the :term:`MACHINE` variable for additional
3929 information.
3930
Andrew Geisslerf0343792020-11-18 10:42:21 -06003931 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003932 The base name of the kernel flattened image tree (FIT) image. This
3933 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05003934 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003935
3936 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3937
3938 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003939 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003940
3941 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3942
Andrew Geisslerf0343792020-11-18 10:42:21 -06003943 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003944 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003945 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003946
3947 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3948
3949 The value of
3950 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003951 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003952
3953 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3954
3955 See the :term:`MACHINE` variable for additional
3956 information.
3957
Andrew Geisslerf0343792020-11-18 10:42:21 -06003958 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003959 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05003960 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003961 checked against the set value during the
3962 :ref:`ref-tasks-sizecheck` task. The task fails if
3963 the kernel image file is larger than the setting.
3964
Andrew Geissler09036742021-06-25 14:25:14 -05003965 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003966 limited amount of space in which the kernel image must be stored.
3967
3968 By default, this variable is not set, which means the size of the
3969 kernel image is not checked.
3970
Andrew Geisslerf0343792020-11-18 10:42:21 -06003971 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003972 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003973 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003974
3975 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3976
3977 The value of the
3978 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05003979 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003980
3981 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3982
Andrew Geisslerf0343792020-11-18 10:42:21 -06003983 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003984 The type of kernel to build for a device, usually set by the machine
3985 configuration files and defaults to "zImage". This variable is used
3986 when building the kernel and is passed to ``make`` as the target to
3987 build.
3988
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003989 If you want to build an alternate kernel image type in addition to that
Andrew Geissler09036742021-06-25 14:25:14 -05003990 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003991 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003992
Andrew Geisslerf0343792020-11-18 10:42:21 -06003993 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003994 Lists kernel modules that need to be auto-loaded during boot.
3995
3996 .. note::
3997
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003998 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003999 variable.
4000
Andrew Geissler09036742021-06-25 14:25:14 -05004001 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004002 can be recognized by the kernel recipe or by an out-of-tree kernel
4003 module recipe (e.g. a machine configuration file, a distribution
4004 configuration file, an append file for the recipe, or the recipe
4005 itself).
4006
Andrew Geisslerc926e172021-05-07 16:11:35 -05004007 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004008
4009 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4010
Andrew Geissler09036742021-06-25 14:25:14 -05004011 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004012 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4013 the list of modules to be auto-loaded on boot. The modules appear
4014 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004015 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004016
4017 KERNEL_MODULE_AUTOLOAD += "module_name"
4018
4019 For information on how to populate the ``modname.conf`` file with
4020 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4021
Andrew Geisslerf0343792020-11-18 10:42:21 -06004022 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004023 Provides a list of modules for which the OpenEmbedded build system
4024 expects to find ``module_conf_``\ modname values that specify
4025 configuration for each of the modules. For information on how to
4026 provide those module configurations, see the
4027 :term:`module_conf_* <module_conf>` variable.
4028
Andrew Geisslerf0343792020-11-18 10:42:21 -06004029 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004030 The location of the kernel sources. This variable is set to the value
4031 of the :term:`STAGING_KERNEL_DIR` within
4032 the :ref:`module <ref-classes-module>` class. For information on
4033 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004034 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004035 section in the Yocto Project Linux Kernel Development Manual.
4036
4037 To help maximize compatibility with out-of-tree drivers used to build
4038 modules, the OpenEmbedded build system also recognizes and uses the
4039 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004040 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004041 used by external Makefiles to point to the kernel source directory.
4042
Andrew Geisslerf0343792020-11-18 10:42:21 -06004043 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004044 The location of the kernel sources. This variable is set to the value
4045 of the :term:`STAGING_KERNEL_DIR` within
4046 the :ref:`module <ref-classes-module>` class. For information on
4047 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004048 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004049 section in the Yocto Project Linux Kernel Development Manual.
4050
4051 To help maximize compatibility with out-of-tree drivers used to build
4052 modules, the OpenEmbedded build system also recognizes and uses the
4053 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004054 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004055 used by external Makefiles to point to the kernel source directory.
4056
Andrew Geisslerf0343792020-11-18 10:42:21 -06004057 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004058 Specifies the version of the kernel as extracted from ``version.h``
4059 or ``utsrelease.h`` within the kernel sources. Effects of setting
4060 this variable do not take affect until the kernel has been
4061 configured. Consequently, attempting to refer to this variable in
4062 contexts prior to configuration will not work.
4063
Andrew Geisslerf0343792020-11-18 10:42:21 -06004064 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004065 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004066 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004067 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004068 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004069 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004070 ``initramfs`` recipe. Setting the variable there when the data is not
4071 needed avoids a potential dependency loop.
4072
Andrew Geisslerf0343792020-11-18 10:42:21 -06004073 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004074 Provides a short description of a configuration fragment. You use
4075 this variable in the ``.scc`` file that describes a configuration
4076 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004077 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004078
4079 define KFEATURE_DESCRIPTION "Enable SMP"
4080
Andrew Geisslerf0343792020-11-18 10:42:21 -06004081 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004082 The machine as known by the kernel. Sometimes the machine name used
4083 by the kernel does not match the machine name used by the
4084 OpenEmbedded build system. For example, the machine name that the
4085 OpenEmbedded build system understands as ``core2-32-intel-common``
4086 goes by a different name in the Linux Yocto kernel. The kernel
4087 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004088 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004089 OpenEmbedded build system machine name.
4090
4091 These mappings between different names occur in the Yocto Linux
4092 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004093 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004094
4095 LINUX_VERSION_core2-32-intel-common = "3.19.0"
4096 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
4097 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4098 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4099 KMACHINE_core2-32-intel-common = "intel-core2-32"
4100 KBRANCH_core2-32-intel-common = "standard/base"
4101 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
4102
Andrew Geissler09036742021-06-25 14:25:14 -05004103 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004104 that the kernel understands the machine name as "intel-core2-32".
4105 However, the OpenEmbedded build system understands the machine as
4106 "core2-32-intel-common".
4107
Andrew Geisslerf0343792020-11-18 10:42:21 -06004108 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004109 Defines the kernel type to be used in assembling the configuration.
4110 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004111 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004112 section in the
4113 Yocto Project Linux Kernel Development Manual for more information on
4114 kernel types.
4115
Andrew Geissler09036742021-06-25 14:25:14 -05004116 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004117 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004118 value you use must match the value used for the
4119 :term:`LINUX_KERNEL_TYPE` value used by the
4120 kernel recipe.
4121
Andrew Geisslerf0343792020-11-18 10:42:21 -06004122 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004123 Provides a list of targets for automatic configuration.
4124
4125 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4126 information on how this variable is used.
4127
Andrew Geisslerf0343792020-11-18 10:42:21 -06004128 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004129 Lists the layers, separated by spaces, on which this recipe depends.
4130 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004131 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004132
4133 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4134
4135 In this previous example,
4136 version 3 of "anotherlayer" is compared against
4137 :term:`LAYERVERSION`\ ``_anotherlayer``.
4138
4139 An error is produced if any dependency is missing or the version
4140 numbers (if specified) do not match exactly. This variable is used in
4141 the ``conf/layer.conf`` file and must be suffixed with the name of
4142 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4143
Andrew Geisslerf0343792020-11-18 10:42:21 -06004144 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004145 When used inside the ``layer.conf`` configuration file, this variable
4146 provides the path of the current layer. This variable is not
4147 available outside of ``layer.conf`` and references are expanded
4148 immediately when parsing of the file completes.
4149
Andrew Geisslerf0343792020-11-18 10:42:21 -06004150 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004151 Lists the layers, separated by spaces, recommended for use with this
4152 layer.
4153
4154 Optionally, you can specify a specific layer version for a
4155 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004156 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004157
4158 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4159
4160 In this previous example, version 3 of "anotherlayer" is compared
4161 against ``LAYERVERSION_anotherlayer``.
4162
4163 This variable is used in the ``conf/layer.conf`` file and must be
4164 suffixed with the name of the specific layer (e.g.
4165 ``LAYERRECOMMENDS_mylayer``).
4166
Andrew Geisslerf0343792020-11-18 10:42:21 -06004167 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004168 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004169 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004170 allows the layer maintainer to indicate which combinations of the
4171 layer and OE-Core can be expected to work. The variable gives the
4172 system a way to detect when a layer has not been tested with new
4173 releases of OE-Core (e.g. the layer is not maintained).
4174
4175 To specify the OE-Core versions for which a layer is compatible, use
4176 this variable in your layer's ``conf/layer.conf`` configuration file.
4177 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004178 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004179 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004180 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004181
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004182 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004183
4184 .. note::
4185
Andrew Geissler09036742021-06-25 14:25:14 -05004186 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004187 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004188 The OpenEmbedded build system produces a warning if the variable
4189 is not set for any given layer.
4190
Andrew Geissler09209ee2020-12-13 08:44:15 -06004191 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004192 section in the Yocto Project Development Tasks Manual.
4193
Andrew Geisslerf0343792020-11-18 10:42:21 -06004194 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004195 Optionally specifies the version of a layer as a single number. You
4196 can use this within :term:`LAYERDEPENDS` for
4197 another layer in order to depend on a specific version of the layer.
4198 This variable is used in the ``conf/layer.conf`` file and must be
4199 suffixed with the name of the specific layer (e.g.
4200 ``LAYERVERSION_mylayer``).
4201
Andrew Geisslerf0343792020-11-18 10:42:21 -06004202 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004203 The minimal command and arguments used to run the linker.
4204
Andrew Geisslerf0343792020-11-18 10:42:21 -06004205 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004206 Specifies the flags to pass to the linker. This variable is exported
4207 to an environment variable and thus made visible to the software
4208 being built during the compilation step.
4209
Andrew Geissler09036742021-06-25 14:25:14 -05004210 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004211 being built:
4212
4213 - :term:`TARGET_LDFLAGS` when building for the
4214 target
4215
4216 - :term:`BUILD_LDFLAGS` when building for the
4217 build host (i.e. ``-native``)
4218
4219 - :term:`BUILDSDK_LDFLAGS` when building for
4220 an SDK (i.e. ``nativesdk-``)
4221
Andrew Geisslerf0343792020-11-18 10:42:21 -06004222 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004223 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4224 that the :ref:`debian <ref-classes-debian>` class applies its
4225 naming policy to given a recipe that packages multiple libraries.
4226
4227 This variable works in conjunction with the ``debian`` class.
4228
Andrew Geisslerf0343792020-11-18 10:42:21 -06004229 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004230 Checksums of the license text in the recipe source code.
4231
4232 This variable tracks changes in license text of the source code
4233 files. If the license text is changed, it will trigger a build
4234 failure, which gives the developer an opportunity to review any
4235 license change.
4236
4237 This variable must be defined for all recipes (unless
4238 :term:`LICENSE` is set to "CLOSED").
4239
Andrew Geissler09209ee2020-12-13 08:44:15 -06004240 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004241 section in the Yocto Project Development Tasks Manual.
4242
Andrew Geisslerf0343792020-11-18 10:42:21 -06004243 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004244 The list of source licenses for the recipe. Follow these rules:
4245
4246 - Do not use spaces within individual license names.
4247
4248 - Separate license names using \| (pipe) when there is a choice
4249 between licenses.
4250
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004251 - Separate license names using & (ampersand) when there are
4252 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004253
4254 - You can use spaces between license names.
4255
4256 - For standard licenses, use the names of the files in
4257 ``meta/files/common-licenses/`` or the
4258 :term:`SPDXLICENSEMAP` flag names defined in
4259 ``meta/conf/licenses.conf``.
4260
Andrew Geisslerc926e172021-05-07 16:11:35 -05004261 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004262
4263 LICENSE = "LGPLv2.1 | GPLv3"
4264 LICENSE = "MPL-1 & LGPLv2.1"
4265 LICENSE = "GPLv2+"
4266
4267 The first example is from the
4268 recipes for Qt, which the user may choose to distribute under either
4269 the LGPL version 2.1 or GPL version 3. The second example is from
4270 Cairo where two licenses cover different parts of the source code.
4271 The final example is from ``sysstat``, which presents a single
4272 license.
4273
4274 You can also specify licenses on a per-package basis to handle
4275 situations where components of the output have different licenses.
4276 For example, a piece of software whose code is licensed under GPLv2
4277 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004278 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004279
4280 LICENSE = "GFDL-1.2 & GPLv2"
4281 LICENSE_${PN} = "GPLv2"
4282 LICENSE_${PN}-doc = "GFDL-1.2"
4283
Andrew Geisslerf0343792020-11-18 10:42:21 -06004284 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004285 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004286 build system to create an extra package (i.e.
4287 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4288 those packages to the
4289 :term:`RRECOMMENDS`\ ``_${PN}``.
4290
4291 The ``${PN}-lic`` package installs a directory in
4292 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4293 name, and installs files in that directory that contain license and
4294 copyright information (i.e. copies of the appropriate license files
4295 from ``meta/common-licenses`` that match the licenses specified in
4296 the :term:`LICENSE` variable of the recipe metadata
4297 and copies of files marked in
4298 :term:`LIC_FILES_CHKSUM` as containing
4299 license text).
4300
4301 For related information on providing license text, see the
4302 :term:`COPY_LIC_DIRS` variable, the
4303 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004304 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004305 section in the Yocto Project Development Tasks Manual.
4306
Andrew Geisslerf0343792020-11-18 10:42:21 -06004307 :term:`LICENSE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004308 Specifies additional flags for a recipe you must whitelist through
4309 :term:`LICENSE_FLAGS_WHITELIST` in
4310 order to allow the recipe to be built. When providing multiple flags,
4311 separate them with spaces.
4312
4313 This value is independent of :term:`LICENSE` and is
4314 typically used to mark recipes that might require additional licenses
4315 in order to be used in a commercial product. For more information,
4316 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004317 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004318 section in the Yocto Project Development Tasks Manual.
4319
Andrew Geisslerf0343792020-11-18 10:42:21 -06004320 :term:`LICENSE_FLAGS_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004321 Lists license flags that when specified in
4322 :term:`LICENSE_FLAGS` within a recipe should not
4323 prevent that recipe from being built. This practice is otherwise
4324 known as "whitelisting" license flags. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004325 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004326 section in the Yocto Project Development Tasks Manual.
4327
Andrew Geisslerf0343792020-11-18 10:42:21 -06004328 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004329 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004330 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004331 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004332 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004333 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004334
4335 LICENSE_PATH += "path-to-additional-common-licenses"
4336
Andrew Geisslerf0343792020-11-18 10:42:21 -06004337 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004338 Defines the kernel type to be used in assembling the configuration.
4339 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004340 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004341 section in the
4342 Yocto Project Linux Kernel Development Manual for more information on
4343 kernel types.
4344
Andrew Geissler09036742021-06-25 14:25:14 -05004345 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004346 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004347 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004348 the kernel tools to find the appropriate description within the
4349 kernel :term:`Metadata` with which to build out the sources
4350 and configuration.
4351
Andrew Geisslerf0343792020-11-18 10:42:21 -06004352 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004353 The Linux version from ``kernel.org`` on which the Linux kernel image
4354 being built using the OpenEmbedded build system is based. You define
4355 this variable in the kernel recipe. For example, the
4356 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004357 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004358
4359 LINUX_VERSION ?= "3.4.24"
4360
Andrew Geissler09036742021-06-25 14:25:14 -05004361 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004362 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004363
4364 PV = "${LINUX_VERSION}+git${SRCPV}"
4365
Andrew Geisslerf0343792020-11-18 10:42:21 -06004366 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004367 A string extension compiled into the version string of the Linux
4368 kernel built with the OpenEmbedded build system. You define this
4369 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004370 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004371
4372 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4373
4374 Defining this variable essentially sets the Linux kernel
4375 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4376 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004377 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004378
4379 $ uname -r
4380 3.7.0-rc8-custom
4381
Andrew Geisslerf0343792020-11-18 10:42:21 -06004382 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004383 Specifies the directory to which the OpenEmbedded build system writes
4384 overall log files. The default directory is ``${TMPDIR}/log``.
4385
4386 For the directory containing logs specific to each task, see the
4387 :term:`T` variable.
4388
Andrew Geisslerf0343792020-11-18 10:42:21 -06004389 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004390 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004391 :term:`MACHINE` in the ``local.conf`` file found in the
4392 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004393 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004394 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004395
4396 MACHINE ?= "qemux86"
4397
4398 The variable corresponds to a machine configuration file of the same
4399 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004400 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004401 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004402 the :term:`Source Directory` in
4403 ``meta/conf/machine``.
4404
4405 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004406 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004407
4408 MACHINE ?= "qemuarm"
4409 MACHINE ?= "qemuarm64"
4410 MACHINE ?= "qemumips"
4411 MACHINE ?= "qemumips64"
4412 MACHINE ?= "qemuppc"
4413 MACHINE ?= "qemux86"
4414 MACHINE ?= "qemux86-64"
4415 MACHINE ?= "genericx86"
4416 MACHINE ?= "genericx86-64"
4417 MACHINE ?= "beaglebone"
4418 MACHINE ?= "edgerouter"
4419
4420 The last five are Yocto Project reference hardware
4421 boards, which are provided in the ``meta-yocto-bsp`` layer.
4422
4423 .. note::
4424
4425 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004426 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004427
Andrew Geisslerf0343792020-11-18 10:42:21 -06004428 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004429 Specifies the name of the machine-specific architecture. This
4430 variable is set automatically from :term:`MACHINE` or
4431 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004432 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004433
Andrew Geisslerf0343792020-11-18 10:42:21 -06004434 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004435 A list of required machine-specific packages to install as part of
4436 the image being built. The build process depends on these packages
4437 being present. Furthermore, because this is a "machine-essential"
4438 variable, the list of packages are essential for the machine to boot.
4439 The impact of this variable affects images based on
4440 ``packagegroup-core-boot``, including the ``core-image-minimal``
4441 image.
4442
4443 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004444 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004445 that the image being built has a build dependency on the variable's
4446 list of packages. In other words, the image will not build if a file
4447 in this list is not found.
4448
4449 As an example, suppose the machine for which you are building
4450 requires ``example-init`` to be run during boot to initialize the
4451 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004452 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004453
4454 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4455
Andrew Geisslerf0343792020-11-18 10:42:21 -06004456 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004457 A list of recommended machine-specific packages to install as part of
4458 the image being built. The build process does not depend on these
4459 packages being present. However, because this is a
4460 "machine-essential" variable, the list of packages are essential for
4461 the machine to boot. The impact of this variable affects images based
4462 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4463 image.
4464
Andrew Geissler09036742021-06-25 14:25:14 -05004465 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004466 variable with the exception that the image being built does not have
4467 a build dependency on the variable's list of packages. In other
4468 words, the image will still build if a package in this list is not
4469 found. Typically, this variable is used to handle essential kernel
4470 modules, whose functionality may be selected to be built into the
4471 kernel rather than as a module, in which case a package will not be
4472 produced.
4473
4474 Consider an example where you have a custom kernel where a specific
4475 touchscreen driver is required for the machine to be usable. However,
4476 the driver can be built as a module or into the kernel depending on
4477 the kernel configuration. If the driver is built as a module, you
4478 want it to be installed. But, when the driver is built into the
4479 kernel, you still want the build to succeed. This variable sets up a
4480 "recommends" relationship so that in the latter case, the build will
4481 not fail due to the missing package. To accomplish this, assuming the
4482 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004483 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004484
4485 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4486
4487 .. note::
4488
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004489 In this example, the ``kernel-module-ab123`` recipe needs to
4490 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4491 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4492 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004493
4494 Some examples of these machine essentials are flash, screen,
4495 keyboard, mouse, or touchscreen drivers (depending on the machine).
4496
Andrew Geisslerf0343792020-11-18 10:42:21 -06004497 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004498 A list of machine-specific packages to install as part of the image
4499 being built that are not essential for the machine to boot. However,
4500 the build process for more fully-featured images depends on the
4501 packages being present.
4502
4503 This variable affects all images based on ``packagegroup-base``,
4504 which does not include the ``core-image-minimal`` or
4505 ``core-image-full-cmdline`` images.
4506
Andrew Geissler09036742021-06-25 14:25:14 -05004507 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004508 with the exception that the image being built has a build dependency
4509 on the variable's list of packages. In other words, the image will
4510 not build if a file in this list is not found.
4511
4512 An example is a machine that has WiFi capability but is not essential
4513 for the machine to boot the image. However, if you are building a
4514 more fully-featured image, you want to enable the WiFi. The package
4515 containing the firmware for the WiFi hardware is always expected to
4516 exist, so it is acceptable for the build process to depend upon
4517 finding the package. In this case, assuming the package for the
4518 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004519 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004520
4521 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4522
Andrew Geisslerf0343792020-11-18 10:42:21 -06004523 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004524 A list of machine-specific packages to install as part of the image
4525 being built that are not essential for booting the machine. The image
4526 being built has no build dependency on this list of packages.
4527
4528 This variable affects only images based on ``packagegroup-base``,
4529 which does not include the ``core-image-minimal`` or
4530 ``core-image-full-cmdline`` images.
4531
Andrew Geissler09036742021-06-25 14:25:14 -05004532 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004533 with the exception that the image being built does not have a build
4534 dependency on the variable's list of packages. In other words, the
4535 image will build if a file in this list is not found.
4536
4537 An example is a machine that has WiFi capability but is not essential
4538 For the machine to boot the image. However, if you are building a
4539 more fully-featured image, you want to enable WiFi. In this case, the
4540 package containing the WiFi kernel module will not be produced if the
4541 WiFi driver is built into the kernel, in which case you still want
4542 the build to succeed instead of failing as a result of the package
4543 not being found. To accomplish this, assuming the package for the
4544 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004545 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004546
4547 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4548
Andrew Geisslerf0343792020-11-18 10:42:21 -06004549 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004550 Specifies the list of hardware features the
4551 :term:`MACHINE` is capable of supporting. For related
4552 information on enabling features, see the
4553 :term:`DISTRO_FEATURES`,
4554 :term:`COMBINED_FEATURES`, and
4555 :term:`IMAGE_FEATURES` variables.
4556
4557 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004558 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004559
Andrew Geisslerf0343792020-11-18 10:42:21 -06004560 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004561 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4562 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004563
4564 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4565 not intended to be user-configurable. It is best to just reference
4566 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004567 all machine configurations. See the ":ref:`ref-features-backfill`"
4568 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004569
Andrew Geisslerf0343792020-11-18 10:42:21 -06004570 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004571 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4572 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004573 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004574
Andrew Geisslerf0343792020-11-18 10:42:21 -06004575 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004576 A colon-separated list of overrides that apply to the current
4577 machine. By default, this list includes the value of
4578 :term:`MACHINE`.
4579
Andrew Geissler09036742021-06-25 14:25:14 -05004580 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004581 should apply to a machine. For example, all machines emulated in QEMU
4582 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4583 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004584 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004585
4586 MACHINEOVERRIDES =. "qemuall:"
4587
4588 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004589 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004590 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004591 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004592
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004593 SRC_URI_append_qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004594 file://wired-setup \
4595 "
4596
4597 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004598 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004599 value of :term:`OVERRIDES`.
4600
Andrew Geisslerf0343792020-11-18 10:42:21 -06004601 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004602 The email address of the distribution maintainer.
4603
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004604 :term:`METADATA_BRANCH`
4605 The branch currently checked out for the OpenEmbedded-Core layer (path
4606 determined by :term:`COREBASE`).
4607
4608 :term:`METADATA_REVISION`
4609 The revision currently checked out for the OpenEmbedded-Core layer (path
4610 determined by :term:`COREBASE`).
4611
Andrew Geisslerf0343792020-11-18 10:42:21 -06004612 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004613 Specifies additional paths from which the OpenEmbedded build system
4614 gets source code. When the build system searches for source code, it
4615 first tries the local download directory. If that location fails, the
4616 build system tries locations defined by
4617 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004618 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004619
4620 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004621 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004622 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4623
Andrew Geisslerf0343792020-11-18 10:42:21 -06004624 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004625 Specifies a prefix has been added to :term:`PN` to create a
4626 special version of a recipe or package (i.e. a Multilib version). The
4627 variable is used in places where the prefix needs to be added to or
4628 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004629 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004630
4631 .. note::
4632
Andrew Geissler09036742021-06-25 14:25:14 -05004633 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004634 historical and comes from a time when ``nativesdk`` was a suffix
4635 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004636 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004637
Andrew Geissler09036742021-06-25 14:25:14 -05004638 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004639 :term:`BBCLASSEXTEND` is used to provide a
4640 ``nativesdk`` version of a recipe in addition to the target version.
4641 If that recipe declares build-time dependencies on tasks in other
4642 recipes by using :term:`DEPENDS`, then a dependency on
4643 "foo" will automatically get rewritten to a dependency on
4644 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004645 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004646
4647 do_foo[depends] += "recipe:do_foo"
4648
4649 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004650 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004651
4652 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4653
Andrew Geissler09036742021-06-25 14:25:14 -05004654 :term:`module_autoload`
4655 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004656 variable. You should replace all occurrences of ``module_autoload``
Andrew Geissler09036742021-06-25 14:25:14 -05004657 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004658
4659 module_autoload_rfcomm = "rfcomm"
4660
Andrew Geisslerc926e172021-05-07 16:11:35 -05004661 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004662
4663 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4664
4665 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4666
Andrew Geissler09036742021-06-25 14:25:14 -05004667 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004668 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004669 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4670 file.
4671
4672 You can use this variable anywhere that it can be recognized by the
4673 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4674 configuration file, a distribution configuration file, an append file
4675 for the recipe, or the recipe itself). If you use this variable, you
4676 must also be sure to list the module name in the
4677 :term:`KERNEL_MODULE_AUTOLOAD`
4678 variable.
4679
Andrew Geisslerc926e172021-05-07 16:11:35 -05004680 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004681
4682 module_conf_module_name = "modprobe.d-syntax"
4683
4684 You must use the kernel module name override.
4685
4686 Run ``man modprobe.d`` in the shell to find out more information on
4687 the exact syntax you want to provide with ``module_conf``.
4688
4689 Including ``module_conf`` causes the OpenEmbedded build system to
4690 populate the ``/etc/modprobe.d/modname.conf`` file with
4691 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004692 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004693
4694 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4695
4696 For information on how to specify kernel modules to auto-load on
4697 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4698
Andrew Geisslerf0343792020-11-18 10:42:21 -06004699 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004700 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4701 "0" to disable creation of this file, which contains all of the
4702 kernel modules resulting from a kernel build.
4703
Andrew Geisslerf0343792020-11-18 10:42:21 -06004704 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004705 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004706 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004707
4708 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4709
4710 The value
4711 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004712 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004713
4714 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4715
4716 See the :term:`MACHINE` variable for additional information.
4717
Andrew Geisslerf0343792020-11-18 10:42:21 -06004718 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004719 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004720 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004721
4722 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4723
4724 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004725 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004726
4727 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4728
Andrew Geisslerf0343792020-11-18 10:42:21 -06004729 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004730 Uniquely identifies the type of the target system for which packages
4731 are being built. This variable allows output for different types of
4732 target systems to be put into different subdirectories of the same
4733 output directory.
4734
Andrew Geisslerc926e172021-05-07 16:11:35 -05004735 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004736
4737 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4738
4739 Some classes (e.g.
4740 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004741 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004742
4743 See the :term:`STAMP` variable for an example. See the
4744 :term:`STAGING_DIR_TARGET` variable for more information.
4745
Andrew Geisslerf0343792020-11-18 10:42:21 -06004746 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004747 A string identifying the host distribution. Strings consist of the
4748 host distributor ID followed by the release, as reported by the
4749 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4750 example, when running a build on Ubuntu 12.10, the value is
4751 "Ubuntu-12.10". If this information is unable to be determined, the
4752 value resolves to "Unknown".
4753
4754 This variable is used by default to isolate native shared state
4755 packages for different distributions (e.g. to avoid problems with
4756 ``glibc`` version incompatibilities). Additionally, the variable is
4757 checked against
4758 :term:`SANITY_TESTED_DISTROS` if that
4759 variable is set.
4760
Andrew Geisslerf0343792020-11-18 10:42:21 -06004761 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004762 The minimal command and arguments to run ``nm``.
4763
Andrew Geisslerf0343792020-11-18 10:42:21 -06004764 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004765 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004766 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004767 licenses that are not in any way common. Also, new licenses are added
4768 occasionally to avoid introducing a lot of common license files,
4769 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004770 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004771 not exist in common licenses.
4772
Andrew Geissler09036742021-06-25 14:25:14 -05004773 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004774 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004775
4776 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4777
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004778 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004779 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004780 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004781
4782 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4783
Andrew Geisslerf0343792020-11-18 10:42:21 -06004784 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004785 Prevents installation of all "recommended-only" packages.
4786 Recommended-only packages are packages installed only through the
4787 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05004788 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004789
4790 NO_RECOMMENDATIONS = "1"
4791
4792 You can set this variable globally in your ``local.conf`` file or you
4793 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05004794 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004795
4796 NO_RECOMMENDATIONS_pn-target_image = "1"
4797
4798 It is important to realize that if you choose to not install packages
4799 using this variable and some other packages are dependent on them
4800 (i.e. listed in a recipe's :term:`RDEPENDS`
4801 variable), the OpenEmbedded build system ignores your request and
4802 will install the packages to avoid dependency errors.
4803
4804 .. note::
4805
4806 Some recommended packages might be required for certain system
4807 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004808 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004809
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004810 This variable is only supported when using the IPK and RPM
4811 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004812
4813 See the :term:`BAD_RECOMMENDATIONS` and
4814 the :term:`PACKAGE_EXCLUDE` variables for
4815 related information.
4816
Andrew Geisslerf0343792020-11-18 10:42:21 -06004817 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004818 Disables auto package from splitting ``.debug`` files. If a recipe
4819 requires ``FILES_${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05004820 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004821 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004822
4823 NOAUTOPACKAGEDEBUG = "1"
4824 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4825 FILES_${PN}-dbg = "/usr/src/debug/"
4826 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
4827
Andrew Geissler09036742021-06-25 14:25:14 -05004828 :term:`NON_MULTILIB_RECIPES`
4829 A list of recipes that should not be built for multilib. OE-Core's
4830 ``multilib.conf`` file defines a reasonable starting point for this
4831 list with::
4832
4833 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
4834
Andrew Geisslerf0343792020-11-18 10:42:21 -06004835 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004836 The minimal command and arguments to run ``objcopy``.
4837
Andrew Geisslerf0343792020-11-18 10:42:21 -06004838 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004839 The minimal command and arguments to run ``objdump``.
4840
Andrew Geisslerf0343792020-11-18 10:42:21 -06004841 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004842 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4843 this variable specifies additional arguments passed to the "sed"
4844 command. The sed command alters any paths in configuration scripts
4845 that have been set up during compilation. Inheriting this class
4846 results in all paths in these scripts being changed to point into the
4847 ``sysroots/`` directory so that all builds that use the script will
4848 use the correct directories for the cross compiling layout.
4849
4850 See the ``meta/classes/binconfig.bbclass`` in the
4851 :term:`Source Directory` for details on how this class
4852 applies these additional sed command arguments. For general
4853 information on the ``binconfig`` class, see the
4854 ":ref:`binconfig.bbclass <ref-classes-binconfig>`" section.
4855
Andrew Geisslerf0343792020-11-18 10:42:21 -06004856 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004857 An internal variable used to tell the OpenEmbedded build system what
4858 Python modules to import for every Python function run by the system.
4859
4860 .. note::
4861
4862 Do not set this variable. It is for internal use only.
4863
Andrew Geisslerf0343792020-11-18 10:42:21 -06004864 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004865 The name of the build environment setup script for the purposes of
4866 setting up the environment within the extensible SDK. The default
4867 value is "oe-init-build-env".
4868
4869 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05004870 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004871
Andrew Geisslerf0343792020-11-18 10:42:21 -06004872 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004873 Controls how the OpenEmbedded build system spawns interactive
4874 terminals on the host development system (e.g. using the BitBake
4875 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06004876 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004877 the Yocto Project Development Tasks Manual.
4878
4879 You can use the following values for the ``OE_TERMINAL`` variable:
4880
4881 - auto
4882 - gnome
4883 - xfce
4884 - rxvt
4885 - screen
4886 - konsole
4887 - none
4888
Andrew Geisslerf0343792020-11-18 10:42:21 -06004889 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004890 The directory from which the top-level build environment setup script
4891 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004892 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05004893 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004894 contains the script.
4895
4896 For additional information on how this variable is used, see the
4897 initialization script.
4898
Andrew Geisslerf0343792020-11-18 10:42:21 -06004899 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004900 Declares the oldest version of the Linux kernel that the produced
4901 binaries must support. This variable is passed into the build of the
4902 Embedded GNU C Library (``glibc``).
4903
4904 The default for this variable comes from the
4905 ``meta/conf/bitbake.conf`` configuration file. You can override this
4906 default by setting the variable in a custom distribution
4907 configuration file.
4908
Andrew Geisslerf0343792020-11-18 10:42:21 -06004909 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004910 A colon-separated list of overrides that currently apply. Overrides
4911 are a BitBake mechanism that allows variables to be selectively
4912 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05004913 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004914 the current recipe being built, the machine for which it is being
4915 built, and so forth.
4916
4917 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05004918 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004919 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004920 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004921
4922 FOO_an-override = "overridden"
4923
4924 See the
4925 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
4926 section in the BitBake User Manual for more information on the
4927 overrides mechanism.
4928
Andrew Geissler09036742021-06-25 14:25:14 -05004929 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004930 :term:`CLASSOVERRIDE`,
4931 :term:`MACHINEOVERRIDES`, and
4932 :term:`DISTROOVERRIDES` variables. Another
4933 important override included by default is ``pn-${PN}``. This override
4934 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05004935 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004936
4937 FOO_pn-myrecipe = "myrecipe-specific value"
4938
4939 .. note::
4940
Andrew Geissler09036742021-06-25 14:25:14 -05004941 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004942 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004943 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004944 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004945
Andrew Geisslerf0343792020-11-18 10:42:21 -06004946 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05004947 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004948
4949 ${PN}-${PV}
4950
Andrew Geisslerf0343792020-11-18 10:42:21 -06004951 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004952 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004953
4954 You may find you need to inject additional metadata into packages.
4955 This variable allows you to do that by setting the injected data as
4956 the value. Multiple fields can be added by splitting the content with
4957 the literal separator "\n".
4958
4959 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
4960 to do package type specific settings. It can also be made package
4961 specific by using the package name as a suffix.
4962
4963 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004964 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004965 section in the Yocto Project Development Tasks Manual.
4966
Andrew Geisslerf0343792020-11-18 10:42:21 -06004967 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004968 The architecture of the resulting package or packages.
4969
4970 By default, the value of this variable is set to
4971 :term:`TUNE_PKGARCH` when building for the
4972 target, :term:`BUILD_ARCH` when building for the
4973 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
4974 SDK.
4975
4976 .. note::
4977
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004978 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004979
4980 However, if your recipe's output packages are built specific to the
4981 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05004982 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05004983 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004984
4985 PACKAGE_ARCH = "${MACHINE_ARCH}"
4986
Andrew Geisslerf0343792020-11-18 10:42:21 -06004987 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004988 Specifies a list of architectures compatible with the target machine.
4989 This variable is set automatically and should not normally be
4990 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05004991 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004992 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
4993
Andrew Geisslerf0343792020-11-18 10:42:21 -06004994 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05004995 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004996 that those added packages can pick up files that would normally be
4997 included in the default package.
4998
Andrew Geisslerf0343792020-11-18 10:42:21 -06004999 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005000 This variable, which is set in the ``local.conf`` configuration file
5001 found in the ``conf`` folder of the
5002 :term:`Build Directory`, specifies the package manager the
5003 OpenEmbedded build system uses when packaging data.
5004
5005 You can provide one or more of the following arguments for the
5006 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5007 package_tar"
5008
5009 .. note::
5010
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005011 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005012 class has limited functionality due to no support for package
5013 dependencies by that backend. Therefore, it is recommended that
5014 you do not use it.
5015
5016 The build system uses only the first argument in the list as the
5017 package manager when creating your image or SDK. However, packages
5018 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005019 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005020
5021 PACKAGE_CLASSES ?= "package_ipk"
5022
5023 The OpenEmbedded build system uses
5024 the IPK package manager to create your image or SDK.
5025
5026 For information on packaging and build performance effects as a
5027 result of the package manager in use, see the
5028 ":ref:`package.bbclass <ref-classes-package>`" section.
5029
Andrew Geisslerf0343792020-11-18 10:42:21 -06005030 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005031 Determines how to split up the binary and debug information when
5032 creating ``*-dbg`` packages to be used with the GNU Project Debugger
5033 (GDB).
5034
Andrew Geissler09036742021-06-25 14:25:14 -05005035 With the :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable, you can control
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005036 where debug information, which can include or exclude source files,
5037 is stored:
5038
5039 - ".debug": Debug symbol files are placed next to the binary in a
5040 ``.debug`` directory on the target. For example, if a binary is
5041 installed into ``/bin``, the corresponding debug symbol files are
5042 installed in ``/bin/.debug``. Source files are placed in
5043 ``/usr/src/debug``.
5044
5045 - "debug-file-directory": Debug symbol files are placed under
5046 ``/usr/lib/debug`` on the target, and separated by the path from
5047 where the binary is installed. For example, if a binary is
5048 installed in ``/bin``, the corresponding debug symbols are
5049 installed in ``/usr/lib/debug/bin``. Source files are placed in
5050 ``/usr/src/debug``.
5051
5052 - "debug-without-src": The same behavior as ".debug" previously
5053 described with the exception that no source files are installed.
5054
5055 - "debug-with-srcpkg": The same behavior as ".debug" previously
5056 described with the exception that all source files are placed in a
5057 separate ``*-src`` pkg. This is the default behavior.
5058
5059 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005060 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005061 in the Yocto Project Development Tasks Manual.
5062
Andrew Geisslerf0343792020-11-18 10:42:21 -06005063 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005064 Prevents specific packages from being installed when you are
5065 installing complementary packages.
5066
5067 You might find that you want to prevent installing certain packages
5068 when you are installing complementary packages. For example, if you
5069 are using :term:`IMAGE_FEATURES` to install
5070 ``dev-pkgs``, you might not want to install all packages from a
5071 particular multilib. If you find yourself in this situation, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005072 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005073 expressions to match the packages you want to exclude.
5074
Andrew Geisslerf0343792020-11-18 10:42:21 -06005075 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005076 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005077 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005078
5079 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5080
5081 You can set this variable globally in your ``local.conf`` file or you
5082 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005083 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005084
5085 PACKAGE_EXCLUDE_pn-target_image = "package_name"
5086
5087 If you choose to not install a package using this variable and some
5088 other package is dependent on it (i.e. listed in a recipe's
5089 :term:`RDEPENDS` variable), the OpenEmbedded build
5090 system generates a fatal installation error. Because the build system
5091 halts the process with a fatal error, you can use the variable with
5092 an iterative development process to remove specific components from a
5093 system.
5094
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005095 This variable is supported only when using the IPK and RPM
5096 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005097
5098 See the :term:`NO_RECOMMENDATIONS` and the
5099 :term:`BAD_RECOMMENDATIONS` variables for
5100 related information.
5101
Andrew Geisslerf0343792020-11-18 10:42:21 -06005102 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005103 Specifies the list of architectures compatible with the device CPU.
5104 This variable is useful when you build for several different devices
5105 that use miscellaneous processors such as XScale and ARM926-EJS.
5106
Andrew Geisslerf0343792020-11-18 10:42:21 -06005107 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005108 Optionally specifies the package architectures used as part of the
5109 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005110 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005111 URI, which is constructed using the
5112 :term:`PACKAGE_FEED_URIS` and
5113 :term:`PACKAGE_FEED_BASE_PATHS`
5114 variables.
5115
5116 .. note::
5117
Andrew Geissler09036742021-06-25 14:25:14 -05005118 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005119 variable to whitelist specific package architectures. If you do
5120 not need to whitelist specific architectures, which is a common
5121 case, you can omit this variable. Omitting the variable results in
5122 all available architectures for the current machine being included
5123 into remote package feeds.
5124
Andrew Geissler09036742021-06-25 14:25:14 -05005125 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5126 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005127 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005128
5129 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5130 https://example.com/packagerepos/updates"
5131 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5132 PACKAGE_FEED_ARCHS = "all core2-64"
5133
5134 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005135
5136 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005137
5138 https://example.com/packagerepos/release/rpm/all
5139 https://example.com/packagerepos/release/rpm/core2-64
5140 https://example.com/packagerepos/release/rpm-dev/all
5141 https://example.com/packagerepos/release/rpm-dev/core2-64
5142 https://example.com/packagerepos/updates/rpm/all
5143 https://example.com/packagerepos/updates/rpm/core2-64
5144 https://example.com/packagerepos/updates/rpm-dev/all
5145 https://example.com/packagerepos/updates/rpm-dev/core2-64
5146
Andrew Geisslerf0343792020-11-18 10:42:21 -06005147 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005148 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005149 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005150 package feed URI used by the OpenEmbedded build system. The base path
5151 lies between the :term:`PACKAGE_FEED_URIS`
5152 and :term:`PACKAGE_FEED_ARCHS` variables.
5153
Andrew Geissler09036742021-06-25 14:25:14 -05005154 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5155 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005156 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005157
5158 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5159 https://example.com/packagerepos/updates"
5160 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5161 PACKAGE_FEED_ARCHS = "all core2-64"
5162
5163 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005164
5165 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005166
5167 https://example.com/packagerepos/release/rpm/all
5168 https://example.com/packagerepos/release/rpm/core2-64
5169 https://example.com/packagerepos/release/rpm-dev/all
5170 https://example.com/packagerepos/release/rpm-dev/core2-64
5171 https://example.com/packagerepos/updates/rpm/all
5172 https://example.com/packagerepos/updates/rpm/core2-64
5173 https://example.com/packagerepos/updates/rpm-dev/all
5174 https://example.com/packagerepos/updates/rpm-dev/core2-64
5175
Andrew Geisslerf0343792020-11-18 10:42:21 -06005176 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005177 Specifies the front portion of the package feed URI used by the
5178 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005179 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005180 :term:`PACKAGE_FEED_BASE_PATHS`, and
5181 :term:`PACKAGE_FEED_ARCHS` variables.
5182
Andrew Geissler09036742021-06-25 14:25:14 -05005183 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5184 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005185 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005186
5187 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5188 https://example.com/packagerepos/updates"
5189 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5190 PACKAGE_FEED_ARCHS = "all core2-64"
5191
5192 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005193
5194 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005195
5196 https://example.com/packagerepos/release/rpm/all
5197 https://example.com/packagerepos/release/rpm/core2-64
5198 https://example.com/packagerepos/release/rpm-dev/all
5199 https://example.com/packagerepos/release/rpm-dev/core2-64
5200 https://example.com/packagerepos/updates/rpm/all
5201 https://example.com/packagerepos/updates/rpm/core2-64
5202 https://example.com/packagerepos/updates/rpm-dev/all
5203 https://example.com/packagerepos/updates/rpm-dev/core2-64
5204
Andrew Geisslerf0343792020-11-18 10:42:21 -06005205 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005206 The final list of packages passed to the package manager for
5207 installation into the image.
5208
5209 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005210 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005211 not the final list of packages that are actually installed. This
5212 variable is internal to the image construction code. Consequently, in
5213 general, you should use the
5214 :term:`IMAGE_INSTALL` variable to specify
5215 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005216 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005217 image. When working with an initial RAM filesystem (initramfs) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005218 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005219 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005220 in the Yocto Project Development Tasks Manual.
5221
Andrew Geisslerf0343792020-11-18 10:42:21 -06005222 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005223 Specifies a list of packages the OpenEmbedded build system attempts
5224 to install when creating an image. If a listed package fails to
5225 install, the build system does not generate an error. This variable
5226 is generally not user-defined.
5227
Andrew Geisslerf0343792020-11-18 10:42:21 -06005228 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005229 Specifies a list of functions run to pre-process the
5230 :term:`PKGD` directory prior to splitting the files out
5231 to individual packages.
5232
Andrew Geisslerf0343792020-11-18 10:42:21 -06005233 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005234 Specifies a list of dependencies for post-installation and
5235 pre-installation scripts on native/cross tools. If your
5236 post-installation or pre-installation script can execute at rootfs
5237 creation time rather than on the target but depends on a native tool
5238 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005239 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005240
5241 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005242 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005243 section in the Yocto Project Development Tasks Manual.
5244
Andrew Geisslerf0343792020-11-18 10:42:21 -06005245 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005246 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005247 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005248 recipes when you specify features and then arguments that define
5249 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005250 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005251
5252 PACKAGECONFIG ??= "f1 f2 f3 ..."
5253 PACKAGECONFIG[f1] = "\
5254 --with-f1, \
5255 --without-f1, \
5256 build-deps-for-f1, \
5257 runtime-deps-for-f1, \
5258 runtime-recommends-for-f1, \
5259 packageconfig-conflicts-for-f1"
5260 PACKAGECONFIG[f2] = "\
5261 ... and so on and so on ...
5262
5263 The ``PACKAGECONFIG`` variable itself specifies a space-separated
5264 list of the features to enable. Following the features, you can
5265 determine the behavior of each feature by providing up to six
5266 order-dependent arguments, which are separated by commas. You can
5267 omit any argument you like but must retain the separating commas. The
5268 order is important and specifies the following:
5269
5270 1. Extra arguments that should be added to the configure script
5271 argument list (:term:`EXTRA_OECONF` or
5272 :term:`PACKAGECONFIG_CONFARGS`) if
5273 the feature is enabled.
5274
Andrew Geissler09036742021-06-25 14:25:14 -05005275 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5276 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005277
5278 3. Additional build dependencies (:term:`DEPENDS`)
5279 that should be added if the feature is enabled.
5280
5281 4. Additional runtime dependencies (:term:`RDEPENDS`)
5282 that should be added if the feature is enabled.
5283
5284 5. Additional runtime recommendations
5285 (:term:`RRECOMMENDS`) that should be added if
5286 the feature is enabled.
5287
Andrew Geissler09036742021-06-25 14:25:14 -05005288 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005289 settings for this feature.
5290
Andrew Geissler09036742021-06-25 14:25:14 -05005291 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005292 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5293 three arguments that determine the feature's behavior.
5294 ::
5295
5296 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5297
5298 The
5299 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5300 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005301 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005302 other hand, if the feature is disabled say through a ``.bbappend``
5303 file in another layer, then the second argument ``--without-gtk3`` is
5304 added to the configure script instead.
5305
Andrew Geissler09036742021-06-25 14:25:14 -05005306 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005307 regardless of whether you are creating a block or changing a block.
5308 When creating a block, use the structure inside your recipe.
5309
Andrew Geissler09036742021-06-25 14:25:14 -05005310 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005311 so one of two ways:
5312
5313 - *Append file:* Create an append file named
5314 recipename\ ``.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005315 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005316 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005317
5318 PACKAGECONFIG = "f4 f5"
5319
Andrew Geisslerc926e172021-05-07 16:11:35 -05005320 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005321
5322 PACKAGECONFIG_append = " f4"
5323
5324 - *Configuration file:* This method is identical to changing the
5325 block through an append file except you edit your ``local.conf``
5326 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005327 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005328
5329 PACKAGECONFIG_pn-recipename = "f4 f5"
5330
Andrew Geisslerc926e172021-05-07 16:11:35 -05005331 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005332
5333 PACKAGECONFIG_append_pn-recipename = " f4"
5334
Andrew Geisslerf0343792020-11-18 10:42:21 -06005335 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005336 A space-separated list of configuration options generated from the
5337 :term:`PACKAGECONFIG` setting.
5338
5339 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005340 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5341 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5342 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005343 handles the ``do_configure`` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005344 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005345
Andrew Geisslerf0343792020-11-18 10:42:21 -06005346 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005347 For recipes inheriting the
5348 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005349 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005350 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5351 should not be automatically created by the ``packagegroup`` recipe,
5352 which is the default behavior.
5353
Andrew Geisslerf0343792020-11-18 10:42:21 -06005354 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005355 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005356 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005357
5358 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5359
5360 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005361 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005362 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005363 package. If a file matches the :term:`FILES` variable for more than one
5364 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005365 (leftmost) package.
5366
5367 Packages in the variable's list that are empty (i.e. where none of
5368 the patterns in ``FILES_``\ pkg match any files installed by the
5369 :ref:`ref-tasks-install` task) are not generated,
5370 unless generation is forced through the
5371 :term:`ALLOW_EMPTY` variable.
5372
Andrew Geisslerf0343792020-11-18 10:42:21 -06005373 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005374 A promise that your recipe satisfies runtime dependencies for
5375 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005376 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005377 only states that they should be satisfied. For example, if a hard,
5378 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005379 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005380 variable, but a package with the module name is never actually
5381 produced, then the other package will be broken. Thus, if you attempt
5382 to include that package in an image, you will get a dependency
5383 failure from the packaging system during the
5384 :ref:`ref-tasks-rootfs` task.
5385
5386 Typically, if there is a chance that such a situation can occur and
5387 the package that is not created is valid without the dependency being
5388 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005389 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005390
Andrew Geissler09036742021-06-25 14:25:14 -05005391 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005392 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005393 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005394 section in the Yocto Project Development Tasks Manual.
5395
Andrew Geisslerf0343792020-11-18 10:42:21 -06005396 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005397 Specifies a list of functions run to perform additional splitting of
5398 files into individual packages. Recipes can either prepend to this
5399 variable or prepend to the ``populate_packages`` function in order to
5400 perform additional package splitting. In either case, the function
5401 should set :term:`PACKAGES`,
5402 :term:`FILES`, :term:`RDEPENDS` and
5403 other packaging variables appropriately in order to perform the
5404 desired splitting.
5405
Andrew Geisslerf0343792020-11-18 10:42:21 -06005406 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005407 Extra options passed to the ``make`` command during the
5408 :ref:`ref-tasks-compile` task in order to specify
5409 parallel compilation on the local build host. This variable is
5410 usually in the form "-j x", where x represents the maximum number of
5411 parallel threads ``make`` can run.
5412
5413 .. note::
5414
Andrew Geissler09036742021-06-25 14:25:14 -05005415 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005416 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5417 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005418
5419 By default, the OpenEmbedded build system automatically sets this
5420 variable to be equal to the number of cores the build system uses.
5421
5422 .. note::
5423
5424 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005425 the ``do_compile`` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005426 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005427 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005428 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005429 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005430
5431 For single socket systems (i.e. one CPU), you should not have to
5432 override this variable to gain optimal parallelism during builds.
5433 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005434 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005435 not set higher than "-j 20".
5436
5437 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005438 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005439 section in the Yocto Project Development Tasks Manual.
5440
Andrew Geisslerf0343792020-11-18 10:42:21 -06005441 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005442 Extra options passed to the ``make install`` command during the
5443 :ref:`ref-tasks-install` task in order to specify
5444 parallel installation. This variable defaults to the value of
5445 :term:`PARALLEL_MAKE`.
5446
5447 .. note::
5448
Andrew Geissler09036742021-06-25 14:25:14 -05005449 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005450 be called with
5451 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5452 way to ensure this is to use the ``oe_runmake`` function.
5453
5454 If the software being built experiences dependency issues during
5455 the ``do_install`` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005456 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005457 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005458 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005459 section in the Yocto Project Development Tasks Manual.
5460
Andrew Geisslerf0343792020-11-18 10:42:21 -06005461 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005462 Determines the action to take when a patch fails. You can set this
5463 variable to one of two values: "noop" and "user".
5464
5465 The default value of "noop" causes the build to simply fail when the
5466 OpenEmbedded build system cannot successfully apply a patch. Setting
5467 the value to "user" causes the build system to launch a shell and
5468 places you in the right location so that you can manually resolve the
5469 conflicts.
5470
5471 Set this variable in your ``local.conf`` file.
5472
Andrew Geisslerf0343792020-11-18 10:42:21 -06005473 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005474 Specifies the utility used to apply patches for a recipe during the
5475 :ref:`ref-tasks-patch` task. You can specify one of
5476 three utilities: "patch", "quilt", or "git". The default utility used
5477 is "quilt" except for the quilt-native recipe itself. Because the
5478 quilt tool is not available at the time quilt-native is being
5479 patched, it uses "patch".
5480
5481 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005482 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005483
5484 PATCHTOOL = "patch"
5485 PATCHTOOL = "quilt"
5486 PATCHTOOL = "git"
5487
Andrew Geisslerf0343792020-11-18 10:42:21 -06005488 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005489 The epoch of the recipe. By default, this variable is unset. The
5490 variable is used to make upgrades possible when the versioning scheme
5491 changes in some backwards incompatible way.
5492
Andrew Geissler09036742021-06-25 14:25:14 -05005493 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005494
Andrew Geisslerf0343792020-11-18 10:42:21 -06005495 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005496 Specifies the recipe or package name and includes all version and
5497 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5498 ``bash-4.2-r1/``). This variable is comprised of the following:
5499 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5500
Andrew Geisslerf0343792020-11-18 10:42:21 -06005501 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005502 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5503 class, this variable identifies packages that contain the pixbuf
5504 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5505 class assumes that the loaders are in the recipe's main package (i.e.
5506 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5507 loaders you need are in a package other than that main package.
5508
Andrew Geisslerf0343792020-11-18 10:42:21 -06005509 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005510 The name of the resulting package created by the OpenEmbedded build
5511 system.
5512
5513 .. note::
5514
Andrew Geissler09036742021-06-25 14:25:14 -05005515 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005516
5517 For example, when the :ref:`debian <ref-classes-debian>` class
5518 renames the output package, it does so by setting
5519 ``PKG_packagename``.
5520
Andrew Geisslerf0343792020-11-18 10:42:21 -06005521 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005522 The path to ``pkg-config`` files for the current build context.
5523 ``pkg-config`` reads this variable from the environment.
5524
Andrew Geisslerf0343792020-11-18 10:42:21 -06005525 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005526 Points to the destination directory for files to be packaged before
5527 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005528 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005529
5530 ${WORKDIR}/package
5531
5532 Do not change this default.
5533
Andrew Geisslerf0343792020-11-18 10:42:21 -06005534 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005535 Points to a shared, global-state directory that holds data generated
5536 during the packaging process. During the packaging process, the
5537 :ref:`ref-tasks-packagedata` task packages data
5538 for each recipe and installs it into this temporary, shared area.
5539 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005540 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005541
5542 ${STAGING_DIR_HOST}/pkgdata
5543
5544 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005545 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005546 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005547 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005548 section in the Yocto Project Development Tasks Manual. For more
5549 information on the shared, global-state directory, see
5550 :term:`STAGING_DIR_HOST`.
5551
Andrew Geisslerf0343792020-11-18 10:42:21 -06005552 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005553 Points to the parent directory for files to be packaged after they
5554 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005555 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005556
5557 ${WORKDIR}/packages-split
5558
5559 Under this directory, the build system creates directories for each
5560 package specified in :term:`PACKAGES`. Do not change
5561 this default.
5562
Andrew Geisslerf0343792020-11-18 10:42:21 -06005563 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005564 Points to a temporary work area where the
5565 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005566 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005567
5568 ${WORKDIR}/pkgdata
5569
5570 Do not change this default.
5571
5572 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005573 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005574 :term:`PKGDATA_DIR` to make it available globally.
5575
Andrew Geisslerf0343792020-11-18 10:42:21 -06005576 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005577 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005578 is set to :term:`PE`.
5579
Andrew Geisslerf0343792020-11-18 10:42:21 -06005580 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005581 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005582 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005583
Andrew Geisslerf0343792020-11-18 10:42:21 -06005584 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005585 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005586 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005587
Andrew Geisslerf0343792020-11-18 10:42:21 -06005588 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005589 This variable can have two separate functions depending on the
5590 context: a recipe name or a resulting package name.
5591
Andrew Geissler09036742021-06-25 14:25:14 -05005592 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005593 OpenEmbedded build system as input to create a package. The name is
5594 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005595 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005596 will be "expat".
5597
5598 The variable refers to a package name in the context of a file
5599 created or produced by the OpenEmbedded build system.
5600
Andrew Geissler09036742021-06-25 14:25:14 -05005601 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005602 or prefix. For example, using ``bash`` to build packages for the
5603 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005604 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005605 and ``lib64-bash``, respectively.
5606
Andrew Geisslerf0343792020-11-18 10:42:21 -06005607 :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005608 Lists recipes you do not want the OpenEmbedded build system to build.
5609 This variable works in conjunction with the
5610 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited
5611 globally.
5612
Andrew Geissler09036742021-06-25 14:25:14 -05005613 To prevent a recipe from being built, use the :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005614 variable in your ``local.conf`` file. Here is an example that
Andrew Geisslerc926e172021-05-07 16:11:35 -05005615 prevents ``myrecipe`` from being built::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005616
5617 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5618
Andrew Geisslerf0343792020-11-18 10:42:21 -06005619 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005620 Specifies a list of functions to call once the OpenEmbedded build
5621 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005622 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005623
5624 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5625
5626 If you need to pass the SDK path to a command within a function, you
5627 can use ``${SDK_DIR}``, which points to the parent directory used by
5628 the OpenEmbedded build system when creating SDK output. See the
5629 :term:`SDK_DIR` variable for more information.
5630
Andrew Geisslerf0343792020-11-18 10:42:21 -06005631 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005632 Specifies a list of functions to call once the OpenEmbedded build
5633 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005634 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005635
5636 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5637
5638 If you need to pass the SDK path to a command within a function, you
5639 can use ``${SDK_DIR}``, which points to the parent directory used by
5640 the OpenEmbedded build system when creating SDK output. See the
5641 :term:`SDK_DIR` variable for more information.
5642
Andrew Geisslerf0343792020-11-18 10:42:21 -06005643 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005644 The revision of the recipe. The default value for this variable is
5645 "r0". Subsequent revisions of the recipe conventionally have the
5646 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005647 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005648
5649 .. note::
5650
Andrew Geissler09036742021-06-25 14:25:14 -05005651 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005652 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005653 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005654 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005655 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005656 mechanisms.
5657
Andrew Geissler09036742021-06-25 14:25:14 -05005658 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005659 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005660 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005661 :term:`PKGR`, helps the package manager distinguish which
5662 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005663 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5664 the same :term:`PV` usually means that the packages all install the same
5665 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005666 packaging fixes.
5667
5668 .. note::
5669
Andrew Geissler09036742021-06-25 14:25:14 -05005670 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005671 package contents or metadata.
5672
5673 Because manually managing ``PR`` can be cumbersome and error-prone,
5674 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005675 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005676 in the Yocto Project Development Tasks Manual for more information.
5677
Andrew Geisslerf0343792020-11-18 10:42:21 -06005678 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005679 If multiple recipes provide the same item, this variable determines
5680 which recipe is preferred and thus provides the item (i.e. the
5681 preferred provider). You should always suffix this variable with the
5682 name of the provided item. And, you should define the variable using
5683 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005684 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005685
5686 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5687
5688 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005689 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005690 the recipe you prefer to provide "virtual/kernel".
5691
Andrew Geisslerc926e172021-05-07 16:11:35 -05005692 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005693
5694 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5695 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5696
5697 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005698 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005699 section in the Yocto Project Development Tasks Manual.
5700
5701 .. note::
5702
Andrew Geissler09036742021-06-25 14:25:14 -05005703 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005704 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005705 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005706 desirable since this mechanism is designed to select between mutually
5707 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005708
Andrew Geisslerf0343792020-11-18 10:42:21 -06005709 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005710 If there are multiple versions of a recipe available, this variable
5711 determines which version should be given preference. You must always
5712 suffix the variable with the :term:`PN` you want to select (`python` in
5713 the first example below), and you should specify the :term:`PV`
5714 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005715
Andrew Geissler09036742021-06-25 14:25:14 -05005716 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005717 through the "``%``" character. You can use the character to match any
5718 number of characters, which can be useful when specifying versions
5719 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005720 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005721
5722 PREFERRED_VERSION_python = "3.4.0"
5723 PREFERRED_VERSION_linux-yocto = "5.0%"
5724
5725 .. note::
5726
5727 The use of the "%" character is limited in that it only works at the end of the
5728 string. You cannot use the wildcard character in any other
5729 location of the string.
5730
5731 The specified version is matched against :term:`PV`, which
5732 does not necessarily match the version part of the recipe's filename.
5733 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005734 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005735
5736 PV = "1.1+git${SRCPV}"
5737
5738 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005739 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005740
5741 PREFERRED_VERSION_foo = "1.1+git%"
5742
5743 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005744 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005745
5746 PREFERRED_VERSION_foo = "git"
5747
Andrew Geissler09036742021-06-25 14:25:14 -05005748 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005749 configuration files in a way that is hard to change. You can use
5750 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005751 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005752
5753 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%"
5754
5755 Although not recommended, worst case, you can also use the
5756 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005757 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005758
5759 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%"
5760
5761 .. note::
5762
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005763 The ``\_forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005764 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005765
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005766 If a recipe with the specified version is not available, a warning
5767 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5768 to be an error instead.
5769
Andrew Geisslerf0343792020-11-18 10:42:21 -06005770 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005771 Specifies additional paths from which the OpenEmbedded build system
5772 gets source code. When the build system searches for source code, it
5773 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005774 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005775 source, and then locations specified by
5776 :term:`MIRRORS` in that order.
5777
5778 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005779 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005780 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5781
5782 Typically, you could add a specific server for the build system to
5783 attempt before any others by adding something like the following to
5784 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005785 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005786
5787 PREMIRRORS_prepend = "\
5788 git://.*/.* http://www.yoctoproject.org/sources/ \n \
5789 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
5790 http://.*/.* http://www.yoctoproject.org/sources/ \n \
5791 https://.*/.* http://www.yoctoproject.org/sources/ \n"
5792
5793 These changes cause the
5794 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5795 direct them to the ``http://`` sources mirror. You can use
5796 ``file://`` URLs to point to local directories or network shares as
5797 well.
5798
Andrew Geisslerf0343792020-11-18 10:42:21 -06005799 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005800 Indicates the importance of a package.
5801
Andrew Geissler09036742021-06-25 14:25:14 -05005802 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005803 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05005804 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005805 normally set within recipes.
5806
Andrew Geissler09036742021-06-25 14:25:14 -05005807 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005808 "optional", which is the default.
5809
Andrew Geisslerf0343792020-11-18 10:42:21 -06005810 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005811 Specifies libraries installed within a recipe that should be ignored
5812 by the OpenEmbedded build system's shared library resolver. This
5813 variable is typically used when software being built by a recipe has
5814 its own private versions of a library normally provided by another
5815 recipe. In this case, you would not want the package containing the
5816 private libraries to be set as a dependency on other unrelated
5817 packages that should instead depend on the package providing the
5818 standard version of the library.
5819
5820 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05005821 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005822
5823 PRIVATE_LIBS = "libmozjs.so \
5824 libxpcom.so \
5825 libnspr4.so \
5826 libxul.so \
5827 libmozalloc.so \
5828 libplc4.so \
5829 libplds4.so"
5830
5831 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005832 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005833 section in the Yocto Project Overview and Concepts Manual.
5834
Andrew Geisslerf0343792020-11-18 10:42:21 -06005835 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005836 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05005837 default, a recipe's own :term:`PN` is implicitly already in its
5838 :term:`PROVIDES` list and therefore does not need to mention that it
5839 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005840 aliases are synonyms for the recipe and can be useful for satisfying
5841 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05005842 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005843
Andrew Geissler09036742021-06-25 14:25:14 -05005844 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05005845 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005846
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005847 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005848
Andrew Geissler09036742021-06-25 14:25:14 -05005849 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005850 results in the "eudev" recipe also being available as simply "udev".
5851
5852 .. note::
5853
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005854 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
5855 to `PROVIDES`, so while using "+=" in the above example may not be
5856 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005857
5858 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05005859 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005860 virtual target is a name that corresponds to some particular
5861 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05005862 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005863 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05005864 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005865
5866 Conventionally, virtual targets have names on the form
5867 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5868 of the name and has no syntactical significance.
5869
5870 The :term:`PREFERRED_PROVIDER` variable is
5871 used to select which particular recipe provides a virtual target.
5872
5873 .. note::
5874
5875 A corresponding mechanism for virtual runtime dependencies
5876 (packages) exists. However, the mechanism does not depend on any
5877 special functionality beyond ordinary variable assignments. For
5878 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5879 the component that manages the ``/dev`` directory.
5880
5881 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05005882 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005883
5884 VIRTUAL-RUNTIME_dev_manager = "udev"
5885
5886
Andrew Geisslerf0343792020-11-18 10:42:21 -06005887 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005888 The network based :term:`PR` service host and port.
5889
5890 The ``conf/local.conf.sample.extended`` configuration file in the
5891 :term:`Source Directory` shows how the
Andrew Geissler09036742021-06-25 14:25:14 -05005892 :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005893
5894 PRSERV_HOST = "localhost:0"
5895
5896 You must
5897 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06005898 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05005899 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005900
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005901
5902 :term:`PSEUDO_IGNORE_PATHS`
5903 A comma-separated (without spaces) list of path prefixes that should be ignored
5904 by pseudo when monitoring and recording file operations, in order to avoid
5905 problems with files being written to outside of the pseudo context and
5906 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
5907 and can include partial directory (or file) names.
5908
5909
Andrew Geisslerf0343792020-11-18 10:42:21 -06005910 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005911 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06005912 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005913 functionality is enabled when building a recipe. You should not set
5914 this variable directly. Enabling and disabling building Package Tests
5915 at build time should be done by adding "ptest" to (or removing it
5916 from) :term:`DISTRO_FEATURES`.
5917
Andrew Geisslerf0343792020-11-18 10:42:21 -06005918 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005919 The version of the recipe. The version is normally extracted from the
5920 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05005921 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
5922 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005923 building an unstable (i.e. development) version from a source code
5924 repository (e.g. Git or Subversion).
5925
Andrew Geissler09036742021-06-25 14:25:14 -05005926 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005927
Andrew Geisslerf0343792020-11-18 10:42:21 -06005928 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005929 When used by recipes that inherit the
5930 :ref:`distutils3 <ref-classes-distutils3>`,
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005931 :ref:`setuptools3 <ref-classes-setuptools3>` classes, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005932 Application Binary Interface (ABI) currently in use for Python. By
5933 default, the ABI is "m". You do not have to set this variable as the
5934 OpenEmbedded build system sets it for you.
5935
5936 The OpenEmbedded build system uses the ABI to construct directory
5937 names used when installing the Python headers and libraries in
5938 sysroot (e.g. ``.../python3.3m/...``).
5939
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005940 Recipes that inherit the ``distutils3`` class during cross-builds also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005941 use this variable to locate the headers and libraries of the
5942 appropriate Python that the extension is targeting.
5943
Andrew Geisslerf0343792020-11-18 10:42:21 -06005944 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005945 When used by recipes that inherit the
5946 `distutils3 <ref-classes-distutils3>`,
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005947 :ref:`setuptools3 <ref-classes-setuptools3>` classes, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05005948 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005949 be "python3". You do not have to set this variable as the
5950 OpenEmbedded build system automatically sets it for you.
5951
5952 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005953 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005954
5955 DEPENDS += "${PYTHON_PN}-native"
5956
5957 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05005958 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005959
Andrew Geisslerf0343792020-11-18 10:42:21 -06005960 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005961 The minimal command and arguments to run ``ranlib``.
5962
Andrew Geisslerf0343792020-11-18 10:42:21 -06005963 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005964 The list of packages that conflict with packages. Note that packages
5965 will not be installed if conflicting packages are not first removed.
5966
5967 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005968 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005969
5970 RCONFLICTS_${PN} = "another_conflicting_package_name"
5971
5972 BitBake, which the OpenEmbedded build system uses, supports
5973 specifying versioned dependencies. Although the syntax varies
5974 depending on the packaging format, BitBake hides these differences
5975 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05005976 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005977
5978 RCONFLICTS_${PN} = "package (operator version)"
5979
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005980 For ``operator``, you can specify the following:
5981
5982 - =
5983 - <
5984 - >
5985 - <=
5986 - >=
5987
5988 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05005989 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005990
5991 RCONFLICTS_${PN} = "foo (>= 1.2)"
5992
Andrew Geisslerf0343792020-11-18 10:42:21 -06005993 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005994 Lists runtime dependencies of a package. These dependencies are other
5995 packages that must be installed in order for the package to function
5996 correctly. As an example, the following assignment declares that the
5997 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05005998 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005999
6000 RDEPENDS_foo = "bar baz"
6001
6002 The most common types of package
6003 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006004 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006005 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006006 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006007 section in the Yocto Project Overview and Concepts Manual.
6008
Andrew Geissler09036742021-06-25 14:25:14 -05006009 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006010 ``bar`` and ``baz`` will be declared as dependencies inside the
6011 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006012 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006013 Exactly how this is done depends on which package format is used,
6014 which is determined by
6015 :term:`PACKAGE_CLASSES`. When the
6016 corresponding package manager installs the package, it will know to
6017 also install the packages on which it depends.
6018
6019 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006020 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006021 added. This dependency is from the recipe's
6022 :ref:`ref-tasks-build` (not to be confused with
6023 :ref:`ref-tasks-compile`) task to the
6024 ``do_package_write_*`` task of the recipes that build ``bar`` and
6025 ``baz``.
6026
Andrew Geissler09036742021-06-25 14:25:14 -05006027 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 names of other packages - they cannot be recipe names. Although
6029 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006030 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006031 variable. For an example of the default list of packages created from
6032 a recipe, see the :term:`PACKAGES` variable.
6033
Andrew Geissler09036742021-06-25 14:25:14 -05006034 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006035 you should always use the variable in a form with an attached package
6036 name (remember that a single recipe can build multiple packages). For
6037 example, suppose you are building a development package that depends
6038 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006039 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006040
6041 RDEPENDS_${PN}-dev += "perl"
6042
6043 In the example,
6044 the development package depends on the ``perl`` package. Thus, the
6045 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of
6046 the variable.
6047
6048 .. note::
6049
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006050 ``RDEPENDS_${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006051 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006052 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
6053 ``${PN}`` when modifying ``RDEPENDS_${PN}-dev``. Use the "+=" operator
6054 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006055
Andrew Geissler09036742021-06-25 14:25:14 -05006056 The package names you use with :term:`RDEPENDS` must appear as they would
6057 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006058 allows a different name to be used for the final package (e.g. the
6059 :ref:`debian <ref-classes-debian>` class uses this to rename
6060 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006061 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006062 independent of the package format used.
6063
6064 BitBake, which the OpenEmbedded build system uses, supports
6065 specifying versioned dependencies. Although the syntax varies
6066 depending on the packaging format, BitBake hides these differences
6067 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006068 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006069
6070 RDEPENDS_${PN} = "package (operator version)"
6071
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006072 For ``operator``, you can specify the following:
6073
6074 - =
6075 - <
6076 - >
6077 - <=
6078 - >=
6079
6080 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006081
6082 .. note::
6083
Andrew Geissler09036742021-06-25 14:25:14 -05006084 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006085 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006086
6087 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006088 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006089
6090 RDEPENDS_${PN} = "foo (>= 1.2)"
6091
6092 For information on build-time dependencies, see the
6093 :term:`DEPENDS` variable. You can also see the
6094 ":ref:`Tasks <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks>`" and
6095 ":ref:`Dependencies <bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies>`" sections in the
6096 BitBake User Manual for additional information on tasks and
6097 dependencies.
6098
Andrew Geisslerf0343792020-11-18 10:42:21 -06006099 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006100 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006101 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006102 class, this variable identifies distribution features that must exist
6103 in the current configuration in order for the OpenEmbedded build
6104 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006105 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6106 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006107 the recipe will be skipped, and if the build system attempts to build
6108 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006109
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006110 :term:`REQUIRED_VERSION`
6111 If there are multiple versions of a recipe available, this variable
6112 determines which version should be given preference.
6113 :term:`REQUIRED_VERSION` works in exactly the same manner as
6114 :term:`PREFERRED_VERSION`, except that if the specified version is not
6115 available then an error message is shown and the build fails
6116 immediately.
6117
6118 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6119 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6120
Andrew Geisslerf0343792020-11-18 10:42:21 -06006121 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006122 With ``rm_work`` enabled, this variable specifies a list of recipes
6123 whose work directories should not be removed. See the
6124 ":ref:`rm_work.bbclass <ref-classes-rm-work>`" section for more
6125 details.
6126
Andrew Geisslerf0343792020-11-18 10:42:21 -06006127 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006129 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006130
6131 ROOT_HOME ??= "/home/root"
6132
6133 .. note::
6134
6135 This default value is likely used because some embedded solutions
6136 prefer to have a read-only root filesystem and prefer to keep
6137 writeable data in one place.
6138
6139 You can override the default by setting the variable in any layer or
6140 in the ``local.conf`` file. Because the default is set using a "weak"
6141 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006142 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006143
6144 ROOT_HOME = "/root"
6145 ROOT_HOME ?= "/root"
6146
6147 These
6148 override examples use ``/root``, which is probably the most commonly
6149 used override.
6150
Andrew Geisslerf0343792020-11-18 10:42:21 -06006151 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006152 Indicates a filesystem image to include as the root filesystem.
6153
Andrew Geissler09036742021-06-25 14:25:14 -05006154 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006155 :ref:`image-live <ref-classes-image-live>` class.
6156
Andrew Geisslerf0343792020-11-18 10:42:21 -06006157 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006158 Specifies a list of functions to call after the OpenEmbedded build
6159 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006160 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006161
6162 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6163
6164 If you need to pass the root filesystem path to a command within a
6165 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6166 directory that becomes the root filesystem image. See the
6167 :term:`IMAGE_ROOTFS` variable for more
6168 information.
6169
Andrew Geisslerf0343792020-11-18 10:42:21 -06006170 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006171 Specifies a list of functions to call once the OpenEmbedded build
6172 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006173 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006174
6175 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6176
6177 If you need to pass the root filesystem path to a command within a
6178 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6179 directory that becomes the root filesystem image. See the
6180 :term:`IMAGE_ROOTFS` variable for more
6181 information.
6182
Andrew Geisslerf0343792020-11-18 10:42:21 -06006183 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006184 Specifies a list of functions to call after the OpenEmbedded build
6185 system has removed unnecessary packages. When runtime package
6186 management is disabled in the image, several packages are removed
6187 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006188 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006189
6190 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6191
6192 If you need to pass the root filesystem path to a command within a
6193 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6194 directory that becomes the root filesystem image. See the
6195 :term:`IMAGE_ROOTFS` variable for more
6196 information.
6197
Andrew Geisslerf0343792020-11-18 10:42:21 -06006198 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006199 Specifies a list of functions to call before the OpenEmbedded build
6200 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006201 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006202
6203 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6204
6205 If you need to pass the root filesystem path to a command within a
6206 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6207 directory that becomes the root filesystem image. See the
6208 :term:`IMAGE_ROOTFS` variable for more
6209 information.
6210
Andrew Geisslerf0343792020-11-18 10:42:21 -06006211 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006212 A list of package name aliases that a package also provides. These
6213 aliases are useful for satisfying runtime dependencies of other
6214 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006215 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006216
6217 .. note::
6218
Andrew Geissler09036742021-06-25 14:25:14 -05006219 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006220
6221 As with all package-controlling variables, you must always use the
6222 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006223 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006224
6225 RPROVIDES_${PN} = "widget-abi-2"
6226
Andrew Geisslerf0343792020-11-18 10:42:21 -06006227 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006228 A list of packages that extends the usability of a package being
6229 built. The package being built does not depend on this list of
6230 packages in order to successfully build, but rather uses them for
6231 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006232 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006233
Andrew Geissler09036742021-06-25 14:25:14 -05006234 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006235 list of packages when installing the built package. However, you can
6236 prevent listed packages from being installed by using the
6237 :term:`BAD_RECOMMENDATIONS`,
6238 :term:`NO_RECOMMENDATIONS`, and
6239 :term:`PACKAGE_EXCLUDE` variables.
6240
Andrew Geissler09036742021-06-25 14:25:14 -05006241 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006242 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006243 through the :term:`PACKAGES` or
6244 :term:`PACKAGES_DYNAMIC` variables or the
6245 :term:`RPROVIDES` variable, or an error will occur
6246 during the build. If such a recipe does exist and the package is not
6247 produced, the build continues without error.
6248
Andrew Geissler09036742021-06-25 14:25:14 -05006249 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006250 you should always attach an override to the variable to specify the
6251 particular package whose usability is being extended. For example,
6252 suppose you are building a development package that is extended to
6253 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006254 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006255
6256 RRECOMMENDS_${PN}-dev += "wireless_package_name"
6257
6258 In the
6259 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006260 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006261 by classes such as ``debian.bbclass``.
6262
6263 BitBake, which the OpenEmbedded build system uses, supports
6264 specifying versioned recommends. Although the syntax varies depending
6265 on the packaging format, BitBake hides these differences from you.
6266 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006267 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006268
6269 RRECOMMENDS_${PN} = "package (operator version)"
6270
6271 For ``operator``, you can specify the following:
6272
6273 - =
6274 - <
6275 - >
6276 - <=
6277 - >=
6278
6279 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006280 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006281
6282 RRECOMMENDS_${PN} = "foo (>= 1.2)"
6283
Andrew Geisslerf0343792020-11-18 10:42:21 -06006284 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006285 A list of packages replaced by a package. The package manager uses
6286 this variable to determine which package should be installed to
6287 replace other package(s) during an upgrade. In order to also have the
6288 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006289 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006290
6291 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006292 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006293
6294 RREPLACES_${PN} = "other_package_being_replaced"
6295
6296 BitBake, which the OpenEmbedded build system uses, supports
6297 specifying versioned replacements. Although the syntax varies
6298 depending on the packaging format, BitBake hides these differences
6299 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006300 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006301
6302 RREPLACES_${PN} = "package (operator version)"
6303
6304 For ``operator``, you can specify the following:
6305
6306 - =
6307 - <
6308 - >
6309 - <=
6310 - >=
6311
6312 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006313 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006314
6315 RREPLACES_${PN} = "foo (>= 1.2)"
6316
Andrew Geisslerf0343792020-11-18 10:42:21 -06006317 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006318 A list of additional packages that you can suggest for installation
6319 by the package manager at the time a package is installed. Not all
6320 package managers support this functionality.
6321
6322 As with all package-controlling variables, you must always use this
6323 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006324 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006325
6326 RSUGGESTS_${PN} = "useful_package another_package"
6327
Andrew Geisslerf0343792020-11-18 10:42:21 -06006328 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006329 The location in the :term:`Build Directory` where
6330 unpacked recipe source code resides. By default, this directory is
6331 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6332 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6333 version. If the source tarball extracts the code to a directory named
6334 anything other than ``${BPN}-${PV}``, or if the source code is
6335 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006336 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006337 to find the unpacked source.
6338
6339 As an example, assume a :term:`Source Directory`
6340 top-level folder named ``poky`` and a default Build Directory at
6341 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006342 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006343
6344 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6345
6346 The unpacked source code resides in the ``db-5.1.19`` folder.
6347
6348 This next example assumes a Git repository. By default, Git
6349 repositories are cloned to ``${WORKDIR}/git`` during
6350 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006351 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006352 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006353
6354 SRC_URI = "git://path/to/repo.git"
6355 S = "${WORKDIR}/git"
6356
Andrew Geisslerf0343792020-11-18 10:42:21 -06006357 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006358 Specifies a list of command-line utilities that should be checked for
6359 during the initial sanity checking process when running BitBake. If
6360 any of the utilities are not installed on the build host, then
6361 BitBake immediately exits with an error.
6362
Andrew Geisslerf0343792020-11-18 10:42:21 -06006363 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006364 A list of the host distribution identifiers that the build system has
6365 been tested against. Identifiers consist of the host distributor ID
6366 followed by the release, as reported by the ``lsb_release`` tool or
6367 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006368 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006369 not empty and the current value of
6370 :term:`NATIVELSBSTRING` does not appear in the
6371 list, then the build system reports a warning that indicates the
6372 current host distribution has not been tested as a build host.
6373
Andrew Geisslerf0343792020-11-18 10:42:21 -06006374 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006375 The target architecture for the SDK. Typically, you do not directly
6376 set this variable. Instead, use :term:`SDKMACHINE`.
6377
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006378 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006379 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006380 "1" and a ``conf/templateconf.conf`` file exists in the build directory
6381 (:term:`TOPDIR`) then this will be copied into the SDK.
6382
Andrew Geisslerf0343792020-11-18 10:42:21 -06006383 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384 The directory set up and used by the
6385 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6386 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006387 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006388
6389 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6390
Andrew Geisslerf0343792020-11-18 10:42:21 -06006391 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006392 The parent directory used by the OpenEmbedded build system when
6393 creating SDK output. The
6394 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006395 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006396
6397 SDK_DIR = "${WORKDIR}/sdk"
6398
6399 .. note::
6400
Andrew Geissler09036742021-06-25 14:25:14 -05006401 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6402 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006403
Andrew Geisslerf0343792020-11-18 10:42:21 -06006404 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006405 Controls whether or not shared state artifacts are copied into the
6406 extensible SDK. The default value of "full" copies all of the
6407 required shared state artifacts into the extensible SDK. The value
6408 "minimal" leaves these artifacts out of the SDK.
6409
6410 .. note::
6411
6412 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006413 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6414 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006415
Andrew Geisslerf0343792020-11-18 10:42:21 -06006416 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006417 The manifest file for the host part of the SDK. This file lists all
6418 the installed packages that make up the host part of the SDK. The
6419 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006420 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006421
6422 packagename packagearch version
6423
6424 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006425 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006426
6427 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6428
6429 The location is derived using the :term:`SDK_DEPLOY` and
6430 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6431
Andrew Geisslerf0343792020-11-18 10:42:21 -06006432 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006433 When set to "1", specifies to include the packagedata for all recipes
6434 in the "world" target in the extensible SDK. Including this data
6435 allows the ``devtool search`` command to find these recipes in search
6436 results, as well as allows the ``devtool add`` command to map
6437 dependencies more effectively.
6438
6439 .. note::
6440
Andrew Geissler09036742021-06-25 14:25:14 -05006441 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006442 variable significantly increases build time because all of world
6443 needs to be built. Enabling the variable also slightly increases
6444 the size of the extensible SDK.
6445
Andrew Geisslerf0343792020-11-18 10:42:21 -06006446 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006447 When set to "1", specifies to include the toolchain in the extensible
6448 SDK. Including the toolchain is useful particularly when
6449 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6450 the SDK reasonably small but you still want to provide a usable
6451 toolchain. For example, suppose you want to use the toolchain from an
6452 IDE or from other tools and you do not want to perform additional
6453 steps to install the toolchain.
6454
Andrew Geissler09036742021-06-25 14:25:14 -05006455 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6456 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6457 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006458
Andrew Geisslerf0343792020-11-18 10:42:21 -06006459 :term:`SDK_INHERIT_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006460 A list of classes to remove from the :term:`INHERIT`
6461 value globally within the extensible SDK configuration. The
6462 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006463 default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006464
6465 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
6466
6467 Some classes are not generally applicable within the extensible SDK
6468 context. You can use this variable to disable those classes.
6469
6470 For additional information on how to customize the extensible SDK's
6471 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006472 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006473 section in the Yocto Project Application Development and the
6474 Extensible Software Development Kit (eSDK) manual.
6475
Andrew Geisslerf0343792020-11-18 10:42:21 -06006476 :term:`SDK_LOCAL_CONF_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006477 A list of variables not allowed through from the OpenEmbedded build
6478 system configuration into the extensible SDK configuration. Usually,
6479 these are variables that are specific to the machine on which the
6480 build system is running and thus would be potentially problematic
6481 within the extensible SDK.
6482
Andrew Geissler09036742021-06-25 14:25:14 -05006483 By default, :term:`SDK_LOCAL_CONF_BLACKLIST` is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006484 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
6485 excludes the following variables:
6486
6487 - :term:`CONF_VERSION`
6488 - :term:`BB_NUMBER_THREADS`
6489 - :term:`bitbake:BB_NUMBER_PARSE_THREADS`
6490 - :term:`PARALLEL_MAKE`
6491 - :term:`PRSERV_HOST`
6492 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
6493 - :term:`SSTATE_DIR` :term:`TMPDIR`
6494 - :term:`BB_SERVER_TIMEOUT`
6495
6496 For additional information on how to customize the extensible SDK's
6497 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006498 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006499 section in the Yocto Project Application Development and the
6500 Extensible Software Development Kit (eSDK) manual.
6501
Andrew Geisslerf0343792020-11-18 10:42:21 -06006502 :term:`SDK_LOCAL_CONF_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006503 A list of variables allowed through from the OpenEmbedded build
6504 system configuration into the extensible SDK configuration. By
6505 default, the list of variables is empty and is set in the
6506 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
6507
6508 This list overrides the variables specified using the
6509 :term:`SDK_LOCAL_CONF_BLACKLIST`
6510 variable as well as any variables identified by automatic
6511 blacklisting due to the "/" character being found at the start of the
6512 value, which is usually indicative of being a path and thus might not
6513 be valid on the system where the SDK is installed.
6514
6515 For additional information on how to customize the extensible SDK's
6516 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006517 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006518 section in the Yocto Project Application Development and the
6519 Extensible Software Development Kit (eSDK) manual.
6520
Andrew Geisslerf0343792020-11-18 10:42:21 -06006521 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006522 The base name for SDK output files. The name is derived from the
6523 :term:`DISTRO`, :term:`TCLIBC`,
6524 :term:`SDK_ARCH`,
6525 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006526 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006527
6528 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6529
Andrew Geisslerf0343792020-11-18 10:42:21 -06006530 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006531 Specifies the operating system for which the SDK will be built. The
6532 default value is the value of :term:`BUILD_OS`.
6533
Andrew Geisslerf0343792020-11-18 10:42:21 -06006534 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006535 The location used by the OpenEmbedded build system when creating SDK
6536 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006537 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006538
6539 SDK_DIR = "${WORKDIR}/sdk"
6540 SDK_OUTPUT = "${SDK_DIR}/image"
6541 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6542
6543 .. note::
6544
Andrew Geissler09036742021-06-25 14:25:14 -05006545 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006546 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6547 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006548
Andrew Geisslerf0343792020-11-18 10:42:21 -06006549 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006550 Specifies a list of architectures compatible with the SDK machine.
6551 This variable is set automatically and should not normally be
6552 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006553 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006554 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6555
Andrew Geisslerf0343792020-11-18 10:42:21 -06006556 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006557 Specifies a list of functions to call once the OpenEmbedded build
6558 system creates the SDK. You can specify functions separated by
6559 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6560
6561 If you need to pass an SDK path to a command within a function, you
6562 can use ``${SDK_DIR}``, which points to the parent directory used by
6563 the OpenEmbedded build system when creating SDK output. See the
6564 :term:`SDK_DIR` variable for more information.
6565
Andrew Geisslerf0343792020-11-18 10:42:21 -06006566 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006568 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006569 :term:`TARGET_PREFIX` when building
6570 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6571
Andrew Geisslerf0343792020-11-18 10:42:21 -06006572 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006573 A list of shared state tasks added to the extensible SDK. By default,
6574 the following tasks are added:
6575
6576 - do_populate_lic
6577 - do_package_qa
6578 - do_populate_sysroot
6579 - do_deploy
6580
6581 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006582 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006583 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006584 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006585 tasks that are needed in order to build
6586 :term:`SDK_TARGETS`).
6587
Andrew Geisslerf0343792020-11-18 10:42:21 -06006588 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006589 Specifies the system, including the architecture and the operating
6590 system, for which the SDK will be built.
6591
6592 The OpenEmbedded build system automatically sets this variable based
6593 on :term:`SDK_ARCH`,
6594 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006595 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006596 variable yourself.
6597
Andrew Geisslerf0343792020-11-18 10:42:21 -06006598 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006599 The manifest file for the target part of the SDK. This file lists all
6600 the installed packages that make up the target part of the SDK. The
6601 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006602 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006603
6604 packagename packagearch version
6605
6606 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006607 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006608
6609 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6610
6611 The location is derived using the :term:`SDK_DEPLOY` and
6612 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6613
Andrew Geisslerf0343792020-11-18 10:42:21 -06006614 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006615 A list of targets to install from shared state as part of the
6616 standard or extensible SDK installation. The default value is "${PN}"
6617 (i.e. the image from which the SDK is built).
6618
Andrew Geissler09036742021-06-25 14:25:14 -05006619 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006620 would not be changed.
6621
Andrew Geisslerf0343792020-11-18 10:42:21 -06006622 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006623 The title to be printed when running the SDK installer. By default,
6624 this title is based on the :term:`DISTRO_NAME` or
6625 :term:`DISTRO` variable and is set in the
6626 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006627 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006628
6629 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6630
6631 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006632 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006633
6634 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006635 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006636 section in the Yocto Project Application Development and the
6637 Extensible Software Development Kit (eSDK) manual.
6638
Andrew Geisslerf0343792020-11-18 10:42:21 -06006639 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006640 An optional URL for an update server for the extensible SDK. If set,
6641 the value is used as the default update server when running
6642 ``devtool sdk-update`` within the extensible SDK.
6643
Andrew Geisslerf0343792020-11-18 10:42:21 -06006644 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006645 Specifies the name of the SDK vendor.
6646
Andrew Geisslerf0343792020-11-18 10:42:21 -06006647 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006648 Specifies the version of the SDK. The Poky distribution configuration file
6649 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006650 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006651
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006652 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006653
6654 For additional information, see the
6655 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006656 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006657
Andrew Geisslerf0343792020-11-18 10:42:21 -06006658 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006659 The default installation directory for the Extensible SDK. By
6660 default, this directory is based on the :term:`DISTRO`
6661 variable and is set in the
6662 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006663 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006664
6665 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6666
6667 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006668 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006669
6670 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006671 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006672 section in the Yocto Project Application Development and the
6673 Extensible Software Development Kit (eSDK) manual.
6674
Andrew Geisslerf0343792020-11-18 10:42:21 -06006675 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006676 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006677 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006678
6679 $ bitbake -c populate_sdk imagename
6680
Andrew Geisslerf0343792020-11-18 10:42:21 -06006681 :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006682 The machine for which the SDK is built. In other words, the SDK is
6683 built such that it runs on the target you specify with the
Andrew Geissler09036742021-06-25 14:25:14 -05006684 :term:`SDKMACHINE` value. The value points to a corresponding ``.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006685 file under ``conf/machine-sdk/``.
6686
6687 You can use "i686" and "x86_64" as possible values for this variable.
6688 The variable defaults to "i686" and is set in the local.conf file in
6689 the Build Directory.
6690 ::
6691
6692 SDKMACHINE ?= "i686"
6693
6694 .. note::
6695
Andrew Geissler09036742021-06-25 14:25:14 -05006696 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006697 variable in your distribution configuration file. If you do, the
6698 configuration will not take affect.
6699
Andrew Geisslerf0343792020-11-18 10:42:21 -06006700 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006701 Defines the path offered to the user for installation of the SDK that
6702 is generated by the OpenEmbedded build system. The path appears as
6703 the default location for installing the SDK when you run the SDK's
6704 installation script. You can override the offered path when you run
6705 the script.
6706
Andrew Geisslerf0343792020-11-18 10:42:21 -06006707 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006708 The full path to the sysroot used for cross-compilation within an SDK
6709 as it will be when installed into the default
6710 :term:`SDKPATH`.
6711
Andrew Geisslerf0343792020-11-18 10:42:21 -06006712 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006713 The section in which packages should be categorized. Package
6714 management utilities can make use of this variable.
6715
Andrew Geisslerf0343792020-11-18 10:42:21 -06006716 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006717 Specifies the optimization flags passed to the C compiler when
6718 building for the target. The flags are passed through the default
6719 value of the :term:`TARGET_CFLAGS` variable.
6720
Andrew Geissler09036742021-06-25 14:25:14 -05006721 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006722 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6723 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006724
Andrew Geisslerf0343792020-11-18 10:42:21 -06006725 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006726 Defines a serial console (TTY) to enable using
6727 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6728 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006729 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006730
6731 SERIAL_CONSOLE = "115200 ttyS0"
6732
6733 .. note::
6734
Andrew Geissler09036742021-06-25 14:25:14 -05006735 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006736 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006737
Andrew Geisslerf0343792020-11-18 10:42:21 -06006738 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006739 Defines a serial console (TTY) to enable using
6740 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6741 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006742 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006743
6744 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6745
Andrew Geisslerf0343792020-11-18 10:42:21 -06006746 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006747 Specifies serial consoles, which must be listed in
6748 :term:`SERIAL_CONSOLES`, to check against
6749 ``/proc/console`` before enabling them using getty. This variable
6750 allows aliasing in the format: <device>:<alias>. If a device was
6751 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006752 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006753
6754 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6755
6756 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006757 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6758 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6759 incompatible with customizations such as the following::
6760
6761 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006762
Andrew Geisslerf0343792020-11-18 10:42:21 -06006763 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006764 A list of recipe dependencies that should not be used to determine
6765 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006766 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767
6768 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6769
6770 In the previous example, ``intone`` depends on ``mplayer2``.
6771
6772 You can use the special token ``"*"`` on the left-hand side of the
6773 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006774 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006775
6776 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6777
6778 In the previous example, all recipes except ``quilt-native`` ignore
6779 task signatures from the ``quilt-native`` recipe when determining
6780 their task signatures.
6781
6782 Use of this variable is one mechanism to remove dependencies that
6783 affect task signatures and thus force rebuilds when a recipe changes.
6784
6785 .. note::
6786
6787 If you add an inappropriate dependency for a recipe relationship,
6788 the software might break during runtime if the interface of the
6789 second recipe was changed after the first recipe had been built.
6790
Andrew Geisslerf0343792020-11-18 10:42:21 -06006791 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006792 A list of recipes that are completely stable and will never change.
6793 The ABI for the recipes in the list are presented by output from the
6794 tasks run to build the recipe. Use of this variable is one way to
6795 remove dependencies from one recipe on another that affect task
6796 signatures and thus force rebuilds when the recipe changes.
6797
6798 .. note::
6799
6800 If you add an inappropriate variable to this list, the software
6801 might break at runtime if the interface of the recipe was changed
6802 after the other had been built.
6803
Andrew Geisslerf0343792020-11-18 10:42:21 -06006804 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006805 Specifies the number of bits for the target system CPU. The value
6806 should be either "32" or "64".
6807
Andrew Geisslerf0343792020-11-18 10:42:21 -06006808 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006809 Specifies the endian byte order of the target system. The value
6810 should be either "le" for little-endian or "be" for big-endian.
6811
Andrew Geisslerf0343792020-11-18 10:42:21 -06006812 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006813 Enables removal of all files from the "Provides" section of an RPM
6814 package. Removal of these files is required for packages containing
6815 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6816
6817 To enable file removal, set the variable to "1" in your
6818 ``conf/local.conf`` configuration file in your:
6819 :term:`Build Directory`.
6820 ::
6821
6822 SKIP_FILEDEPS = "1"
6823
Andrew Geisslerf0343792020-11-18 10:42:21 -06006824 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006825 Groups together machines based upon the same family of SOC (System On
6826 Chip). You typically set this variable in a common ``.inc`` file that
6827 you include in the configuration files of all the machines.
6828
6829 .. note::
6830
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006831 You must include ``conf/machine/include/soc-family.inc`` for this
6832 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006833
Andrew Geisslerf0343792020-11-18 10:42:21 -06006834 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006835 Defines the suffix for shared libraries used on the target platform.
6836 By default, this suffix is ".so.*" for all Linux-based systems and is
6837 defined in the ``meta/conf/bitbake.conf`` configuration file.
6838
6839 You will see this variable referenced in the default values of
6840 ``FILES_${PN}``.
6841
Andrew Geisslerf0343792020-11-18 10:42:21 -06006842 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006843 Defines the suffix for the development symbolic link (symlink) for
6844 shared libraries on the target platform. By default, this suffix is
6845 ".so" for Linux-based systems and is defined in the
6846 ``meta/conf/bitbake.conf`` configuration file.
6847
6848 You will see this variable referenced in the default values of
6849 ``FILES_${PN}-dev``.
6850
Andrew Geisslerf0343792020-11-18 10:42:21 -06006851 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006852 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05006853 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006854 your ``local.conf`` configuration file ensures the source for all
6855 recipes are fetched regardless of whether or not a recipe is
6856 compatible with the configuration. A recipe is considered
6857 incompatible with the currently configured machine when either or
6858 both the :term:`COMPATIBLE_MACHINE`
6859 variable and :term:`COMPATIBLE_HOST` variables
6860 specify compatibility with a machine other than that of the current
6861 machine or host.
6862
6863 .. note::
6864
Andrew Geissler09036742021-06-25 14:25:14 -05006865 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006866 variable unless you are creating a source mirror. In other words,
6867 do not set the variable during a normal build.
6868
Andrew Geisslerf0343792020-11-18 10:42:21 -06006869 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006870 Defines your own :term:`PREMIRRORS` from which to
6871 first fetch source before attempting to fetch from the upstream
6872 specified in :term:`SRC_URI`.
6873
6874 To use this variable, you must globally inherit the
6875 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05006876 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006877
6878 INHERIT += "own-mirrors"
6879 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
6880
6881 .. note::
6882
Andrew Geissler09036742021-06-25 14:25:14 -05006883 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006884
Andrew Geisslerf0343792020-11-18 10:42:21 -06006885 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006886 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05006887 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006888 mappings, see the ``meta/conf/licenses.conf`` file.
6889
6890 For additional information, see the :term:`LICENSE`
6891 variable.
6892
Andrew Geisslerf0343792020-11-18 10:42:21 -06006893 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006894 A list of prefixes for :term:`PN` used by the OpenEmbedded
6895 build system to create variants of recipes or packages. The list
6896 specifies the prefixes to strip off during certain circumstances such
6897 as the generation of the :term:`BPN` variable.
6898
Andrew Geisslerf0343792020-11-18 10:42:21 -06006899 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006900 The file type for the Secondary Program Loader (SPL). Some devices
6901 use an SPL from which to boot (e.g. the BeagleBone development
6902 board). For such cases, you can declare the file type of the SPL
6903 binary in the ``u-boot.inc`` include file, which is used in the
6904 U-Boot recipe.
6905
6906 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05006907 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006908
6909 # Some versions of u-boot build an SPL (Second Program Loader) image that
6910 # should be packaged along with the u-boot binary as well as placed in the
6911 # deploy directory. For those versions they can set the following variables
6912 # to allow packaging the SPL.
6913 SPL_BINARY ?= ""
6914 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
6915 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
6916 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
6917
Andrew Geissler09036742021-06-25 14:25:14 -05006918 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919 various ``SPL_*`` variables used by the OpenEmbedded build system.
6920
6921 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006922 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006923 section in the Yocto Project Board Support Package Developer's Guide
6924 for additional information.
6925
Andrew Geisslerf0343792020-11-18 10:42:21 -06006926 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006927 The list of source files - local or remote. This variable tells the
6928 OpenEmbedded build system which bits to pull in for the build and how
6929 to pull them in. For example, if the recipe or append file only needs
6930 to fetch a tarball from the Internet, the recipe or append file uses
Andrew Geissler09036742021-06-25 14:25:14 -05006931 a single :term:`SRC_URI` entry. On the other hand, if the recipe or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006932 append file needs to fetch a tarball, apply two patches, and include
6933 a custom file, the recipe or append file would include four instances
6934 of the variable.
6935
6936 The following list explains the available URI protocols. URI
6937 protocols are highly dependent on particular BitBake Fetcher
6938 submodules. Depending on the fetcher BitBake uses, various URL
6939 parameters are employed. For specifics on the supported Fetchers, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06006940 the ":ref:`Fetchers <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`" section in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006941 BitBake User Manual.
6942
6943 - ``file://`` - Fetches files, which are usually files shipped
6944 with the :term:`Metadata`, from the local machine (e.g.
Andrew Geissler09209ee2020-12-13 08:44:15 -06006945 :ref:`patch <overview-manual/concepts:patching>` files).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006946 The path is relative to the :term:`FILESPATH`
6947 variable. Thus, the build system searches, in order, from the
6948 following directories, which are assumed to be a subdirectories of
6949 the directory in which the recipe file (``.bb``) or append file
6950 (``.bbappend``) resides:
6951
6952 - ``${BPN}`` - The base recipe name without any special suffix
6953 or version numbers.
6954
6955 - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and
6956 version but without any special package name suffix.
6957
6958 - *files -* Files within a directory, which is named ``files``
6959 and is also alongside the recipe or append file.
6960
6961 .. note::
6962
6963 If you want the build system to pick up files specified through
6964 a
6965 SRC_URI
6966 statement from your append file, you need to be sure to extend
6967 the
6968 FILESPATH
6969 variable by also using the
6970 FILESEXTRAPATHS
6971 variable from within your append file.
6972
6973 - ``bzr://`` - Fetches files from a Bazaar revision control
6974 repository.
6975
6976 - ``git://`` - Fetches files from a Git revision control
6977 repository.
6978
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006979 - ``osc://`` - Fetches files from an OSC (openSUSE Build service)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006980 revision control repository.
6981
6982 - ``repo://`` - Fetches files from a repo (Git) repository.
6983
6984 - ``ccrc://`` - Fetches files from a ClearCase repository.
6985
6986 - ``http://`` - Fetches files from the Internet using ``http``.
6987
6988 - ``https://`` - Fetches files from the Internet using ``https``.
6989
6990 - ``ftp://`` - Fetches files from the Internet using ``ftp``.
6991
6992 - ``cvs://`` - Fetches files from a CVS revision control
6993 repository.
6994
6995 - ``hg://`` - Fetches files from a Mercurial (``hg``) revision
6996 control repository.
6997
6998 - ``p4://`` - Fetches files from a Perforce (``p4``) revision
6999 control repository.
7000
7001 - ``ssh://`` - Fetches files from a secure shell.
7002
7003 - ``svn://`` - Fetches files from a Subversion (``svn``) revision
7004 control repository.
7005
7006 - ``npm://`` - Fetches JavaScript modules from a registry.
7007
Andrew Geissler95ac1b82021-03-31 14:34:31 -05007008 - ``az://`` - Fetches files from an Azure Storage account.
7009
Andrew Geissler09036742021-06-25 14:25:14 -05007010 There are standard and recipe-specific options for :term:`SRC_URI`. Here are
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007011 standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007012
7013 - ``apply`` - Whether to apply the patch or not. The default
7014 action is to apply the patch.
7015
7016 - ``striplevel`` - Which striplevel to use when applying the
7017 patch. The default level is 1.
7018
7019 - ``patchdir`` - Specifies the directory in which the patch should
7020 be applied. The default is ``${``\ :term:`S`\ ``}``.
7021
7022 Here are options specific to recipes building code from a revision
7023 control system:
7024
7025 - ``mindate`` - Apply the patch only if
7026 :term:`SRCDATE` is equal to or greater than
7027 ``mindate``.
7028
Andrew Geissler09036742021-06-25 14:25:14 -05007029 - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007030 than ``maxdate``.
7031
Andrew Geissler09036742021-06-25 14:25:14 -05007032 - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007033 greater than ``minrev``.
7034
Andrew Geissler09036742021-06-25 14:25:14 -05007035 - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007036 than ``maxrev``.
7037
Andrew Geissler09036742021-06-25 14:25:14 -05007038 - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007039 ``rev``.
7040
Andrew Geissler09036742021-06-25 14:25:14 -05007041 - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007042 ``rev``.
7043
7044 Here are some additional options worth mentioning:
7045
7046 - ``unpack`` - Controls whether or not to unpack the file if it is
7047 an archive. The default action is to unpack the file.
7048
7049 - ``destsuffix`` - Places the file (or extracts its contents) into
7050 the specified subdirectory of :term:`WORKDIR` when
7051 the Git fetcher is used.
7052
7053 - ``subdir`` - Places the file (or extracts its contents) into the
Andrew Geissler09036742021-06-25 14:25:14 -05007054 specified subdirectory of :term:`WORKDIR` when the local (``file://``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007055 fetcher is used.
7056
7057 - ``localdir`` - Places the file (or extracts its contents) into
Andrew Geissler09036742021-06-25 14:25:14 -05007058 the specified subdirectory of :term:`WORKDIR` when the CVS fetcher is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007059 used.
7060
7061 - ``subpath`` - Limits the checkout to a specific subpath of the
7062 tree when using the Git fetcher is used.
7063
7064 - ``name`` - Specifies a name to be used for association with
Andrew Geissler09036742021-06-25 14:25:14 -05007065 :term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one
7066 file or git repository specified in :term:`SRC_URI`. For example::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007067
7068 SRC_URI = "git://example.com/foo.git;name=first \
7069 git://example.com/bar.git;name=second \
7070 http://example.com/file.tar.gz;name=third"
7071
7072 SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
7073 SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
7074 SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
7075
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007076
7077 - ``downloadfilename`` - Specifies the filename used when storing
7078 the downloaded file.
7079
Andrew Geisslerf0343792020-11-18 10:42:21 -06007080 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007081 By default, the OpenEmbedded build system automatically detects
7082 whether ``SRC_URI`` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007083 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007084 variable to "0" disables this behavior.
7085
Andrew Geisslerf0343792020-11-18 10:42:21 -06007086 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007087 The date of the source code used to build the package. This variable
7088 applies only if the source was fetched from a Source Code Manager
7089 (SCM).
7090
Andrew Geisslerf0343792020-11-18 10:42:21 -06007091 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007092 Returns the version string of the current package. This string is
7093 used to help define the value of :term:`PV`.
7094
Andrew Geissler09036742021-06-25 14:25:14 -05007095 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007096 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007097 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007098
7099 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7100
Andrew Geissler09036742021-06-25 14:25:14 -05007101 Recipes that need to define :term:`PV` do so with the help of the
7102 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007103 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007104 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007105
7106 PV = "0.12-git${SRCPV}"
7107
Andrew Geisslerf0343792020-11-18 10:42:21 -06007108 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007109 The revision of the source code used to build the package. This
7110 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7111 that if you want to build a fixed revision and you want to avoid
7112 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007113 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007114 identifier and not just a tag.
7115
7116 .. note::
7117
7118 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007119 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007120 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007121 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007122 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007123
Andrew Geissler09036742021-06-25 14:25:14 -05007124 :term:`SRCTREECOVEREDTASKS`
7125 A list of tasks that are typically not relevant (and therefore skipped)
7126 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7127 class. The default value as set in that class file is the set of tasks
7128 that are rarely needed when using external source::
7129
7130 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7131
7132 The notable exception is when processing external kernel source as
7133 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7134 class file (formatted for aesthetics)::
7135
7136 SRCTREECOVEREDTASKS += "\
7137 do_validate_branches \
7138 do_kernel_configcheck \
7139 do_kernel_checkout \
7140 do_fetch \
7141 do_unpack \
7142 do_patch \
7143 "
7144
7145 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7146 variables for more information.
7147
Andrew Geisslerf0343792020-11-18 10:42:21 -06007148 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007149 The directory for the shared state cache.
7150
Andrew Geisslerf0343792020-11-18 10:42:21 -06007151 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007152 If set to "1", allows fetches from mirrors that are specified in
7153 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007154 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7155 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7156 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007157 your shared state cache, but you want to disable any other fetching
7158 from the network.
7159
Andrew Geisslerf0343792020-11-18 10:42:21 -06007160 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007161 Configures the OpenEmbedded build system to search other mirror
7162 locations for prebuilt cache data objects before building out the
7163 data. This variable works like fetcher :term:`MIRRORS`
7164 and :term:`PREMIRRORS` and points to the cache
7165 locations to check for the shared state (sstate) objects.
7166
7167 You can specify a filesystem directory or a remote URL such as HTTP
7168 or FTP. The locations you specify need to contain the shared state
7169 cache (sstate-cache) results from previous builds. The sstate-cache
7170 you point to can also be from builds on other machines.
7171
7172 When pointing to sstate build artifacts on another machine that uses
7173 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007174 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007175 paths to server paths. The paths need to take into account
7176 :term:`NATIVELSBSTRING` set by the
7177 :ref:`uninative <ref-classes-uninative>` class. For example, the
7178 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007179 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007180
7181 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n"
7182
7183 If a mirror uses the same structure as
7184 :term:`SSTATE_DIR`, you need to add "PATH" at the
7185 end as shown in the examples below. The build system substitutes the
7186 correct path within the directory structure.
7187 ::
7188
7189 SSTATE_MIRRORS ?= "\
7190 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
7191 file://.* file:///some-local-dir/sstate/PATH"
7192
Andrew Geisslerf0343792020-11-18 10:42:21 -06007193 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007194 Controls the list of files the OpenEmbedded build system scans for
7195 hardcoded installation paths. The variable uses a space-separated
7196 list of filenames (not paths) with standard wildcard characters
7197 allowed.
7198
7199 During a build, the OpenEmbedded build system creates a shared state
7200 (sstate) object during the first stage of preparing the sysroots.
7201 That object is scanned for hardcoded paths for original installation
7202 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007203 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7204 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007205 than the variable being comprehensively set. The
7206 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7207 of files.
7208
7209 For details on the process, see the
7210 :ref:`staging <ref-classes-staging>` class.
7211
Andrew Geisslerf0343792020-11-18 10:42:21 -06007212 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007213 Specifies the path to the ``/lib`` subdirectory of the sysroot
7214 directory for the build host.
7215
Andrew Geisslerf0343792020-11-18 10:42:21 -06007216 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007217 Specifies the path to the ``/lib`` subdirectory of the sysroot
7218 directory for the target for which the current recipe is being built
7219 (:term:`STAGING_DIR_HOST`).
7220
Andrew Geisslerf0343792020-11-18 10:42:21 -06007221 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007222 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7223 directory for the target for which the current recipe is being built
7224 (:term:`STAGING_DIR_HOST`).
7225
Andrew Geisslerf0343792020-11-18 10:42:21 -06007226 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007227 Specifies the path to the directory containing binary configuration
7228 scripts. These scripts provide configuration information for other
7229 software that wants to make use of libraries or include files
7230 provided by the software associated with the script.
7231
7232 .. note::
7233
7234 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007235 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7236 library to which you are linking, it is recommended you use
7237 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007238
Andrew Geisslerf0343792020-11-18 10:42:21 -06007239 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7241 directory for the build host.
7242
Andrew Geisslerf0343792020-11-18 10:42:21 -06007243 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007244 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7245 directory for the target for which the current recipe is being built
7246 (:term:`STAGING_DIR_HOST`).
7247
Andrew Geisslerf0343792020-11-18 10:42:21 -06007248 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007249 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7250 directory for the build host.
7251
Andrew Geisslerf0343792020-11-18 10:42:21 -06007252 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007253 Helps construct the ``recipe-sysroots`` directory, which is used
7254 during packaging.
7255
7256 For information on how staging for recipe-specific sysroots occurs,
7257 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007258 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007259 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007260 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007261 section in the Yocto Project Overview and Concepts Manual, and the
7262 :term:`SYSROOT_DIRS` variable.
7263
7264 .. note::
7265
Andrew Geissler09036742021-06-25 14:25:14 -05007266 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007267 directory because the OpenEmbedded build system manages the
7268 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007269 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007270 task and then the OpenEmbedded build system will stage a subset of
7271 those files into the sysroot.
7272
Andrew Geisslerf0343792020-11-18 10:42:21 -06007273 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007274 Specifies the path to the sysroot directory for the system on which
7275 the component is built to run (the system that hosts the component).
7276 For most recipes, this sysroot is the one in which that recipe's
7277 :ref:`ref-tasks-populate_sysroot` task copies
7278 files. Exceptions include ``-native`` recipes, where the
7279 ``do_populate_sysroot`` task instead uses
7280 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007281 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007282 have the following values:
7283
7284 - For recipes building for the target machine, the value is
7285 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7286
7287 - For native recipes building for the build host, the value is empty
7288 given the assumption that when building for the build host, the
7289 build host's own directories should be used.
7290
7291 .. note::
7292
7293 ``-native`` recipes are not installed into host paths like such
7294 as ``/usr``. Rather, these recipes are installed into
7295 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes,
7296 standard build environment variables such as
7297 :term:`CPPFLAGS` and
7298 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007299 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007300 headers using, for example, GCC's ``-isystem`` option.
7301
7302 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7303 should be viewed as input variables by tasks such as
7304 :ref:`ref-tasks-configure`,
7305 :ref:`ref-tasks-compile`, and
7306 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007307 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007308 for ``-native`` recipes, as they make use of host headers and
7309 libraries.
7310
Andrew Geisslerf0343792020-11-18 10:42:21 -06007311 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007312 Specifies the path to the sysroot directory used when building
7313 components that run on the build host itself.
7314
Andrew Geisslerf0343792020-11-18 10:42:21 -06007315 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007316 Specifies the path to the sysroot used for the system for which the
7317 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007318 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007319 :term:`STAGING_DIR_HOST`.
7320
7321 Some recipes build binaries that can run on the target system but
7322 those binaries in turn generate code for another different system
7323 (e.g. cross-canadian recipes). Using terminology from GNU, the
7324 primary system is referred to as the "HOST" and the secondary, or
7325 different, system is referred to as the "TARGET". Thus, the binaries
7326 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007327 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7328 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007329 sysroot used for the "TARGET" system.
7330
Andrew Geisslerf0343792020-11-18 10:42:21 -06007331 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007332 Specifies the path to the ``/etc`` subdirectory of the sysroot
7333 directory for the build host.
7334
Andrew Geisslerf0343792020-11-18 10:42:21 -06007335 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007336 Specifies the path to the ``/usr`` subdirectory of the sysroot
7337 directory for the target for which the current recipe is being built
7338 (:term:`STAGING_DIR_HOST`).
7339
Andrew Geisslerf0343792020-11-18 10:42:21 -06007340 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007341 Specifies the path to the ``/usr/include`` subdirectory of the
7342 sysroot directory for the target for which the current recipe being
7343 built (:term:`STAGING_DIR_HOST`).
7344
Andrew Geisslerf0343792020-11-18 10:42:21 -06007345 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007346 Specifies the path to the ``/usr/include`` subdirectory of the
7347 sysroot directory for the build host.
7348
Andrew Geisslerf0343792020-11-18 10:42:21 -06007349 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007350 Points to the directory containing the kernel build artifacts.
7351 Recipes building software that needs to access kernel build artifacts
7352 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007353 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007354 after the kernel has been built.
7355
Andrew Geisslerf0343792020-11-18 10:42:21 -06007356 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007357 The directory with kernel headers that are required to build
7358 out-of-tree modules.
7359
Andrew Geisslerf0343792020-11-18 10:42:21 -06007360 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007361 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7362 directory for the target for which the current recipe is being built
7363 (:term:`STAGING_DIR_HOST`).
7364
Andrew Geisslerf0343792020-11-18 10:42:21 -06007365 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007366 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7367 directory for the build host.
7368
Andrew Geisslerf0343792020-11-18 10:42:21 -06007369 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007370 Specifies the base path used to create recipe stamp files. The path
7371 to an actual stamp file is constructed by evaluating this string and
7372 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007373 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007374 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007375
7376 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7377
7378 For information on how BitBake uses stamp files to determine if a
7379 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007380 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007381 section in the Yocto Project Overview and Concepts Manual.
7382
7383 See :term:`STAMPS_DIR`,
7384 :term:`MULTIMACH_TARGET_SYS`,
7385 :term:`PN`, :term:`EXTENDPE`,
7386 :term:`PV`, and :term:`PR` for related variable
7387 information.
7388
Andrew Geisslerf0343792020-11-18 10:42:21 -06007389 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007390 Specifies the base directory in which the OpenEmbedded build system
7391 places stamps. The default directory is ``${TMPDIR}/stamps``.
7392
Andrew Geisslerf0343792020-11-18 10:42:21 -06007393 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007394 The minimal command and arguments to run ``strip``, which is used to
7395 strip symbols.
7396
Andrew Geisslerf0343792020-11-18 10:42:21 -06007397 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007398 The short (72 characters or less) summary of the binary package for
7399 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007400 :term:`SUMMARY` is used to define the
7401 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007402 not set in the recipe.
7403
Andrew Geisslerf0343792020-11-18 10:42:21 -06007404 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007405 The directory in which files checked out of a Subversion system are
7406 stored.
7407
Andrew Geisslerf0343792020-11-18 10:42:21 -06007408 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007409 Specifies the kernel boot default console. If you want to use a
7410 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007411 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007412
7413 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7414
7415 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7416 this variable to null but then checks for a value later.
7417
Andrew Geisslerf0343792020-11-18 10:42:21 -06007418 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007419 Lists additional options to add to the syslinux file. You need to set
7420 this variable in your recipe. If you want to list multiple options,
7421 separate the options with a semicolon character (``;``).
7422
7423 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7424 to create a set of options.
7425
Andrew Geisslerf0343792020-11-18 10:42:21 -06007426 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007427 Specifies the alternate serial port or turns it off. To turn off
7428 serial, set this variable to an empty string in your recipe. The
7429 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007430 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007431
7432 SYSLINUX_SERIAL ?= "0 115200"
7433
7434 The class checks for and uses the variable as needed.
7435
Andrew Geisslerf0343792020-11-18 10:42:21 -06007436 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007437 Specifies the alternate console=tty... kernel boot argument. The
7438 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007439 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007440
7441 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7442
7443 The class checks for and uses the variable as needed.
7444
Andrew Geisslerf0343792020-11-18 10:42:21 -06007445 :term:`SYSLINUX_SPLASH`
7446 An ``.LSS`` file used as the background for the VGA boot menu when
7447 you use the boot menu. You need to set this variable in your recipe.
7448
7449 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7450 variable and if found, the OpenEmbedded build system installs the
7451 splash screen.
7452
7453 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007454 Points to the temporary directory under the work directory (default
7455 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7456 where the files populated into the sysroot are assembled during the
7457 :ref:`ref-tasks-populate_sysroot` task.
7458
Andrew Geisslerf0343792020-11-18 10:42:21 -06007459 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007460 Directories that are staged into the sysroot by the
7461 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007462 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007463
7464 SYSROOT_DIRS = " \
7465 ${includedir} \
7466 ${libdir} \
7467 ${base_libdir} \
7468 ${nonarch_base_libdir} \
7469 ${datadir} \
7470 "
7471
Andrew Geisslerf0343792020-11-18 10:42:21 -06007472 :term:`SYSROOT_DIRS_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007473 Directories that are not staged into the sysroot by the
7474 :ref:`ref-tasks-populate_sysroot` task. You
7475 can use this variable to exclude certain subdirectories of
7476 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007477 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007478
7479 SYSROOT_DIRS_BLACKLIST = " \
7480 ${mandir} \
7481 ${docdir} \
7482 ${infodir} \
7483 ${datadir}/locale \
7484 ${datadir}/applications \
7485 ${datadir}/fonts \
7486 ${datadir}/pixmaps \
7487 "
7488
Andrew Geisslerf0343792020-11-18 10:42:21 -06007489 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007490 Extra directories staged into the sysroot by the
7491 :ref:`ref-tasks-populate_sysroot` task for
7492 ``-native`` recipes, in addition to those specified in
7493 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007494 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007495
7496 SYSROOT_DIRS_NATIVE = " \
7497 ${bindir} \
7498 ${sbindir} \
7499 ${base_bindir} \
7500 ${base_sbindir} \
7501 ${libexecdir} \
7502 ${sysconfdir} \
7503 ${localstatedir} \
7504 "
7505
7506 .. note::
7507
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007508 Programs built by ``-native`` recipes run directly from the sysroot
7509 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7510 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007511
Andrew Geisslerf0343792020-11-18 10:42:21 -06007512 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007513 A list of functions to execute after files are staged into the
7514 sysroot. These functions are usually used to apply additional
7515 processing on the staged files, or to stage additional files.
7516
Andrew Geisslerf0343792020-11-18 10:42:21 -06007517 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007518 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7519 this variable specifies whether the specified service in
7520 :term:`SYSTEMD_SERVICE` should start
7521 automatically or not. By default, the service is enabled to
7522 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007523 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007524
7525 SYSTEMD_AUTO_ENABLE ??= "enable"
7526
7527 You can disable the service by setting the variable to "disable".
7528
Andrew Geisslerf0343792020-11-18 10:42:21 -06007529 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007530 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007531 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007532 configuration file that should be used. By default, the
7533 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007534 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007535
7536 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7537
7538 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007539 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007540
Andrew Geisslerf0343792020-11-18 10:42:21 -06007541 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007542 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007543 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007544 list of entry files (``*.conf``) to install that contain one boot
7545 entry per file. By default, the
7546 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007547 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007548
7549 SYSTEMD_BOOT_ENTRIES ?= ""
7550
7551 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007552 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007553
Andrew Geisslerf0343792020-11-18 10:42:21 -06007554 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007555 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007556 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007557 boot menu timeout in seconds. By default, the
7558 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007559 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560
7561 SYSTEMD_BOOT_TIMEOUT ?= "10"
7562
7563 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007564 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007565
Andrew Geisslerf0343792020-11-18 10:42:21 -06007566 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007567 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7568 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007569 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007570 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007571 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007572
7573 SYSTEMD_PACKAGES ?= "${PN}"
7574
7575 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007576 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007577 the build system can find the systemd unit files.
7578
Andrew Geisslerf0343792020-11-18 10:42:21 -06007579 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007580 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7581 this variable specifies the systemd service name for a package.
7582
7583 When you specify this file in your recipe, use a package name
7584 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007585 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007586
7587 SYSTEMD_SERVICE_${PN} = "connman.service"
7588
Andrew Geisslerf0343792020-11-18 10:42:21 -06007589 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007590 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007591 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007592 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007593 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007594 (allowing login), assuming :term:`USE_VT` is not set to
7595 "0".
7596
Andrew Geissler09036742021-06-25 14:25:14 -05007597 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007598 run a getty on the first virtual terminal).
7599
Andrew Geisslerf0343792020-11-18 10:42:21 -06007600 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007601 This variable points to a directory were BitBake places temporary
7602 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007603 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007604
7605 T = "${WORKDIR}/temp"
7606
7607 The :term:`WORKDIR` is the directory into which
7608 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7609 file sets this variable.
7610
Andrew Geissler09036742021-06-25 14:25:14 -05007611 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007612 :term:`TMPDIR` variable, which points to the root of
7613 the directory tree where BitBake places the output of an entire
7614 build.
7615
Andrew Geisslerf0343792020-11-18 10:42:21 -06007616 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007617 The target machine's architecture. The OpenEmbedded build system
7618 supports many architectures. Here is an example list of architectures
7619 supported. This list is by no means complete as the architecture is
7620 configurable:
7621
7622 - arm
7623 - i586
7624 - x86_64
7625 - powerpc
7626 - powerpc64
7627 - mips
7628 - mipsel
7629
7630 For additional information on machine architectures, see the
7631 :term:`TUNE_ARCH` variable.
7632
Andrew Geisslerf0343792020-11-18 10:42:21 -06007633 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007635 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007636 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007637 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007638
7639 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7640
Andrew Geisslerf0343792020-11-18 10:42:21 -06007641 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007642 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007643 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007644 :term:`TUNE_CCARGS` by default.
7645
7646 .. note::
7647
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007648 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007649 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7650 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007651
Andrew Geisslerf0343792020-11-18 10:42:21 -06007652 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007653 This is a specific kernel compiler flag for a CPU or Application
7654 Binary Interface (ABI) tune. The flag is used rarely and only for
7655 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007656 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007657 variable allows the kernel (and associated modules) to use a
7658 different configuration. See the
7659 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7660 :term:`Source Directory` for an example.
7661
Andrew Geisslerf0343792020-11-18 10:42:21 -06007662 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007663 Specifies the flags to pass to the C compiler when building for the
7664 target. When building in the target context,
7665 :term:`CFLAGS` is set to the value of this variable by
7666 default.
7667
Andrew Geissler09036742021-06-25 14:25:14 -05007668 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7669 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007670 executables built using the SDK also have the flags applied.
7671
Andrew Geisslerf0343792020-11-18 10:42:21 -06007672 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007673 Specifies the flags to pass to the C pre-processor (i.e. to both the
7674 C and the C++ compilers) when building for the target. When building
7675 in the target context, :term:`CPPFLAGS` is set to the
7676 value of this variable by default.
7677
7678 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007679 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007680 value so that executables built using the SDK also have the flags
7681 applied.
7682
Andrew Geisslerf0343792020-11-18 10:42:21 -06007683 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007684 Specifies the flags to pass to the C++ compiler when building for the
7685 target. When building in the target context,
7686 :term:`CXXFLAGS` is set to the value of this variable
7687 by default.
7688
7689 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007690 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007691 value so that executables built using the SDK also have the flags
7692 applied.
7693
Andrew Geisslerf0343792020-11-18 10:42:21 -06007694 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007695 Specifies the method for handling FPU code. For FPU-less targets,
7696 which include most ARM CPUs, the variable must be set to "soft". If
7697 not, the kernel emulation gets used, which results in a performance
7698 penalty.
7699
Andrew Geisslerf0343792020-11-18 10:42:21 -06007700 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007701 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007702 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007703 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007704 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007705
7706 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7707
Andrew Geisslerf0343792020-11-18 10:42:21 -06007708 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007709 Specifies the flags to pass to the linker when building for the
7710 target. When building in the target context,
7711 :term:`LDFLAGS` is set to the value of this variable
7712 by default.
7713
7714 Additionally, the SDK's environment setup script sets the
7715 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007716 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007717 have the flags applied.
7718
Andrew Geisslerf0343792020-11-18 10:42:21 -06007719 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007720 Specifies the target's operating system. The variable can be set to
7721 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007722 for musl libc. For ARM/EABI targets, the possible values are
7723 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007724
Andrew Geisslerf0343792020-11-18 10:42:21 -06007725 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007726 Specifies the prefix used for the toolchain binary target tools.
7727
7728 Depending on the type of recipe and the build target,
7729 ``TARGET_PREFIX`` is set as follows:
7730
7731 - For recipes building for the target machine, the value is
7732 "${:term:`TARGET_SYS`}-".
7733
7734 - For native recipes, the build system sets the variable to the
7735 value of ``BUILD_PREFIX``.
7736
7737 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007738 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007739
Andrew Geisslerf0343792020-11-18 10:42:21 -06007740 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007741 Specifies the system, including the architecture and the operating
7742 system, for which the build is occurring in the context of the
7743 current recipe.
7744
7745 The OpenEmbedded build system automatically sets this variable based
7746 on :term:`TARGET_ARCH`,
7747 :term:`TARGET_VENDOR`, and
7748 :term:`TARGET_OS` variables.
7749
7750 .. note::
7751
Andrew Geissler09036742021-06-25 14:25:14 -05007752 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007753
7754 Consider these two examples:
7755
7756 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7757 value is "i686-linux".
7758
7759 - Given a recipe being built for a little-endian, MIPS target
7760 running Linux, the value might be "mipsel-linux".
7761
Andrew Geisslerf0343792020-11-18 10:42:21 -06007762 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007763 Specifies the name of the target vendor.
7764
Andrew Geisslerf0343792020-11-18 10:42:21 -06007765 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007766 Specifies the GNU standard C library (``libc``) variant to use during
7767 the build process. This variable replaces ``POKYLIBC``, which is no
7768 longer supported.
7769
7770 You can select "glibc", "musl", "newlib", or "baremetal"
7771
Andrew Geisslerf0343792020-11-18 10:42:21 -06007772 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007773 Specifies a suffix to be appended onto the
7774 :term:`TMPDIR` value. The suffix identifies the
7775 ``libc`` variant for building. When you are building for multiple
7776 variants with the same :term:`Build Directory`, this
7777 mechanism ensures that output for different ``libc`` variants is kept
7778 separate to avoid potential conflicts.
7779
7780 In the ``defaultsetup.conf`` file, the default value of
7781 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky,
7782 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007783 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007784 in no suffix being applied.
7785
Andrew Geisslerf0343792020-11-18 10:42:21 -06007786 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007787 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007788 characteristics of the generated packages and images by telling the
7789 OpenEmbedded build system which toolchain profile to use. By default,
7790 the OpenEmbedded build system builds its own internal toolchain. The
7791 variable's default value is "default", which uses that internal
7792 toolchain.
7793
7794 .. note::
7795
Andrew Geissler09036742021-06-25 14:25:14 -05007796 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007797 responsibility to ensure that the toolchain is compatible with the
7798 default toolchain. Using older or newer versions of these
7799 components might cause build problems. See the Release Notes for
7800 the Yocto Project release for the specific components with which
7801 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007802 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007803 page on the Yocto Project website and click on the "RELEASE
7804 INFORMATION" link for the appropriate release.
7805
Andrew Geissler09036742021-06-25 14:25:14 -05007806 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007807 which controls the variant of the GNU standard C library (``libc``)
7808 used during the build process: ``glibc`` or ``musl``.
7809
7810 With additional layers, it is possible to use a pre-compiled external
7811 toolchain. One example is the Sourcery G++ Toolchain. The support for
7812 this toolchain resides in the separate Mentor Graphics
7813 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007814 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007815
7816 The layer's ``README`` file contains information on how to use the
7817 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7818 be sure to add the layer to your ``bblayers.conf`` file in front of
7819 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7820 in your ``local.conf`` file to the location in which you installed
7821 the toolchain.
7822
7823 The fundamentals used for this example apply to any external
7824 toolchain. You can use ``meta-sourcery`` as a template for adding
7825 support for other external toolchains.
7826
Andrew Geisslerf0343792020-11-18 10:42:21 -06007827 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007828 The location the OpenEmbedded build system uses to export tests when
7829 the :term:`TEST_EXPORT_ONLY` variable is set
7830 to "1".
7831
Andrew Geissler09036742021-06-25 14:25:14 -05007832 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007833 ``"${TMPDIR}/testimage/${PN}"``.
7834
Andrew Geisslerf0343792020-11-18 10:42:21 -06007835 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007836 Specifies to export the tests only. Set this variable to "1" if you
7837 do not want to run the tests but you want them to be exported in a
7838 manner that you to run them outside of the build system.
7839
Andrew Geisslerf0343792020-11-18 10:42:21 -06007840 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007841 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05007842 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007843
7844 .. note::
7845
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007846 Actual test results reside in the task log (``log.do_testimage``),
7847 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007848
Andrew Geisslerf0343792020-11-18 10:42:21 -06007849 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007850 For automated hardware testing, specifies the command to use to
7851 control the power of the target machine under test. Typically, this
7852 command would point to a script that performs the appropriate action
7853 (e.g. interacting with a web-enabled power strip). The specified
7854 command should expect to receive as the last argument "off", "on" or
7855 "cycle" specifying to power off, on, or cycle (power off and then
7856 power on) the device, respectively.
7857
Andrew Geisslerf0343792020-11-18 10:42:21 -06007858 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007859 For automated hardware testing, specifies additional arguments to
7860 pass through to the command specified in
7861 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007862 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007863 wish, for example, to separate the machine-specific and
7864 non-machine-specific parts of the arguments.
7865
Andrew Geisslerf0343792020-11-18 10:42:21 -06007866 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007867 The time in seconds allowed for an image to boot before automated
7868 runtime tests begin to run against an image. The default timeout
7869 period to allow the boot process to reach the login prompt is 500
7870 seconds. You can specify a different value in the ``local.conf``
7871 file.
7872
7873 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007874 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007875 section in the Yocto Project Development Tasks Manual.
7876
Andrew Geisslerf0343792020-11-18 10:42:21 -06007877 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007878 For automated hardware testing, specifies the command to use to
7879 connect to the serial console of the target machine under test. This
7880 command simply needs to connect to the serial console and forward
7881 that connection to standard input and output as any normal terminal
7882 program does.
7883
7884 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05007885 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007886
7887 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
7888
Andrew Geisslerf0343792020-11-18 10:42:21 -06007889 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007890 For automated hardware testing, specifies additional arguments to
7891 pass through to the command specified in
7892 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007893 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007894 wish, for example, to separate the machine-specific and
7895 non-machine-specific parts of the command.
7896
Andrew Geisslerf0343792020-11-18 10:42:21 -06007897 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007898 The IP address of the build machine (host machine). This IP address
7899 is usually automatically detected. However, if detection fails, this
7900 variable needs to be set to the IP address of the build machine (i.e.
7901 where the build is taking place).
7902
7903 .. note::
7904
Andrew Geissler09036742021-06-25 14:25:14 -05007905 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007906 tests such as the "dnf" test suite, which needs to download packages
7907 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007908
Andrew Geisslerf0343792020-11-18 10:42:21 -06007909 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007910 An ordered list of tests (modules) to run against an image when
7911 performing automated runtime testing.
7912
7913 The OpenEmbedded build system provides a core set of tests that can
7914 be used against images.
7915
7916 .. note::
7917
7918 Currently, there is only support for running these tests under
7919 QEMU.
7920
7921 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05007922 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007923 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007924
7925 TEST_SUITES_append = " mytest"
7926
7927 Alternatively, you can
7928 provide the "auto" option to have all applicable tests run against
7929 the image.
7930 ::
7931
7932 TEST_SUITES_append = " auto"
7933
7934 Using this option causes the
7935 build system to automatically run tests that are applicable to the
7936 image. Tests that are not applicable are skipped.
7937
7938 The order in which tests are run is important. Tests that depend on
7939 another test must appear later in the list than the test on which
7940 they depend. For example, if you append the list of tests with two
7941 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05007942 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007943
7944 TEST_SUITES = "test_A test_B"
7945
7946 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007947 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007948 section in the Yocto Project Development Tasks Manual.
7949
Andrew Geisslerf0343792020-11-18 10:42:21 -06007950 :term:`TEST_TARGET`
7951 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007952 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007953
7954 TEST_TARGET = "qemu"
7955
7956 A target controller is a class that defines how an image gets
7957 deployed on a target and how a target is started. A layer can extend
7958 the controllers by adding a module in the layer's
7959 ``/lib/oeqa/controllers`` directory and by inheriting the
7960 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05007961 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06007962
7963 You can provide the following arguments with ``TEST_TARGET``:
7964
7965 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007966 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06007967 in the Yocto Project Development Tasks Manual for more
7968 information.
7969
7970 - *"simpleremote":* Runs the tests on target hardware that is
7971 already up and running. The hardware can be on the network or it
7972 can be a device running an image on QEMU. You must also set
7973 :term:`TEST_TARGET_IP` when you use
7974 "simpleremote".
7975
7976 .. note::
7977
7978 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007979 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06007980
7981 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007982 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06007983 section in the Yocto Project Development Tasks Manual.
7984
7985 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05007986 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06007987 variable has no effect when :term:`TEST_TARGET` is
7988 set to "qemu".
7989
7990 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007991 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007992
7993 TEST_TARGET_IP = "192.168.1.4:2201"
7994
7995 Specifying a port is
7996 useful when SSH is started on a non-standard port or in cases when
7997 your hardware under test is behind a firewall or network that is not
7998 directly accessible from your host and you need to do port address
7999 translation.
8000
8001 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008002 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008003 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008004 any image that successfully builds to automatically boot under QEMU.
8005 Using the variable also adds in dependencies so that any SDK for
8006 which testing is requested is automatically built first.
8007
8008 These tests are written in Python making use of the ``unittest``
8009 module, and the majority of them run commands on the target system
8010 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8011 file in the :term:`Build Directory` to have the
8012 OpenEmbedded build system automatically run these tests after an
8013 image successfully builds:
8014
8015 TESTIMAGE_AUTO = "1"
8016
8017 For more information
8018 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008019 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008020 section in the Yocto Project Development Tasks Manual and the
8021 ":ref:`testimage*.bbclass <ref-classes-testimage*>`" section.
8022
Andrew Geisslerf0343792020-11-18 10:42:21 -06008023 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008024 The directory in which the file BitBake is currently parsing is
8025 located. Do not manually set this variable.
8026
Andrew Geisslerf0343792020-11-18 10:42:21 -06008027 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008028 The time the build was started. Times appear using the hour, minute,
8029 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8030 seconds past 1400 hours).
8031
Andrew Geisslerf0343792020-11-18 10:42:21 -06008032 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008033 This variable is the base directory the OpenEmbedded build system
8034 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008035 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008036 ``tmp`` within the :term:`Build Directory`.
8037
8038 If you want to establish this directory in a location other than the
8039 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008040 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008041
8042 #TMPDIR = "${TOPDIR}/tmp"
8043
Andrew Geissler09036742021-06-25 14:25:14 -05008044 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008045 which does not use NFS, while having the Build Directory use NFS.
8046
Andrew Geissler09036742021-06-25 14:25:14 -05008047 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008048 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8049 persistent inodes). Due to various issues with NFS and bugs in some
8050 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008051 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008052
Andrew Geisslerf0343792020-11-18 10:42:21 -06008053 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008054 This variable lists packages the OpenEmbedded build system uses when
8055 building an SDK, which contains a cross-development environment. The
8056 packages specified by this variable are part of the toolchain set
8057 that runs on the :term:`SDKMACHINE`, and each
8058 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008059 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008060
8061 $ bitbake -c populate_sdk imagename
8062
8063 In this case, a default list of packages is
8064 set in this variable, but you can add additional packages to the
8065 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008066 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008067 in the Yocto Project Application Development and the Extensible
8068 Software Development Kit (eSDK) manual for more information.
8069
8070 For background information on cross-development toolchains in the
8071 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008072 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008073 section in the Yocto Project Overview and Concepts Manual. For
8074 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008075 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008076
Andrew Geisslerf0343792020-11-18 10:42:21 -06008077 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008078 This variable defines the name used for the toolchain output. The
8079 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008080 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008081
8082 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8083
8084 See
8085 the :term:`SDK_NAME` and
8086 :term:`SDK_VERSION` variables for additional
8087 information.
8088
Andrew Geisslerf0343792020-11-18 10:42:21 -06008089 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008090 This variable lists packages the OpenEmbedded build system uses when
8091 it creates the target part of an SDK (i.e. the part built for the
8092 target hardware), which includes libraries and headers. Use this
8093 variable to add individual packages to the part of the SDK that runs
8094 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008095 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008096 in the Yocto Project Application Development and the Extensible
8097 Software Development Kit (eSDK) manual for more information.
8098
8099 For background information on cross-development toolchains in the
8100 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008101 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008102 section in the Yocto Project Overview and Concepts Manual. For
8103 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008104 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008105
Andrew Geisslerf0343792020-11-18 10:42:21 -06008106 :term:`TOPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008107 The top-level :term:`Build Directory`. BitBake
8108 automatically sets this variable when you initialize your build
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008109 environment using :ref:`structure-core-script`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008110
Andrew Geisslerf0343792020-11-18 10:42:21 -06008111 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008112 A sanitized version of :term:`TARGET_ARCH`. This
8113 variable is used where the architecture is needed in a value where
8114 underscores are not allowed, for example within package filenames. In
8115 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008116 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008117
8118 Do not edit this variable.
8119
Andrew Geisslerf0343792020-11-18 10:42:21 -06008120 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008121 The GNU canonical architecture for a specific architecture (i.e.
8122 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8123 this value to setup configuration.
8124
Andrew Geissler09036742021-06-25 14:25:14 -05008125 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008126 definitions can be a single static definition, or can be dynamically
8127 adjusted. You can see details for a given CPU family by looking at
8128 the architecture's ``README`` file. For example, the
8129 ``meta/conf/machine/include/mips/README`` file in the
8130 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008131 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008132
Andrew Geissler09036742021-06-25 14:25:14 -05008133 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008134 :term:`TARGET_ARCH`, which defines the target
8135 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008136 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008137
8138 TARGET_ARCH = "${TUNE_ARCH}"
8139
8140 The following list, which is by no means complete since architectures
8141 are configurable, shows supported machine architectures:
8142
8143 - arm
8144 - i586
8145 - x86_64
8146 - powerpc
8147 - powerpc64
8148 - mips
8149 - mipsel
8150
Andrew Geisslerf0343792020-11-18 10:42:21 -06008151 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008152 Specifies architecture-specific assembler flags for the target
8153 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008154 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008155 typically under ``meta/conf/machine/include/`` and are influenced
8156 through :term:`TUNE_FEATURES`. For example, the
8157 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008158 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008159
8160 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8161
8162 .. note::
8163
8164 Board Support Packages (BSPs) select the tune. The selected tune,
8165 in turn, affects the tune variables themselves (i.e. the tune can
8166 supply its own set of flags).
8167
Andrew Geisslerf0343792020-11-18 10:42:21 -06008168 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008169 Specifies architecture-specific C compiler flags for the target
8170 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008171 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008172 typically under ``meta/conf/machine/include/`` and are influenced
8173 through :term:`TUNE_FEATURES`.
8174
8175 .. note::
8176
8177 Board Support Packages (BSPs) select the tune. The selected tune,
8178 in turn, affects the tune variables themselves (i.e. the tune can
8179 supply its own set of flags).
8180
Andrew Geisslerf0343792020-11-18 10:42:21 -06008181 :term:`TUNE_FEATURES`
8182 Features used to "tune" a compiler for optimal use given a specific
8183 processor. The features are defined within the tune files and allow
8184 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8185 the features.
8186
8187 The OpenEmbedded build system verifies the features to be sure they
8188 are not conflicting and that they are supported.
8189
8190 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008191 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008192
8193 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
8194
8195 See the :term:`DEFAULTTUNE` variable for more information.
8196
8197 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008198 Specifies architecture-specific linker flags for the target system.
8199 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008200 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008201 typically under ``meta/conf/machine/include/`` and are influenced
8202 through :term:`TUNE_FEATURES`. For example, the
8203 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008204 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008205
8206 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8207
8208 .. note::
8209
8210 Board Support Packages (BSPs) select the tune. The selected tune,
8211 in turn, affects the tune variables themselves (i.e. the tune can
8212 supply its own set of flags).
8213
Andrew Geisslerf0343792020-11-18 10:42:21 -06008214 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008215 The package architecture understood by the packaging system to define
8216 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008217 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008218
8219 TUNE_PKGARCH_tune-tune = "tune"
8220
8221 These tune-specific package architectures are defined in the machine
8222 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008223 the ``meta/conf/machine/include/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008224
8225 TUNE_PKGARCH_tune-core2-32 = "core2-32"
8226
Andrew Geisslerf0343792020-11-18 10:42:21 -06008227 :term:`TUNEABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008228 An underlying Application Binary Interface (ABI) used by a particular
8229 tuning in a given toolchain layer. Providers that use prebuilt
Andrew Geissler09036742021-06-25 14:25:14 -05008230 libraries can use the :term:`TUNEABI`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008231 :term:`TUNEABI_OVERRIDE`, and
8232 :term:`TUNEABI_WHITELIST` variables to check
8233 compatibility of tunings against their selection of libraries.
8234
Andrew Geissler09036742021-06-25 14:25:14 -05008235 If :term:`TUNEABI` is undefined, then every tuning is allowed. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008236 :ref:`sanity <ref-classes-sanity>` class to see how the variable is
8237 used.
8238
Andrew Geisslerf0343792020-11-18 10:42:21 -06008239 :term:`TUNEABI_OVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008240 If set, the OpenEmbedded system ignores the
8241 :term:`TUNEABI_WHITELIST` variable.
8242 Providers that use prebuilt libraries can use the
Andrew Geissler09036742021-06-25 14:25:14 -05008243 :term:`TUNEABI_OVERRIDE`, :term:`TUNEABI_WHITELIST`, and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008244 :term:`TUNEABI` variables to check compatibility of a
8245 tuning against their selection of libraries.
8246
8247 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8248 variable is used.
8249
Andrew Geisslerf0343792020-11-18 10:42:21 -06008250 :term:`TUNEABI_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251 A whitelist of permissible :term:`TUNEABI` values. If
Andrew Geissler09036742021-06-25 14:25:14 -05008252 :term:`TUNEABI_WHITELIST` is not set, all tunes are allowed. Providers
8253 that use prebuilt libraries can use the :term:`TUNEABI_WHITELIST`,
8254 :term:`TUNEABI_OVERRIDE`, and :term:`TUNEABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008255 variables to check compatibility of a tuning against their selection
8256 of libraries.
8257
8258 See the :ref:`sanity <ref-classes-sanity>` class to see how the
8259 variable is used.
8260
Andrew Geisslerf0343792020-11-18 10:42:21 -06008261 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008262 Specifies CPU or Application Binary Interface (ABI) tuning features
8263 that conflict with feature.
8264
8265 Known tuning conflicts are specified in the machine include files in
8266 the :term:`Source Directory`. Here is an example from
8267 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8268 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008269 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008270
8271 TUNECONFLICTS[n32] = "o32 n64"
8272
Andrew Geisslerf0343792020-11-18 10:42:21 -06008273 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008274 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8275 feature. The specified feature is stored as a flag. Valid features
8276 are specified in the machine include files (e.g.
8277 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008278 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008279
8280 TUNEVALID[bigendian] = "Enable big-endian mode."
8281
8282 See the machine include files in the :term:`Source Directory`
8283 for these features.
8284
Andrew Geisslerf0343792020-11-18 10:42:21 -06008285 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008286 Configures the :term:`UBOOT_MACHINE` and can
8287 also define :term:`IMAGE_FSTYPES` for individual
8288 cases.
8289
8290 Following is an example from the ``meta-fsl-arm`` layer. ::
8291
8292 UBOOT_CONFIG ??= "sd"
8293 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8294 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8295 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8296 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8297
8298 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008299 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8300 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008301 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008302
Andrew Geissler09036742021-06-25 14:25:14 -05008303 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008304 :ref:`uboot-config <ref-classes-uboot-config>`
8305 class.
8306
Andrew Geisslerf0343792020-11-18 10:42:21 -06008307 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008308 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008309 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008310 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8311 the load address to be used in
8312 creating the dtb sections of Image Tree Source for the FIT image.
8313
Andrew Geisslerf0343792020-11-18 10:42:21 -06008314 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008315 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008316 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008317 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8318 creating the dtbo sections of Image Tree Source for the FIT image.
8319
Andrew Geisslerf0343792020-11-18 10:42:21 -06008320 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008321 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008322 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008323 command-line parameter to the ``uboot-mkimage`` utility.
8324
Andrew Geisslerf0343792020-11-18 10:42:21 -06008325 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008326 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008327 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008328 command-line parameter to the ``uboot-mkimage`` utility.
8329
Andrew Geisslerf0343792020-11-18 10:42:21 -06008330 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008331 Appends a string to the name of the local version of the U-Boot
8332 image. For example, assuming the version of the U-Boot image built
8333 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008334 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008335
8336 UBOOT_LOCALVERSION = "-yocto"
8337
Andrew Geisslerf0343792020-11-18 10:42:21 -06008338 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008339 Specifies the value passed on the ``make`` command line when building
8340 a U-Boot image. The value indicates the target platform
8341 configuration. You typically set this variable from the machine
8342 configuration file (i.e. ``conf/machine/machine_name.conf``).
8343
8344 Please see the "Selection of Processor Architecture and Board Type"
8345 section in the U-Boot README for valid values for this variable.
8346
Andrew Geisslerf0343792020-11-18 10:42:21 -06008347 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008348 Specifies the target called in the ``Makefile``. The default target
8349 is "all".
8350
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008351 :term:`UBOOT_MKIMAGE`
8352 Specifies the name of the mkimage command as used by the
8353 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8354 the FIT image. This can be used to substitute an alternative command, wrapper
8355 script or function if desired. The default is "uboot-mkimage".
8356
Andrew Geisslerf0343792020-11-18 10:42:21 -06008357 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008358 Options for the device tree compiler passed to mkimage '-D'
8359 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008360 If ``UBOOT_MKIMAGE_DTCOPTS`` is not set then kernel-fitimage will not
8361 pass the ``-D`` option to mkimage.
8362
8363 :term:`UBOOT_MKIMAGE_SIGN`
8364 Specifies the name of the mkimage command as used by the
8365 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8366 the FIT image after it has been assembled (if enabled). This can be used
8367 to substitute an alternative command, wrapper script or function if
8368 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8369
8370 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8371 Optionally specifies additional arguments for the
8372 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8373 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008374
Andrew Geisslerf0343792020-11-18 10:42:21 -06008375 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008376 Specifies the entrypoint for the RAM disk image.
8377 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008378 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008379 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8380 entrypoint to be used in creating the Image Tree Source for
8381 the FIT image.
8382
Andrew Geisslerf0343792020-11-18 10:42:21 -06008383 :term:`UBOOT_RD_LOADADDRESS`
8384 Specifies the load address for the RAM disk image.
8385 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008386 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008387 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8388 load address to be used in creating the Image Tree Source for
8389 the FIT image.
8390
8391 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008392 Enable signing of FIT image. The default value is "0".
8393
Andrew Geisslerf0343792020-11-18 10:42:21 -06008394 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008395 Location of the directory containing the RSA key and
8396 certificate used for signing FIT image.
8397
Andrew Geisslerf0343792020-11-18 10:42:21 -06008398 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008399 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008400 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8401 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8402 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8403
Andrew Geisslerf0343792020-11-18 10:42:21 -06008404 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008405 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8406 has a ``.sb`` extension.
8407
8408 The default U-Boot extension is ``.bin``
8409
Andrew Geisslerf0343792020-11-18 10:42:21 -06008410 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008411 Specifies the target used for building U-Boot. The target is passed
8412 directly as part of the "make" command (e.g. SPL and AIS). If you do
8413 not specifically set this variable, the OpenEmbedded build process
8414 passes and uses "all" for the target during the U-Boot building
8415 process.
8416
Andrew Geisslerf0343792020-11-18 10:42:21 -06008417 :term:`UNKNOWN_CONFIGURE_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008418 Specifies a list of options that, if reported by the configure script
8419 as being invalid, should not generate a warning during the
8420 :ref:`ref-tasks-configure` task. Normally, invalid
8421 configure options are simply not passed to the configure script (e.g.
8422 should be removed from :term:`EXTRA_OECONF` or
8423 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008424 However, there are common options that are passed to all
8425 configure scripts at a class level, but might not be valid for some
8426 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler09036742021-06-25 14:25:14 -05008427 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_WHITELIST`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008428
8429 The configure arguments check that uses
Andrew Geissler09036742021-06-25 14:25:14 -05008430 :term:`UNKNOWN_CONFIGURE_WHITELIST` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008431 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8432 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8433
Andrew Geisslerf0343792020-11-18 10:42:21 -06008434 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008435 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008436 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008437 specifies the package that contains the initscript that is enabled.
8438
8439 The default value is "${PN}". Given that almost all recipes that
8440 install initscripts package them in the main package for the recipe,
8441 you rarely need to set this variable in individual recipes.
8442
Andrew Geisslerf0343792020-11-18 10:42:21 -06008443 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008444 You can perform a per-recipe check for what the latest upstream
8445 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8446 the recipe source code is provided from Git repositories, the
8447 OpenEmbedded build system determines the latest upstream version by
8448 picking the latest tag from the list of all repository tags.
8449
Andrew Geissler09036742021-06-25 14:25:14 -05008450 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008451 regular expression to filter only the relevant tags should the
8452 default filter not work correctly.
8453 ::
8454
8455 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8456
Andrew Geisslerf0343792020-11-18 10:42:21 -06008457 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008458 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008459 regular expression instead of the default one when the package
8460 checking system is parsing the page found using
8461 :term:`UPSTREAM_CHECK_URI`.
8462 ::
8463
8464 UPSTREAM_CHECK_REGEX = "package_regex"
8465
Andrew Geisslerf0343792020-11-18 10:42:21 -06008466 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008467 You can perform a per-recipe check for what the latest upstream
8468 source code version is by calling ``bitbake -c checkpkg`` recipe. If
8469 the source code is provided from tarballs, the latest version is
8470 determined by fetching the directory listing where the tarball is and
8471 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008472 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008473 contains the link to the latest tarball.
8474 ::
8475
8476 UPSTREAM_CHECK_URI = "recipe_url"
8477
Andrew Geisslerf0343792020-11-18 10:42:21 -06008478 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008479 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008480 default value used for :term:`USE_DEVFS` is "1" when no value is
8481 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008482 statically populated ``/dev`` directory.
8483
Andrew Geissler09209ee2020-12-13 08:44:15 -06008484 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008485 the Yocto Project Development Tasks Manual for information on how to
8486 use this variable.
8487
Andrew Geisslerf0343792020-11-18 10:42:21 -06008488 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008489 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008490 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008491 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008492 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008493 virtual terminals in order to enable logging in through those
8494 terminals.
8495
Andrew Geissler09036742021-06-25 14:25:14 -05008496 The default value used for :term:`USE_VT` is "1" when no default value is
8497 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008498 machine configuration file for machines that do not have a graphical
8499 display attached and therefore do not need virtual terminal
8500 functionality.
8501
Andrew Geisslerf0343792020-11-18 10:42:21 -06008502 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008503 A list of classes to globally inherit. These classes are used by the
8504 OpenEmbedded build system to enable extra features (e.g.
8505 ``buildstats``, ``image-mklibs``, and so forth).
8506
Andrew Geisslerc926e172021-05-07 16:11:35 -05008507 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008508
8509 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
8510
8511 For more information, see
8512 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8513
Andrew Geisslerf0343792020-11-18 10:42:21 -06008514 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008515 If set to ``error``, forces the OpenEmbedded build system to produce
8516 an error if the user identification (``uid``) and group
8517 identification (``gid``) values are not defined in any of the files
8518 listed in :term:`USERADD_UID_TABLES` and
8519 :term:`USERADD_GID_TABLES`. If set to
8520 ``warn``, a warning will be issued instead.
8521
8522 The default behavior for the build system is to dynamically apply
8523 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008524 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008525 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008526 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008527 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008528
8529 USERADD_ERROR_DYNAMIC = "error"
8530
8531 Overriding the
8532 default behavior implies you are going to also take steps to set
8533 static ``uid`` and ``gid`` values through use of the
8534 :term:`USERADDEXTENSION`,
8535 :term:`USERADD_UID_TABLES`, and
8536 :term:`USERADD_GID_TABLES` variables.
8537
8538 .. note::
8539
8540 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008541 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008542 When it is set to ``warn``, the build system will report a warning for
8543 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8544 to ``error``, it will only report errors for recipes that are actually
8545 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008546 This saves you from having to add static IDs for recipes that you
8547 know will never be built.
8548
Andrew Geisslerf0343792020-11-18 10:42:21 -06008549 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008550 Specifies a password file to use for obtaining static group
8551 identification (``gid``) values when the OpenEmbedded build system
8552 adds a group to the system during package installation.
8553
8554 When applying static group identification (``gid``) values, the
8555 OpenEmbedded build system looks in :term:`BBPATH` for a
8556 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008557 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008558
8559
8560 USERADD_GID_TABLES = "files/group"
8561
8562 .. note::
8563
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008564 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8565 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008566
Andrew Geisslerf0343792020-11-18 10:42:21 -06008567 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008568 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8569 this variable specifies the individual packages within the recipe
8570 that require users and/or groups to be added.
8571
8572 You must set this variable if the recipe inherits the class. For
8573 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008574 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008575
8576 USERADD_PACKAGES = "${PN}"
8577
8578 .. note::
8579
Andrew Geissler09036742021-06-25 14:25:14 -05008580 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008581 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8582 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008583
Andrew Geisslerf0343792020-11-18 10:42:21 -06008584 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008585 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8586 this variable specifies for a package what parameters should pass to
8587 the ``useradd`` command if you add a user to the system when the
8588 package is installed.
8589
Andrew Geisslerc926e172021-05-07 16:11:35 -05008590 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008591
8592 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
8593 --no-create-home --shell /bin/false \
8594 --user-group messagebus"
8595
8596 For information on the
8597 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008598 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008599
Andrew Geisslerf0343792020-11-18 10:42:21 -06008600 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008601 Specifies a password file to use for obtaining static user
8602 identification (``uid``) values when the OpenEmbedded build system
8603 adds a user to the system during package installation.
8604
8605 When applying static user identification (``uid``) values, the
8606 OpenEmbedded build system looks in :term:`BBPATH` for a
8607 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008608 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008609
8610 USERADD_UID_TABLES = "files/passwd"
8611
8612 .. note::
8613
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008614 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8615 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008616
Andrew Geisslerf0343792020-11-18 10:42:21 -06008617 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008618 When set to "useradd-staticids", causes the OpenEmbedded build system
8619 to base all user and group additions on a static ``passwd`` and
8620 ``group`` files found in :term:`BBPATH`.
8621
8622 To use static user identification (``uid``) and group identification
8623 (``gid``) values, set the variable as follows in your ``local.conf``
8624 file: USERADDEXTENSION = "useradd-staticids"
8625
8626 .. note::
8627
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008628 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008629 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008630 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008631
8632 If you use static ``uid`` and ``gid`` information, you must also
8633 specify the ``files/passwd`` and ``files/group`` files by setting the
8634 :term:`USERADD_UID_TABLES` and
8635 :term:`USERADD_GID_TABLES` variables.
8636 Additionally, you should also set the
8637 :term:`USERADD_ERROR_DYNAMIC` variable.
8638
Andrew Geisslerf0343792020-11-18 10:42:21 -06008639 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 Specifies the persistence of the target's ``/var/log`` directory,
8641 which is used to house postinstall target log files.
8642
Andrew Geissler09036742021-06-25 14:25:14 -05008643 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008644 file is not persistent. You can override this setting by setting the
8645 variable to "no" to make the log directory persistent.
8646
Andrew Geisslerf0343792020-11-18 10:42:21 -06008647 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008648 Specifies the quality assurance checks whose failures are reported as
8649 warnings by the OpenEmbedded build system. You set this variable in
8650 your distribution configuration file. For a list of the checks you
8651 can control with this variable, see the
8652 ":ref:`insane.bbclass <ref-classes-insane>`" section.
8653
Andrew Geisslerf0343792020-11-18 10:42:21 -06008654 :term:`WKS_FILE`
8655 Specifies the location of the Wic kickstart file that is used by the
8656 OpenEmbedded build system to create a partitioned image
8657 (image\ ``.wic``). For information on how to create a partitioned
8658 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008659 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008660 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008661 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008662
8663 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008664 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008665 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008666 applicable when Wic images are active (i.e. when
8667 :term:`IMAGE_FSTYPES` contains entries related
8668 to Wic). If your recipe does not create Wic images, the variable has
8669 no effect.
8670
Andrew Geissler09036742021-06-25 14:25:14 -05008671 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008672 :term:`DEPENDS` variable. When you use the variable in
8673 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008674 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675
Andrew Geissler09036742021-06-25 14:25:14 -05008676 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008677 specify a list of additional dependencies (e.g. native tools,
8678 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008679 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008680
8681 WKS_FILE_DEPENDS = "some-native-tool"
8682
8683 In the
8684 previous example, some-native-tool would be replaced with an actual
8685 native tool on which the build would depend.
8686
Andrew Geisslerf0343792020-11-18 10:42:21 -06008687 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008688 The pathname of the work directory in which the OpenEmbedded build
8689 system builds a recipe. This directory is located within the
8690 :term:`TMPDIR` directory structure and is specific to
8691 the recipe being built and the system for which it is being built.
8692
Andrew Geissler09036742021-06-25 14:25:14 -05008693 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008694
8695 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8696
8697 The actual directory depends on several things:
8698
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008699 - :term:`TMPDIR`: The top-level build output directory
8700 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8701 - :term:`PN`: The recipe name
8702 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8703 is usually the case for most recipes, then `EXTENDPE` is blank)
8704 - :term:`PV`: The recipe version
8705 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008706
8707 As an example, assume a Source Directory top-level folder name
8708 ``poky``, a default Build Directory at ``poky/build``, and a
8709 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8710 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8711 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008712 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008713
8714 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8715
Andrew Geisslerf0343792020-11-18 10:42:21 -06008716 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008717 Specifies the packages that should be installed to provide an X
8718 server and drivers for the current machine, assuming your image
8719 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8720 indirectly, includes "x11-base" in
8721 :term:`IMAGE_FEATURES`.
8722
Andrew Geissler09036742021-06-25 14:25:14 -05008723 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008724 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8725