blob: ecb2b60c73fb35559cfe300b202bc9eba7309b66 [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
Patrick Williams0ca19cc2021-08-16 14:03:13 -050041 ALLOW_EMPTY:${PN} = "1"
42 ALLOW_EMPTY:${PN}-dev = "1"
43 ALLOW_EMPTY:${PN}-staticdev = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050044
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
Patrick Williams0ca19cc2021-08-16 14:03:13 -050056 ALTERNATIVE:busybox = "sh sed test bracket"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050057
58 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000059 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050060 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
Andrew Geissler595f6302022-01-24 19:11:47 +000079 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050080 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
Andrew Geissler595f6302022-01-24 19:11:47 +000095 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050096 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
Andrew Geissler595f6302022-01-24 19:11:47 +0000125 ":ref:`ref-classes-update-alternatives`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500126
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600127 :term:`ANY_OF_DISTRO_FEATURES`
128 When inheriting the
129 :ref:`features_check <ref-classes-features_check>`
130 class, this variable identifies a list of distribution features where
131 at least one must be enabled in the current configuration in order
132 for the OpenEmbedded build system to build the recipe. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -0500133 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
134 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600135 the recipe will be skipped, and if the build system attempts to build
136 the recipe then an error will be triggered.
137
138
Andrew Geisslerf0343792020-11-18 10:42:21 -0600139 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500140 An override list of append strings for each target specified with
141 :term:`LABELS`.
142
143 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
144 information on how this variable is used.
145
Andrew Geisslerf0343792020-11-18 10:42:21 -0600146 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500147 The minimal command and arguments used to run ``ar``.
148
Andrew Geisslerf0343792020-11-18 10:42:21 -0600149 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500150 When used with the :ref:`archiver <ref-classes-archiver>` class,
151 determines the type of information used to create a released archive.
152 You can use this variable to create archives of patched source,
153 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500154 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500155
156 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
157 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
158 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
159 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
160 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
161 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
162 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
163 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
164
165 For information on how the variable works, see the
166 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
167
Andrew Geisslerf0343792020-11-18 10:42:21 -0600168 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500169 Minimal command and arguments needed to run the assembler.
170
Andrew Geisslerf0343792020-11-18 10:42:21 -0600171 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500172 Lists recipe names (:term:`PN` values) BitBake does not
173 attempt to build. Instead, BitBake assumes these recipes have already
174 been built.
175
Andrew Geissler09036742021-06-25 14:25:14 -0500176 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500177 tools that should not be built. An example is ``git-native``, which
178 when specified, allows for the Git binary from the host to be used
179 rather than building ``git-native``.
180
Andrew Geisslerf0343792020-11-18 10:42:21 -0600181 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500182 Provides additional ``shlibs`` provider mapping information, which
183 adds to or overwrites the information provided automatically by the
184 system. Separate multiple entries using spaces.
185
186 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500187 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500188
189 shlibname:packagename[_version]
190
191 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500192 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500193
194 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
195
Andrew Geisslerf0343792020-11-18 10:42:21 -0600196 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500197 The email address used to contact the original author or authors in
198 order to send patches and forward bugs.
199
Andrew Geisslerf0343792020-11-18 10:42:21 -0600200 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500201 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500202 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500203 packages should be checked for libraries and renamed according to
204 Debian library package naming.
205
206 The default value is "${PACKAGES}", which causes the debian class to
207 act on all packages that are explicitly generated by the recipe.
208
Andrew Geisslerf0343792020-11-18 10:42:21 -0600209 :term:`AUTO_SYSLINUXMENU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500210 Enables creating an automatic menu for the syslinux bootloader. You
211 must set this variable in your recipe. The
212 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
213
Andrew Geisslerf0343792020-11-18 10:42:21 -0600214 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500215 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500216 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500217
218 SRCREV = "${AUTOREV}"
219
220 If you use the previous statement to retrieve the latest version of
221 software, you need to be sure :term:`PV` contains
222 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
223 have a kernel recipe that inherits the
224 :ref:`kernel <ref-classes-kernel>` class and you use the previous
225 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500226 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500227 so that it does contain ``${SRCPV}``.
228
229 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600230 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500231 section in the Yocto Project Development Tasks Manual.
232
Andrew Geisslerf0343792020-11-18 10:42:21 -0600233 :term:`AVAILABLE_LICENSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234 List of licenses found in the directories specified by
235 :term:`COMMON_LICENSE_DIR` and
236 :term:`LICENSE_PATH`.
237
238 .. note::
239
Andrew Geissler09036742021-06-25 14:25:14 -0500240 It is assumed that all changes to :term:`COMMON_LICENSE_DIR` and
241 :term:`LICENSE_PATH` have been done before :term:`AVAILABLE_LICENSES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500242 is defined (in :ref:`ref-classes-license`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243
Andrew Geisslerf0343792020-11-18 10:42:21 -0600244 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500245 The list of defined CPU and Application Binary Interface (ABI)
246 tunings (i.e. "tunes") available for use by the OpenEmbedded build
247 system.
248
249 The list simply presents the tunes that are available. Not all tunes
250 may be compatible with a particular machine configuration, or with
251 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600252 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500253 configuration.
254
255 To add a tune to the list, be sure to append it with spaces using the
256 "+=" BitBake operator. Do not simply replace the list by using the
257 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500258 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500259 User Manual for more information.
260
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500261 :term:`AZ_SAS`
262 Azure Storage Shared Access Signature, when using the
263 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
264 This variable can be defined to be used by the fetcher to authenticate
265 and gain access to non-public artifacts.
266 ::
267
268 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
269
270 For more information see Microsoft's Azure Storage documentation at
271 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
272
Andrew Geisslerf0343792020-11-18 10:42:21 -0600273 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500274 The directory within the :term:`Build Directory` in
275 which the OpenEmbedded build system places generated objects during a
276 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500277 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500278
279 S = "${WORKDIR}/${BP}"
280
Andrew Geissler09036742021-06-25 14:25:14 -0500281 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400282 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500283 separating these directories. The build system defaults to using
284 separate directories for ``gcc`` and some kernel recipes.
285
Andrew Geisslerf0343792020-11-18 10:42:21 -0600286 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500287 Lists "recommended-only" packages to not install. Recommended-only
288 packages are packages installed only through the
289 :term:`RRECOMMENDS` variable. You can prevent any
290 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500291 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500292
293 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
294
295 You can set this variable globally in your ``local.conf`` file or you
296 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500297 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500298
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500299 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500300
301 It is important to realize that if you choose to not install packages
302 using this variable and some other packages are dependent on them
303 (i.e. listed in a recipe's :term:`RDEPENDS`
304 variable), the OpenEmbedded build system ignores your request and
305 will install the packages to avoid dependency errors.
306
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700307 This variable is supported only when using the IPK and RPM
308 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500309
310 See the :term:`NO_RECOMMENDATIONS` and the
311 :term:`PACKAGE_EXCLUDE` variables for related
312 information.
313
Andrew Geisslerf0343792020-11-18 10:42:21 -0600314 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500315 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500316 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600317 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500318 section in the Yocto Project Development Tasks Manual for information
319 on Multilib.
320
Andrew Geissler09036742021-06-25 14:25:14 -0500321 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500322 the :term:`Source Directory`. If Multilib is not
323 being used, the value defaults to "lib".
324
Andrew Geisslerf0343792020-11-18 10:42:21 -0600325 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500326 Points to the base of the work directory for all recipes. The default
327 value is "${TMPDIR}/work".
328
Andrew Geisslerf0343792020-11-18 10:42:21 -0600329 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500330 Specifies a space-delimited list of hosts that the fetcher is allowed
331 to use to obtain the required source code. Following are
332 considerations surrounding this variable:
333
Andrew Geissler09036742021-06-25 14:25:14 -0500334 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500335 or set to "0".
336
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700337 - There is limited support for wildcard matching against the beginning of
338 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500339 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
340 ::
341
342 BB_ALLOWED_NETWORKS = "*.gnu.org"
343
344 .. note::
345
346 The use of the "``*``" character only works at the beginning of
347 a host name and it must be isolated from the remainder of the
348 host name. You cannot use the wildcard character in any other
349 location of the name or combined with the front part of the
350 name.
351
352 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
353 is not.
354
355 - Mirrors not in the host list are skipped and logged in debug.
356
357 - Attempts to access networks not in the host list cause a failure.
358
Andrew Geissler09036742021-06-25 14:25:14 -0500359 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500360 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500361 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500362 fetched from an allowed location and avoids raising an error when a
363 host that is not allowed is in a :term:`SRC_URI`
364 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500365 host listed in :term:`SRC_URI` after a successful fetch from the
366 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500367
Andrew Geisslerf0343792020-11-18 10:42:21 -0600368 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500369 Defines how BitBake handles situations where an append file
370 (``.bbappend``) has no corresponding recipe file (``.bb``). This
371 condition often occurs when layers get out of sync (e.g. ``oe-core``
372 bumps a recipe version and the old recipe no longer exists and the
373 other layer has not been updated to the new version of the recipe
374 yet).
375
376 The default fatal behavior is safest because it is the sane reaction
377 given something is out of sync. It is important to realize when your
378 changes are no longer being applied.
379
380 You can change the default behavior by setting this variable to "1",
381 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500382 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500383
384 BB_DANGLINGAPPENDS_WARNONLY = "1"
385
Andrew Geisslerf0343792020-11-18 10:42:21 -0600386 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500387 Monitors disk space and available inodes during the build and allows
388 you to control the build based on these parameters.
389
390 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500391 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500392 found in the :term:`Build Directory`. Use the
393 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500394
395 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500396
397 BB_DISKMON_DIRS = "action,dir,threshold [...]"
398
399 where:
400
401 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000402 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500403 a threshold is broken.
404 STOPTASKS: Stop the build after the currently
405 executing tasks have finished when
406 a threshold is broken.
407 WARN: Issue a warning but continue the
408 build when a threshold is broken.
409 Subsequent warnings are issued as
410 defined by the BB_DISKMON_WARNINTERVAL
411 variable, which must be defined in
412 the conf/local.conf file.
413
414 dir is:
415 Any directory you choose. You can specify one or
416 more directories to monitor by separating the
417 groupings with a space. If two directories are
418 on the same device, only the first directory
419 is monitored.
420
421 threshold is:
422 Either the minimum available disk space,
423 the minimum number of free inodes, or
424 both. You must specify at least one. To
425 omit one or the other, simply omit the value.
426 Specify the threshold using G, M, K for Gbytes,
427 Mbytes, and Kbytes, respectively. If you do
428 not specify G, M, or K, Kbytes is assumed by
429 default. Do not use GB, MB, or KB.
430
Andrew Geisslerc926e172021-05-07 16:11:35 -0500431 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500432
433 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
434 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
435 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
436
437 The first example works only if you also provide the
438 :term:`BB_DISKMON_WARNINTERVAL`
439 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000440 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500441 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
442 below 100 Kbytes. Because two directories are provided with the
443 variable, the build system also issue a warning when the disk space
444 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
445 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500446 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500447 variable.
448
449 The second example stops the build after all currently executing
450 tasks complete when the minimum disk space in the ``${TMPDIR}``
451 directory drops below 1 Gbyte. No disk monitoring occurs for the free
452 inodes in this case.
453
Andrew Geissler595f6302022-01-24 19:11:47 +0000454 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500455 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
456 disk space monitoring for the directory itself occurs in this case.
457
Andrew Geisslerf0343792020-11-18 10:42:21 -0600458 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500459 Defines the disk space and free inode warning intervals. To set these
460 intervals, define the variable in your ``conf/local.conf`` file in
461 the :term:`Build Directory`.
462
Andrew Geissler09036742021-06-25 14:25:14 -0500463 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500464 must also use the :term:`BB_DISKMON_DIRS`
465 variable and define its action as "WARN". During the build,
466 subsequent warnings are issued each time disk space or number of free
467 inodes further reduces by the respective interval.
468
Andrew Geissler09036742021-06-25 14:25:14 -0500469 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
470 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500471 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500472
473 BB_DISKMON_WARNINTERVAL = "50M,5K"
474
475 When specifying the variable in your configuration file, use the
476 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500477
478 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500479
480 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
481
482 where:
483
484 disk_space_interval is:
485 An interval of memory expressed in either
486 G, M, or K for Gbytes, Mbytes, or Kbytes,
487 respectively. You cannot use GB, MB, or KB.
488
489 disk_inode_interval is:
490 An interval of free inodes expressed in either
491 G, M, or K for Gbytes, Mbytes, or Kbytes,
492 respectively. You cannot use GB, MB, or KB.
493
Andrew Geisslerc926e172021-05-07 16:11:35 -0500494 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500495
496 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
497 BB_DISKMON_WARNINTERVAL = "50M,5K"
498
499 These variables cause the
500 OpenEmbedded build system to issue subsequent warnings each time the
501 available disk space further reduces by 50 Mbytes or the number of
502 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
503 directory. Subsequent warnings based on the interval occur each time
504 a respective interval is reached beyond the initial warning (i.e. 1
505 Gbytes and 100 Kbytes).
506
Andrew Geisslerf0343792020-11-18 10:42:21 -0600507 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500508 Causes tarballs of the source control repositories (e.g. Git
509 repositories), including metadata, to be placed in the
510 :term:`DL_DIR` directory.
511
512 For performance reasons, creating and placing tarballs of these
513 repositories is not the default action by the OpenEmbedded build
514 system.
515 ::
516
517 BB_GENERATE_MIRROR_TARBALLS = "1"
518
519 Set this variable in your
520 ``local.conf`` file in the :term:`Build Directory`.
521
522 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500523 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500524 source control work directories.
525
Andrew Geisslerf0343792020-11-18 10:42:21 -0600526 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500527 The maximum number of tasks BitBake should run in parallel at any one
528 time. The OpenEmbedded build system automatically configures this
529 variable to be equal to the number of cores on the build system. For
530 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500531 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500532 to "4".
533
534 For single socket systems (i.e. one CPU), you should not have to
535 override this variable to gain optimal parallelism during builds.
536 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500537 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500538 is not set higher than "20".
539
540 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600541 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500542 section in the Yocto Project Development Tasks Manual.
543
Andrew Geisslerf0343792020-11-18 10:42:21 -0600544 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500545 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500546 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500547 long the BitBake server stays resident between invocations.
548
549 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500550 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500551
552 BB_SERVER_TIMEOUT = "20"
553
554 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400555 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500556
Andrew Geisslerf0343792020-11-18 10:42:21 -0600557 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500558 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700559 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500560 ``quilt-native``, which is a copy of Quilt built to run on the build
561 system; "crosses" such as ``gcc-cross``, which is a compiler built to
562 run on the build machine but produces binaries that run on the target
563 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500564 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500565 "``multilib:``\ multilib_name".
566
567 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500568 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500569
570 BBCLASSEXTEND =+ "native nativesdk"
571 BBCLASSEXTEND =+ "multilib:multilib_name"
572
573 .. note::
574
Andrew Geissler09036742021-06-25 14:25:14 -0500575 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500576 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500577 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500578 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400579 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500580
Andrew Geissler09036742021-06-25 14:25:14 -0500581 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500582 Parsing once adds some limitations. For example, it is not
583 possible to include a different file depending on the variant,
584 since ``include`` statements are processed when the recipe is
585 parsed.
586
Andrew Geisslerf0343792020-11-18 10:42:21 -0600587 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500588 Lists the names of configured layers. These names are used to find
589 the other ``BBFILE_*`` variables. Typically, each layer will append
590 its name to this variable in its ``conf/layer.conf`` file.
591
Andrew Geisslerf0343792020-11-18 10:42:21 -0600592 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500593 Variable that expands to match files from
594 :term:`BBFILES` in a particular layer. This variable
595 is used in the ``conf/layer.conf`` file and must be suffixed with the
596 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
597
Andrew Geisslerf0343792020-11-18 10:42:21 -0600598 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500599 Assigns the priority for recipe files in each layer.
600
601 This variable is useful in situations where the same recipe appears
602 in more than one layer. Setting this variable allows you to
603 prioritize a layer against other layers that contain the same recipe
604 - effectively letting you control the precedence for the multiple
605 layers. The precedence established through this variable stands
606 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500607 example, a layer that has a recipe with a higher :term:`PV` value but for
608 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500609 has a lower precedence.
610
Andrew Geissler09036742021-06-25 14:25:14 -0500611 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500612 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500613 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
614 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500615 for more information. The default priority, if unspecified for a
616 layer with no dependencies, is the lowest defined priority + 1 (or 1
617 if no priorities are defined).
618
619 .. tip::
620
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500621 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500622 to list all configured layers along with their priorities.
623
Andrew Geisslerf0343792020-11-18 10:42:21 -0600624 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500625 A space-separated list of recipe files BitBake uses to build
626 software.
627
628 When specifying recipe files, you can pattern match using Python's
629 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
630 For details on the syntax, see the documentation by following the
631 previous link.
632
Andrew Geisslerf0343792020-11-18 10:42:21 -0600633 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500634 Activates content when identified layers are present. You identify
635 the layers by the collections that the layers define.
636
Andrew Geissler09036742021-06-25 14:25:14 -0500637 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500638 whose corresponding ``.bb`` file is in a layer that attempts to
639 modify other layers through ``.bbappend`` but does not want to
640 introduce a hard dependency on those other layers.
641
Andrew Geissler09036742021-06-25 14:25:14 -0500642 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000643 ``collection_name:filename_pattern``.
644
645 The following example identifies two collection names and two
646 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500647
648 BBFILES_DYNAMIC += " \
649 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
650 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
651 "
652
653 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000654 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500655
656 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500657
658 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
659 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
660 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
661
Andrew Geisslerf0343792020-11-18 10:42:21 -0600662 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500663 Variable that controls how BitBake displays logs on build failure.
664
Andrew Geisslerf0343792020-11-18 10:42:21 -0600665 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500666 If :term:`BBINCLUDELOGS` is set, specifies the
667 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500668 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500669 the entire log is printed.
670
Andrew Geisslerf0343792020-11-18 10:42:21 -0600671 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500672 Lists the layers to enable during the build. This variable is defined
673 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500674 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500675
676 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500677 /home/scottrif/poky/meta \
678 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500679 /home/scottrif/poky/meta-yocto-bsp \
680 /home/scottrif/poky/meta-mykernel \
681 "
682
683 This example enables four layers, one of which is a custom,
684 user-defined layer named ``meta-mykernel``.
685
Andrew Geisslerf0343792020-11-18 10:42:21 -0600686 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500687 Prevents BitBake from processing recipes and recipe append files.
688
Andrew Geissler09036742021-06-25 14:25:14 -0500689 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500690 ``.bbappend`` files. BitBake ignores any recipe or recipe append
691 files that match any of the expressions. It is as if BitBake does not
692 see them at all. Consequently, matching files are not parsed or
693 otherwise used by BitBake.
694
695 The values you provide are passed to Python's regular expression
696 compiler. Consequently, the syntax follows Python's Regular
697 Expression (re) syntax. The expressions are compared against the full
698 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500699 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700
701 The following example uses a complete regular expression to tell
702 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500703 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500704
705 BBMASK = "meta-ti/recipes-misc/"
706
707 If you want to mask out multiple directories or recipes, you can
708 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500709 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500710
711 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
712 BBMASK += "/meta-oe/recipes-support/"
713 BBMASK += "/meta-foo/.*/openldap"
714 BBMASK += "opencv.*\.bbappend"
715 BBMASK += "lzma"
716
717 .. note::
718
719 When specifying a directory name, use the trailing slash character
720 to ensure you match just that directory name.
721
Andrew Geisslerf0343792020-11-18 10:42:21 -0600722 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500723 Specifies each additional separate configuration when you are
724 building targets with multiple configurations. Use this variable in
725 your ``conf/local.conf`` configuration file. Specify a
726 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500727 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500728
729 BBMULTICONFIG = "configA configB configC"
730
731 Each configuration file you
732 use must reside in the :term:`Build Directory`
733 ``conf/multiconfig`` directory (e.g.
Andrew Geisslereff27472021-10-29 15:35:00 -0500734 ``build_directory/conf/multiconfig/configA.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500735
Andrew Geissler09036742021-06-25 14:25:14 -0500736 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500737 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600738 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500739 section in the Yocto Project Development Tasks Manual.
740
Andrew Geisslerf0343792020-11-18 10:42:21 -0600741 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500742 Used by BitBake to locate ``.bbclass`` and configuration files. This
743 variable is analogous to the ``PATH`` variable.
744
745 .. note::
746
747 If you run BitBake from a directory outside of the
Andrew Geissler09036742021-06-25 14:25:14 -0500748 :term:`Build Directory`, you must be sure to set :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500749 to point to the Build Directory. Set the variable as you would any
Andrew Geisslerc926e172021-05-07 16:11:35 -0500750 environment variable and then run BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500751
752 $ BBPATH = "build_directory"
753 $ export BBPATH
754 $ bitbake target
755
756
Andrew Geisslerf0343792020-11-18 10:42:21 -0600757 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500758 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 BitBake remote server.
760
761 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500762 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500763
764 export BBSERVER=localhost:$port
765
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000766 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
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
Andrew Geissler595f6302022-01-24 19:11:47 +0000775 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500776 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
Andrew Geissler595f6302022-01-24 19:11:47 +0000805 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500806
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
Andrew Geissler5f350902021-07-23 13:09:54 -0400895 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500896 -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
Andrew Geissler5f350902021-07-23 13:09:54 -0400901 :term:`BUILD_OS` from the OS reported by the ``uname`` command - the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500902 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
Andrew Geissler595f6302022-01-24 19:11:47 +0000943 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500944 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
Andrew Geissler595f6302022-01-24 19:11:47 +0000949 By default, the :ref:`buildhistory <ref-classes-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 Geissler595f6302022-01-24 19:11:47 +0000966 By default, the :ref:`buildhistory <ref-classes-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,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000974 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500975
Andrew Geissler595f6302022-01-24 19:11:47 +0000976 By default, the :ref:`buildhistory <ref-classes-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
Andrew Geissler595f6302022-01-24 19:11:47 +00001003 By default, the :ref:`buildhistory <ref-classes-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
Andrew Geissler595f6302022-01-24 19:11:47 +00001019 By default, the :ref:`buildhistory <ref-classes-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 Geissler5f350902021-07-23 13:09:54 -04001024 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
1025 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1026 class, this variable specifies a common path prefix that should be
1027 stripped off the beginning of paths in the task signature list when the
1028 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1029 useful when build history is populated from multiple sources that may not
1030 all use the same top level directory.
1031
Andrew Geissler595f6302022-01-24 19:11:47 +00001032 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001033
1034 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1035
1036 In this case, no prefixes will be stripped.
1037
Andrew Geisslerf0343792020-11-18 10:42:21 -06001038 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001039 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1040 class, this variable optionally specifies a remote repository to
1041 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001042 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001043 :term:`BUILDHISTORY_COMMIT` must be set to
1044 "1".
1045
1046 The repository should correspond to a remote address that specifies a
1047 repository as understood by Git, or alternatively to a remote name
1048 that you have set up manually using ``git remote`` within the local
1049 repository.
1050
Andrew Geissler595f6302022-01-24 19:11:47 +00001051 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001052
1053 BUILDHISTORY_PUSH_REPO ?= ""
1054
Andrew Geisslerf0343792020-11-18 10:42:21 -06001055 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001056 Specifies the flags to pass to the C compiler when building for the
1057 SDK. When building in the ``nativesdk-`` context,
1058 :term:`CFLAGS` is set to the value of this variable by
1059 default.
1060
Andrew Geisslerf0343792020-11-18 10:42:21 -06001061 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001062 Specifies the flags to pass to the C pre-processor (i.e. to both the
1063 C and the C++ compilers) when building for the SDK. When building in
1064 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1065 to the value of this variable by default.
1066
Andrew Geisslerf0343792020-11-18 10:42:21 -06001067 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001068 Specifies the flags to pass to the C++ compiler when building for the
1069 SDK. When building in the ``nativesdk-`` context,
1070 :term:`CXXFLAGS` is set to the value of this variable
1071 by default.
1072
Andrew Geisslerf0343792020-11-18 10:42:21 -06001073 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001074 Specifies the flags to pass to the linker when building for the SDK.
1075 When building in the ``nativesdk-`` context,
1076 :term:`LDFLAGS` is set to the value of this variable
1077 by default.
1078
Andrew Geisslerf0343792020-11-18 10:42:21 -06001079 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001080 Points to the location of the directory that holds build statistics
1081 when you use and enable the
1082 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001083 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001084 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1085
Andrew Geisslerf0343792020-11-18 10:42:21 -06001086 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001087 For the BusyBox recipe, specifies whether to split the output
1088 executable file into two parts: one for features that require
1089 ``setuid root``, and one for the remaining features (i.e. those that
1090 do not require ``setuid root``).
1091
Andrew Geissler09036742021-06-25 14:25:14 -05001092 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001093 splitting the output executable file. Set the variable to "0" to get
1094 a single output executable file.
1095
Andrew Geisslerf0343792020-11-18 10:42:21 -06001096 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001097 Specifies the directory BitBake uses to store a cache of the
1098 :term:`Metadata` so it does not need to be parsed every time
1099 BitBake is started.
1100
Andrew Geisslerf0343792020-11-18 10:42:21 -06001101 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001102 The minimal command and arguments used to run the C compiler.
1103
Andrew Geisslerf0343792020-11-18 10:42:21 -06001104 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001105 Specifies the flags to pass to the C compiler. This variable is
1106 exported to an environment variable and thus made visible to the
1107 software being built during the compilation step.
1108
Andrew Geissler09036742021-06-25 14:25:14 -05001109 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001110 being built:
1111
1112 - :term:`TARGET_CFLAGS` when building for the
1113 target
1114
1115 - :term:`BUILD_CFLAGS` when building for the
1116 build host (i.e. ``-native``)
1117
1118 - :term:`BUILDSDK_CFLAGS` when building for
1119 an SDK (i.e. ``nativesdk-``)
1120
Andrew Geisslerf0343792020-11-18 10:42:21 -06001121 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001122 An internal variable specifying the special class override that
1123 should currently apply (e.g. "class-target", "class-native", and so
1124 forth). The classes that use this variable (e.g.
1125 :ref:`native <ref-classes-native>`,
1126 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1127 variable to appropriate values.
1128
1129 .. note::
1130
Andrew Geissler5f350902021-07-23 13:09:54 -04001131 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001132 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001133
1134 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001135 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001136
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001137 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001138 install my-extra-file ${D}${sysconfdir}
1139 }
1140
1141 Here is an example where ``FOO`` is set to
1142 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001143 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001144
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001145 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001146 FOO = "other"
1147
Andrew Geissler09036742021-06-25 14:25:14 -05001148 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001149 that it is included in the default value of
1150 :term:`OVERRIDES`.
1151
Andrew Geisslerf0343792020-11-18 10:42:21 -06001152 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001153 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001154 ``make clean`` command does not work for the software being built.
1155 Consequently, the OpenEmbedded build system will not try to run
1156 ``make clean`` during the :ref:`ref-tasks-configure`
1157 task, which is the default behavior.
1158
Andrew Geisslerf0343792020-11-18 10:42:21 -06001159 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001160 Provides a list of hardware features that are enabled in both
1161 :term:`MACHINE_FEATURES` and
1162 :term:`DISTRO_FEATURES`. This select list of
1163 features contains features that make sense to be controlled both at
1164 the machine and distribution configuration level. For example, the
1165 "bluetooth" feature requires hardware support but should also be
1166 optional at the distribution level, in case the hardware supports
1167 Bluetooth but you do not ever intend to use it.
1168
Andrew Geisslerf0343792020-11-18 10:42:21 -06001169 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001170 Points to ``meta/files/common-licenses`` in the
1171 :term:`Source Directory`, which is where generic license
1172 files reside.
1173
Andrew Geisslerf0343792020-11-18 10:42:21 -06001174 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001175 A regular expression that resolves to one or more hosts (when the
1176 recipe is native) or one or more targets (when the recipe is
1177 non-native) with which a recipe is compatible. The regular expression
1178 is matched against :term:`HOST_SYS`. You can use the
1179 variable to stop recipes from being built for classes of systems with
1180 which the recipes are not compatible. Stopping these builds is
1181 particularly useful with kernels. The variable also helps to increase
1182 parsing speed since the build system skips parsing recipes not
1183 compatible with the current system.
1184
Andrew Geisslerf0343792020-11-18 10:42:21 -06001185 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001186 A regular expression that resolves to one or more target machines
1187 with which a recipe is compatible. The regular expression is matched
1188 against :term:`MACHINEOVERRIDES`. You can use
1189 the variable to stop recipes from being built for machines with which
1190 the recipes are not compatible. Stopping these builds is particularly
1191 useful with kernels. The variable also helps to increase parsing
1192 speed since the build system skips parsing recipes not compatible
1193 with the current machine.
1194
Andrew Geisslerf0343792020-11-18 10:42:21 -06001195 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001196 Defines wildcards to match when installing a list of complementary
1197 packages for all the packages explicitly (or implicitly) installed in
1198 an image.
1199
1200 .. note::
1201
Andrew Geissler09036742021-06-25 14:25:14 -05001202 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001203 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1204 which is similar to the Unix style pathname pattern expansion
1205 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001206
1207 The resulting list of complementary packages is associated with an
1208 item that can be added to
1209 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001210 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001211 will install -dev packages (containing headers and other development
1212 files) for every package in the image.
1213
1214 To add a new feature item pointing to a wildcard, use a variable flag
1215 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001216 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001217
1218 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1219
Andrew Geisslerf0343792020-11-18 10:42:21 -06001220 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001221 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001222 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001223 sysroots for other recipes.
1224
1225 The default is
1226 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1227 (i.e.
1228 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1229
Andrew Geisslerf0343792020-11-18 10:42:21 -06001230 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001231 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001232 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001233 ``build/conf/`` compatibility changes.
1234
Andrew Geisslerf0343792020-11-18 10:42:21 -06001235 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001236 Identifies editable or configurable files that are part of a package.
1237 If the Package Management System (PMS) is being used to update
1238 packages on the target system, it is possible that configuration
1239 files you have changed after the original installation and that you
1240 now want to remain unchanged are overwritten. In other words,
1241 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001242 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001243 variable to list the files in the package that you wish to prevent
1244 the PMS from overwriting during this update process.
1245
Andrew Geissler09036742021-06-25 14:25:14 -05001246 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001247 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001248 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001249
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001250 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001251 ${sysconfdir}/file2 ${sysconfdir}/file3"
1252
Andrew Geissler09036742021-06-25 14:25:14 -05001253 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1254 variables. The files listed within :term:`CONFFILES` must be a subset of
1255 the files listed within :term:`FILES`. Because the configuration files
1256 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001257 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001258 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001259 variable.
1260
1261 .. note::
1262
Andrew Geissler09036742021-06-25 14:25:14 -05001263 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001264 good practice to use appropriate path variables.
1265 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1266 rather than ``/usr/bin``. You can find a list of these variables at
1267 the top of the ``meta/conf/bitbake.conf`` file in the
1268 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001269
Andrew Geisslerf0343792020-11-18 10:42:21 -06001270 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001271 Identifies the initial RAM filesystem (initramfs) source files. The
1272 OpenEmbedded build system receives and uses this kernel Kconfig
1273 variable as an environment variable. By default, the variable is set
1274 to null ("").
1275
Andrew Geissler09036742021-06-25 14:25:14 -05001276 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001277 with a ``.cpio`` suffix or a space-separated list of directories and
1278 files for building the initramfs image. A cpio archive should contain
1279 a filesystem archive to be used as an initramfs image. Directories
1280 should contain a filesystem layout to be included in the initramfs
1281 image. Files should contain entries according to the format described
1282 by the ``usr/gen_init_cpio`` program in the kernel tree.
1283
1284 If you specify multiple directories and files, the initramfs image
1285 will be the aggregate of all of them.
1286
1287 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001288 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001289 in the Yocto Project Development Tasks Manual.
1290
Andrew Geisslerf0343792020-11-18 10:42:21 -06001291 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001292 A list of files that contains ``autoconf`` test results relevant to
1293 the current build. This variable is used by the Autotools utilities
1294 when running ``configure``.
1295
Andrew Geisslerf0343792020-11-18 10:42:21 -06001296 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001297 The minimal arguments for GNU configure.
1298
Andrew Geisslerf0343792020-11-18 10:42:21 -06001299 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001300 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001301 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001302 class, this variable identifies distribution features that would be
1303 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001304 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1305 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001306 the recipe will be skipped, and if the build system attempts to build
1307 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001308
Andrew Geisslerf0343792020-11-18 10:42:21 -06001309 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001310 A space-separated list of licenses to exclude from the source
1311 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1312 other words, if a license in a recipe's
1313 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001314 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001315 class.
1316
1317 .. note::
1318
Andrew Geissler09036742021-06-25 14:25:14 -05001319 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001320 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001321
1322 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001323 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001324 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001325 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001326
Andrew Geisslerf0343792020-11-18 10:42:21 -06001327 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001328 A space-separated list of licenses to include in the source archived
1329 by the :ref:`archiver <ref-classes-archiver>` class. In other
1330 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001331 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001332 source is archived by the class.
1333
1334 The default value is set by the
1335 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001336 is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001337 "GPL*", "LGPL*", and "AGPL*".
1338
Andrew Geisslerf0343792020-11-18 10:42:21 -06001339 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001340 A list of recipes to exclude 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_EXCLUDE` 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 exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001349 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001351 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001352
Andrew Geisslerf0343792020-11-18 10:42:21 -06001353 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001354 A list of recipes to include in the source archived by the
1355 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001356 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001357 exclusion caused through the
1358 :term:`COPYLEFT_LICENSE_INCLUDE` and
1359 :term:`COPYLEFT_LICENSE_EXCLUDE`
1360 variables, respectively.
1361
1362 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001363 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001365 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001366
Andrew Geisslerf0343792020-11-18 10:42:21 -06001367 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001368 A space-separated list of recipe types to include in the source
1369 archived by the :ref:`archiver <ref-classes-archiver>` class.
1370 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1371 ``crosssdk``, and ``cross-canadian``.
1372
Andrew Geissler09036742021-06-25 14:25:14 -05001373 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001374 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001375 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001376
Andrew Geisslerf0343792020-11-18 10:42:21 -06001377 :term:`COPY_LIC_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 If set to "1" along with the
1379 :term:`COPY_LIC_MANIFEST` variable, the
1380 OpenEmbedded build system copies into the image the license files,
1381 which are located in ``/usr/share/common-licenses``, for each
1382 package. The license files are placed in directories within the image
1383 itself during build time.
1384
1385 .. note::
1386
Andrew Geissler09036742021-06-25 14:25:14 -05001387 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001388 newly installed packages to an image, which might be most suitable for
1389 read-only filesystems that cannot be upgraded. See the
1390 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001391 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001392 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001393 information on providing license text.
1394
Andrew Geisslerf0343792020-11-18 10:42:21 -06001395 :term:`COPY_LIC_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001396 If set to "1", the OpenEmbedded build system copies the license
1397 manifest for the image to
1398 ``/usr/share/common-licenses/license.manifest`` within the image
1399 itself during build time.
1400
1401 .. note::
1402
Andrew Geissler09036742021-06-25 14:25:14 -05001403 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001404 newly installed packages to an image, which might be most suitable for
1405 read-only filesystems that cannot be upgraded. See the
1406 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
Andrew Geissler09209ee2020-12-13 08:44:15 -06001407 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001408 section in the Yocto Project Development Tasks Manual for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001409 information on providing license text.
1410
Andrew Geisslerf0343792020-11-18 10:42:21 -06001411 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001412 Specifies the list of packages to be added to the image. You should
1413 only set this variable in the ``local.conf`` configuration file found
1414 in the :term:`Build Directory`.
1415
1416 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1417 supported.
1418
Andrew Geisslerf0343792020-11-18 10:42:21 -06001419 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001420 Specifies the parent directory of the OpenEmbedded-Core Metadata
1421 layer (i.e. ``meta``).
1422
Andrew Geissler09036742021-06-25 14:25:14 -05001423 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001424 of this layer and not the layer itself. Consider an example where you
1425 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001426 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001427 points to the ``poky`` folder because it is the parent directory of
1428 the ``poky/meta`` layer.
1429
Andrew Geisslerf0343792020-11-18 10:42:21 -06001430 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 Lists files from the :term:`COREBASE` directory that
1432 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001433 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001434 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001435 into the extensible SDK.
1436
Andrew Geissler09036742021-06-25 14:25:14 -05001437 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001438 typically contains build directories and other files that should not
1439 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001440 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001441 are actually needed.
1442
Andrew Geisslerf0343792020-11-18 10:42:21 -06001443 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001444 The minimal command and arguments used to run the C preprocessor.
1445
Andrew Geisslerf0343792020-11-18 10:42:21 -06001446 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001447 Specifies the flags to pass to the C pre-processor (i.e. to both the
1448 C and the C++ compilers). This variable is exported to an environment
1449 variable and thus made visible to the software being built during the
1450 compilation step.
1451
Andrew Geissler09036742021-06-25 14:25:14 -05001452 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001453 being built:
1454
1455 - :term:`TARGET_CPPFLAGS` when building for
1456 the target
1457
1458 - :term:`BUILD_CPPFLAGS` when building for the
1459 build host (i.e. ``-native``)
1460
1461 - :term:`BUILDSDK_CPPFLAGS` when building
1462 for an SDK (i.e. ``nativesdk-``)
1463
Andrew Geisslerf0343792020-11-18 10:42:21 -06001464 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001465 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001466 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001467 :term:`TARGET_PREFIX` variable.
1468
1469 .. note::
1470
Andrew Geissler09036742021-06-25 14:25:14 -05001471 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001472 variable only in certain contexts (e.g. when building for kernel
1473 and kernel module recipes).
1474
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001475 :term:`CVE_CHECK_PN_WHITELIST`
1476 The list of package names (:term:`PN`) for which
1477 CVEs (Common Vulnerabilities and Exposures) are ignored.
1478
1479 :term:`CVE_CHECK_WHITELIST`
1480 The list of CVE IDs which are ignored. Here is
1481 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1482
1483 # This is windows only issue.
1484 CVE_CHECK_WHITELIST += "CVE-2020-15523"
1485
Patrick Williams213cb262021-08-07 19:21:33 -05001486 :term:`CVE_PRODUCT`
1487 In a recipe, defines the name used to match the recipe name
1488 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1489
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001490 The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001491 database or matches with multiple entries in the database, the default
1492 value needs to be changed.
1493
1494 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1495
1496 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1497
Andrew Geisslerf0343792020-11-18 10:42:21 -06001498 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001499 The directory in which files checked out under the CVS system are
1500 stored.
1501
Andrew Geisslerf0343792020-11-18 10:42:21 -06001502 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001503 The minimal command and arguments used to run the C++ compiler.
1504
Andrew Geisslerf0343792020-11-18 10:42:21 -06001505 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001506 Specifies the flags to pass to the C++ compiler. This variable is
1507 exported to an environment variable and thus made visible to the
1508 software being built during the compilation step.
1509
Andrew Geissler09036742021-06-25 14:25:14 -05001510 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001511 being built:
1512
1513 - :term:`TARGET_CXXFLAGS` when building for
1514 the target
1515
1516 - :term:`BUILD_CXXFLAGS` when building for the
1517 build host (i.e. ``-native``)
1518
1519 - :term:`BUILDSDK_CXXFLAGS` when building
1520 for an SDK (i.e. ``nativesdk-``)
1521
Andrew Geisslerf0343792020-11-18 10:42:21 -06001522 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001523 The destination directory. The location in the :term:`Build Directory`
1524 where components are installed by the
1525 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001526 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001527
1528 ${WORKDIR}/image
1529
1530 .. note::
1531
1532 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001533 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001534
Andrew Geisslerf0343792020-11-18 10:42:21 -06001535 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001536 The date the build was started. Dates appear using the year, month,
1537 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1538
Andrew Geisslerf0343792020-11-18 10:42:21 -06001539 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001540 The date and time on which the current build started. The format is
1541 suitable for timestamps.
1542
Andrew Geisslerf0343792020-11-18 10:42:21 -06001543 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001544 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001545 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001546 particular package should not be renamed according to Debian library
1547 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001548 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001549
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001550 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001551
Andrew Geisslerf0343792020-11-18 10:42:21 -06001552 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001553 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001554 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555 the library name for an individual package. Overriding the library
1556 name in these cases is rare. You must use the package name as an
1557 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001558 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001559
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001560 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001561
Andrew Geisslerf0343792020-11-18 10:42:21 -06001562 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001563 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001564 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001565
Andrew Geisslerf0343792020-11-18 10:42:21 -06001566 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001567 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001568 compiling a system for debugging. This variable defaults to "-O
1569 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1570
Andrew Geisslerf0343792020-11-18 10:42:21 -06001571 :term:`DEFAULT_PREFERENCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001572 Specifies a weak bias for recipe selection priority.
1573
1574 The most common usage of this is variable is to set it to "-1" within
1575 a recipe for a development version of a piece of software. Using the
1576 variable in this way causes the stable version of the recipe to build
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001577 by default in the absence of :term:`PREFERRED_VERSION` being used to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001578 build the development version.
1579
1580 .. note::
1581
Andrew Geissler09036742021-06-25 14:25:14 -05001582 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001583 by :term:`BBFILE_PRIORITY` if that variable is different between two
1584 layers that contain different versions of the same recipe.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001585
Andrew Geisslereff27472021-10-29 15:35:00 -05001586 :term:`DEBUG_PREFIX_MAP`
1587 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1588 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1589 replace build-time paths by install-time ones in the debugging sections
1590 of binaries. This makes compiler output files location independent,
1591 at the cost of having to pass an extra command to tell the debugger
1592 where source files are.
1593
1594 This is used by the Yocto Project to guarantee
1595 :doc:`/test-manual/reproducible-builds` even when the source code of
1596 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1597 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1598 website for details.
1599
1600 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1601 not intended to be user-configurable.
1602
Andrew Geisslerf0343792020-11-18 10:42:21 -06001603 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001604 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1605 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001606 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001607 :term:`TUNE_FEATURES`.
1608
1609 The default tune is either implicitly or explicitly set by the
1610 machine (:term:`MACHINE`). However, you can override
1611 the setting using available tunes as defined with
1612 :term:`AVAILTUNES`.
1613
Andrew Geisslerf0343792020-11-18 10:42:21 -06001614 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615 Lists a recipe's build-time dependencies. These are dependencies on
1616 other recipes whose contents (e.g. headers and shared libraries) are
1617 needed by the recipe at build time.
1618
1619 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001620 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001621
1622 DEPENDS = "bar"
1623
1624 The practical effect of the previous
1625 assignment is that all files installed by bar will be available in
1626 the appropriate staging sysroot, given by the
1627 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1628 :ref:`ref-tasks-configure` task for ``foo`` runs.
1629 This mechanism is implemented by having ``do_configure`` depend on
1630 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001631 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001632 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1633 declaration in the :ref:`base <ref-classes-base>` class.
1634
1635 .. note::
1636
Andrew Geissler09036742021-06-25 14:25:14 -05001637 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001638 explicitly. The standard classes and build-related variables are
1639 configured to automatically use the appropriate staging sysroots.
1640
Andrew Geissler09036742021-06-25 14:25:14 -05001641 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001642 that run on the build machine during the build. For example, a recipe
1643 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001644 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001645
1646 DEPENDS = "codegen-native"
1647
1648 For more
1649 information, see the :ref:`native <ref-classes-native>` class and
1650 the :term:`EXTRANATIVEPATH` variable.
1651
1652 .. note::
1653
Andrew Geissler09036742021-06-25 14:25:14 -05001654 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001655 it is a list of :term:`PROVIDES` names, which
1656 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001657 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001658 instead, as this will put files from all the packages that make
1659 up ``foo``, which includes those from ``foo-dev``, into the
1660 sysroot.
1661
Andrew Geissler09036742021-06-25 14:25:14 -05001662 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001663 itself add any runtime dependencies between the packages
1664 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001665 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001666 section in the Yocto Project Overview and Concepts Manual,
1667 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001668 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001669
Andrew Geissler09036742021-06-25 14:25:14 -05001670 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001671 recipes that install precompiled components. For example, if
1672 ``libfoo`` is a precompiled library that links against
1673 ``libbar``, then linking against ``libfoo`` requires both
1674 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001675 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001676 to the recipe that installs ``libbar``, other recipes might
1677 fail to link against ``libfoo``.
1678
1679 For information on runtime dependencies, see the
1680 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001681 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1682 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001683 BitBake User Manual for additional information on tasks and
1684 dependencies.
1685
Andrew Geisslerf0343792020-11-18 10:42:21 -06001686 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001687 Points to the general area that the OpenEmbedded build system uses to
1688 place images, packages, SDKs, and other output files that are ready
1689 to be used outside of the build system. By default, this directory
1690 resides within the :term:`Build Directory` as
1691 ``${TMPDIR}/deploy``.
1692
1693 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001694 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001695 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001696 ":ref:`overview-manual/concepts:images`",
1697 ":ref:`overview-manual/concepts:package feeds`", and
1698 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001699 Yocto Project Overview and Concepts Manual.
1700
Andrew Geisslerf0343792020-11-18 10:42:21 -06001701 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001702 Points to the area that the OpenEmbedded build system uses to place
1703 Debian packages that are ready to be used outside of the build
1704 system. This variable applies only when
1705 :term:`PACKAGE_CLASSES` contains
1706 "package_deb".
1707
1708 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001709 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001710 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001711
1712 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1713
1714 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001715 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001716 :ref:`ref-tasks-package_write_deb` task
1717 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001718 information on how packaging works, see the
1719 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001720 in the Yocto Project Overview and Concepts Manual.
1721
Andrew Geisslerf0343792020-11-18 10:42:21 -06001722 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001723 Points to the area that the OpenEmbedded build system uses to place
1724 images and other associated output files that are ready to be
1725 deployed onto the target machine. The directory is machine-specific
1726 as it contains the ``${MACHINE}`` name. By default, this directory
1727 resides within the :term:`Build Directory` as
1728 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1729
Andrew Geissler09036742021-06-25 14:25:14 -05001730 It must not be used directly in recipes when deploying files. Instead,
1731 it's only useful when a recipe needs to "read" a file already deployed
1732 by a dependency. So, it should be filled with the contents of
1733 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1734 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1735 <ref-classes-image>` class.
1736
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001737 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001738 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001739 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001740 ":ref:`overview-manual/concepts:images`" and
1741 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001742 the Yocto Project Overview and Concepts Manual.
1743
Andrew Geisslerf0343792020-11-18 10:42:21 -06001744 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001745 Points to the area that the OpenEmbedded build system uses to place
1746 IPK packages that are ready to be used outside of the build system.
1747 This variable applies only when
1748 :term:`PACKAGE_CLASSES` contains
1749 "package_ipk".
1750
1751 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001752 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001753
1754 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1755
1756 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001757 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001758 :ref:`ref-tasks-package_write_ipk` task
1759 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001760 on how packaging works, see the
1761 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001762 in the Yocto Project Overview and Concepts Manual.
1763
Andrew Geisslerf0343792020-11-18 10:42:21 -06001764 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001765 Points to the area that the OpenEmbedded build system uses to place
1766 RPM packages that are ready to be used outside of the build system.
1767 This variable applies only when
1768 :term:`PACKAGE_CLASSES` contains
1769 "package_rpm".
1770
1771 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001772 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001773
1774 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1775
1776 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001777 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001778 :ref:`ref-tasks-package_write_rpm` task
1779 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001780 on how packaging works, see the
1781 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001782 in the Yocto Project Overview and Concepts Manual.
1783
Andrew Geisslerf0343792020-11-18 10:42:21 -06001784 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001785 Points to the area that the OpenEmbedded build system uses to place
1786 tarballs that are ready to be used outside of the build system. This
1787 variable applies only when
1788 :term:`PACKAGE_CLASSES` contains
1789 "package_tar".
1790
1791 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001792 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001793
1794 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1795
1796 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001797 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001798 :ref:`ref-tasks-package_write_tar` task
1799 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001800 on how packaging works, see the
1801 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001802 in the Yocto Project Overview and Concepts Manual.
1803
Andrew Geisslerf0343792020-11-18 10:42:21 -06001804 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001805 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001806 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001807 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001808
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001809 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001810
Andrew Geissler595f6302022-01-24 19:11:47 +00001811 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001812 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001813 them into :term:`DEPLOY_DIR_IMAGE`
1814 afterwards.
1815
Andrew Geisslerf0343792020-11-18 10:42:21 -06001816 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001817 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001818 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001819 variable.
1820
Andrew Geisslerf0343792020-11-18 10:42:21 -06001821 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001822 The short name of the distribution. For information on the long name
1823 of the distribution, see the :term:`DISTRO_NAME`
1824 variable.
1825
Andrew Geissler09036742021-06-25 14:25:14 -05001826 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001827 file whose root name is the same as the variable's argument and whose
1828 filename extension is ``.conf``. For example, the distribution
1829 configuration file for the Poky distribution is named ``poky.conf``
1830 and resides in the ``meta-poky/conf/distro`` directory of the
1831 :term:`Source Directory`.
1832
Andrew Geissler09036742021-06-25 14:25:14 -05001833 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001834 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001835
1836 DISTRO = "poky"
1837
1838 Distribution configuration files are located in a ``conf/distro``
1839 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001840 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001841 spaces, and is typically all lower-case.
1842
1843 .. note::
1844
Andrew Geissler09036742021-06-25 14:25:14 -05001845 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001846 are used, which are specified within
1847 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001848
Andrew Geisslerf0343792020-11-18 10:42:21 -06001849 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001850 Specifies a codename for the distribution being built.
1851
Andrew Geisslerf0343792020-11-18 10:42:21 -06001852 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001853 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001854 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001855 variable only really applies to the more full-featured images that
1856 include ``packagegroup-base``. You can use this variable to keep
1857 distro policy out of generic images. As with all other distro
1858 variables, you set this variable in the distro ``.conf`` file.
1859
Andrew Geisslerf0343792020-11-18 10:42:21 -06001860 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001861 Specifies a list of distro-specific packages to add to all images if
1862 the packages exist. The packages might not exist or be empty (e.g.
1863 kernel modules). The list of packages are automatically installed but
1864 you can remove them.
1865
Andrew Geisslerf0343792020-11-18 10:42:21 -06001866 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001867 The software support you want in your distribution for various
1868 features. You define your distribution features in the distribution
1869 configuration file.
1870
1871 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001872 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001873 to the configure script during the
1874 :ref:`ref-tasks-configure` task for recipes that
1875 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001876 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001877 target that can optionally support X11 to have its X11 support
1878 enabled.
1879
1880 Two more examples are Bluetooth and NFS support. For a more complete
1881 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001882 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883
Andrew Geisslerf0343792020-11-18 10:42:21 -06001884 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001885 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1886 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001887
1888 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1889 not intended to be user-configurable. It is best to just reference
1890 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001891 all distro configurations. See the ":ref:`ref-features-backfill`" section
1892 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001893
Andrew Geisslerf0343792020-11-18 10:42:21 -06001894 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001895 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1896 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001897 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001898
Andrew Geisslerf0343792020-11-18 10:42:21 -06001899 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001900 A convenience variable that gives you the default list of distro
1901 features with the exception of any features specific to the C library
1902 (``libc``).
1903
1904 When creating a custom distribution, you might find it useful to be
1905 able to reuse the default
1906 :term:`DISTRO_FEATURES` options without the
1907 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001908 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001909
1910 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1911
Andrew Geisslerf0343792020-11-18 10:42:21 -06001912 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001913 Specifies a list of features that if present in the target
1914 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001915 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001916 variable is used in addition to the features filtered using the
1917 :term:`DISTRO_FEATURES_NATIVE`
1918 variable.
1919
Andrew Geisslerf0343792020-11-18 10:42:21 -06001920 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001921 Specifies a list of features that if present in the target
1922 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001923 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001924 variable is used in addition to the features filtered using the
1925 :term:`DISTRO_FEATURES_NATIVESDK`
1926 variable.
1927
Andrew Geisslerf0343792020-11-18 10:42:21 -06001928 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001929 Specifies a list of features that should be included in
1930 :term:`DISTRO_FEATURES` when building native
1931 recipes. This variable is used in addition to the features filtered
1932 using the
1933 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1934 variable.
1935
Andrew Geisslerf0343792020-11-18 10:42:21 -06001936 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001937 Specifies a list of features that should be included in
1938 :term:`DISTRO_FEATURES` when building
1939 nativesdk recipes. This variable is used in addition to the features
1940 filtered using the
1941 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1942 variable.
1943
Andrew Geisslerf0343792020-11-18 10:42:21 -06001944 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001945 The long name of the distribution. For information on the short name
1946 of the distribution, see the :term:`DISTRO` variable.
1947
Andrew Geissler09036742021-06-25 14:25:14 -05001948 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001949 configuration file whose root name is the same as the variable's
1950 argument and whose filename extension is ``.conf``. For example, the
1951 distribution configuration file for the Poky distribution is named
1952 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1953 of the :term:`Source Directory`.
1954
Andrew Geissler09036742021-06-25 14:25:14 -05001955 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001956 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001957
1958 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1959
1960 Distribution configuration files are located in a ``conf/distro``
1961 directory within the :term:`Metadata` that contains the
1962 distribution configuration.
1963
1964 .. note::
1965
Andrew Geissler09036742021-06-25 14:25:14 -05001966 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001967 configurations are used, which are specified within
1968 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001969
Andrew Geisslerf0343792020-11-18 10:42:21 -06001970 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001971 The version of the distribution.
1972
Andrew Geisslerf0343792020-11-18 10:42:21 -06001973 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001974 A colon-separated list of overrides specific to the current
1975 distribution. By default, this list includes the value of
1976 :term:`DISTRO`.
1977
Andrew Geissler09036742021-06-25 14:25:14 -05001978 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001979 apply to the distribution.
1980
Andrew Geissler09036742021-06-25 14:25:14 -05001981 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001982 is included in the default value of
1983 :term:`OVERRIDES`.
1984
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001985 :term:`DISTUTILS_SETUP_PATH`
1986 When used by recipes that inherit the
Andrew Geissler595f6302022-01-24 19:11:47 +00001987 :ref:`distutils3 <ref-classes-distutils3>` class, this variable should
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05001988 be used to specify the directory in which the ``setup.py`` file is
1989 located if it is not at the root of the source tree (as specified by
1990 :term:`S`). For example, in a recipe where the sources are fetched from
1991 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
1992 subdirectory, you would have this::
1993
1994 S = "${WORKDIR}/git"
1995 DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule"
1996
Andrew Geissler595f6302022-01-24 19:11:47 +00001997 .. note::
1998
1999 ``distutils`` has been deprecated in Python 3.10 and will be removed
2000 in Python 3.12. For this reason, the use of :ref:`distutils3 <ref-classes-distutils3>`
2001 is deprecated. Instead use :ref:`setuptools3 <ref-classes-setuptools3>` and the
2002 :term:`SETUPTOOLS_SETUP_PATH` variable.
2003
Andrew Geisslerf0343792020-11-18 10:42:21 -06002004 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002005 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05002006 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002007 for everything except Git repositories. If you want tarballs of Git
2008 repositories, use the
2009 :term:`BB_GENERATE_MIRROR_TARBALLS`
2010 variable.
2011
Andrew Geissler09036742021-06-25 14:25:14 -05002012 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002013 ``conf/local.conf`` file. This directory is self-maintaining and you
2014 should not have to touch it. By default, the directory is
2015 ``downloads`` in the :term:`Build Directory`.
2016 ::
2017
2018 #DL_DIR ?= "${TOPDIR}/downloads"
2019
2020 To specify a different download directory,
2021 simply remove the comment from the line and provide your directory.
2022
2023 During a first build, the system downloads many different source code
2024 tarballs from various upstream projects. Downloading can take a
2025 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002026 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002027 system looks there first to find source tarballs.
2028
2029 .. note::
2030
2031 When wiping and rebuilding, you can preserve this directory to
2032 speed up this part of subsequent builds.
2033
2034 You can safely share this directory between multiple builds on the
2035 same development machine. For additional information on how the build
2036 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002037 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002038 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002039 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002040 Wiki page.
2041
Andrew Geisslerf0343792020-11-18 10:42:21 -06002042 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002043 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2044 class, this variable sets the compression policy used when the
2045 OpenEmbedded build system compresses man pages and info pages. By
2046 default, the compression method used is gz (gzip). Other policies
2047 available are xz and bz2.
2048
2049 For information on policies and on how to use this variable, see the
2050 comments in the ``meta/classes/compress_doc.bbclass`` file.
2051
Andrew Geisslerf0343792020-11-18 10:42:21 -06002052 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002053 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2054 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002055 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002056 default is "grub-efi", but "systemd-boot" can be used instead.
2057
2058 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2059 :ref:`image-live <ref-classes-image-live>` classes for more
2060 information.
2061
Andrew Geisslerf0343792020-11-18 10:42:21 -06002062 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002063 Variable that controls which locales for ``glibc`` are generated
2064 during the build (useful if the target device has 64Mbytes of RAM or
2065 less).
2066
Andrew Geisslerf0343792020-11-18 10:42:21 -06002067 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002068 When used with the :ref:`report-error <ref-classes-report-error>`
2069 class, specifies the path used for storing the debug files created by
2070 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002071 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002072 allows you to submit build errors you encounter to a central
2073 database. By default, the value of this variable is
2074 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2075
Andrew Geissler09036742021-06-25 14:25:14 -05002076 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002077 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002078 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002079
2080 ERR_REPORT_DIR = "path"
2081
Andrew Geisslerf0343792020-11-18 10:42:21 -06002082 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002083 Specifies the quality assurance checks whose failures are reported as
2084 errors by the OpenEmbedded build system. You set this variable in
2085 your distribution configuration file. For a list of the checks you
2086 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002087 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002088
Andrew Geisslerf0343792020-11-18 10:42:21 -06002089 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002090 Triggers the OpenEmbedded build system's shared libraries resolver to
2091 exclude an entire package when scanning for shared libraries.
2092
2093 .. note::
2094
2095 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002096 the internal function ``package_do_shlibs``, which is part of the
2097 :ref:`ref-tasks-package` task. You should be aware that the shared
2098 libraries resolver might implicitly define some dependencies between
2099 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002100
Andrew Geissler09036742021-06-25 14:25:14 -05002101 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002102 :term:`PRIVATE_LIBS` variable, which excludes a
2103 package's particular libraries only and not the whole package.
2104
Andrew Geissler09036742021-06-25 14:25:14 -05002105 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002106 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002107
2108 EXCLUDE_FROM_SHLIBS = "1"
2109
Andrew Geisslerf0343792020-11-18 10:42:21 -06002110 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002111 Directs BitBake to exclude a recipe from world builds (i.e.
2112 ``bitbake world``). During world builds, BitBake locates, parses and
2113 builds all recipes found in every layer exposed in the
2114 ``bblayers.conf`` configuration file.
2115
2116 To exclude a recipe from a world build using this variable, set the
2117 variable to "1" in the recipe.
2118
2119 .. note::
2120
Andrew Geissler09036742021-06-25 14:25:14 -05002121 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002122 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002123 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002124 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002125
Andrew Geisslerf0343792020-11-18 10:42:21 -06002126 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002127 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002128 version based on the recipe's :term:`PE` value. If :term:`PE`
2129 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2130 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2131 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2132 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002133
2134 See the :term:`STAMP` variable for an example.
2135
Andrew Geisslerf0343792020-11-18 10:42:21 -06002136 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002137 The full package version specification as it appears on the final
2138 packages produced by a recipe. The variable's value is normally used
2139 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002140 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002141
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002142 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002143
2144 The dependency relationships are intended to force the package
2145 manager to upgrade these types of packages in lock-step.
2146
Andrew Geisslerf0343792020-11-18 10:42:21 -06002147 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002148 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002149 tools are not in the source tree.
2150
2151 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002152 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002153 variable tells the OpenEmbedded build system to prefer the installed
2154 external tools. See the
2155 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2156 ``meta/classes`` to see how the variable is used.
2157
Andrew Geisslerf0343792020-11-18 10:42:21 -06002158 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002159 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2160 class, this variable points to the source tree, which is outside of
2161 the OpenEmbedded build system. When set, this variable sets the
2162 :term:`S` variable, which is what the OpenEmbedded build
2163 system uses to locate unpacked recipe source code.
2164
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002165 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002166 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002167 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002168 section in the Yocto Project Development Tasks Manual.
2169
Andrew Geisslerf0343792020-11-18 10:42:21 -06002170 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002171 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2172 class, this variable points to the directory in which the recipe's
2173 source code is built, which is outside of the OpenEmbedded build
2174 system. When set, this variable sets the :term:`B` variable,
2175 which is what the OpenEmbedded build system uses to locate the Build
2176 Directory.
2177
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002178 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002179 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002180 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002181 section in the Yocto Project Development Tasks Manual.
2182
Andrew Geisslerf0343792020-11-18 10:42:21 -06002183 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002184 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002185 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002186 pass to the ``autoreconf`` command that is executed during the
2187 :ref:`ref-tasks-configure` task.
2188
2189 The default value is "--exclude=autopoint".
2190
Andrew Geisslerf0343792020-11-18 10:42:21 -06002191 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002192 A list of additional features to include in an image. When listing
2193 more than one feature, separate them with a space.
2194
2195 Typically, you configure this variable in your ``local.conf`` file,
2196 which is found in the :term:`Build Directory`.
2197 Although you can use this variable from within a recipe, best
2198 practices dictate that you do not.
2199
2200 .. note::
2201
2202 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002203 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002204
2205 Here are some examples of features you can add:
2206
2207 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2208 symbol information for debugging and profiling.
2209
2210 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2211 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002212 'post-install-logging' features in the ":ref:`ref-features-image`"
2213 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002214 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2215 useful if you want to develop against the libraries in the image.
2216 - "read-only-rootfs" - Creates an image whose root filesystem is
2217 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002218 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002219 section in the Yocto Project Development Tasks Manual for more
2220 information
2221 - "tools-debug" - Adds debugging tools such as gdb and strace.
2222 - "tools-sdk" - Adds development tools such as gcc, make,
2223 pkgconfig and so forth.
2224 - "tools-testapps" - Adds useful testing tools
2225 such as ts_print, aplay, arecord and so forth.
2226
2227 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002228 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002229
2230 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002231 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 -05002232 section in the Yocto Project Development Tasks Manual.
2233
Andrew Geisslerf0343792020-11-18 10:42:21 -06002234 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002235 Specifies additional options for the image creation command that has
2236 been specified in :term:`IMAGE_CMD`. When setting
2237 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002238 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002239
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002240 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002241
Andrew Geisslerf0343792020-11-18 10:42:21 -06002242 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002243 A list of recipes to build that do not provide packages for
2244 installing into the root filesystem.
2245
2246 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002247 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002248 variable to list these recipes and thus specify the dependencies. A
2249 typical example is a required bootloader in a machine configuration.
2250
2251 .. note::
2252
2253 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002254 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002255
Andrew Geisslerf0343792020-11-18 10:42:21 -06002256 :term:`EXTRANATIVEPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002257 A list of subdirectories of
2258 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2259 added to the beginning of the environment variable ``PATH``. As an
2260 example, the following prepends
2261 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
Andrew Geisslerc926e172021-05-07 16:11:35 -05002262 ``PATH``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002263
2264 EXTRANATIVEPATH = "foo bar"
2265
Andrew Geisslerf0343792020-11-18 10:42:21 -06002266 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002267 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2268 :ref:`cmake <ref-classes-cmake>` class for additional information.
2269
Andrew Geisslerf0343792020-11-18 10:42:21 -06002270 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002271 Additional ``configure`` script options. See
2272 :term:`PACKAGECONFIG_CONFARGS` for
2273 additional information on passing configure script options.
2274
Andrew Geisslerf0343792020-11-18 10:42:21 -06002275 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002276 Additional GNU ``make`` options.
2277
Andrew Geissler09036742021-06-25 14:25:14 -05002278 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002279 variable to specify any required GNU options.
2280
2281 :term:`PARALLEL_MAKE` and
2282 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002283 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002284
Andrew Geisslerf0343792020-11-18 10:42:21 -06002285 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002286 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2287 variable specifies additional configuration options you want to pass
2288 to the ``scons`` command line.
2289
Andrew Geisslerf0343792020-11-18 10:42:21 -06002290 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002291 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2292 class, this variable provides image level user and group operations.
2293 This is a more global method of providing user and group
2294 configuration as compared to using the
2295 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2296 group configurations to a specific recipe.
2297
2298 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002299 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002300 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002301
2302 # EXTRA_USERS_PARAMS = "\
2303 # useradd -p '' tester; \
2304 # groupadd developers; \
2305 # userdel nobody; \
2306 # groupdel -g video; \
2307 # groupmod -g 1020 developers; \
2308 # usermod -s /bin/sh tester; \
2309 # "
2310
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002311 Additionally there is a special ``passwd-expire`` command that will
2312 cause the password for a user to be expired and thus force changing it
2313 on first login, for example::
2314
2315 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2316
2317 .. note::
2318
2319 At present, ``passwd-expire`` may only work for remote logins when
2320 using OpenSSH and not dropbear as an SSH server.
2321
Andrew Geisslerf0343792020-11-18 10:42:21 -06002322 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002323 Defines one or more packages to include in an image when a specific
2324 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002325 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002326 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002327
2328 FEATURE_PACKAGES_widget = "package1 package2"
2329
Andrew Geissler09036742021-06-25 14:25:14 -05002330 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002331 package1 and package2 would be included in the image.
2332
2333 .. note::
2334
Andrew Geissler09036742021-06-25 14:25:14 -05002335 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002336 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002337 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002338 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002339
Andrew Geisslerf0343792020-11-18 10:42:21 -06002340 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002341 Points to the base URL of the server and location within the
2342 document-root that provides the metadata and packages required by
2343 OPKG to support runtime package management of IPK packages. You set
2344 this variable in your ``local.conf`` file.
2345
Andrew Geisslerc926e172021-05-07 16:11:35 -05002346 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002347
2348 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2349
2350 This example assumes you are serving
2351 your packages over HTTP and your databases are located in a directory
2352 named ``BOARD-dir``, which is underneath your HTTP server's
2353 document-root. In this case, the OpenEmbedded build system generates
2354 a set of configuration files for you in your target that work with
2355 the feed.
2356
Andrew Geisslerf0343792020-11-18 10:42:21 -06002357 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002358 The list of files and directories that are placed in a package. The
2359 :term:`PACKAGES` variable lists the packages
2360 generated by a recipe.
2361
Andrew Geissler09036742021-06-25 14:25:14 -05002362 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002363 identifies the resulting package. Then, provide a space-separated
2364 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002365 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002366
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002367 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002368
2369 .. note::
2370
2371 - When specifying files or paths, you can pattern match using
2372 Python's
2373 `glob <https://docs.python.org/3/library/glob.html>`_
2374 syntax. For details on the syntax, see the documentation by
2375 following the previous link.
2376
Andrew Geissler09036742021-06-25 14:25:14 -05002377 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002378 good practice to use appropriate path variables. For example,
2379 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2380 rather than ``/usr/bin``. You can find a list of these
2381 variables at the top of the ``meta/conf/bitbake.conf`` file in
2382 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002383 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002384 this file.
2385
Andrew Geissler09036742021-06-25 14:25:14 -05002386 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002387 editable and you know they should not be overwritten during the
2388 package update process by the Package Management System (PMS), you
2389 can identify these files so that the PMS will not overwrite them. See
2390 the :term:`CONFFILES` variable for information on
2391 how to identify these files to the PMS.
2392
Andrew Geisslerf0343792020-11-18 10:42:21 -06002393 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002394 Defines the file specification to match
2395 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002396 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002397 symbolic link (symlink) for shared libraries on the target platform.
2398
2399 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002400 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002401
2402 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2403
Andrew Geisslerf0343792020-11-18 10:42:21 -06002404 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002405 Extends the search path the OpenEmbedded build system uses when
2406 looking for files and patches as it processes recipes and append
2407 files. The default directories BitBake uses when it processes recipes
2408 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002409 variable. You can extend :term:`FILESPATH` variable by using
2410 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002411
2412 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002413 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002414 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002415
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002416 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002417
2418 In the above example, the build system first
2419 looks for files in a directory that has the same name as the
2420 corresponding append file.
2421
2422 .. note::
2423
Andrew Geissler09036742021-06-25 14:25:14 -05002424 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002425 expansion (``:=``) operator. Immediate expansion makes sure that
2426 BitBake evaluates :term:`THISDIR` at the time the
2427 directive is encountered rather than at some later time when
2428 expansion might result in a directory that does not contain the
2429 files you need.
2430
2431 Also, include the trailing separating colon character if you are
2432 prepending. The trailing colon character is necessary because you
2433 are directing BitBake to extend the path by prepending directories
2434 to the search path.
2435
Andrew Geisslerc926e172021-05-07 16:11:35 -05002436 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002437
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002438 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002439
2440 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002441 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002442 in the same directory as the corresponding append file.
2443
Andrew Geisslerc926e172021-05-07 16:11:35 -05002444 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002445
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002446 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002447
2448 A final example shows how you can extend the search path and include
2449 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002450 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002451
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002452 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002453
2454 The previous statement appears in the
2455 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002456 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002457 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2458 override is a special :term:`PACKAGE_ARCH`
2459 definition for multiple ``meta-intel`` machines.
2460
2461 .. note::
2462
2463 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002464 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002465
2466 By prepending paths in ``.bbappend`` files, you allow multiple append
2467 files that reside in different layers but are used for the same
2468 recipe to correctly extend the path.
2469
Andrew Geisslerf0343792020-11-18 10:42:21 -06002470 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002471 A subset of :term:`OVERRIDES` used by the
2472 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002473 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002474 uses overrides to automatically extend the
2475 :term:`FILESPATH` variable. For an example of how
2476 that works, see the :term:`FILESPATH` variable
2477 description. Additionally, you find more information on how overrides
2478 are handled in the
2479 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2480 section of the BitBake User Manual.
2481
Andrew Geissler09036742021-06-25 14:25:14 -05002482 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002483
2484 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2485
2486 .. note::
2487
Andrew Geissler09036742021-06-25 14:25:14 -05002488 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002489 with expected overrides and are used in an expected manner by the
2490 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002491
Andrew Geisslerf0343792020-11-18 10:42:21 -06002492 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002493 The default set of directories the OpenEmbedded build system uses
2494 when searching for patches and files.
2495
2496 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002497 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002498 patches specified by each ``file://`` URI in a recipe's
2499 :term:`SRC_URI` statements.
2500
Andrew Geissler09036742021-06-25 14:25:14 -05002501 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002502 :ref:`ref-classes-base` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002503 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002504
2505 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2506 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2507
2508 The
Andrew Geissler09036742021-06-25 14:25:14 -05002509 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002510 from the :term:`FILESOVERRIDES` variable.
2511
2512 .. note::
2513
Andrew Geissler09036742021-06-25 14:25:14 -05002514 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002515 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002516 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002517 :term:`FILESEXTRAPATHS` variable.
2518
Andrew Geissler09036742021-06-25 14:25:14 -05002519 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002520 to directories in custom layers where append files
2521 (``.bbappend``) are used. If you want the build system to find
2522 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002523 to extend the :term:`FILESPATH` variable by using the
2524 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002525
2526 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002527 example, consider a case where there is the following directory structure
2528 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002529
2530 files/defconfig
2531 files/MACHINEA/defconfig
2532 files/MACHINEB/defconfig
2533
Andrew Geissler09036742021-06-25 14:25:14 -05002534 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002535 "file://defconfig". Given this scenario, you can set
2536 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002537 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002538 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2539 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2540 build system uses files from ``files/defconfig``.
2541
2542 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002543 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002544 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002545 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002546 the Yocto Project Development Tasks Manual. See the
2547 :ref:`ref-tasks-patch` task as well.
2548
Andrew Geisslerf0343792020-11-18 10:42:21 -06002549 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002550 Allows you to define your own file permissions settings table as part
2551 of your configuration for the packaging process. For example, suppose
2552 you need a consistent set of custom permissions for a set of groups
2553 and users across an entire work project. It is best to do this in the
2554 packages themselves but this is not always possible.
2555
2556 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2557 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2558 If you create your own file
2559 permissions setting table, you should place it in your layer or the
2560 distro's layer.
2561
Andrew Geissler09036742021-06-25 14:25:14 -05002562 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002563 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2564 to point to your custom
2565 ``fs-perms.txt``. You can specify more than a single file permissions
2566 setting table. The paths you specify to these files must be defined
2567 within the :term:`BBPATH` variable.
2568
2569 For guidance on how to create your own file permissions settings
2570 table file, examine the existing ``fs-perms.txt``.
2571
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002572 :term:`FIT_DESC`
2573 Specifies the description string encoded into a fitImage. The default
2574 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2575 class as follows::
2576
2577 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2578
Andrew Geisslerf0343792020-11-18 10:42:21 -06002579 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002580 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002581 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002582 The default value is 0.
2583
Andrew Geisslerf0343792020-11-18 10:42:21 -06002584 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002585 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2586
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002587 :term:`FIT_KERNEL_COMP_ALG`
2588 Compression algorithm to use for the kernel image inside the FIT Image.
2589 At present, the only supported values are "gzip" (default) or "none"
2590 If you set this variable to anything other than "none" you may also need
2591 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2592
2593 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2594 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2595 value is ".gz".
2596
Andrew Geisslerf0343792020-11-18 10:42:21 -06002597 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002598 Arguments to openssl genrsa for generating RSA private key for signing
2599 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2600 use.
2601
Andrew Geisslerf0343792020-11-18 10:42:21 -06002602 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002603 Arguments to openssl req for generating certificate for signing fitImage.
2604 The default value is "-batch -new". batch for non interactive mode
2605 and new for generating new keys.
2606
Andrew Geisslerf0343792020-11-18 10:42:21 -06002607 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002608 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002609 The default value is "x509".
2610
Andrew Geisslerf0343792020-11-18 10:42:21 -06002611 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002612 Specifies the signature algorithm used in creating the FIT Image.
2613 For e.g. rsa2048.
2614
Andrew Geisslerf0343792020-11-18 10:42:21 -06002615 :term:`FIT_SIGN_NUMBITS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002616 Size of private key in number of bits used in fitImage. The default
2617 value is "2048".
2618
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002619 :term:`FIT_SIGN_INDIVIDUAL`
2620 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2621 class will sign the kernel, dtb and ramdisk images individually in addition
2622 to signing the fitImage itself. This could be useful if you are
2623 intending to verify signatures in another context than booting via
2624 U-Boot.
2625
Andrew Geisslerf0343792020-11-18 10:42:21 -06002626 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002627 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2628 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002629 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002630
Andrew Geisslerf0343792020-11-18 10:42:21 -06002631 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002632 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2633 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002634 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002635 that fonts are in the recipe's main package (i.e.
2636 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2637 need are in a package other than that main package.
2638
Andrew Geisslerf0343792020-11-18 10:42:21 -06002639 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002640 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2641 during the generation of the root filesystem.
2642
2643 Set the variable to "1" to force the removal of these packages.
2644
Andrew Geisslerf0343792020-11-18 10:42:21 -06002645 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002646 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002647 compiling an optimized system. This variable defaults to "-O2 -pipe
2648 ${DEBUG_FLAGS}".
2649
Andrew Geisslerf0343792020-11-18 10:42:21 -06002650 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002651 Enables Position Independent Executables (PIE) within the GNU C
2652 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2653 Programming (ROP) attacks much more difficult to execute.
2654
2655 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002656 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002657
2658 GCCPIE ?= "--enable-default-pie"
2659
Andrew Geisslerf0343792020-11-18 10:42:21 -06002660 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002661 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002662 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002663 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002664
2665 GCCVERSION ?= "8.%"
2666
2667 You can override this value by setting it in a
2668 configuration file such as the ``local.conf``.
2669
Andrew Geisslerf0343792020-11-18 10:42:21 -06002670 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002671 The minimal command and arguments to run the GNU Debugger.
2672
Andrew Geissler595f6302022-01-24 19:11:47 +00002673 :term:`GIR_EXTRA_LIBS_PATH`
2674 Allows to specify an extra search path for ``.so`` files
2675 in GLib related recipes using GObject introspection,
2676 and which do not compile without this setting.
2677 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2678 section for details.
2679
Andrew Geisslerf0343792020-11-18 10:42:21 -06002680 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002681 The directory in which a local copy of a Git repository is stored
2682 when it is cloned.
2683
Andrew Geisslerf0343792020-11-18 10:42:21 -06002684 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002685 Specifies the list of GLIBC locales to generate should you not wish
2686 to generate all LIBC locals, which can be time consuming.
2687
2688 .. note::
2689
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002690 If you specifically remove the locale ``en_US.UTF-8``, you must set
2691 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002692
Andrew Geissler09036742021-06-25 14:25:14 -05002693 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002694 By default, all locales are generated.
2695 ::
2696
2697 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2698
Andrew Geisslerf0343792020-11-18 10:42:21 -06002699 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002700 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2701 this variable specifies for a package what parameters should be
2702 passed to the ``groupadd`` command if you wish to add a group to the
2703 system when the package is installed.
2704
Andrew Geisslerc926e172021-05-07 16:11:35 -05002705 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002706
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002707 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002708
2709 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002710 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002711
Andrew Geisslerf0343792020-11-18 10:42:21 -06002712 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002713 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2714 this variable specifies for a package what parameters should be
2715 passed to the ``groupmems`` command if you wish to modify the members
2716 of a group when the package is installed.
2717
2718 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002719 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002720
Andrew Geisslerf0343792020-11-18 10:42:21 -06002721 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002722 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2723 and serial in the boot menu. Set this variable to "1" in your
2724 ``local.conf`` or distribution configuration file to enable graphics
2725 and serial in the menu.
2726
2727 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2728 information on how this variable is used.
2729
Andrew Geisslerf0343792020-11-18 10:42:21 -06002730 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002731 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2732 configuration. Use a semi-colon character (``;``) to separate
2733 multiple options.
2734
Andrew Geissler09036742021-06-25 14:25:14 -05002735 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002736 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2737 on how this variable is used.
2738
Andrew Geisslerf0343792020-11-18 10:42:21 -06002739 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002740 Specifies the timeout before executing the default ``LABEL`` in the
2741 GNU GRand Unified Bootloader (GRUB).
2742
Andrew Geissler09036742021-06-25 14:25:14 -05002743 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002744 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2745 on how this variable is used.
2746
Andrew Geisslerf0343792020-11-18 10:42:21 -06002747 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002748 When inheriting the
2749 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2750 this variable specifies the packages that contain the GTK+ input
2751 method modules being installed when the modules are in packages other
2752 than the main package.
2753
Andrew Geisslerf0343792020-11-18 10:42:21 -06002754 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002755 Website where more information about the software the recipe is
2756 building can be found.
2757
Andrew Geisslerf0343792020-11-18 10:42:21 -06002758 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002759 The name of the target architecture, which is normally the same as
2760 :term:`TARGET_ARCH`. The OpenEmbedded build system
2761 supports many architectures. Here is an example list of architectures
2762 supported. This list is by no means complete as the architecture is
2763 configurable:
2764
2765 - arm
2766 - i586
2767 - x86_64
2768 - powerpc
2769 - powerpc64
2770 - mips
2771 - mipsel
2772
Andrew Geisslerf0343792020-11-18 10:42:21 -06002773 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002774 Specifies architecture-specific compiler flags that are passed to the
2775 C compiler.
2776
Andrew Geissler09036742021-06-25 14:25:14 -05002777 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002778 is being built:
2779
2780 - :term:`TARGET_CC_ARCH` when building for the
2781 target
2782
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002783 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002784 ``-native``)
2785
2786 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2787 ``nativesdk-``)
2788
Andrew Geisslerf0343792020-11-18 10:42:21 -06002789 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002790 Specifies the name of the target operating system, which is normally
2791 the same as the :term:`TARGET_OS`. The variable can
2792 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2793 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2794 "linux-musleabi" values possible.
2795
Andrew Geisslerf0343792020-11-18 10:42:21 -06002796 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002797 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002798 is normally the same as :term:`TARGET_PREFIX`.
2799
Andrew Geisslerf0343792020-11-18 10:42:21 -06002800 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002801 Specifies the system, including the architecture and the operating
2802 system, for which the build is occurring in the context of the
2803 current recipe.
2804
2805 The OpenEmbedded build system automatically sets this variable based
2806 on :term:`HOST_ARCH`,
2807 :term:`HOST_VENDOR`, and
2808 :term:`HOST_OS` variables.
2809
2810 .. note::
2811
2812 You do not need to set the variable yourself.
2813
2814 Consider these two examples:
2815
2816 - Given a native recipe on a 32-bit x86 machine running Linux, the
2817 value is "i686-linux".
2818
2819 - Given a recipe being built for a little-endian MIPS target running
2820 Linux, the value might be "mipsel-linux".
2821
Andrew Geisslerf0343792020-11-18 10:42:21 -06002822 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002823 A space-separated list (filter) of tools on the build host that
2824 should be allowed to be called from within build tasks. Using this
2825 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002826 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002827 host, the OpenEmbedded build system produces an error and the build
2828 is not started.
2829
2830 For additional information, see
2831 :term:`HOSTTOOLS_NONFATAL`.
2832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 A space-separated list (filter) of tools on the build host that
2835 should be allowed to be called from within build tasks. Using this
2836 filter helps reduce the possibility of host contamination. Unlike
2837 :term:`HOSTTOOLS`, the OpenEmbedded build system
2838 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002839 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2840 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002841
Andrew Geisslerf0343792020-11-18 10:42:21 -06002842 :term:`HOST_VENDOR`
Andrew Geissler09036742021-06-25 14:25:14 -05002843 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002844 same as :term:`TARGET_VENDOR`.
2845
Andrew Geisslerf0343792020-11-18 10:42:21 -06002846 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002847 Disables or enables the ``icecc`` (Icecream) function. For more
2848 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002849 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002850 section.
2851
2852 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002853 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002854
2855 ICECC_DISABLED ??= "1"
2856
Andrew Geisslerc926e172021-05-07 16:11:35 -05002857 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002858
2859 ICECC_DISABLED = ""
2860
Andrew Geisslerf0343792020-11-18 10:42:21 -06002861 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002862 Points to the ``icecc-create-env`` script that you provide. This
2863 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2864 set this variable in your ``local.conf`` file.
2865
2866 If you do not point to a script that you provide, the OpenEmbedded
2867 build system uses the default script provided by the
2868 ``icecc-create-env.bb`` recipe, which is a modified version and not
2869 the one that comes with ``icecc``.
2870
Andrew Geisslerf0343792020-11-18 10:42:21 -06002871 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002872 Extra options passed to the ``make`` command during the
2873 :ref:`ref-tasks-compile` task that specify parallel
2874 compilation. This variable usually takes the form of "-j x", where x
2875 represents the maximum number of parallel threads ``make`` can run.
2876
2877 .. note::
2878
2879 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002880 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002881
2882 If your enabled machines support multiple cores, coming up with the
2883 maximum number of parallel threads that gives you the best
2884 performance could take some experimentation since machine speed,
2885 network lag, available memory, and existing machine loads can all
2886 affect build time. Consequently, unlike the
2887 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002888 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002889 performance.
2890
Andrew Geissler09036742021-06-25 14:25:14 -05002891 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002892 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002893 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002894
Andrew Geisslerf0343792020-11-18 10:42:21 -06002895 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002896 The location of the ``icecc`` binary. You can set this variable in
2897 your ``local.conf`` file. If your ``local.conf`` file does not define
2898 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2899 to define it by locating ``icecc`` using ``which``.
2900
Andrew Geisslerf0343792020-11-18 10:42:21 -06002901 :term:`ICECC_USER_CLASS_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002902 Identifies user classes that you do not want the Icecream distributed
2903 compile support to consider. This variable is used by the
2904 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2905 your ``local.conf`` file.
2906
Andrew Geissler595f6302022-01-24 19:11:47 +00002907 When you list classes using this variable, the recipes inheriting
2908 those classes will not benefit from distributed compilation across
2909 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002910
Andrew Geisslerf0343792020-11-18 10:42:21 -06002911 :term:`ICECC_USER_PACKAGE_BL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002912 Identifies user recipes that you do not want the Icecream distributed
2913 compile support to consider. This variable is used by the
2914 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2915 your ``local.conf`` file.
2916
Andrew Geissler595f6302022-01-24 19:11:47 +00002917 When you list recipes using this variable, you are excluding them
2918 from distributed compilation across remote hosts. Instead they will
2919 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002920
Andrew Geisslerf0343792020-11-18 10:42:21 -06002921 :term:`ICECC_USER_PACKAGE_WL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002922 Identifies user recipes that use an empty
2923 :term:`PARALLEL_MAKE` variable that you want to
2924 force remote distributed compilation on using the Icecream
2925 distributed compile support. This variable is used by the
2926 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2927 your ``local.conf`` file.
2928
Andrew Geisslerf0343792020-11-18 10:42:21 -06002929 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002930 The base name of image output files. This variable defaults to the
2931 recipe name (``${``\ :term:`PN`\ ``}``).
2932
Andrew Geisslerf0343792020-11-18 10:42:21 -06002933 :term:`IMAGE_EFI_BOOT_FILES`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002934 A space-separated list of files installed into the boot partition
2935 when preparing an image using the Wic tool with the
2936 ``bootimg-efi`` source plugin. By default,
2937 the files are
2938 installed under the same name as the source files. To change the
2939 installed name, separate it from the original name with a semi-colon
2940 (;). Source files need to be located in
2941 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002942 examples::
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002943
2944 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
2945 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
2946
2947 Alternatively, source files can be picked up using a glob pattern. In
2948 this case, the destination file must have the same name as the base
2949 name of the source file path. To install files into a directory
2950 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002951 Here are two examples::
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002952
2953 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
2954 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
2955
2956 The first example
2957 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
2958 into the root of the target partition. The second example installs
2959 the same files into a ``boot`` directory within the target partition.
2960
2961 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002962 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002963 section of the Yocto Project Development Tasks Manual. Reference
2964 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002965 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002966
Andrew Geisslerf0343792020-11-18 10:42:21 -06002967 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002968 A space-separated list of files installed into the boot partition
2969 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002970 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002971 the files are
2972 installed under the same name as the source files. To change the
2973 installed name, separate it from the original name with a semi-colon
2974 (;). Source files need to be located in
2975 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002976 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002977
2978 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2979 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2980
2981 Alternatively, source files can be picked up using a glob pattern. In
2982 this case, the destination file must have the same name as the base
2983 name of the source file path. To install files into a directory
2984 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002985 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002986
2987 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2988 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2989
2990 The first example
2991 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2992 into the root of the target partition. The second example installs
2993 the same files into a ``boot`` directory within the target partition.
2994
2995 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002996 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002997 section of the Yocto Project Development Tasks Manual. Reference
2998 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002999 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003000
Andrew Geisslerf0343792020-11-18 10:42:21 -06003001 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003002 A list of classes that all images should inherit. You typically use
3003 this variable to specify the list of classes that register the
3004 different types of images the OpenEmbedded build system creates.
3005
Andrew Geissler09036742021-06-25 14:25:14 -05003006 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003007 set this variable in your ``local.conf`` or in a distribution
3008 configuration file.
3009
3010 For more information, see ``meta/classes/image_types.bbclass`` in the
3011 :term:`Source Directory`.
3012
Andrew Geisslerf0343792020-11-18 10:42:21 -06003013 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003014 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003015 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003016 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3017 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003018 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003019
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003020 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003021 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003022 ${EXTRA_IMAGECMD}"
3023
3024 You typically do not need to set this variable unless you are adding
3025 support for a new image type. For more examples on how to set this
3026 variable, see the :ref:`image_types <ref-classes-image_types>`
3027 class file, which is ``meta/classes/image_types.bbclass``.
3028
Andrew Geisslerf0343792020-11-18 10:42:21 -06003029 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003030 Specifies one or more files that contain custom device tables that
3031 are passed to the ``makedevs`` command as part of creating an image.
3032 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003033 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003034 ``files/device_table-minimal.txt`` is used, which is located by
3035 :term:`BBPATH`. For details on how you should write
3036 device table files, see ``meta/files/device_table-minimal.txt`` as an
3037 example.
3038
Andrew Geisslerf0343792020-11-18 10:42:21 -06003039 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003040 The primary list of features to include in an image. Typically, you
3041 configure this variable in an image recipe. Although you can use this
3042 variable from your ``local.conf`` file, which is found in the
3043 :term:`Build Directory`, best practices dictate that you do
3044 not.
3045
3046 .. note::
3047
3048 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003049 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003050
3051 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003052 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003053
3054 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003055 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 -05003056 section in the Yocto Project Development Tasks Manual.
3057
Andrew Geisslerf0343792020-11-18 10:42:21 -06003058 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003059 Specifies the formats the OpenEmbedded build system uses during the
3060 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003061 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003062 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003063
3064 IMAGE_FSTYPES = "ext3 tar.bz2"
3065
3066 For the complete list of supported image formats from which you can
3067 choose, see :term:`IMAGE_TYPES`.
3068
3069 .. note::
3070
3071 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003072 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003073 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003074
3075 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003076 variable, you cannot update its contents by using ``:append``
3077 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003078 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003079
Andrew Geisslerf0343792020-11-18 10:42:21 -06003080 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003081 Used by recipes to specify the packages to install into an image
3082 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003083 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003084
Andrew Geissler09036742021-06-25 14:25:14 -05003085 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003086 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003087 there are "helper" classes such as the
3088 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003089 take lists used with :term:`IMAGE_FEATURES` and turn them into
3090 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003091 default contents.
3092
Andrew Geisslerc926e172021-05-07 16:11:35 -05003093 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003094
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003095 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003096
3097 Be sure to include the space
3098 between the quotation character and the start of the package name or
3099 names.
3100
3101 .. note::
3102
3103 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003104 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003105 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003106 packages for installation. Instead, use the
3107 :term:`PACKAGE_INSTALL` variable, which
3108 allows the initial RAM filesystem (initramfs) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003109 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003110 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003111 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003112 section in the Yocto Project Development Tasks Manual.
3113
Andrew Geissler09036742021-06-25 14:25:14 -05003114 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003115 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003116 BitBake operator within the ``/conf/local.conf`` file or from
3117 within an image recipe is not recommended. Use of this operator
3118 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003119 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003120 value using the
3121 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003122 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003123 results in unexpected behavior when used within
3124 ``conf/local.conf``. Furthermore, the same operation from
3125 within an image recipe may or may not succeed depending on the
3126 specific situation. In both these cases, the behavior is
3127 contrary to how most users expect the ``+=`` operator to work.
3128
Andrew Geisslerf0343792020-11-18 10:42:21 -06003129 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003130 Specifies the list of locales to install into the image during the
3131 root filesystem construction process. The OpenEmbedded build system
3132 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003133 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003134 ensures that any locale packages that correspond to packages already
3135 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003136 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003137
3138 IMAGE_LINGUAS = "pt-br de-de"
3139
3140 In this example, the build system ensures any Brazilian Portuguese
3141 and German locale files that correspond to packages in the image are
3142 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3143 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3144 only provide locale files by language and not by country-specific
3145 language).
3146
3147 See the :term:`GLIBC_GENERATE_LOCALES`
3148 variable for information on generating GLIBC locales.
3149
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003150
3151 :term:`IMAGE_LINK_NAME`
3152 The name of the output image symlink (which does not include
3153 the version part as :term:`IMAGE_NAME` does). The default value
3154 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003155 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003156
3157 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3158
3159
Andrew Geisslerf0343792020-11-18 10:42:21 -06003160 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003161 The manifest file for the image. This file lists all the installed
3162 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003163 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003164
3165 packagename packagearch version
3166
Andrew Geissler09036742021-06-25 14:25:14 -05003167 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003168 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003169
Andrew Geissler09036742021-06-25 14:25:14 -05003170 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003171
3172 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003173 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003174 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003175 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003176 section in the Yocto Project Overview and Concepts Manual.
3177
Andrew Geisslerf0343792020-11-18 10:42:21 -06003178 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003179 The name of the output image files minus the extension. This variable
3180 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003181 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003182 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003183
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003184 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3185
3186 :term:`IMAGE_NAME_SUFFIX`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003187 Suffix used for the image output filename - defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003188 to distinguish the image file from other files created during image
3189 building; however if this suffix is redundant or not desired you can
3190 clear the value of this variable (set the value to ""). For example,
3191 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003192
Andrew Geisslerf0343792020-11-18 10:42:21 -06003193 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003194 Defines a multiplier that the build system applies to the initial
3195 image size for cases when the multiplier times the returned disk
3196 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003197 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003198 the multiplier applied to the initial image size creates free disk
3199 space in the image as overhead. By default, the build process uses a
3200 multiplier of 1.3 for this variable. This default value results in
3201 30% free disk space added to the image when this method is used to
3202 determine the final generated image size. You should be aware that
3203 post install scripts and the package management system uses disk
3204 space inside this overhead area. Consequently, the multiplier does
3205 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003206 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003207 determines the overall image size.
3208
3209 The default 30% free disk space typically gives the image enough room
3210 to boot and allows for basic post installs while still leaving a
3211 small amount of free disk space. If 30% free space is inadequate, you
3212 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003213 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003214
3215 IMAGE_OVERHEAD_FACTOR = "1.5"
3216
3217 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003218 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003219 variable.
3220
Andrew Geisslerf0343792020-11-18 10:42:21 -06003221 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003222 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3223 OpenEmbedded build system. The variable is defined appropriately by
3224 the :ref:`package_deb <ref-classes-package_deb>`,
3225 :ref:`package_rpm <ref-classes-package_rpm>`,
3226 :ref:`package_ipk <ref-classes-package_ipk>`, or
3227 :ref:`package_tar <ref-classes-package_tar>` class.
3228
3229 .. note::
3230
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003231 The ``package_tar`` class is broken and is not supported. It is
3232 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003233
3234 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003235 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003236 for packaging up images and SDKs.
3237
Andrew Geissler09036742021-06-25 14:25:14 -05003238 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003239 variable is set indirectly through the appropriate
3240 :ref:`package_* <ref-classes-package>` class using the
3241 :term:`PACKAGE_CLASSES` variable. The
3242 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3243 or IPK) that appears with the variable
3244
3245 .. note::
3246
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003247 Files using the ``.tar`` format are never used as a substitute
3248 packaging format for DEB, RPM, and IPK formatted files for your image
3249 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003250
Andrew Geisslerf0343792020-11-18 10:42:21 -06003251 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003252 Specifies a list of functions to call once the OpenEmbedded build
3253 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003254 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003255
3256 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3257
3258 If you need to pass the root filesystem path to a command within the
3259 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3260 directory that becomes the root filesystem image. See the
3261 :term:`IMAGE_ROOTFS` variable for more
3262 information.
3263
Andrew Geisslerf0343792020-11-18 10:42:21 -06003264 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003265 Specifies a list of functions to call before the OpenEmbedded build
3266 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003267 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003268
3269 IMAGE_PREPROCESS_COMMAND += "function; ... "
3270
3271 If you need to pass the root filesystem path to a command within the
3272 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3273 directory that becomes the root filesystem image. See the
3274 :term:`IMAGE_ROOTFS` variable for more
3275 information.
3276
Andrew Geisslerf0343792020-11-18 10:42:21 -06003277 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003278 The location of the root filesystem while it is under construction
3279 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3280 variable is not configurable. Do not change it.
3281
Andrew Geisslerf0343792020-11-18 10:42:21 -06003282 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003283 Specifies the alignment for the output image file in Kbytes. If the
3284 size of the image is not a multiple of this value, then the size is
3285 rounded up to the nearest multiple of the value. The default value is
3286 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3287 additional information.
3288
Andrew Geisslerf0343792020-11-18 10:42:21 -06003289 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003290 Defines additional free disk space created in the image in Kbytes. By
3291 default, this variable is set to "0". This free disk space is added
3292 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003293 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003294
3295 This variable is particularly useful when you want to ensure that a
3296 specific amount of free disk space is available on a device after an
3297 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003298 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003299
3300 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3301
3302 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003303 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003304
3305 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3306
Andrew Geisslerf0343792020-11-18 10:42:21 -06003307 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003308 Defines the size in Kbytes for the generated image. The OpenEmbedded
3309 build system determines the final size for the generated image using
3310 an algorithm that takes into account the initial disk space used for
3311 the generated image, a requested size for the image, and requested
3312 additional free disk space to be added to the image. Programatically,
3313 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003314 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003315
3316 if (image-du * overhead) < rootfs-size:
3317 internal-rootfs-size = rootfs-size + xspace
3318 else:
3319 internal-rootfs-size = (image-du * overhead) + xspace
3320 where:
3321 image-du = Returned value of the du command on the image.
3322 overhead = IMAGE_OVERHEAD_FACTOR
3323 rootfs-size = IMAGE_ROOTFS_SIZE
3324 internal-rootfs-size = Initial root filesystem size before any modifications.
3325 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3326
3327 See the :term:`IMAGE_OVERHEAD_FACTOR`
3328 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3329 variables for related information.
3330
Andrew Geisslerf0343792020-11-18 10:42:21 -06003331 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003332 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003333 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003334
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003335 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003336
3337 In the previous example, the variable ensures that when "live" is
3338 listed with the :term:`IMAGE_FSTYPES` variable,
3339 the OpenEmbedded build system produces an ``ext3`` image first since
3340 one of the components of the live image is an ``ext3`` formatted
3341 partition containing the root filesystem.
3342
Andrew Geisslerf0343792020-11-18 10:42:21 -06003343 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003344 Specifies the complete list of supported image types by default:
3345
3346 - btrfs
3347 - container
3348 - cpio
3349 - cpio.gz
3350 - cpio.lz4
3351 - cpio.lzma
3352 - cpio.xz
3353 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003354 - erofs
3355 - erofs-lz4
3356 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003357 - ext2
3358 - ext2.bz2
3359 - ext2.gz
3360 - ext2.lzma
3361 - ext3
3362 - ext3.gz
3363 - ext4
3364 - ext4.gz
3365 - f2fs
3366 - hddimg
3367 - iso
3368 - jffs2
3369 - jffs2.sum
3370 - multiubi
3371 - squashfs
3372 - squashfs-lz4
3373 - squashfs-lzo
3374 - squashfs-xz
3375 - tar
3376 - tar.bz2
3377 - tar.gz
3378 - tar.lz4
3379 - tar.xz
3380 - tar.zst
3381 - ubi
3382 - ubifs
3383 - wic
3384 - wic.bz2
3385 - wic.gz
3386 - wic.lzma
3387
3388 For more information about these types of images, see
3389 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3390
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003391 :term:`IMAGE_VERSION_SUFFIX`
3392 Version suffix that is part of the default :term:`IMAGE_NAME` and
3393 :term:`KERNEL_ARTIFACT_NAME` values.
3394 Defaults to ``"-${DATETIME}"``, however you could set this to a
3395 version string that comes from your external build environment if
3396 desired, and this suffix would then be used consistently across
3397 the build artifacts.
3398
Andrew Geissler09036742021-06-25 14:25:14 -05003399 :term:`IMGDEPLOYDIR`
3400 When inheriting the :ref:`image <ref-classes-image>` class directly or
3401 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003402 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003403 that is set in the ``image`` class as follows::
3404
3405 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3406
3407 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003408 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003409 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3410
Andrew Geisslerf0343792020-11-18 10:42:21 -06003411 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003412 Helps define the recipe revision for recipes that share a common
3413 ``include`` file. You can think of this variable as part of the
3414 recipe revision as set from within an include file.
3415
3416 Suppose, for example, you have a set of recipes that are used across
3417 several projects. And, within each of those recipes the revision (its
3418 :term:`PR` value) is set accordingly. In this case, when
3419 the revision of those recipes changes, the burden is on you to find
3420 all those recipes and be sure that they get changed to reflect the
3421 updated version of the recipe. In this scenario, it can get
3422 complicated when recipes that are used in many places and provide
3423 common functionality are upgraded to a new revision.
3424
3425 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003426 :term:`INC_PR` variable inside the ``include`` files that the recipes
3427 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003428 help define the recipe revision.
3429
3430 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003431 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003432 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003433 can use the variable to set the :term:`PR` values in each recipe. You
3434 will notice that when you set a recipe's :term:`PR` you can provide more
3435 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003436
3437 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3438 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3439 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3440 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3441
3442 The
3443 first line of the example establishes the baseline revision to be
3444 used for all recipes that use the ``include`` file. The remaining
3445 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003446 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003447
Andrew Geisslerf0343792020-11-18 10:42:21 -06003448 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003449 Specifies a space-separated list of license names (as they would
3450 appear in :term:`LICENSE`) that should be excluded
3451 from the build. Recipes that provide no alternatives to listed
3452 incompatible licenses are not built. Packages that are individually
3453 licensed with the specified incompatible licenses will be deleted.
3454
3455 .. note::
3456
3457 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003458 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003459
3460 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3461
3462
3463 Although you can use other settings, you might be required to
3464 remove dependencies on or provide alternatives to components that
3465 are required to produce a functional system image.
3466
3467 .. note::
3468
3469 It is possible to define a list of licenses that are allowed to be
3470 used instead of the licenses that are excluded. To do this, define
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003471 a variable ``COMPATIBLE_LICENSES`` with the names of the licenses
Andrew Geissler09036742021-06-25 14:25:14 -05003472 that are allowed. Then define :term:`INCOMPATIBLE_LICENSE` as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003473
3474 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3475
3476
Andrew Geissler09036742021-06-25 14:25:14 -05003477 This will result in :term:`INCOMPATIBLE_LICENSE` containing the names of
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003478 all licenses from :term:`AVAILABLE_LICENSES` except the ones specified
3479 in ``COMPATIBLE_LICENSES``, thus only allowing the latter licenses to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003480 be used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003481
Andrew Geisslerf0343792020-11-18 10:42:21 -06003482 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003483 Causes the named class or classes to be inherited globally. Anonymous
3484 functions in the class or classes are not executed for the base
3485 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003486 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003487
Andrew Geissler09036742021-06-25 14:25:14 -05003488 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003489 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3490 section in the Bitbake User Manual.
3491
Andrew Geisslerf0343792020-11-18 10:42:21 -06003492 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003493 Lists classes that will be inherited at the distribution level. It is
3494 unlikely that you want to edit this variable.
3495
3496 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003497 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003498
3499 INHERIT_DISTRO ?= "debian devshell sstate license"
3500
Andrew Geisslerf0343792020-11-18 10:42:21 -06003501 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003502 Prevents the default dependencies, namely the C compiler and standard
3503 C library (libc), from being added to :term:`DEPENDS`.
3504 This variable is usually used within recipes that do not require any
3505 compilation using the C compiler.
3506
3507 Set the variable to "1" to prevent the default dependencies from
3508 being added.
3509
Andrew Geisslerf0343792020-11-18 10:42:21 -06003510 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003511 Prevents the OpenEmbedded build system from splitting out debug
3512 information during packaging. By default, the build system splits out
3513 debugging information during the
3514 :ref:`ref-tasks-package` task. For more information on
3515 how debug information is split out, see the
3516 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3517 variable.
3518
3519 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003520 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003521 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003522
3523 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3524
Andrew Geisslerf0343792020-11-18 10:42:21 -06003525 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003526 If set to "1", causes the build to not strip binaries in resulting
3527 packages and prevents the ``-dbg`` package from containing the source
3528 files.
3529
3530 By default, the OpenEmbedded build system strips binaries and puts
3531 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003532 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003533 plan to debug in general.
3534
Andrew Geisslerf0343792020-11-18 10:42:21 -06003535 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003536 If set to "1", causes the build to not strip binaries in the
3537 resulting sysroot.
3538
3539 By default, the OpenEmbedded build system strips binaries in the
3540 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003541 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003542 this stripping.
3543
3544 If you want to use this variable, include the
3545 :ref:`staging <ref-classes-staging>` class. This class uses a
3546 ``sys_strip()`` function to test for the variable and acts
3547 accordingly.
3548
3549 .. note::
3550
Andrew Geissler09036742021-06-25 14:25:14 -05003551 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003552 special circumstances. For example, suppose you are building
3553 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003554 even if the toolchain's binaries are strippable, there are other files
3555 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003556
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003557 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
3558 Indicates the deploy directory used by ``do_bundle_initramfs`` where the
3559 :term:`INITRAMFS_IMAGE` will be fetched from.
3560 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3561 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
3562 when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
3563
Andrew Geisslerf0343792020-11-18 10:42:21 -06003564 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003565 Defines the format for the output image of an initial RAM filesystem
3566 (initramfs), which is used during boot. Supported formats are the
3567 same as those supported by the
3568 :term:`IMAGE_FSTYPES` variable.
3569
3570 The default value of this variable, which is set in the
3571 ``meta/conf/bitbake.conf`` configuration file in the
3572 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3573 initramfs mechanism, as opposed to the initial RAM filesystem
3574 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3575 an optionally compressed cpio archive.
3576
Andrew Geisslerf0343792020-11-18 10:42:21 -06003577 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003578 Specifies the :term:`PROVIDES` name of an image
3579 recipe that is used to build an initial RAM filesystem (initramfs)
Andrew Geissler09036742021-06-25 14:25:14 -05003580 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003581 additional recipe to be built as a dependency to whatever root
3582 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3583 initramfs image recipe you provide should set
3584 :term:`IMAGE_FSTYPES` to
3585 :term:`INITRAMFS_FSTYPES`.
3586
3587 An initramfs image provides a temporary root filesystem used for
3588 early system initialization (e.g. loading of modules needed to locate
3589 and mount the "real" root filesystem).
3590
3591 .. note::
3592
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003593 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3594 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003595 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler09036742021-06-25 14:25:14 -05003596 the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003597 to "core-image-minimal-initramfs".
3598
3599 You can also find more information by referencing the
3600 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3601 the Source Directory, the :ref:`image <ref-classes-image>` class,
3602 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
Andrew Geissler09036742021-06-25 14:25:14 -05003603 the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003604
Andrew Geissler09036742021-06-25 14:25:14 -05003605 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003606 initramfs image is built.
3607
3608 For more information, you can also see the
3609 :term:`INITRAMFS_IMAGE_BUNDLE`
3610 variable, which allows the generated image to be bundled inside the
3611 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003612 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003613 in the Yocto Project Development Tasks Manual.
3614
Andrew Geisslerf0343792020-11-18 10:42:21 -06003615 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003616 Controls whether or not the image recipe specified by
3617 :term:`INITRAMFS_IMAGE` is run through an
3618 extra pass
3619 (:ref:`ref-tasks-bundle_initramfs`) during
3620 kernel compilation in order to build a single binary that contains
3621 both the kernel image and the initial RAM filesystem (initramfs)
3622 image. This makes use of the
3623 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3624 feature.
3625
3626 .. note::
3627
Patrick Williams93c203f2021-10-06 16:15:23 -05003628 Bundling the initramfs with the kernel conflates the code in the
3629 initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3630 compatible software may be part of a bundled initramfs.
3631
3632 .. note::
3633
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003634 Using an extra compilation pass to bundle the initramfs avoids a
3635 circular dependency between the kernel recipe and the initramfs
3636 recipe should the initramfs include kernel modules. Should that be
3637 the case, the initramfs recipe depends on the kernel for the
3638 kernel modules, and the kernel depends on the initramfs recipe
3639 since the initramfs is bundled inside the kernel image.
3640
3641 The combined binary is deposited into the ``tmp/deploy`` directory,
3642 which is part of the :term:`Build Directory`.
3643
3644 Setting the variable to "1" in a configuration file causes the
3645 OpenEmbedded build system to generate a kernel image with the
Andrew Geissler09036742021-06-25 14:25:14 -05003646 initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003647
3648 INITRAMFS_IMAGE_BUNDLE = "1"
3649
3650 By default, the
3651 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003652 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003653
3654 INITRAMFS_IMAGE_BUNDLE ?= ""
3655
3656 .. note::
3657
Andrew Geissler09036742021-06-25 14:25:14 -05003658 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003659 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003660
3661 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003662 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003663 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003664 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003665 in the Yocto Project Development Tasks Manual.
3666
Andrew Geisslerf0343792020-11-18 10:42:21 -06003667 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003668 The link name of the initial RAM filesystem image. This variable is
3669 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003670 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003671
3672 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3673
3674 The value of the
3675 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003676 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003677
3678 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3679
3680 See the :term:`MACHINE` variable for additional
3681 information.
3682
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003683 :term:`INITRAMFS_MULTICONFIG`
3684 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3685
3686 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3687 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3688
3689 For more information on how to bundle an initramfs image from a separate
3690 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3691 section in the Yocto Project Development Tasks Manual.
3692
Andrew Geisslerf0343792020-11-18 10:42:21 -06003693 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003694 The base name of the initial RAM filesystem image. This variable is
3695 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003696 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003697
3698 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3699
3700 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003701 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003702
3703 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3704
Andrew Geisslerf0343792020-11-18 10:42:21 -06003705 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003706 Indicates list of filesystem images to concatenate and use as an
3707 initial RAM disk (``initrd``).
3708
Andrew Geissler09036742021-06-25 14:25:14 -05003709 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003710 :ref:`image-live <ref-classes-image-live>` class.
3711
Andrew Geisslerf0343792020-11-18 10:42:21 -06003712 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003713 When building a "live" bootable image (i.e. when
3714 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003715 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003716 provide the initial RAM disk image. The default value is
3717 "core-image-minimal-initramfs".
3718
3719 See the :ref:`image-live <ref-classes-image-live>` class for more
3720 information.
3721
Andrew Geisslerf0343792020-11-18 10:42:21 -06003722 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003723 The filename of the initialization script as installed to
3724 ``${sysconfdir}/init.d``.
3725
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003726 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003727 The variable is mandatory.
3728
Andrew Geisslerf0343792020-11-18 10:42:21 -06003729 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003730 A list of the packages that contain initscripts. If multiple packages
3731 are specified, you need to append the package name to the other
3732 ``INITSCRIPT_*`` as an override.
3733
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003734 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003735 The variable is optional and defaults to the :term:`PN`
3736 variable.
3737
Andrew Geisslerf0343792020-11-18 10:42:21 -06003738 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003739 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003740
3741 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3742
3743 In this example, the script has a runlevel of 99, starts the script
3744 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3745
3746 The variable's default value is "defaults", which is set in the
3747 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3748
Andrew Geissler09036742021-06-25 14:25:14 -05003749 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003750 ``update-rc.d`` command. For more information on valid parameters,
3751 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003752 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003753
Andrew Geisslerf0343792020-11-18 10:42:21 -06003754 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003755 Specifies the QA checks to skip for a specific package within a
3756 recipe. For example, to skip the check for symbolic link ``.so``
3757 files in the main package of a recipe, add the following to the
3758 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003759 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003760
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003761 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003762
Andrew Geissler595f6302022-01-24 19:11:47 +00003763 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003764 list of the valid QA checks you can specify using this variable.
3765
Andrew Geisslerf0343792020-11-18 10:42:21 -06003766 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003767 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003768 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003769 configuration level to disable this behavior.
3770
Andrew Geisslerf0343792020-11-18 10:42:21 -06003771 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003772 When the IPK backend is in use and package management is enabled on
3773 the target, you can use this variable to set up ``opkg`` in the
3774 target image to point to package feeds on a nominated server. Once
3775 the feed is established, you can perform installations or upgrades
3776 using the package manager at runtime.
3777
Andrew Geisslerf0343792020-11-18 10:42:21 -06003778 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003779 Defines the kernel architecture used when assembling the
3780 configuration. Architectures supported for this release are:
3781
3782 - powerpc
3783 - i386
3784 - x86_64
3785 - arm
3786 - qemu
3787 - mips
3788
Andrew Geissler5f350902021-07-23 13:09:54 -04003789 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003790
Andrew Geisslerf0343792020-11-18 10:42:21 -06003791 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003792 A regular expression used by the build process to explicitly identify
3793 the kernel branch that is validated, patched, and configured during a
3794 build. You must set this variable to ensure the exact kernel branch
3795 you want is being used by the build process.
3796
3797 Values for this variable are set in the kernel's recipe file and the
3798 kernel's append file. For example, if you are using the
3799 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003800 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003801 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003802
3803 KBRANCH ?= "standard/base"
3804
3805 This variable is also used from the kernel's append file to identify
3806 the kernel branch specific to a particular machine or target
3807 hardware. Continuing with the previous kernel example, the kernel's
3808 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3809 BSP layer for a given machine. For example, the append file for the
3810 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3811 machines (``meta-yocto-bsp``) is named
3812 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003813 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003814
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003815 KBRANCH:genericx86 = "standard/base"
3816 KBRANCH:genericx86-64 = "standard/base"
3817 KBRANCH:edgerouter = "standard/edgerouter"
3818 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003819
Andrew Geissler09036742021-06-25 14:25:14 -05003820 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003821 identify the kernel branch to use when building for each supported
3822 BSP.
3823
Andrew Geisslerf0343792020-11-18 10:42:21 -06003824 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003825 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3826 class, specifies an "in-tree" kernel configuration file for use
3827 during a kernel build.
3828
3829 Typically, when using a ``defconfig`` to configure a kernel during a
3830 build, you place the file in your layer in the same manner as you
3831 would place patch files and configuration fragment files (i.e.
3832 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3833 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003834 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003835 :term:`KMACHINE` variable to point to the
3836 ``defconfig`` file.
3837
3838 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003839 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003840
3841 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3842
Andrew Geissler09036742021-06-25 14:25:14 -05003843 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003844 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003845
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003846 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003847
Andrew Geisslerc926e172021-05-07 16:11:35 -05003848 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003849
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003850 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003851
3852 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003853 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003854 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003855 section in the Yocto Project Linux Kernel Development Manual.
3856
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003857 :term:`KCONFIG_MODE`
3858 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3859 class, specifies the kernel configuration values to use for options
3860 not specified in the provided ``defconfig`` file. Valid options are::
3861
3862 KCONFIG_MODE = "alldefconfig"
3863 KCONFIG_MODE = "allnoconfig"
3864
3865 In ``alldefconfig`` mode the options not explicitly specified will be
3866 assigned their Kconfig default value. In ``allnoconfig`` mode the
3867 options not explicitly specified will be disabled in the kernel
3868 config.
3869
Andrew Geissler09036742021-06-25 14:25:14 -05003870 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003871 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3872 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3873 in ``${WORKDIR}`` through a meta-layer will be handled in
3874 ``allnoconfig`` mode.
3875
3876 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003877 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003878 be explicitly set.
3879
3880 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3881 generated by copying the ``.config`` file from a working Linux kernel
3882 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05003883 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003884 not need to be explicitly set.
3885
3886 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3887 generated using the
3888 :ref:`ref-tasks-savedefconfig`
3889 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05003890 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003891
3892 KCONFIG_MODE = "alldefconfig"
3893
3894
Andrew Geisslerf0343792020-11-18 10:42:21 -06003895 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003896 Specifies an alternate kernel image type for creation in addition to
3897 the kernel image type specified using the
3898 :term:`KERNEL_IMAGETYPE` variable.
3899
Andrew Geisslerf0343792020-11-18 10:42:21 -06003900 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003901 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05003902 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003903 variable.
3904
Andrew Geissler09036742021-06-25 14:25:14 -05003905 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003906 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003907 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003908
3909 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3910
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003911 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
3912 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003913
Andrew Geisslerf0343792020-11-18 10:42:21 -06003914 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003915 A list of classes defining kernel image types that the
3916 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3917 typically append this variable to enable extended image types. An
3918 example is the "kernel-fitimage", which enables fitImage support and
3919 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00003920 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003921 variable.
3922
Andrew Geisslerf0343792020-11-18 10:42:21 -06003923 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003924 Specifies the name of the generated Linux kernel device tree (i.e.
3925 the ``.dtb``) file.
3926
3927 .. note::
3928
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003929 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003930 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003931
3932 In order to use this variable, the
3933 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3934 be inherited.
3935
Andrew Geisslerf0343792020-11-18 10:42:21 -06003936 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003937 The link name of the kernel device tree binary (DTB). This variable
3938 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003939 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003940
3941 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3942
3943 The
3944 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05003945 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003946
3947 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3948
3949 See the :term:`MACHINE` variable for additional
3950 information.
3951
Andrew Geisslerf0343792020-11-18 10:42:21 -06003952 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003953 The base name of the kernel device tree binary (DTB). This variable
3954 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003955 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003956
3957 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3958
3959 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003960 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003961
3962 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3963
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003964 :term:`KERNEL_DTC_FLAGS`
3965 Specifies the ``dtc`` flags that are passed to the Linux kernel build
3966 system when generating the device trees (via ``DTC_FLAGS`` environment
3967 variable).
3968
3969 In order to use this variable, the
3970 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3971 be inherited.
3972
Andrew Geisslerf0343792020-11-18 10:42:21 -06003973 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003974 Specifies additional ``make`` command-line arguments the OpenEmbedded
3975 build system passes on when compiling the kernel.
3976
Andrew Geisslerf0343792020-11-18 10:42:21 -06003977 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003978 Includes additional kernel metadata. In the OpenEmbedded build
3979 system, the default Board Support Packages (BSPs)
3980 :term:`Metadata` is provided through the
3981 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05003982 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003983 the kernel recipe or kernel append file to further add metadata for
3984 all BSPs or specific BSPs.
3985
3986 The metadata you add through this variable includes config fragments
3987 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05003988 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003989 variable for a specific machine. In this way, you can provide
3990 validated, but optional, sets of kernel configurations and features.
3991
3992 For example, the following example from the ``linux-yocto-rt_4.12``
3993 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3994 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003995 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003996
3997 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003998 KERNEL_FEATURES:append = "${KERNEL_EXTRA_FEATURES}"
3999 KERNEL_FEATURES:append:qemuall = "cfg/virtio.scc"
4000 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4001 KERNEL_FEATURES:append:qemux86-64 = "cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004002
Andrew Geisslerf0343792020-11-18 10:42:21 -06004003 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004004 The link name of the kernel flattened image tree (FIT) image. This
4005 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004006 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004007
4008 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4009
4010 The value of the
4011 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004012 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004013
4014 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4015
4016 See the :term:`MACHINE` variable for additional
4017 information.
4018
Andrew Geisslerf0343792020-11-18 10:42:21 -06004019 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004020 The base name of the kernel flattened image tree (FIT) image. This
4021 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004022 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004023
4024 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4025
4026 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004027 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004028
4029 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4030
Andrew Geisslerf0343792020-11-18 10:42:21 -06004031 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004032 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004033 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004034
4035 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4036
4037 The value of
4038 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004039 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004040
4041 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4042
4043 See the :term:`MACHINE` variable for additional
4044 information.
4045
Andrew Geisslerf0343792020-11-18 10:42:21 -06004046 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004047 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004048 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004049 checked against the set value during the
4050 :ref:`ref-tasks-sizecheck` task. The task fails if
4051 the kernel image file is larger than the setting.
4052
Andrew Geissler09036742021-06-25 14:25:14 -05004053 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004054 limited amount of space in which the kernel image must be stored.
4055
4056 By default, this variable is not set, which means the size of the
4057 kernel image is not checked.
4058
Andrew Geisslerf0343792020-11-18 10:42:21 -06004059 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004060 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004061 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004062
4063 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4064
4065 The value of the
4066 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004067 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004068
4069 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4070
Andrew Geisslerf0343792020-11-18 10:42:21 -06004071 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004072 The type of kernel to build for a device, usually set by the machine
4073 configuration files and defaults to "zImage". This variable is used
4074 when building the kernel and is passed to ``make`` as the target to
4075 build.
4076
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004077 If you want to build an alternate kernel image type in addition to that
Andrew Geissler09036742021-06-25 14:25:14 -05004078 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004079 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004080
Andrew Geisslerf0343792020-11-18 10:42:21 -06004081 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004082 Lists kernel modules that need to be auto-loaded during boot.
4083
4084 .. note::
4085
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004086 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004087 variable.
4088
Andrew Geissler09036742021-06-25 14:25:14 -05004089 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004090 can be recognized by the kernel recipe or by an out-of-tree kernel
4091 module recipe (e.g. a machine configuration file, a distribution
4092 configuration file, an append file for the recipe, or the recipe
4093 itself).
4094
Andrew Geisslerc926e172021-05-07 16:11:35 -05004095 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004096
4097 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4098
Andrew Geissler09036742021-06-25 14:25:14 -05004099 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004100 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4101 the list of modules to be auto-loaded on boot. The modules appear
4102 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004103 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004104
4105 KERNEL_MODULE_AUTOLOAD += "module_name"
4106
4107 For information on how to populate the ``modname.conf`` file with
4108 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4109
Andrew Geisslerf0343792020-11-18 10:42:21 -06004110 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004111 Provides a list of modules for which the OpenEmbedded build system
4112 expects to find ``module_conf_``\ modname values that specify
4113 configuration for each of the modules. For information on how to
4114 provide those module configurations, see the
4115 :term:`module_conf_* <module_conf>` variable.
4116
Andrew Geisslerf0343792020-11-18 10:42:21 -06004117 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004118 The location of the kernel sources. This variable is set to the value
4119 of the :term:`STAGING_KERNEL_DIR` within
4120 the :ref:`module <ref-classes-module>` class. For information on
4121 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004122 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004123 section in the Yocto Project Linux Kernel Development Manual.
4124
4125 To help maximize compatibility with out-of-tree drivers used to build
4126 modules, the OpenEmbedded build system also recognizes and uses the
4127 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004128 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004129 used by external Makefiles to point to the kernel source directory.
4130
Andrew Geisslerf0343792020-11-18 10:42:21 -06004131 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004132 The location of the kernel sources. This variable is set to the value
4133 of the :term:`STAGING_KERNEL_DIR` within
4134 the :ref:`module <ref-classes-module>` class. For information on
4135 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004136 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004137 section in the Yocto Project Linux Kernel Development Manual.
4138
4139 To help maximize compatibility with out-of-tree drivers used to build
4140 modules, the OpenEmbedded build system also recognizes and uses the
4141 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004142 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004143 used by external Makefiles to point to the kernel source directory.
4144
Andrew Geisslerf0343792020-11-18 10:42:21 -06004145 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004146 Specifies the version of the kernel as extracted from ``version.h``
4147 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004148 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004149 configured. Consequently, attempting to refer to this variable in
4150 contexts prior to configuration will not work.
4151
Andrew Geisslerf0343792020-11-18 10:42:21 -06004152 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004153 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004154 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004155 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004156 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004157 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004158 ``initramfs`` recipe. Setting the variable there when the data is not
4159 needed avoids a potential dependency loop.
4160
Andrew Geisslerf0343792020-11-18 10:42:21 -06004161 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004162 Provides a short description of a configuration fragment. You use
4163 this variable in the ``.scc`` file that describes a configuration
4164 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004165 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004166
4167 define KFEATURE_DESCRIPTION "Enable SMP"
4168
Andrew Geisslerf0343792020-11-18 10:42:21 -06004169 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004170 The machine as known by the kernel. Sometimes the machine name used
4171 by the kernel does not match the machine name used by the
4172 OpenEmbedded build system. For example, the machine name that the
4173 OpenEmbedded build system understands as ``core2-32-intel-common``
4174 goes by a different name in the Linux Yocto kernel. The kernel
4175 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004176 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004177 OpenEmbedded build system machine name.
4178
4179 These mappings between different names occur in the Yocto Linux
4180 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004181 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004182
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004183 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4184 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4185 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4186 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4187 KMACHINE:core2-32-intel-common = "intel-core2-32"
4188 KBRANCH:core2-32-intel-common = "standard/base"
4189 KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004190
Andrew Geissler09036742021-06-25 14:25:14 -05004191 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004192 that the kernel understands the machine name as "intel-core2-32".
4193 However, the OpenEmbedded build system understands the machine as
4194 "core2-32-intel-common".
4195
Andrew Geisslerf0343792020-11-18 10:42:21 -06004196 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004197 Defines the kernel type to be used in assembling the configuration.
4198 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004199 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004200 section in the
4201 Yocto Project Linux Kernel Development Manual for more information on
4202 kernel types.
4203
Andrew Geissler09036742021-06-25 14:25:14 -05004204 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004205 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004206 value you use must match the value used for the
4207 :term:`LINUX_KERNEL_TYPE` value used by the
4208 kernel recipe.
4209
Andrew Geisslerf0343792020-11-18 10:42:21 -06004210 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004211 Provides a list of targets for automatic configuration.
4212
4213 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4214 information on how this variable is used.
4215
Andrew Geisslerf0343792020-11-18 10:42:21 -06004216 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004217 Lists the layers, separated by spaces, on which this recipe depends.
4218 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004219 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004220
4221 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4222
4223 In this previous example,
4224 version 3 of "anotherlayer" is compared against
4225 :term:`LAYERVERSION`\ ``_anotherlayer``.
4226
4227 An error is produced if any dependency is missing or the version
4228 numbers (if specified) do not match exactly. This variable is used in
4229 the ``conf/layer.conf`` file and must be suffixed with the name of
4230 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4231
Andrew Geisslerf0343792020-11-18 10:42:21 -06004232 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004233 When used inside the ``layer.conf`` configuration file, this variable
4234 provides the path of the current layer. This variable is not
4235 available outside of ``layer.conf`` and references are expanded
4236 immediately when parsing of the file completes.
4237
Andrew Geisslerf0343792020-11-18 10:42:21 -06004238 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004239 Lists the layers, separated by spaces, recommended for use with this
4240 layer.
4241
4242 Optionally, you can specify a specific layer version for a
4243 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004244 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004245
4246 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4247
4248 In this previous example, version 3 of "anotherlayer" is compared
4249 against ``LAYERVERSION_anotherlayer``.
4250
4251 This variable is used in the ``conf/layer.conf`` file and must be
4252 suffixed with the name of the specific layer (e.g.
4253 ``LAYERRECOMMENDS_mylayer``).
4254
Andrew Geisslerf0343792020-11-18 10:42:21 -06004255 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004256 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004257 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004258 allows the layer maintainer to indicate which combinations of the
4259 layer and OE-Core can be expected to work. The variable gives the
4260 system a way to detect when a layer has not been tested with new
4261 releases of OE-Core (e.g. the layer is not maintained).
4262
4263 To specify the OE-Core versions for which a layer is compatible, use
4264 this variable in your layer's ``conf/layer.conf`` configuration file.
4265 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004266 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004267 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004268 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004269
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004270 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004271
4272 .. note::
4273
Andrew Geissler09036742021-06-25 14:25:14 -05004274 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004275 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004276 The OpenEmbedded build system produces a warning if the variable
4277 is not set for any given layer.
4278
Andrew Geissler09209ee2020-12-13 08:44:15 -06004279 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004280 section in the Yocto Project Development Tasks Manual.
4281
Andrew Geisslerf0343792020-11-18 10:42:21 -06004282 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004283 Optionally specifies the version of a layer as a single number. You
4284 can use this within :term:`LAYERDEPENDS` for
4285 another layer in order to depend on a specific version of the layer.
4286 This variable is used in the ``conf/layer.conf`` file and must be
4287 suffixed with the name of the specific layer (e.g.
4288 ``LAYERVERSION_mylayer``).
4289
Andrew Geisslerf0343792020-11-18 10:42:21 -06004290 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004291 The minimal command and arguments used to run the linker.
4292
Andrew Geisslerf0343792020-11-18 10:42:21 -06004293 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004294 Specifies the flags to pass to the linker. This variable is exported
4295 to an environment variable and thus made visible to the software
4296 being built during the compilation step.
4297
Andrew Geissler09036742021-06-25 14:25:14 -05004298 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004299 being built:
4300
4301 - :term:`TARGET_LDFLAGS` when building for the
4302 target
4303
4304 - :term:`BUILD_LDFLAGS` when building for the
4305 build host (i.e. ``-native``)
4306
4307 - :term:`BUILDSDK_LDFLAGS` when building for
4308 an SDK (i.e. ``nativesdk-``)
4309
Andrew Geisslerf0343792020-11-18 10:42:21 -06004310 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004311 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4312 that the :ref:`debian <ref-classes-debian>` class applies its
4313 naming policy to given a recipe that packages multiple libraries.
4314
Andrew Geissler595f6302022-01-24 19:11:47 +00004315 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004316
Andrew Geisslerf0343792020-11-18 10:42:21 -06004317 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004318 Checksums of the license text in the recipe source code.
4319
4320 This variable tracks changes in license text of the source code
4321 files. If the license text is changed, it will trigger a build
4322 failure, which gives the developer an opportunity to review any
4323 license change.
4324
4325 This variable must be defined for all recipes (unless
4326 :term:`LICENSE` is set to "CLOSED").
4327
Andrew Geissler09209ee2020-12-13 08:44:15 -06004328 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004329 section in the Yocto Project Development Tasks Manual.
4330
Andrew Geisslerf0343792020-11-18 10:42:21 -06004331 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004332 The list of source licenses for the recipe. Follow these rules:
4333
4334 - Do not use spaces within individual license names.
4335
4336 - Separate license names using \| (pipe) when there is a choice
4337 between licenses.
4338
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004339 - Separate license names using & (ampersand) when there are
4340 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004341
4342 - You can use spaces between license names.
4343
4344 - For standard licenses, use the names of the files in
4345 ``meta/files/common-licenses/`` or the
4346 :term:`SPDXLICENSEMAP` flag names defined in
4347 ``meta/conf/licenses.conf``.
4348
Andrew Geisslerc926e172021-05-07 16:11:35 -05004349 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004350
4351 LICENSE = "LGPLv2.1 | GPLv3"
4352 LICENSE = "MPL-1 & LGPLv2.1"
4353 LICENSE = "GPLv2+"
4354
4355 The first example is from the
4356 recipes for Qt, which the user may choose to distribute under either
4357 the LGPL version 2.1 or GPL version 3. The second example is from
4358 Cairo where two licenses cover different parts of the source code.
4359 The final example is from ``sysstat``, which presents a single
4360 license.
4361
4362 You can also specify licenses on a per-package basis to handle
4363 situations where components of the output have different licenses.
4364 For example, a piece of software whose code is licensed under GPLv2
4365 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004366 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004367
4368 LICENSE = "GFDL-1.2 & GPLv2"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004369 LICENSE:${PN} = "GPLv2"
4370 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004371
Andrew Geisslerf0343792020-11-18 10:42:21 -06004372 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004373 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004374 build system to create an extra package (i.e.
4375 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4376 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004377 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004378
4379 The ``${PN}-lic`` package installs a directory in
4380 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4381 name, and installs files in that directory that contain license and
4382 copyright information (i.e. copies of the appropriate license files
4383 from ``meta/common-licenses`` that match the licenses specified in
4384 the :term:`LICENSE` variable of the recipe metadata
4385 and copies of files marked in
4386 :term:`LIC_FILES_CHKSUM` as containing
4387 license text).
4388
4389 For related information on providing license text, see the
4390 :term:`COPY_LIC_DIRS` variable, the
4391 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004392 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004393 section in the Yocto Project Development Tasks Manual.
4394
Andrew Geisslerf0343792020-11-18 10:42:21 -06004395 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004396 Specifies additional flags for a recipe you must allow through
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004397 :term:`LICENSE_FLAGS_WHITELIST` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004398 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004399 separate them with spaces.
4400
4401 This value is independent of :term:`LICENSE` and is
4402 typically used to mark recipes that might require additional licenses
4403 in order to be used in a commercial product. For more information,
4404 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004405 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004406 section in the Yocto Project Development Tasks Manual.
4407
Andrew Geisslerf0343792020-11-18 10:42:21 -06004408 :term:`LICENSE_FLAGS_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004409 Lists license flags that when specified in
4410 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004411 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004412 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004413 section in the Yocto Project Development Tasks Manual.
4414
Andrew Geisslerf0343792020-11-18 10:42:21 -06004415 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004416 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004417 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004418 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004419 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004420 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004421
4422 LICENSE_PATH += "path-to-additional-common-licenses"
4423
Andrew Geisslerf0343792020-11-18 10:42:21 -06004424 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004425 Defines the kernel type to be used in assembling the configuration.
4426 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004427 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004428 section in the
4429 Yocto Project Linux Kernel Development Manual for more information on
4430 kernel types.
4431
Andrew Geissler09036742021-06-25 14:25:14 -05004432 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004433 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004434 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004435 the kernel tools to find the appropriate description within the
4436 kernel :term:`Metadata` with which to build out the sources
4437 and configuration.
4438
Andrew Geisslerf0343792020-11-18 10:42:21 -06004439 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004440 The Linux version from ``kernel.org`` on which the Linux kernel image
4441 being built using the OpenEmbedded build system is based. You define
4442 this variable in the kernel recipe. For example, the
4443 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004444 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004445
4446 LINUX_VERSION ?= "3.4.24"
4447
Andrew Geissler09036742021-06-25 14:25:14 -05004448 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004449 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004450
4451 PV = "${LINUX_VERSION}+git${SRCPV}"
4452
Andrew Geisslerf0343792020-11-18 10:42:21 -06004453 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004454 A string extension compiled into the version string of the Linux
4455 kernel built with the OpenEmbedded build system. You define this
4456 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004457 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004458
4459 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4460
4461 Defining this variable essentially sets the Linux kernel
4462 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4463 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004464 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004465
4466 $ uname -r
4467 3.7.0-rc8-custom
4468
Andrew Geisslerf0343792020-11-18 10:42:21 -06004469 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004470 Specifies the directory to which the OpenEmbedded build system writes
4471 overall log files. The default directory is ``${TMPDIR}/log``.
4472
4473 For the directory containing logs specific to each task, see the
4474 :term:`T` variable.
4475
Andrew Geisslerf0343792020-11-18 10:42:21 -06004476 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004477 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004478 :term:`MACHINE` in the ``local.conf`` file found in the
4479 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004480 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004481 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004482
4483 MACHINE ?= "qemux86"
4484
4485 The variable corresponds to a machine configuration file of the same
4486 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004487 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004488 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004489 the :term:`Source Directory` in
4490 ``meta/conf/machine``.
4491
4492 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004493 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004494
4495 MACHINE ?= "qemuarm"
4496 MACHINE ?= "qemuarm64"
4497 MACHINE ?= "qemumips"
4498 MACHINE ?= "qemumips64"
4499 MACHINE ?= "qemuppc"
4500 MACHINE ?= "qemux86"
4501 MACHINE ?= "qemux86-64"
4502 MACHINE ?= "genericx86"
4503 MACHINE ?= "genericx86-64"
4504 MACHINE ?= "beaglebone"
4505 MACHINE ?= "edgerouter"
4506
4507 The last five are Yocto Project reference hardware
4508 boards, which are provided in the ``meta-yocto-bsp`` layer.
4509
4510 .. note::
4511
4512 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004513 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004514
Andrew Geisslerf0343792020-11-18 10:42:21 -06004515 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004516 Specifies the name of the machine-specific architecture. This
4517 variable is set automatically from :term:`MACHINE` or
4518 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004519 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004520
Andrew Geisslerf0343792020-11-18 10:42:21 -06004521 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004522 A list of required machine-specific packages to install as part of
4523 the image being built. The build process depends on these packages
4524 being present. Furthermore, because this is a "machine-essential"
4525 variable, the list of packages are essential for the machine to boot.
4526 The impact of this variable affects images based on
4527 ``packagegroup-core-boot``, including the ``core-image-minimal``
4528 image.
4529
4530 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004531 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004532 that the image being built has a build dependency on the variable's
4533 list of packages. In other words, the image will not build if a file
4534 in this list is not found.
4535
4536 As an example, suppose the machine for which you are building
4537 requires ``example-init`` to be run during boot to initialize the
4538 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004539 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004540
4541 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4542
Andrew Geisslerf0343792020-11-18 10:42:21 -06004543 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004544 A list of recommended machine-specific packages to install as part of
4545 the image being built. The build process does not depend on these
4546 packages being present. However, because this is a
4547 "machine-essential" variable, the list of packages are essential for
4548 the machine to boot. The impact of this variable affects images based
4549 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4550 image.
4551
Andrew Geissler09036742021-06-25 14:25:14 -05004552 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004553 variable with the exception that the image being built does not have
4554 a build dependency on the variable's list of packages. In other
4555 words, the image will still build if a package in this list is not
4556 found. Typically, this variable is used to handle essential kernel
4557 modules, whose functionality may be selected to be built into the
4558 kernel rather than as a module, in which case a package will not be
4559 produced.
4560
4561 Consider an example where you have a custom kernel where a specific
4562 touchscreen driver is required for the machine to be usable. However,
4563 the driver can be built as a module or into the kernel depending on
4564 the kernel configuration. If the driver is built as a module, you
4565 want it to be installed. But, when the driver is built into the
4566 kernel, you still want the build to succeed. This variable sets up a
4567 "recommends" relationship so that in the latter case, the build will
4568 not fail due to the missing package. To accomplish this, assuming the
4569 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004570 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004571
4572 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4573
4574 .. note::
4575
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004576 In this example, the ``kernel-module-ab123`` recipe needs to
4577 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4578 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4579 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004580
4581 Some examples of these machine essentials are flash, screen,
4582 keyboard, mouse, or touchscreen drivers (depending on the machine).
4583
Andrew Geisslerf0343792020-11-18 10:42:21 -06004584 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004585 A list of machine-specific packages to install as part of the image
4586 being built that are not essential for the machine to boot. However,
4587 the build process for more fully-featured images depends on the
4588 packages being present.
4589
4590 This variable affects all images based on ``packagegroup-base``,
4591 which does not include the ``core-image-minimal`` or
4592 ``core-image-full-cmdline`` images.
4593
Andrew Geissler09036742021-06-25 14:25:14 -05004594 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004595 with the exception that the image being built has a build dependency
4596 on the variable's list of packages. In other words, the image will
4597 not build if a file in this list is not found.
4598
4599 An example is a machine that has WiFi capability but is not essential
4600 for the machine to boot the image. However, if you are building a
4601 more fully-featured image, you want to enable the WiFi. The package
4602 containing the firmware for the WiFi hardware is always expected to
4603 exist, so it is acceptable for the build process to depend upon
4604 finding the package. In this case, assuming the package for the
4605 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004606 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004607
4608 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4609
Andrew Geisslerf0343792020-11-18 10:42:21 -06004610 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004611 A list of machine-specific packages to install as part of the image
4612 being built that are not essential for booting the machine. The image
4613 being built has no build dependency on this list of packages.
4614
4615 This variable affects only images based on ``packagegroup-base``,
4616 which does not include the ``core-image-minimal`` or
4617 ``core-image-full-cmdline`` images.
4618
Andrew Geissler09036742021-06-25 14:25:14 -05004619 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004620 with the exception that the image being built does not have a build
4621 dependency on the variable's list of packages. In other words, the
4622 image will build if a file in this list is not found.
4623
4624 An example is a machine that has WiFi capability but is not essential
4625 For the machine to boot the image. However, if you are building a
4626 more fully-featured image, you want to enable WiFi. In this case, the
4627 package containing the WiFi kernel module will not be produced if the
4628 WiFi driver is built into the kernel, in which case you still want
4629 the build to succeed instead of failing as a result of the package
4630 not being found. To accomplish this, assuming the package for the
4631 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004632 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004633
4634 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4635
Andrew Geisslerf0343792020-11-18 10:42:21 -06004636 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004637 Specifies the list of hardware features the
4638 :term:`MACHINE` is capable of supporting. For related
4639 information on enabling features, see the
4640 :term:`DISTRO_FEATURES`,
4641 :term:`COMBINED_FEATURES`, and
4642 :term:`IMAGE_FEATURES` variables.
4643
4644 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004645 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004646
Andrew Geisslerf0343792020-11-18 10:42:21 -06004647 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004648 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4649 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004650
4651 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4652 not intended to be user-configurable. It is best to just reference
4653 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004654 all machine configurations. See the ":ref:`ref-features-backfill`"
4655 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004656
Andrew Geisslerf0343792020-11-18 10:42:21 -06004657 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004658 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4659 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004660 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004661
Andrew Geisslerf0343792020-11-18 10:42:21 -06004662 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004663 A colon-separated list of overrides that apply to the current
4664 machine. By default, this list includes the value of
4665 :term:`MACHINE`.
4666
Andrew Geissler09036742021-06-25 14:25:14 -05004667 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004668 should apply to a machine. For example, all machines emulated in QEMU
4669 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4670 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004671 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004672
4673 MACHINEOVERRIDES =. "qemuall:"
4674
4675 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004676 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004677 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004678 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004679
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004680 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004681 file://wired-setup \
4682 "
4683
4684 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004685 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004686 value of :term:`OVERRIDES`.
4687
Andrew Geisslerf0343792020-11-18 10:42:21 -06004688 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004689 The email address of the distribution maintainer.
4690
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004691 :term:`METADATA_BRANCH`
4692 The branch currently checked out for the OpenEmbedded-Core layer (path
4693 determined by :term:`COREBASE`).
4694
4695 :term:`METADATA_REVISION`
4696 The revision currently checked out for the OpenEmbedded-Core layer (path
4697 determined by :term:`COREBASE`).
4698
Andrew Geisslerf0343792020-11-18 10:42:21 -06004699 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004700 Specifies additional paths from which the OpenEmbedded build system
4701 gets source code. When the build system searches for source code, it
4702 first tries the local download directory. If that location fails, the
4703 build system tries locations defined by
4704 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004705 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004706
4707 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004708 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004709 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4710
Andrew Geisslerf0343792020-11-18 10:42:21 -06004711 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004712 Specifies a prefix has been added to :term:`PN` to create a
4713 special version of a recipe or package (i.e. a Multilib version). The
4714 variable is used in places where the prefix needs to be added to or
4715 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004716 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004717
4718 .. note::
4719
Andrew Geissler09036742021-06-25 14:25:14 -05004720 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004721 historical and comes from a time when ``nativesdk`` was a suffix
4722 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004723 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004724
Andrew Geissler09036742021-06-25 14:25:14 -05004725 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004726 :term:`BBCLASSEXTEND` is used to provide a
4727 ``nativesdk`` version of a recipe in addition to the target version.
4728 If that recipe declares build-time dependencies on tasks in other
4729 recipes by using :term:`DEPENDS`, then a dependency on
4730 "foo" will automatically get rewritten to a dependency on
4731 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004732 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004733
4734 do_foo[depends] += "recipe:do_foo"
4735
4736 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004737 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004738
4739 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4740
Andrew Geissler09036742021-06-25 14:25:14 -05004741 :term:`module_autoload`
4742 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004743 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004744 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004745
4746 module_autoload_rfcomm = "rfcomm"
4747
Andrew Geisslerc926e172021-05-07 16:11:35 -05004748 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004749
4750 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4751
4752 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4753
Andrew Geissler09036742021-06-25 14:25:14 -05004754 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004755 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004756 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4757 file.
4758
4759 You can use this variable anywhere that it can be recognized by the
4760 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4761 configuration file, a distribution configuration file, an append file
4762 for the recipe, or the recipe itself). If you use this variable, you
4763 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004764 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004765 variable.
4766
Andrew Geisslerc926e172021-05-07 16:11:35 -05004767 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004768
4769 module_conf_module_name = "modprobe.d-syntax"
4770
4771 You must use the kernel module name override.
4772
4773 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004774 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004775
Andrew Geissler5f350902021-07-23 13:09:54 -04004776 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777 populate the ``/etc/modprobe.d/modname.conf`` file with
4778 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004779 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004780
4781 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4782
4783 For information on how to specify kernel modules to auto-load on
4784 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4785
Andrew Geisslerf0343792020-11-18 10:42:21 -06004786 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004787 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4788 "0" to disable creation of this file, which contains all of the
4789 kernel modules resulting from a kernel build.
4790
Andrew Geisslerf0343792020-11-18 10:42:21 -06004791 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004792 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004793 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004794
4795 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4796
4797 The value
4798 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004799 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004800
4801 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4802
4803 See the :term:`MACHINE` variable for additional information.
4804
Andrew Geisslerf0343792020-11-18 10:42:21 -06004805 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004806 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004807 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004808
4809 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4810
4811 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004812 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004813
4814 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4815
Andrew Geisslerf0343792020-11-18 10:42:21 -06004816 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004817 Uniquely identifies the type of the target system for which packages
4818 are being built. This variable allows output for different types of
4819 target systems to be put into different subdirectories of the same
4820 output directory.
4821
Andrew Geisslerc926e172021-05-07 16:11:35 -05004822 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004823
4824 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4825
4826 Some classes (e.g.
4827 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004828 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004829
4830 See the :term:`STAMP` variable for an example. See the
4831 :term:`STAGING_DIR_TARGET` variable for more information.
4832
Andrew Geisslerf0343792020-11-18 10:42:21 -06004833 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004834 A string identifying the host distribution. Strings consist of the
4835 host distributor ID followed by the release, as reported by the
4836 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4837 example, when running a build on Ubuntu 12.10, the value is
4838 "Ubuntu-12.10". If this information is unable to be determined, the
4839 value resolves to "Unknown".
4840
4841 This variable is used by default to isolate native shared state
4842 packages for different distributions (e.g. to avoid problems with
4843 ``glibc`` version incompatibilities). Additionally, the variable is
4844 checked against
4845 :term:`SANITY_TESTED_DISTROS` if that
4846 variable is set.
4847
Andrew Geisslerf0343792020-11-18 10:42:21 -06004848 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004849 The minimal command and arguments to run ``nm``.
4850
Andrew Geisslerf0343792020-11-18 10:42:21 -06004851 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004852 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004853 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004854 licenses that are not in any way common. Also, new licenses are added
4855 occasionally to avoid introducing a lot of common license files,
4856 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004857 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004858 not exist in common licenses.
4859
Andrew Geissler09036742021-06-25 14:25:14 -05004860 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004861 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004862
4863 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4864
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004865 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004866 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004867 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004868
4869 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4870
Andrew Geisslerf0343792020-11-18 10:42:21 -06004871 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004872 Prevents installation of all "recommended-only" packages.
4873 Recommended-only packages are packages installed only through the
4874 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05004875 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004876
4877 NO_RECOMMENDATIONS = "1"
4878
4879 You can set this variable globally in your ``local.conf`` file or you
4880 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05004881 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004882
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004883 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004884
4885 It is important to realize that if you choose to not install packages
4886 using this variable and some other packages are dependent on them
4887 (i.e. listed in a recipe's :term:`RDEPENDS`
4888 variable), the OpenEmbedded build system ignores your request and
4889 will install the packages to avoid dependency errors.
4890
4891 .. note::
4892
4893 Some recommended packages might be required for certain system
4894 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004895 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004896
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004897 This variable is only supported when using the IPK and RPM
4898 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004899
4900 See the :term:`BAD_RECOMMENDATIONS` and
4901 the :term:`PACKAGE_EXCLUDE` variables for
4902 related information.
4903
Andrew Geisslerf0343792020-11-18 10:42:21 -06004904 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004905 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004906 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05004907 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004908 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004909
4910 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004911 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4912 FILES:${PN}-dbg = "/usr/src/debug/"
4913 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004914
Andrew Geissler09036742021-06-25 14:25:14 -05004915 :term:`NON_MULTILIB_RECIPES`
4916 A list of recipes that should not be built for multilib. OE-Core's
4917 ``multilib.conf`` file defines a reasonable starting point for this
4918 list with::
4919
4920 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
4921
Andrew Geisslerf0343792020-11-18 10:42:21 -06004922 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004923 The minimal command and arguments to run ``objcopy``.
4924
Andrew Geisslerf0343792020-11-18 10:42:21 -06004925 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004926 The minimal command and arguments to run ``objdump``.
4927
Andrew Geisslerf0343792020-11-18 10:42:21 -06004928 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004929 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4930 this variable specifies additional arguments passed to the "sed"
4931 command. The sed command alters any paths in configuration scripts
4932 that have been set up during compilation. Inheriting this class
4933 results in all paths in these scripts being changed to point into the
4934 ``sysroots/`` directory so that all builds that use the script will
4935 use the correct directories for the cross compiling layout.
4936
4937 See the ``meta/classes/binconfig.bbclass`` in the
4938 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00004939 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004940
Andrew Geisslerf0343792020-11-18 10:42:21 -06004941 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004942 An internal variable used to tell the OpenEmbedded build system what
4943 Python modules to import for every Python function run by the system.
4944
4945 .. note::
4946
4947 Do not set this variable. It is for internal use only.
4948
Andrew Geisslerf0343792020-11-18 10:42:21 -06004949 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004950 The name of the build environment setup script for the purposes of
4951 setting up the environment within the extensible SDK. The default
4952 value is "oe-init-build-env".
4953
4954 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05004955 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004956
Andrew Geisslerf0343792020-11-18 10:42:21 -06004957 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004958 Controls how the OpenEmbedded build system spawns interactive
4959 terminals on the host development system (e.g. using the BitBake
4960 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06004961 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004962 the Yocto Project Development Tasks Manual.
4963
Andrew Geissler5f350902021-07-23 13:09:54 -04004964 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004965
4966 - auto
4967 - gnome
4968 - xfce
4969 - rxvt
4970 - screen
4971 - konsole
4972 - none
4973
Andrew Geisslerf0343792020-11-18 10:42:21 -06004974 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004975 The directory from which the top-level build environment setup script
4976 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004977 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05004978 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004979 contains the script.
4980
4981 For additional information on how this variable is used, see the
4982 initialization script.
4983
Andrew Geisslerf0343792020-11-18 10:42:21 -06004984 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004985 Declares the oldest version of the Linux kernel that the produced
4986 binaries must support. This variable is passed into the build of the
4987 Embedded GNU C Library (``glibc``).
4988
4989 The default for this variable comes from the
4990 ``meta/conf/bitbake.conf`` configuration file. You can override this
4991 default by setting the variable in a custom distribution
4992 configuration file.
4993
Andrew Geisslerf0343792020-11-18 10:42:21 -06004994 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004995 A colon-separated list of overrides that currently apply. Overrides
4996 are a BitBake mechanism that allows variables to be selectively
4997 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05004998 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004999 the current recipe being built, the machine for which it is being
5000 built, and so forth.
5001
5002 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005003 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005004 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005005 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005006
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005007 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005008
5009 See the
5010 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5011 section in the BitBake User Manual for more information on the
5012 overrides mechanism.
5013
Andrew Geissler09036742021-06-25 14:25:14 -05005014 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005015 :term:`CLASSOVERRIDE`,
5016 :term:`MACHINEOVERRIDES`, and
5017 :term:`DISTROOVERRIDES` variables. Another
5018 important override included by default is ``pn-${PN}``. This override
5019 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005020 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005021
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005022 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005023
5024 .. note::
5025
Andrew Geissler09036742021-06-25 14:25:14 -05005026 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005027 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005028 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005029 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005030
Andrew Geisslerf0343792020-11-18 10:42:21 -06005031 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005032 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005033
5034 ${PN}-${PV}
5035
Andrew Geisslerf0343792020-11-18 10:42:21 -06005036 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005037 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005038
5039 You may find you need to inject additional metadata into packages.
5040 This variable allows you to do that by setting the injected data as
5041 the value. Multiple fields can be added by splitting the content with
5042 the literal separator "\n".
5043
5044 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5045 to do package type specific settings. It can also be made package
5046 specific by using the package name as a suffix.
5047
5048 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005049 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005050 section in the Yocto Project Development Tasks Manual.
5051
Andrew Geisslerf0343792020-11-18 10:42:21 -06005052 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005053 The architecture of the resulting package or packages.
5054
5055 By default, the value of this variable is set to
5056 :term:`TUNE_PKGARCH` when building for the
5057 target, :term:`BUILD_ARCH` when building for the
5058 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5059 SDK.
5060
5061 .. note::
5062
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005063 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005064
5065 However, if your recipe's output packages are built specific to the
5066 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005067 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005068 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005069
5070 PACKAGE_ARCH = "${MACHINE_ARCH}"
5071
Andrew Geisslerf0343792020-11-18 10:42:21 -06005072 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005073 Specifies a list of architectures compatible with the target machine.
5074 This variable is set automatically and should not normally be
5075 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005076 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005077 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5078
Andrew Geisslerf0343792020-11-18 10:42:21 -06005079 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005080 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005081 that those added packages can pick up files that would normally be
5082 included in the default package.
5083
Andrew Geisslerf0343792020-11-18 10:42:21 -06005084 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005085 This variable, which is set in the ``local.conf`` configuration file
5086 found in the ``conf`` folder of the
5087 :term:`Build Directory`, specifies the package manager the
5088 OpenEmbedded build system uses when packaging data.
5089
5090 You can provide one or more of the following arguments for the
5091 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5092 package_tar"
5093
5094 .. note::
5095
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005096 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005097 class has limited functionality due to no support for package
5098 dependencies by that backend. Therefore, it is recommended that
5099 you do not use it.
5100
5101 The build system uses only the first argument in the list as the
5102 package manager when creating your image or SDK. However, packages
5103 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005104 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005105
5106 PACKAGE_CLASSES ?= "package_ipk"
5107
5108 The OpenEmbedded build system uses
5109 the IPK package manager to create your image or SDK.
5110
5111 For information on packaging and build performance effects as a
5112 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005113 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005114
Andrew Geisslerf0343792020-11-18 10:42:21 -06005115 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005116 Determines how to split up and package debug and source information
5117 when creating debugging packages to be used with the GNU Project
5118 Debugger (GDB). In general, based on the value of this variable,
5119 you can combine the source and debug info in a single package,
5120 you can break out the source into a separate package that can be
5121 installed independently, or you can choose to not have the source
5122 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005123
Patrick Williams93c203f2021-10-06 16:15:23 -05005124 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005125
Patrick Williams93c203f2021-10-06 16:15:23 -05005126 - "``.debug``": All debugging and source info is placed in a single
5127 ``*-dbg`` package; debug symbol files are placed next to the
5128 binary in a ``.debug`` directory so that, if a binary is installed
5129 into ``/bin``, the corresponding debug symbol file is installed
5130 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5131 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005132
Patrick Williams93c203f2021-10-06 16:15:23 -05005133 - "``debug-file-directory``": As above, all debugging and source info
5134 is placed in a single ``*-dbg`` package; debug symbol files are
5135 placed entirely under the directory ``/usr/lib/debug`` and separated
5136 by the path from where the binary is installed, so that if a binary
5137 is installed in ``/bin``, the corresponding debug symbols are installed
5138 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5139 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005140
Patrick Williams93c203f2021-10-06 16:15:23 -05005141 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5142 ``*-dbg`` package as with the ``.debug`` value, while source is
5143 placed in a separate ``*-src`` package, which can be installed
5144 independently. This is the default setting for this variable,
5145 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005146
Patrick Williams93c203f2021-10-06 16:15:23 -05005147 - "``debug-without-src``": The same behavior as with the ``.debug``
5148 setting, but no source is packaged at all.
5149
5150 .. note::
5151
5152 Much of the above package splitting can be overridden via
5153 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005154
5155 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005156 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005157 in the Yocto Project Development Tasks Manual.
5158
Andrew Geisslerf0343792020-11-18 10:42:21 -06005159 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005160 Prevents specific packages from being installed when you are
5161 installing complementary packages.
5162
5163 You might find that you want to prevent installing certain packages
5164 when you are installing complementary packages. For example, if you
5165 are using :term:`IMAGE_FEATURES` to install
5166 ``dev-pkgs``, you might not want to install all packages from a
5167 particular multilib. If you find yourself in this situation, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005168 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005169 expressions to match the packages you want to exclude.
5170
Andrew Geisslerf0343792020-11-18 10:42:21 -06005171 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005172 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005173 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005174
5175 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5176
5177 You can set this variable globally in your ``local.conf`` file or you
5178 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005179 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005180
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005181 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005182
5183 If you choose to not install a package using this variable and some
5184 other package is dependent on it (i.e. listed in a recipe's
5185 :term:`RDEPENDS` variable), the OpenEmbedded build
5186 system generates a fatal installation error. Because the build system
5187 halts the process with a fatal error, you can use the variable with
5188 an iterative development process to remove specific components from a
5189 system.
5190
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005191 This variable is supported only when using the IPK and RPM
5192 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005193
5194 See the :term:`NO_RECOMMENDATIONS` and the
5195 :term:`BAD_RECOMMENDATIONS` variables for
5196 related information.
5197
Andrew Geisslerf0343792020-11-18 10:42:21 -06005198 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005199 Specifies the list of architectures compatible with the device CPU.
5200 This variable is useful when you build for several different devices
5201 that use miscellaneous processors such as XScale and ARM926-EJS.
5202
Andrew Geisslerf0343792020-11-18 10:42:21 -06005203 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005204 Optionally specifies the package architectures used as part of the
5205 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005206 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005207 URI, which is constructed using the
5208 :term:`PACKAGE_FEED_URIS` and
5209 :term:`PACKAGE_FEED_BASE_PATHS`
5210 variables.
5211
5212 .. note::
5213
Andrew Geissler09036742021-06-25 14:25:14 -05005214 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005215 variable to allow specific package architectures. If you do
5216 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005217 case, you can omit this variable. Omitting the variable results in
5218 all available architectures for the current machine being included
5219 into remote package feeds.
5220
Andrew Geissler09036742021-06-25 14:25:14 -05005221 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5222 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005223 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005224
5225 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5226 https://example.com/packagerepos/updates"
5227 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5228 PACKAGE_FEED_ARCHS = "all core2-64"
5229
5230 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005231
5232 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005233
5234 https://example.com/packagerepos/release/rpm/all
5235 https://example.com/packagerepos/release/rpm/core2-64
5236 https://example.com/packagerepos/release/rpm-dev/all
5237 https://example.com/packagerepos/release/rpm-dev/core2-64
5238 https://example.com/packagerepos/updates/rpm/all
5239 https://example.com/packagerepos/updates/rpm/core2-64
5240 https://example.com/packagerepos/updates/rpm-dev/all
5241 https://example.com/packagerepos/updates/rpm-dev/core2-64
5242
Andrew Geisslerf0343792020-11-18 10:42:21 -06005243 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005244 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005245 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005246 package feed URI used by the OpenEmbedded build system. The base path
5247 lies between the :term:`PACKAGE_FEED_URIS`
5248 and :term:`PACKAGE_FEED_ARCHS` variables.
5249
Andrew Geissler09036742021-06-25 14:25:14 -05005250 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5251 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005252 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005253
5254 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5255 https://example.com/packagerepos/updates"
5256 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5257 PACKAGE_FEED_ARCHS = "all core2-64"
5258
5259 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005260
5261 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005262
5263 https://example.com/packagerepos/release/rpm/all
5264 https://example.com/packagerepos/release/rpm/core2-64
5265 https://example.com/packagerepos/release/rpm-dev/all
5266 https://example.com/packagerepos/release/rpm-dev/core2-64
5267 https://example.com/packagerepos/updates/rpm/all
5268 https://example.com/packagerepos/updates/rpm/core2-64
5269 https://example.com/packagerepos/updates/rpm-dev/all
5270 https://example.com/packagerepos/updates/rpm-dev/core2-64
5271
Andrew Geisslerf0343792020-11-18 10:42:21 -06005272 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005273 Specifies the front portion of the package feed URI used by the
5274 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005275 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005276 :term:`PACKAGE_FEED_BASE_PATHS`, and
5277 :term:`PACKAGE_FEED_ARCHS` variables.
5278
Andrew Geissler09036742021-06-25 14:25:14 -05005279 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5280 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005281 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005282
5283 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5284 https://example.com/packagerepos/updates"
5285 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5286 PACKAGE_FEED_ARCHS = "all core2-64"
5287
5288 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005289
5290 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005291
5292 https://example.com/packagerepos/release/rpm/all
5293 https://example.com/packagerepos/release/rpm/core2-64
5294 https://example.com/packagerepos/release/rpm-dev/all
5295 https://example.com/packagerepos/release/rpm-dev/core2-64
5296 https://example.com/packagerepos/updates/rpm/all
5297 https://example.com/packagerepos/updates/rpm/core2-64
5298 https://example.com/packagerepos/updates/rpm-dev/all
5299 https://example.com/packagerepos/updates/rpm-dev/core2-64
5300
Andrew Geisslerf0343792020-11-18 10:42:21 -06005301 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005302 The final list of packages passed to the package manager for
5303 installation into the image.
5304
5305 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005306 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005307 not the final list of packages that are actually installed. This
5308 variable is internal to the image construction code. Consequently, in
5309 general, you should use the
5310 :term:`IMAGE_INSTALL` variable to specify
5311 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005312 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005313 image. When working with an initial RAM filesystem (initramfs) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005314 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005315 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005316 in the Yocto Project Development Tasks Manual.
5317
Andrew Geisslerf0343792020-11-18 10:42:21 -06005318 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005319 Specifies a list of packages the OpenEmbedded build system attempts
5320 to install when creating an image. If a listed package fails to
5321 install, the build system does not generate an error. This variable
5322 is generally not user-defined.
5323
Andrew Geisslerf0343792020-11-18 10:42:21 -06005324 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005325 Specifies a list of functions run to pre-process the
5326 :term:`PKGD` directory prior to splitting the files out
5327 to individual packages.
5328
Andrew Geisslerf0343792020-11-18 10:42:21 -06005329 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005330 Specifies a list of dependencies for post-installation and
5331 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005332 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005333 creation time rather than on the target but depends on a native tool
5334 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005335 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005336
5337 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005338 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005339 section in the Yocto Project Development Tasks Manual.
5340
Andrew Geisslerf0343792020-11-18 10:42:21 -06005341 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005342 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005343 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005344 recipes when you specify features and then arguments that define
5345 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005346 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005347
5348 PACKAGECONFIG ??= "f1 f2 f3 ..."
5349 PACKAGECONFIG[f1] = "\
5350 --with-f1, \
5351 --without-f1, \
5352 build-deps-for-f1, \
5353 runtime-deps-for-f1, \
5354 runtime-recommends-for-f1, \
5355 packageconfig-conflicts-for-f1"
5356 PACKAGECONFIG[f2] = "\
5357 ... and so on and so on ...
5358
Andrew Geissler5f350902021-07-23 13:09:54 -04005359 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360 list of the features to enable. Following the features, you can
5361 determine the behavior of each feature by providing up to six
5362 order-dependent arguments, which are separated by commas. You can
5363 omit any argument you like but must retain the separating commas. The
5364 order is important and specifies the following:
5365
5366 1. Extra arguments that should be added to the configure script
5367 argument list (:term:`EXTRA_OECONF` or
5368 :term:`PACKAGECONFIG_CONFARGS`) if
5369 the feature is enabled.
5370
Andrew Geissler09036742021-06-25 14:25:14 -05005371 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5372 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005373
5374 3. Additional build dependencies (:term:`DEPENDS`)
5375 that should be added if the feature is enabled.
5376
5377 4. Additional runtime dependencies (:term:`RDEPENDS`)
5378 that should be added if the feature is enabled.
5379
5380 5. Additional runtime recommendations
5381 (:term:`RRECOMMENDS`) that should be added if
5382 the feature is enabled.
5383
Andrew Geissler09036742021-06-25 14:25:14 -05005384 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005385 settings for this feature.
5386
Andrew Geissler09036742021-06-25 14:25:14 -05005387 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005388 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5389 three arguments that determine the feature's behavior.
5390 ::
5391
5392 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5393
5394 The
5395 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5396 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005397 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005398 other hand, if the feature is disabled say through a ``.bbappend``
5399 file in another layer, then the second argument ``--without-gtk3`` is
5400 added to the configure script instead.
5401
Andrew Geissler09036742021-06-25 14:25:14 -05005402 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005403 regardless of whether you are creating a block or changing a block.
5404 When creating a block, use the structure inside your recipe.
5405
Andrew Geissler09036742021-06-25 14:25:14 -05005406 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005407 so one of two ways:
5408
5409 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005410 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005411 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005412 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005413
5414 PACKAGECONFIG = "f4 f5"
5415
Andrew Geisslerc926e172021-05-07 16:11:35 -05005416 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005417
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005418 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005419
5420 - *Configuration file:* This method is identical to changing the
5421 block through an append file except you edit your ``local.conf``
5422 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005423 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005424
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005425 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005426
Andrew Geisslerc926e172021-05-07 16:11:35 -05005427 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005428
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005429 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005430
Andrew Geisslerf0343792020-11-18 10:42:21 -06005431 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005432 A space-separated list of configuration options generated from the
5433 :term:`PACKAGECONFIG` setting.
5434
5435 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005436 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5437 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5438 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005439 handles the ``do_configure`` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005440 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005441
Andrew Geisslerf0343792020-11-18 10:42:21 -06005442 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005443 For recipes inheriting the
5444 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005445 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005446 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5447 should not be automatically created by the ``packagegroup`` recipe,
5448 which is the default behavior.
5449
Andrew Geisslerf0343792020-11-18 10:42:21 -06005450 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005451 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005452 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005453
Andrew Geissler5199d832021-09-24 16:47:35 -05005454 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005455
5456 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005457 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005458 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005459 package. If a file matches the :term:`FILES` variable for more than one
5460 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005461 (leftmost) package.
5462
5463 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005464 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005465 :ref:`ref-tasks-install` task) are not generated,
5466 unless generation is forced through the
5467 :term:`ALLOW_EMPTY` variable.
5468
Andrew Geisslerf0343792020-11-18 10:42:21 -06005469 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005470 A promise that your recipe satisfies runtime dependencies for
5471 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005472 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005473 only states that they should be satisfied. For example, if a hard,
5474 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005475 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005476 variable, but a package with the module name is never actually
5477 produced, then the other package will be broken. Thus, if you attempt
5478 to include that package in an image, you will get a dependency
5479 failure from the packaging system during the
5480 :ref:`ref-tasks-rootfs` task.
5481
5482 Typically, if there is a chance that such a situation can occur and
5483 the package that is not created is valid without the dependency being
5484 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005485 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005486
Andrew Geissler09036742021-06-25 14:25:14 -05005487 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005488 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005489 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005490 section in the Yocto Project Development Tasks Manual.
5491
Andrew Geisslerf0343792020-11-18 10:42:21 -06005492 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005493 Specifies a list of functions run to perform additional splitting of
5494 files into individual packages. Recipes can either prepend to this
5495 variable or prepend to the ``populate_packages`` function in order to
5496 perform additional package splitting. In either case, the function
5497 should set :term:`PACKAGES`,
5498 :term:`FILES`, :term:`RDEPENDS` and
5499 other packaging variables appropriately in order to perform the
5500 desired splitting.
5501
Andrew Geisslerf0343792020-11-18 10:42:21 -06005502 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005503 Extra options passed to the ``make`` command during the
5504 :ref:`ref-tasks-compile` task in order to specify
5505 parallel compilation on the local build host. This variable is
5506 usually in the form "-j x", where x represents the maximum number of
5507 parallel threads ``make`` can run.
5508
5509 .. note::
5510
Andrew Geissler09036742021-06-25 14:25:14 -05005511 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005512 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5513 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005514
5515 By default, the OpenEmbedded build system automatically sets this
5516 variable to be equal to the number of cores the build system uses.
5517
5518 .. note::
5519
5520 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005521 the ``do_compile`` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005522 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005523 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005524 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005525 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005526
5527 For single socket systems (i.e. one CPU), you should not have to
5528 override this variable to gain optimal parallelism during builds.
5529 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005530 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005531 not set higher than "-j 20".
5532
5533 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005534 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005535 section in the Yocto Project Development Tasks Manual.
5536
Andrew Geisslerf0343792020-11-18 10:42:21 -06005537 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005538 Extra options passed to the ``make install`` command during the
5539 :ref:`ref-tasks-install` task in order to specify
5540 parallel installation. This variable defaults to the value of
5541 :term:`PARALLEL_MAKE`.
5542
5543 .. note::
5544
Andrew Geissler09036742021-06-25 14:25:14 -05005545 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005546 be called with
5547 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5548 way to ensure this is to use the ``oe_runmake`` function.
5549
5550 If the software being built experiences dependency issues during
5551 the ``do_install`` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005552 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005553 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005554 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005555 section in the Yocto Project Development Tasks Manual.
5556
Andrew Geisslerf0343792020-11-18 10:42:21 -06005557 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005558 Determines the action to take when a patch fails. You can set this
5559 variable to one of two values: "noop" and "user".
5560
5561 The default value of "noop" causes the build to simply fail when the
5562 OpenEmbedded build system cannot successfully apply a patch. Setting
5563 the value to "user" causes the build system to launch a shell and
5564 places you in the right location so that you can manually resolve the
5565 conflicts.
5566
5567 Set this variable in your ``local.conf`` file.
5568
Andrew Geisslerf0343792020-11-18 10:42:21 -06005569 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005570 Specifies the utility used to apply patches for a recipe during the
5571 :ref:`ref-tasks-patch` task. You can specify one of
5572 three utilities: "patch", "quilt", or "git". The default utility used
5573 is "quilt" except for the quilt-native recipe itself. Because the
5574 quilt tool is not available at the time quilt-native is being
5575 patched, it uses "patch".
5576
5577 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005578 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005579
5580 PATCHTOOL = "patch"
5581 PATCHTOOL = "quilt"
5582 PATCHTOOL = "git"
5583
Andrew Geisslerf0343792020-11-18 10:42:21 -06005584 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005585 The epoch of the recipe. By default, this variable is unset. The
5586 variable is used to make upgrades possible when the versioning scheme
5587 changes in some backwards incompatible way.
5588
Andrew Geissler09036742021-06-25 14:25:14 -05005589 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005590
Andrew Geisslerf0343792020-11-18 10:42:21 -06005591 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005592 Specifies the recipe or package name and includes all version and
5593 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5594 ``bash-4.2-r1/``). This variable is comprised of the following:
5595 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5596
Andrew Geisslerf0343792020-11-18 10:42:21 -06005597 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005598 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5599 class, this variable identifies packages that contain the pixbuf
5600 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5601 class assumes that the loaders are in the recipe's main package (i.e.
5602 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5603 loaders you need are in a package other than that main package.
5604
Andrew Geisslerf0343792020-11-18 10:42:21 -06005605 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005606 The name of the resulting package created by the OpenEmbedded build
5607 system.
5608
5609 .. note::
5610
Andrew Geissler09036742021-06-25 14:25:14 -05005611 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005612
5613 For example, when the :ref:`debian <ref-classes-debian>` class
5614 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005615 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005616
Andrew Geisslerf0343792020-11-18 10:42:21 -06005617 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005618 The path to ``pkg-config`` files for the current build context.
5619 ``pkg-config`` reads this variable from the environment.
5620
Andrew Geisslerf0343792020-11-18 10:42:21 -06005621 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005622 Points to the destination directory for files to be packaged before
5623 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005624 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005625
5626 ${WORKDIR}/package
5627
5628 Do not change this default.
5629
Andrew Geisslerf0343792020-11-18 10:42:21 -06005630 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005631 Points to a shared, global-state directory that holds data generated
5632 during the packaging process. During the packaging process, the
5633 :ref:`ref-tasks-packagedata` task packages data
5634 for each recipe and installs it into this temporary, shared area.
5635 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005636 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005637
5638 ${STAGING_DIR_HOST}/pkgdata
5639
5640 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005641 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005642 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005643 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005644 section in the Yocto Project Development Tasks Manual. For more
5645 information on the shared, global-state directory, see
5646 :term:`STAGING_DIR_HOST`.
5647
Andrew Geisslerf0343792020-11-18 10:42:21 -06005648 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005649 Points to the parent directory for files to be packaged after they
5650 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005651 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005652
5653 ${WORKDIR}/packages-split
5654
5655 Under this directory, the build system creates directories for each
5656 package specified in :term:`PACKAGES`. Do not change
5657 this default.
5658
Andrew Geisslerf0343792020-11-18 10:42:21 -06005659 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005660 Points to a temporary work area where the
5661 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005662 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005663
5664 ${WORKDIR}/pkgdata
5665
5666 Do not change this default.
5667
5668 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005669 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005670 :term:`PKGDATA_DIR` to make it available globally.
5671
Andrew Geisslerf0343792020-11-18 10:42:21 -06005672 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005673 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005674 is set to :term:`PE`.
5675
Andrew Geisslerf0343792020-11-18 10:42:21 -06005676 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005677 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005678 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005679
Andrew Geisslerf0343792020-11-18 10:42:21 -06005680 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005681 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005682 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005683
Andrew Geisslerf0343792020-11-18 10:42:21 -06005684 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005685 This variable can have two separate functions depending on the
5686 context: a recipe name or a resulting package name.
5687
Andrew Geissler09036742021-06-25 14:25:14 -05005688 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005689 OpenEmbedded build system as input to create a package. The name is
5690 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005691 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005692 will be "expat".
5693
5694 The variable refers to a package name in the context of a file
5695 created or produced by the OpenEmbedded build system.
5696
Andrew Geissler09036742021-06-25 14:25:14 -05005697 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005698 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005699 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005700 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005701 and ``lib64-bash``, respectively.
5702
Andrew Geisslerf0343792020-11-18 10:42:21 -06005703 :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005704 Lists recipes you do not want the OpenEmbedded build system to build.
5705 This variable works in conjunction with the
5706 :ref:`blacklist <ref-classes-blacklist>` class, which is inherited
5707 globally.
5708
Andrew Geissler09036742021-06-25 14:25:14 -05005709 To prevent a recipe from being built, use the :term:`PNBLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005710 variable in your ``local.conf`` file. Here is an example that
Andrew Geisslerc926e172021-05-07 16:11:35 -05005711 prevents ``myrecipe`` from being built::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005712
5713 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5714
Andrew Geisslerf0343792020-11-18 10:42:21 -06005715 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005716 Specifies a list of functions to call once the OpenEmbedded build
5717 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005718 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005719
5720 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5721
5722 If you need to pass the SDK path to a command within a function, you
5723 can use ``${SDK_DIR}``, which points to the parent directory used by
5724 the OpenEmbedded build system when creating SDK output. See the
5725 :term:`SDK_DIR` variable for more information.
5726
Andrew Geisslerf0343792020-11-18 10:42:21 -06005727 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005728 Specifies a list of functions to call once the OpenEmbedded build
5729 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005730 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005731
5732 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5733
5734 If you need to pass the SDK path to a command within a function, you
5735 can use ``${SDK_DIR}``, which points to the parent directory used by
5736 the OpenEmbedded build system when creating SDK output. See the
5737 :term:`SDK_DIR` variable for more information.
5738
Andrew Geisslerf0343792020-11-18 10:42:21 -06005739 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005740 The revision of the recipe. The default value for this variable is
5741 "r0". Subsequent revisions of the recipe conventionally have the
5742 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005743 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005744
5745 .. note::
5746
Andrew Geissler09036742021-06-25 14:25:14 -05005747 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005748 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005749 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005750 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005751 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005752 mechanisms.
5753
Andrew Geissler09036742021-06-25 14:25:14 -05005754 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005755 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005756 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005757 :term:`PKGR`, helps the package manager distinguish which
5758 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005759 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5760 the same :term:`PV` usually means that the packages all install the same
5761 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005762 packaging fixes.
5763
5764 .. note::
5765
Andrew Geissler09036742021-06-25 14:25:14 -05005766 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005767 package contents or metadata.
5768
Andrew Geissler5f350902021-07-23 13:09:54 -04005769 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005770 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005771 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005772 in the Yocto Project Development Tasks Manual for more information.
5773
Andrew Geisslerf0343792020-11-18 10:42:21 -06005774 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005775 If multiple recipes provide the same item, this variable determines
5776 which recipe is preferred and thus provides the item (i.e. the
5777 preferred provider). You should always suffix this variable with the
5778 name of the provided item. And, you should define the variable using
5779 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005780 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005781
5782 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5783
5784 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005785 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005786 the recipe you prefer to provide "virtual/kernel".
5787
Andrew Geisslerc926e172021-05-07 16:11:35 -05005788 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005789
5790 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5791 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5792
5793 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005794 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005795 section in the Yocto Project Development Tasks Manual.
5796
5797 .. note::
5798
Andrew Geissler09036742021-06-25 14:25:14 -05005799 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005800 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005801 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005802 desirable since this mechanism is designed to select between mutually
5803 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005804
Andrew Geisslerf0343792020-11-18 10:42:21 -06005805 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005806 If there are multiple versions of a recipe available, this variable
5807 determines which version should be given preference. You must always
5808 suffix the variable with the :term:`PN` you want to select (`python` in
5809 the first example below), and you should specify the :term:`PV`
5810 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005811
Andrew Geissler09036742021-06-25 14:25:14 -05005812 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005813 through the "``%``" character. You can use the character to match any
5814 number of characters, which can be useful when specifying versions
5815 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005816 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005817
5818 PREFERRED_VERSION_python = "3.4.0"
5819 PREFERRED_VERSION_linux-yocto = "5.0%"
5820
5821 .. note::
5822
5823 The use of the "%" character is limited in that it only works at the end of the
5824 string. You cannot use the wildcard character in any other
5825 location of the string.
5826
5827 The specified version is matched against :term:`PV`, which
5828 does not necessarily match the version part of the recipe's filename.
5829 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005830 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005831
5832 PV = "1.1+git${SRCPV}"
5833
5834 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005835 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005836
5837 PREFERRED_VERSION_foo = "1.1+git%"
5838
5839 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005840 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005841
5842 PREFERRED_VERSION_foo = "git"
5843
Andrew Geissler09036742021-06-25 14:25:14 -05005844 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005845 configuration files in a way that is hard to change. You can use
5846 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005847 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005848
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005849 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005850
5851 Although not recommended, worst case, you can also use the
5852 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005853 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005854
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005855 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005856
5857 .. note::
5858
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005859 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005860 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005861
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005862 If a recipe with the specified version is not available, a warning
5863 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5864 to be an error instead.
5865
Andrew Geisslerf0343792020-11-18 10:42:21 -06005866 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005867 Specifies additional paths from which the OpenEmbedded build system
5868 gets source code. When the build system searches for source code, it
5869 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005870 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005871 source, and then locations specified by
5872 :term:`MIRRORS` in that order.
5873
5874 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005875 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005876 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5877
5878 Typically, you could add a specific server for the build system to
5879 attempt before any others by adding something like the following to
5880 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005881 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005882
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005883 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00005884 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5885 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5886 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5887 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005888
5889 These changes cause the
5890 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5891 direct them to the ``http://`` sources mirror. You can use
5892 ``file://`` URLs to point to local directories or network shares as
5893 well.
5894
Andrew Geisslerf0343792020-11-18 10:42:21 -06005895 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005896 Indicates the importance of a package.
5897
Andrew Geissler09036742021-06-25 14:25:14 -05005898 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005899 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05005900 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005901 normally set within recipes.
5902
Andrew Geissler09036742021-06-25 14:25:14 -05005903 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005904 "optional", which is the default.
5905
Andrew Geisslerf0343792020-11-18 10:42:21 -06005906 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005907 Specifies libraries installed within a recipe that should be ignored
5908 by the OpenEmbedded build system's shared library resolver. This
5909 variable is typically used when software being built by a recipe has
5910 its own private versions of a library normally provided by another
5911 recipe. In this case, you would not want the package containing the
5912 private libraries to be set as a dependency on other unrelated
5913 packages that should instead depend on the package providing the
5914 standard version of the library.
5915
5916 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05005917 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005918
5919 PRIVATE_LIBS = "libmozjs.so \
5920 libxpcom.so \
5921 libnspr4.so \
5922 libxul.so \
5923 libmozalloc.so \
5924 libplc4.so \
5925 libplds4.so"
5926
5927 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005928 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005929 section in the Yocto Project Overview and Concepts Manual.
5930
Andrew Geisslerf0343792020-11-18 10:42:21 -06005931 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005932 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05005933 default, a recipe's own :term:`PN` is implicitly already in its
5934 :term:`PROVIDES` list and therefore does not need to mention that it
5935 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005936 aliases are synonyms for the recipe and can be useful for satisfying
5937 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05005938 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005939
Andrew Geissler09036742021-06-25 14:25:14 -05005940 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05005941 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005942
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005943 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005944
Andrew Geissler09036742021-06-25 14:25:14 -05005945 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005946 results in the "eudev" recipe also being available as simply "udev".
5947
5948 .. note::
5949
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005950 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
5951 to `PROVIDES`, so while using "+=" in the above example may not be
5952 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005953
5954 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05005955 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005956 virtual target is a name that corresponds to some particular
5957 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05005958 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005959 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05005960 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005961
5962 Conventionally, virtual targets have names on the form
5963 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5964 of the name and has no syntactical significance.
5965
5966 The :term:`PREFERRED_PROVIDER` variable is
5967 used to select which particular recipe provides a virtual target.
5968
5969 .. note::
5970
5971 A corresponding mechanism for virtual runtime dependencies
5972 (packages) exists. However, the mechanism does not depend on any
5973 special functionality beyond ordinary variable assignments. For
5974 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5975 the component that manages the ``/dev`` directory.
5976
5977 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05005978 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005979
5980 VIRTUAL-RUNTIME_dev_manager = "udev"
5981
5982
Andrew Geisslerf0343792020-11-18 10:42:21 -06005983 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005984 The network based :term:`PR` service host and port.
5985
5986 The ``conf/local.conf.sample.extended`` configuration file in the
5987 :term:`Source Directory` shows how the
Andrew Geissler09036742021-06-25 14:25:14 -05005988 :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005989
5990 PRSERV_HOST = "localhost:0"
5991
5992 You must
5993 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06005994 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05005995 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005996
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005997
5998 :term:`PSEUDO_IGNORE_PATHS`
5999 A comma-separated (without spaces) list of path prefixes that should be ignored
6000 by pseudo when monitoring and recording file operations, in order to avoid
6001 problems with files being written to outside of the pseudo context and
6002 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6003 and can include partial directory (or file) names.
6004
6005
Andrew Geisslerf0343792020-11-18 10:42:21 -06006006 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006007 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006008 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006009 functionality is enabled when building a recipe. You should not set
6010 this variable directly. Enabling and disabling building Package Tests
6011 at build time should be done by adding "ptest" to (or removing it
6012 from) :term:`DISTRO_FEATURES`.
6013
Andrew Geisslerf0343792020-11-18 10:42:21 -06006014 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006015 The version of the recipe. The version is normally extracted from the
6016 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006017 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6018 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006019 building an unstable (i.e. development) version from a source code
6020 repository (e.g. Git or Subversion).
6021
Andrew Geissler09036742021-06-25 14:25:14 -05006022 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006023
Andrew Geisslerf0343792020-11-18 10:42:21 -06006024 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006025 When used by recipes that inherit the
6026 :ref:`distutils3 <ref-classes-distutils3>`,
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006027 :ref:`setuptools3 <ref-classes-setuptools3>` classes, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 Application Binary Interface (ABI) currently in use for Python. By
6029 default, the ABI is "m". You do not have to set this variable as the
6030 OpenEmbedded build system sets it for you.
6031
6032 The OpenEmbedded build system uses the ABI to construct directory
6033 names used when installing the Python headers and libraries in
6034 sysroot (e.g. ``.../python3.3m/...``).
6035
Andrew Geissler595f6302022-01-24 19:11:47 +00006036 Recipes that inherit the :ref:`distutils3 <ref-classes-distutils3>` class during cross-builds also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006037 use this variable to locate the headers and libraries of the
6038 appropriate Python that the extension is targeting.
6039
Andrew Geisslerf0343792020-11-18 10:42:21 -06006040 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006041 When used by recipes that inherit the
6042 `distutils3 <ref-classes-distutils3>`,
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006043 :ref:`setuptools3 <ref-classes-setuptools3>` classes, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006044 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006045 be "python3". You do not have to set this variable as the
6046 OpenEmbedded build system automatically sets it for you.
6047
6048 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006049 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006050
6051 DEPENDS += "${PYTHON_PN}-native"
6052
6053 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006054 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006055
Andrew Geisslerf0343792020-11-18 10:42:21 -06006056 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006057 The minimal command and arguments to run ``ranlib``.
6058
Andrew Geisslerf0343792020-11-18 10:42:21 -06006059 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006060 The list of packages that conflict with packages. Note that packages
6061 will not be installed if conflicting packages are not first removed.
6062
6063 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006064 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006065
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006066 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006067
6068 BitBake, which the OpenEmbedded build system uses, supports
6069 specifying versioned dependencies. Although the syntax varies
6070 depending on the packaging format, BitBake hides these differences
6071 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006072 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006073
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006074 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006075
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006076 For ``operator``, you can specify the following:
6077
6078 - =
6079 - <
6080 - >
6081 - <=
6082 - >=
6083
6084 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006085 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006086
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006087 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006088
Andrew Geisslerf0343792020-11-18 10:42:21 -06006089 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006090 Lists runtime dependencies of a package. These dependencies are other
6091 packages that must be installed in order for the package to function
6092 correctly. As an example, the following assignment declares that the
6093 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006094 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006095
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006096 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006097
6098 The most common types of package
6099 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006100 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006101 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006102 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006103 section in the Yocto Project Overview and Concepts Manual.
6104
Andrew Geissler09036742021-06-25 14:25:14 -05006105 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006106 ``bar`` and ``baz`` will be declared as dependencies inside the
6107 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006108 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006109 Exactly how this is done depends on which package format is used,
6110 which is determined by
6111 :term:`PACKAGE_CLASSES`. When the
6112 corresponding package manager installs the package, it will know to
6113 also install the packages on which it depends.
6114
6115 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006116 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006117 added. This dependency is from the recipe's
6118 :ref:`ref-tasks-build` (not to be confused with
6119 :ref:`ref-tasks-compile`) task to the
6120 ``do_package_write_*`` task of the recipes that build ``bar`` and
6121 ``baz``.
6122
Andrew Geissler09036742021-06-25 14:25:14 -05006123 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006124 names of other packages - they cannot be recipe names. Although
6125 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006126 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006127 variable. For an example of the default list of packages created from
6128 a recipe, see the :term:`PACKAGES` variable.
6129
Andrew Geissler09036742021-06-25 14:25:14 -05006130 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006131 you should always use the variable in a form with an attached package
6132 name (remember that a single recipe can build multiple packages). For
6133 example, suppose you are building a development package that depends
6134 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006135 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006136
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006137 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006138
6139 In the example,
6140 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006141 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006142 the variable.
6143
6144 .. note::
6145
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006146 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006147 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006148 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006149 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006150 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006151
Andrew Geissler09036742021-06-25 14:25:14 -05006152 The package names you use with :term:`RDEPENDS` must appear as they would
6153 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006154 allows a different name to be used for the final package (e.g. the
6155 :ref:`debian <ref-classes-debian>` class uses this to rename
6156 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006157 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006158 independent of the package format used.
6159
6160 BitBake, which the OpenEmbedded build system uses, supports
6161 specifying versioned dependencies. Although the syntax varies
6162 depending on the packaging format, BitBake hides these differences
6163 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006164 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006165
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006166 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006167
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006168 For ``operator``, you can specify the following:
6169
6170 - =
6171 - <
6172 - >
6173 - <=
6174 - >=
6175
6176 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006177
6178 .. note::
6179
Andrew Geissler09036742021-06-25 14:25:14 -05006180 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006181 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006182
6183 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006184 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006185
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006186 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006187
6188 For information on build-time dependencies, see the
6189 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006190 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6191 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006192 BitBake User Manual for additional information on tasks and
6193 dependencies.
6194
Andrew Geissler5199d832021-09-24 16:47:35 -05006195 :term:`RECIPE_NO_UPDATE_REASON`
6196 If a recipe should not be replaced by a more recent upstream version,
6197 putting the reason why in this variable in a recipe allows
6198 ``devtool check-upgrade-status`` command to display it, as explained
6199 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6200 section.
6201
Andrew Geisslerf0343792020-11-18 10:42:21 -06006202 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006204 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006205 class, this variable identifies distribution features that must exist
6206 in the current configuration in order for the OpenEmbedded build
6207 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006208 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6209 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006210 the recipe will be skipped, and if the build system attempts to build
6211 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006212
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006213 :term:`REQUIRED_VERSION`
6214 If there are multiple versions of a recipe available, this variable
6215 determines which version should be given preference.
6216 :term:`REQUIRED_VERSION` works in exactly the same manner as
6217 :term:`PREFERRED_VERSION`, except that if the specified version is not
6218 available then an error message is shown and the build fails
6219 immediately.
6220
6221 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6222 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6223
Andrew Geisslerf0343792020-11-18 10:42:21 -06006224 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006225 With ``rm_work`` enabled, this variable specifies a list of recipes
6226 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006227 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006228 details.
6229
Andrew Geisslerf0343792020-11-18 10:42:21 -06006230 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006231 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006232 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006233
6234 ROOT_HOME ??= "/home/root"
6235
6236 .. note::
6237
6238 This default value is likely used because some embedded solutions
6239 prefer to have a read-only root filesystem and prefer to keep
6240 writeable data in one place.
6241
6242 You can override the default by setting the variable in any layer or
6243 in the ``local.conf`` file. Because the default is set using a "weak"
6244 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006245 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006246
6247 ROOT_HOME = "/root"
6248 ROOT_HOME ?= "/root"
6249
6250 These
6251 override examples use ``/root``, which is probably the most commonly
6252 used override.
6253
Andrew Geisslerf0343792020-11-18 10:42:21 -06006254 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006255 Indicates a filesystem image to include as the root filesystem.
6256
Andrew Geissler09036742021-06-25 14:25:14 -05006257 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006258 :ref:`image-live <ref-classes-image-live>` class.
6259
Andrew Geisslerf0343792020-11-18 10:42:21 -06006260 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006261 Specifies a list of functions to call after the OpenEmbedded build
6262 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006263 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006264
6265 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6266
6267 If you need to pass the root filesystem path to a command within a
6268 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6269 directory that becomes the root filesystem image. See the
6270 :term:`IMAGE_ROOTFS` variable for more
6271 information.
6272
Andrew Geisslerf0343792020-11-18 10:42:21 -06006273 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006274 Specifies a list of functions to call once the OpenEmbedded build
6275 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006276 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006277
6278 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6279
6280 If you need to pass the root filesystem path to a command within a
6281 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6282 directory that becomes the root filesystem image. See the
6283 :term:`IMAGE_ROOTFS` variable for more
6284 information.
6285
Andrew Geisslerf0343792020-11-18 10:42:21 -06006286 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006287 Specifies a list of functions to call after the OpenEmbedded build
6288 system has removed unnecessary packages. When runtime package
6289 management is disabled in the image, several packages are removed
6290 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006291 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006292
6293 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6294
6295 If you need to pass the root filesystem path to a command within a
6296 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6297 directory that becomes the root filesystem image. See the
6298 :term:`IMAGE_ROOTFS` variable for more
6299 information.
6300
Andrew Geisslerf0343792020-11-18 10:42:21 -06006301 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006302 Specifies a list of functions to call before the OpenEmbedded build
6303 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006304 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006305
6306 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6307
6308 If you need to pass the root filesystem path to a command within a
6309 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6310 directory that becomes the root filesystem image. See the
6311 :term:`IMAGE_ROOTFS` variable for more
6312 information.
6313
Andrew Geisslerf0343792020-11-18 10:42:21 -06006314 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006315 A list of package name aliases that a package also provides. These
6316 aliases are useful for satisfying runtime dependencies of other
6317 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006318 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006319
6320 .. note::
6321
Andrew Geissler09036742021-06-25 14:25:14 -05006322 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006323
6324 As with all package-controlling variables, you must always use the
6325 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006326 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006327
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006328 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006329
Andrew Geisslerf0343792020-11-18 10:42:21 -06006330 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006331 A list of packages that extends the usability of a package being
6332 built. The package being built does not depend on this list of
6333 packages in order to successfully build, but rather uses them for
6334 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006335 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006336
Andrew Geissler09036742021-06-25 14:25:14 -05006337 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006338 list of packages when installing the built package. However, you can
6339 prevent listed packages from being installed by using the
6340 :term:`BAD_RECOMMENDATIONS`,
6341 :term:`NO_RECOMMENDATIONS`, and
6342 :term:`PACKAGE_EXCLUDE` variables.
6343
Andrew Geissler09036742021-06-25 14:25:14 -05006344 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006345 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006346 through the :term:`PACKAGES` or
6347 :term:`PACKAGES_DYNAMIC` variables or the
6348 :term:`RPROVIDES` variable, or an error will occur
6349 during the build. If such a recipe does exist and the package is not
6350 produced, the build continues without error.
6351
Andrew Geissler09036742021-06-25 14:25:14 -05006352 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006353 you should always attach an override to the variable to specify the
6354 particular package whose usability is being extended. For example,
6355 suppose you are building a development package that is extended to
6356 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006357 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006358
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006359 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006360
6361 In the
6362 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006363 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006364 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006365
6366 BitBake, which the OpenEmbedded build system uses, supports
6367 specifying versioned recommends. Although the syntax varies depending
6368 on the packaging format, BitBake hides these differences from you.
6369 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006370 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006371
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006372 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006373
6374 For ``operator``, you can specify the following:
6375
6376 - =
6377 - <
6378 - >
6379 - <=
6380 - >=
6381
6382 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006383 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006385 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006386
Andrew Geisslerf0343792020-11-18 10:42:21 -06006387 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006388 A list of packages replaced by a package. The package manager uses
6389 this variable to determine which package should be installed to
6390 replace other package(s) during an upgrade. In order to also have the
6391 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006392 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006393
6394 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006395 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006396
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006397 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006398
6399 BitBake, which the OpenEmbedded build system uses, supports
6400 specifying versioned replacements. Although the syntax varies
6401 depending on the packaging format, BitBake hides these differences
6402 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006403 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006404
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006405 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006406
6407 For ``operator``, you can specify the following:
6408
6409 - =
6410 - <
6411 - >
6412 - <=
6413 - >=
6414
6415 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006416 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006417
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006418 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006419
Andrew Geisslerf0343792020-11-18 10:42:21 -06006420 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006421 A list of additional packages that you can suggest for installation
6422 by the package manager at the time a package is installed. Not all
6423 package managers support this functionality.
6424
6425 As with all package-controlling variables, you must always use this
6426 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006427 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006428
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006429 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006430
Andrew Geisslerf0343792020-11-18 10:42:21 -06006431 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006432 The location in the :term:`Build Directory` where
6433 unpacked recipe source code resides. By default, this directory is
6434 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6435 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6436 version. If the source tarball extracts the code to a directory named
6437 anything other than ``${BPN}-${PV}``, or if the source code is
6438 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006439 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006440 to find the unpacked source.
6441
6442 As an example, assume a :term:`Source Directory`
6443 top-level folder named ``poky`` and a default Build Directory at
6444 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006445 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006446
6447 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6448
6449 The unpacked source code resides in the ``db-5.1.19`` folder.
6450
6451 This next example assumes a Git repository. By default, Git
6452 repositories are cloned to ``${WORKDIR}/git`` during
6453 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006454 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006455 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006456
6457 SRC_URI = "git://path/to/repo.git"
6458 S = "${WORKDIR}/git"
6459
Andrew Geisslerf0343792020-11-18 10:42:21 -06006460 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006461 Specifies a list of command-line utilities that should be checked for
6462 during the initial sanity checking process when running BitBake. If
6463 any of the utilities are not installed on the build host, then
6464 BitBake immediately exits with an error.
6465
Andrew Geisslerf0343792020-11-18 10:42:21 -06006466 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006467 A list of the host distribution identifiers that the build system has
6468 been tested against. Identifiers consist of the host distributor ID
6469 followed by the release, as reported by the ``lsb_release`` tool or
6470 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006471 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006472 not empty and the current value of
6473 :term:`NATIVELSBSTRING` does not appear in the
6474 list, then the build system reports a warning that indicates the
6475 current host distribution has not been tested as a build host.
6476
Andrew Geisslerf0343792020-11-18 10:42:21 -06006477 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006478 The target architecture for the SDK. Typically, you do not directly
6479 set this variable. Instead, use :term:`SDKMACHINE`.
6480
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006481 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006482 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006483 "1" and a ``conf/templateconf.conf`` file exists in the build directory
6484 (:term:`TOPDIR`) then this will be copied into the SDK.
6485
Andrew Geisslerf0343792020-11-18 10:42:21 -06006486 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006487 The directory set up and used by the
6488 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6489 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006490 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006491
6492 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6493
Andrew Geisslerf0343792020-11-18 10:42:21 -06006494 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006495 The parent directory used by the OpenEmbedded build system when
6496 creating SDK output. The
6497 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006498 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006499
6500 SDK_DIR = "${WORKDIR}/sdk"
6501
6502 .. note::
6503
Andrew Geissler09036742021-06-25 14:25:14 -05006504 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6505 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006506
Andrew Geisslerf0343792020-11-18 10:42:21 -06006507 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006508 Controls whether or not shared state artifacts are copied into the
6509 extensible SDK. The default value of "full" copies all of the
6510 required shared state artifacts into the extensible SDK. The value
6511 "minimal" leaves these artifacts out of the SDK.
6512
6513 .. note::
6514
6515 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006516 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6517 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006518
Andrew Geisslerf0343792020-11-18 10:42:21 -06006519 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006520 The manifest file for the host part of the SDK. This file lists all
6521 the installed packages that make up the host part of the SDK. The
6522 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006523 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006524
6525 packagename packagearch version
6526
6527 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006528 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006529
6530 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6531
6532 The location is derived using the :term:`SDK_DEPLOY` and
6533 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6534
Andrew Geisslerf0343792020-11-18 10:42:21 -06006535 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006536 When set to "1", specifies to include the packagedata for all recipes
6537 in the "world" target in the extensible SDK. Including this data
6538 allows the ``devtool search`` command to find these recipes in search
6539 results, as well as allows the ``devtool add`` command to map
6540 dependencies more effectively.
6541
6542 .. note::
6543
Andrew Geissler09036742021-06-25 14:25:14 -05006544 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006545 variable significantly increases build time because all of world
6546 needs to be built. Enabling the variable also slightly increases
6547 the size of the extensible SDK.
6548
Andrew Geisslerf0343792020-11-18 10:42:21 -06006549 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006550 When set to "1", specifies to include the toolchain in the extensible
6551 SDK. Including the toolchain is useful particularly when
6552 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6553 the SDK reasonably small but you still want to provide a usable
6554 toolchain. For example, suppose you want to use the toolchain from an
6555 IDE or from other tools and you do not want to perform additional
6556 steps to install the toolchain.
6557
Andrew Geissler09036742021-06-25 14:25:14 -05006558 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6559 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6560 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006561
Andrew Geisslerf0343792020-11-18 10:42:21 -06006562 :term:`SDK_INHERIT_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006563 A list of classes to remove from the :term:`INHERIT`
6564 value globally within the extensible SDK configuration. The
6565 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006566 default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567
6568 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
6569
6570 Some classes are not generally applicable within the extensible SDK
6571 context. You can use this variable to disable those classes.
6572
6573 For additional information on how to customize the extensible SDK's
6574 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006575 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006576 section in the Yocto Project Application Development and the
6577 Extensible Software Development Kit (eSDK) manual.
6578
Andrew Geisslerf0343792020-11-18 10:42:21 -06006579 :term:`SDK_LOCAL_CONF_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006580 A list of variables not allowed through from the OpenEmbedded build
6581 system configuration into the extensible SDK configuration. Usually,
6582 these are variables that are specific to the machine on which the
6583 build system is running and thus would be potentially problematic
6584 within the extensible SDK.
6585
Andrew Geissler09036742021-06-25 14:25:14 -05006586 By default, :term:`SDK_LOCAL_CONF_BLACKLIST` is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006587 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
6588 excludes the following variables:
6589
6590 - :term:`CONF_VERSION`
6591 - :term:`BB_NUMBER_THREADS`
Patrick Williams213cb262021-08-07 19:21:33 -05006592 - :term:`BB_NUMBER_PARSE_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006593 - :term:`PARALLEL_MAKE`
6594 - :term:`PRSERV_HOST`
6595 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
6596 - :term:`SSTATE_DIR` :term:`TMPDIR`
6597 - :term:`BB_SERVER_TIMEOUT`
6598
6599 For additional information on how to customize the extensible SDK's
6600 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006601 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006602 section in the Yocto Project Application Development and the
6603 Extensible Software Development Kit (eSDK) manual.
6604
Andrew Geisslerf0343792020-11-18 10:42:21 -06006605 :term:`SDK_LOCAL_CONF_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006606 A list of variables allowed through from the OpenEmbedded build
6607 system configuration into the extensible SDK configuration. By
6608 default, the list of variables is empty and is set in the
6609 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
6610
6611 This list overrides the variables specified using the
Andrew Geissler595f6302022-01-24 19:11:47 +00006612 :term:`SDK_LOCAL_CONF_BLACKLIST` variable as well as
6613 other variables automatically added due to the "/" character
6614 being found at the start of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006615 value, which is usually indicative of being a path and thus might not
6616 be valid on the system where the SDK is installed.
6617
6618 For additional information on how to customize the extensible SDK's
6619 configuration, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006620 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006621 section in the Yocto Project Application Development and the
6622 Extensible Software Development Kit (eSDK) manual.
6623
Andrew Geisslerf0343792020-11-18 10:42:21 -06006624 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006625 The base name for SDK output files. The name is derived from the
6626 :term:`DISTRO`, :term:`TCLIBC`,
6627 :term:`SDK_ARCH`,
6628 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006629 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006630
6631 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6632
Andrew Geisslerf0343792020-11-18 10:42:21 -06006633 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006634 Specifies the operating system for which the SDK will be built. The
6635 default value is the value of :term:`BUILD_OS`.
6636
Andrew Geisslerf0343792020-11-18 10:42:21 -06006637 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006638 The location used by the OpenEmbedded build system when creating SDK
6639 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006640 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006641
6642 SDK_DIR = "${WORKDIR}/sdk"
6643 SDK_OUTPUT = "${SDK_DIR}/image"
6644 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6645
6646 .. note::
6647
Andrew Geissler09036742021-06-25 14:25:14 -05006648 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006649 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6650 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006651
Andrew Geisslerf0343792020-11-18 10:42:21 -06006652 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006653 Specifies a list of architectures compatible with the SDK machine.
6654 This variable is set automatically and should not normally be
6655 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006656 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006657 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6658
Andrew Geisslerf0343792020-11-18 10:42:21 -06006659 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006660 Specifies a list of functions to call once the OpenEmbedded build
6661 system creates the SDK. You can specify functions separated by
6662 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6663
6664 If you need to pass an SDK path to a command within a function, you
6665 can use ``${SDK_DIR}``, which points to the parent directory used by
6666 the OpenEmbedded build system when creating SDK output. See the
6667 :term:`SDK_DIR` variable for more information.
6668
Andrew Geisslerf0343792020-11-18 10:42:21 -06006669 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006670 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006671 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006672 :term:`TARGET_PREFIX` when building
6673 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6674
Andrew Geisslerf0343792020-11-18 10:42:21 -06006675 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006676 A list of shared state tasks added to the extensible SDK. By default,
6677 the following tasks are added:
6678
6679 - do_populate_lic
6680 - do_package_qa
6681 - do_populate_sysroot
6682 - do_deploy
6683
6684 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006685 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006686 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006687 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006688 tasks that are needed in order to build
6689 :term:`SDK_TARGETS`).
6690
Andrew Geisslerf0343792020-11-18 10:42:21 -06006691 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006692 Specifies the system, including the architecture and the operating
6693 system, for which the SDK will be built.
6694
6695 The OpenEmbedded build system automatically sets this variable based
6696 on :term:`SDK_ARCH`,
6697 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006698 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006699 variable yourself.
6700
Andrew Geisslerf0343792020-11-18 10:42:21 -06006701 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006702 The manifest file for the target part of the SDK. This file lists all
6703 the installed packages that make up the target part of the SDK. The
6704 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006705 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006706
6707 packagename packagearch version
6708
6709 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006710 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006711
6712 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6713
6714 The location is derived using the :term:`SDK_DEPLOY` and
6715 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6716
Andrew Geisslerf0343792020-11-18 10:42:21 -06006717 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006718 A list of targets to install from shared state as part of the
6719 standard or extensible SDK installation. The default value is "${PN}"
6720 (i.e. the image from which the SDK is built).
6721
Andrew Geissler09036742021-06-25 14:25:14 -05006722 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006723 would not be changed.
6724
Andrew Geisslerf0343792020-11-18 10:42:21 -06006725 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006726 The title to be printed when running the SDK installer. By default,
6727 this title is based on the :term:`DISTRO_NAME` or
6728 :term:`DISTRO` variable and is set in the
6729 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006730 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006731
6732 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6733
6734 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006735 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006736
6737 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006738 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006739 section in the Yocto Project Application Development and the
6740 Extensible Software Development Kit (eSDK) manual.
6741
Andrew Geisslerf0343792020-11-18 10:42:21 -06006742 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006743 An optional URL for an update server for the extensible SDK. If set,
6744 the value is used as the default update server when running
6745 ``devtool sdk-update`` within the extensible SDK.
6746
Andrew Geisslerf0343792020-11-18 10:42:21 -06006747 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006748 Specifies the name of the SDK vendor.
6749
Andrew Geisslerf0343792020-11-18 10:42:21 -06006750 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006751 Specifies the version of the SDK. The Poky distribution configuration file
6752 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006753 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006754
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006755 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006756
6757 For additional information, see the
6758 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006759 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006760
Andrew Geisslerf0343792020-11-18 10:42:21 -06006761 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006762 The default installation directory for the Extensible SDK. By
6763 default, this directory is based on the :term:`DISTRO`
6764 variable and is set in the
6765 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006766 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767
6768 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6769
6770 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006771 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006772
6773 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006774 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006775 section in the Yocto Project Application Development and the
6776 Extensible Software Development Kit (eSDK) manual.
6777
Andrew Geisslerf0343792020-11-18 10:42:21 -06006778 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006779 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006780 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006781
6782 $ bitbake -c populate_sdk imagename
6783
Andrew Geisslerf0343792020-11-18 10:42:21 -06006784 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00006785 The machine for which the SDK is built. In other words, the SDK is built
6786 such that it runs on the target you specify with the :term:`SDKMACHINE`
6787 value. The value points to a corresponding ``.conf`` file under
6788 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6789 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6790 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006791
Andrew Geissler595f6302022-01-24 19:11:47 +00006792 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6793 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006794
6795 .. note::
6796
Andrew Geissler09036742021-06-25 14:25:14 -05006797 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006798 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00006799 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006800
Andrew Geisslerf0343792020-11-18 10:42:21 -06006801 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006802 Defines the path offered to the user for installation of the SDK that
6803 is generated by the OpenEmbedded build system. The path appears as
6804 the default location for installing the SDK when you run the SDK's
6805 installation script. You can override the offered path when you run
6806 the script.
6807
Andrew Geisslerf0343792020-11-18 10:42:21 -06006808 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006809 The full path to the sysroot used for cross-compilation within an SDK
6810 as it will be when installed into the default
6811 :term:`SDKPATH`.
6812
Andrew Geisslerf0343792020-11-18 10:42:21 -06006813 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006814 The section in which packages should be categorized. Package
6815 management utilities can make use of this variable.
6816
Andrew Geisslerf0343792020-11-18 10:42:21 -06006817 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006818 Specifies the optimization flags passed to the C compiler when
6819 building for the target. The flags are passed through the default
6820 value of the :term:`TARGET_CFLAGS` variable.
6821
Andrew Geissler09036742021-06-25 14:25:14 -05006822 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006823 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6824 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006825
Andrew Geisslerf0343792020-11-18 10:42:21 -06006826 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006827 Defines a serial console (TTY) to enable using
6828 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6829 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006830 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006831
6832 SERIAL_CONSOLE = "115200 ttyS0"
6833
6834 .. note::
6835
Andrew Geissler09036742021-06-25 14:25:14 -05006836 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006837 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006838
Andrew Geisslerf0343792020-11-18 10:42:21 -06006839 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006840 Defines a serial console (TTY) to enable using
6841 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6842 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006843 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006844
6845 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6846
Andrew Geisslerf0343792020-11-18 10:42:21 -06006847 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006848 Specifies serial consoles, which must be listed in
6849 :term:`SERIAL_CONSOLES`, to check against
6850 ``/proc/console`` before enabling them using getty. This variable
6851 allows aliasing in the format: <device>:<alias>. If a device was
6852 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006853 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006854
6855 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6856
6857 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006858 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6859 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6860 incompatible with customizations such as the following::
6861
6862 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006863
Andrew Geissler595f6302022-01-24 19:11:47 +00006864 :term:`SETUPTOOLS_BUILD_ARGS`
6865 When used by recipes that inherit the
6866 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6867 be used to specify additional arguments to be passed to ``setup.py build``
6868 in the ``setuptools3_do_compile()`` task.
6869
6870 :term:`SETUPTOOLS_INSTALL_ARGS`
6871 When used by recipes that inherit the
6872 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6873 be used to specify additional arguments to be passed to ``setup.py install``
6874 in the ``setuptools3_do_install()`` task.
6875
6876 :term:`SETUPTOOLS_SETUP_PATH`
6877 When used by recipes that inherit the
6878 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6879 be used to specify the directory in which the ``setup.py`` file is
6880 located if it is not at the root of the source tree (as specified by
6881 :term:`S`). For example, in a recipe where the sources are fetched from
6882 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6883 subdirectory, you would have this::
6884
6885 S = "${WORKDIR}/git"
6886 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6887
Andrew Geisslerf0343792020-11-18 10:42:21 -06006888 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006889 A list of recipe dependencies that should not be used to determine
6890 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006891 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006892
6893 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6894
6895 In the previous example, ``intone`` depends on ``mplayer2``.
6896
6897 You can use the special token ``"*"`` on the left-hand side of the
6898 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006899 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006900
6901 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6902
6903 In the previous example, all recipes except ``quilt-native`` ignore
6904 task signatures from the ``quilt-native`` recipe when determining
6905 their task signatures.
6906
6907 Use of this variable is one mechanism to remove dependencies that
6908 affect task signatures and thus force rebuilds when a recipe changes.
6909
6910 .. note::
6911
6912 If you add an inappropriate dependency for a recipe relationship,
6913 the software might break during runtime if the interface of the
6914 second recipe was changed after the first recipe had been built.
6915
Andrew Geisslerf0343792020-11-18 10:42:21 -06006916 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006917 A list of recipes that are completely stable and will never change.
6918 The ABI for the recipes in the list are presented by output from the
6919 tasks run to build the recipe. Use of this variable is one way to
6920 remove dependencies from one recipe on another that affect task
6921 signatures and thus force rebuilds when the recipe changes.
6922
6923 .. note::
6924
6925 If you add an inappropriate variable to this list, the software
6926 might break at runtime if the interface of the recipe was changed
6927 after the other had been built.
6928
Andrew Geisslerf0343792020-11-18 10:42:21 -06006929 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006930 Specifies the number of bits for the target system CPU. The value
6931 should be either "32" or "64".
6932
Andrew Geisslerf0343792020-11-18 10:42:21 -06006933 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006934 Specifies the endian byte order of the target system. The value
6935 should be either "le" for little-endian or "be" for big-endian.
6936
Andrew Geisslerf0343792020-11-18 10:42:21 -06006937 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006938 Enables removal of all files from the "Provides" section of an RPM
6939 package. Removal of these files is required for packages containing
6940 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6941
6942 To enable file removal, set the variable to "1" in your
6943 ``conf/local.conf`` configuration file in your:
6944 :term:`Build Directory`.
6945 ::
6946
6947 SKIP_FILEDEPS = "1"
6948
Andrew Geisslerf0343792020-11-18 10:42:21 -06006949 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006950 Groups together machines based upon the same family of SOC (System On
6951 Chip). You typically set this variable in a common ``.inc`` file that
6952 you include in the configuration files of all the machines.
6953
6954 .. note::
6955
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006956 You must include ``conf/machine/include/soc-family.inc`` for this
6957 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006958
Andrew Geisslerf0343792020-11-18 10:42:21 -06006959 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006960 Defines the suffix for shared libraries used on the target platform.
6961 By default, this suffix is ".so.*" for all Linux-based systems and is
6962 defined in the ``meta/conf/bitbake.conf`` configuration file.
6963
6964 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006965 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006966
Andrew Geisslerf0343792020-11-18 10:42:21 -06006967 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006968 Defines the suffix for the development symbolic link (symlink) for
6969 shared libraries on the target platform. By default, this suffix is
6970 ".so" for Linux-based systems and is defined in the
6971 ``meta/conf/bitbake.conf`` configuration file.
6972
6973 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006974 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006975
Andrew Geisslereff27472021-10-29 15:35:00 -05006976 :term:`SOURCE_DATE_EPOCH`
6977 This defines a date expressed in number of seconds since
6978 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
6979 multiple build systems to force a timestamp in built binaries.
6980 Many upstream projects already support this variable.
6981
6982 You will find more details in the `official specifications
6983 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
6984
6985 A value for each recipe is computed from the sources by
6986 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
6987
6988 If a recipe wishes to override the default behavior, it should set its
6989 own :term:`SOURCE_DATE_EPOCH` value::
6990
6991 SOURCE_DATE_EPOCH = "1613559011"
6992
Andrew Geisslerf0343792020-11-18 10:42:21 -06006993 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006994 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05006995 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006996 your ``local.conf`` configuration file ensures the source for all
6997 recipes are fetched regardless of whether or not a recipe is
6998 compatible with the configuration. A recipe is considered
6999 incompatible with the currently configured machine when either or
7000 both the :term:`COMPATIBLE_MACHINE`
7001 variable and :term:`COMPATIBLE_HOST` variables
7002 specify compatibility with a machine other than that of the current
7003 machine or host.
7004
7005 .. note::
7006
Andrew Geissler09036742021-06-25 14:25:14 -05007007 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007008 variable unless you are creating a source mirror. In other words,
7009 do not set the variable during a normal build.
7010
Andrew Geisslerf0343792020-11-18 10:42:21 -06007011 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007012 Defines your own :term:`PREMIRRORS` from which to
7013 first fetch source before attempting to fetch from the upstream
7014 specified in :term:`SRC_URI`.
7015
7016 To use this variable, you must globally inherit the
7017 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007018 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007019
7020 INHERIT += "own-mirrors"
7021 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7022
7023 .. note::
7024
Andrew Geissler09036742021-06-25 14:25:14 -05007025 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007026
Andrew Geisslerf0343792020-11-18 10:42:21 -06007027 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007028 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007029 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007030 mappings, see the ``meta/conf/licenses.conf`` file.
7031
7032 For additional information, see the :term:`LICENSE`
7033 variable.
7034
Andrew Geisslerf0343792020-11-18 10:42:21 -06007035 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007036 A list of prefixes for :term:`PN` used by the OpenEmbedded
7037 build system to create variants of recipes or packages. The list
7038 specifies the prefixes to strip off during certain circumstances such
7039 as the generation of the :term:`BPN` variable.
7040
Andrew Geisslerf0343792020-11-18 10:42:21 -06007041 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007042 The file type for the Secondary Program Loader (SPL). Some devices
7043 use an SPL from which to boot (e.g. the BeagleBone development
7044 board). For such cases, you can declare the file type of the SPL
7045 binary in the ``u-boot.inc`` include file, which is used in the
7046 U-Boot recipe.
7047
7048 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007049 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007050
7051 # Some versions of u-boot build an SPL (Second Program Loader) image that
7052 # should be packaged along with the u-boot binary as well as placed in the
7053 # deploy directory. For those versions they can set the following variables
7054 # to allow packaging the SPL.
7055 SPL_BINARY ?= ""
7056 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7057 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7058 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7059
Andrew Geissler09036742021-06-25 14:25:14 -05007060 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007061 various ``SPL_*`` variables used by the OpenEmbedded build system.
7062
7063 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007064 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007065 section in the Yocto Project Board Support Package Developer's Guide
7066 for additional information.
7067
Andrew Geisslerf0343792020-11-18 10:42:21 -06007068 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007069
Andrew Geissler595f6302022-01-24 19:11:47 +00007070 See the BitBake manual for the initial description for this variable:
7071 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007072
Andrew Geissler595f6302022-01-24 19:11:47 +00007073 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007074
Andrew Geissler595f6302022-01-24 19:11:47 +00007075 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007076
7077 - ``apply`` - Whether to apply the patch or not. The default
7078 action is to apply the patch.
7079
7080 - ``striplevel`` - Which striplevel to use when applying the
7081 patch. The default level is 1.
7082
7083 - ``patchdir`` - Specifies the directory in which the patch should
7084 be applied. The default is ``${``\ :term:`S`\ ``}``.
7085
7086 Here are options specific to recipes building code from a revision
7087 control system:
7088
7089 - ``mindate`` - Apply the patch only if
7090 :term:`SRCDATE` is equal to or greater than
7091 ``mindate``.
7092
Andrew Geissler09036742021-06-25 14:25:14 -05007093 - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007094 than ``maxdate``.
7095
Andrew Geissler09036742021-06-25 14:25:14 -05007096 - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007097 greater than ``minrev``.
7098
Andrew Geissler09036742021-06-25 14:25:14 -05007099 - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007100 than ``maxrev``.
7101
Andrew Geissler09036742021-06-25 14:25:14 -05007102 - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007103 ``rev``.
7104
Andrew Geissler09036742021-06-25 14:25:14 -05007105 - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007106 ``rev``.
7107
Andrew Geissler595f6302022-01-24 19:11:47 +00007108 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007109
Andrew Geissler595f6302022-01-24 19:11:47 +00007110 If you want the build system to pick up files specified through
7111 a :term:`SRC_URI` statement from your append file, you need to be
7112 sure to extend the :term:`FILESPATH` variable by also using the
7113 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007114
Andrew Geisslerf0343792020-11-18 10:42:21 -06007115 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007116 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007117 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007118 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007119 variable to "0" disables this behavior.
7120
Andrew Geisslerf0343792020-11-18 10:42:21 -06007121 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007122 The date of the source code used to build the package. This variable
7123 applies only if the source was fetched from a Source Code Manager
7124 (SCM).
7125
Andrew Geisslerf0343792020-11-18 10:42:21 -06007126 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007127 Returns the version string of the current package. This string is
7128 used to help define the value of :term:`PV`.
7129
Andrew Geissler09036742021-06-25 14:25:14 -05007130 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007131 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007132 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007133
7134 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7135
Andrew Geissler09036742021-06-25 14:25:14 -05007136 Recipes that need to define :term:`PV` do so with the help of the
7137 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007138 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007139 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007140
7141 PV = "0.12-git${SRCPV}"
7142
Andrew Geisslerf0343792020-11-18 10:42:21 -06007143 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007144 The revision of the source code used to build the package. This
7145 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7146 that if you want to build a fixed revision and you want to avoid
7147 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007148 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007149 identifier and not just a tag.
7150
7151 .. note::
7152
7153 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007154 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007155 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007156 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007157 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007158
Andrew Geissler09036742021-06-25 14:25:14 -05007159 :term:`SRCTREECOVEREDTASKS`
7160 A list of tasks that are typically not relevant (and therefore skipped)
7161 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7162 class. The default value as set in that class file is the set of tasks
7163 that are rarely needed when using external source::
7164
7165 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7166
7167 The notable exception is when processing external kernel source as
7168 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7169 class file (formatted for aesthetics)::
7170
7171 SRCTREECOVEREDTASKS += "\
7172 do_validate_branches \
7173 do_kernel_configcheck \
7174 do_kernel_checkout \
7175 do_fetch \
7176 do_unpack \
7177 do_patch \
7178 "
7179
7180 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7181 variables for more information.
7182
Andrew Geisslerf0343792020-11-18 10:42:21 -06007183 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007184 The directory for the shared state cache.
7185
Andrew Geisslerf0343792020-11-18 10:42:21 -06007186 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007187 If set to "1", allows fetches from mirrors that are specified in
7188 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007189 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7190 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7191 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007192 your shared state cache, but you want to disable any other fetching
7193 from the network.
7194
Andrew Geisslerf0343792020-11-18 10:42:21 -06007195 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007196 Configures the OpenEmbedded build system to search other mirror
7197 locations for prebuilt cache data objects before building out the
7198 data. This variable works like fetcher :term:`MIRRORS`
7199 and :term:`PREMIRRORS` and points to the cache
7200 locations to check for the shared state (sstate) objects.
7201
7202 You can specify a filesystem directory or a remote URL such as HTTP
7203 or FTP. The locations you specify need to contain the shared state
7204 cache (sstate-cache) results from previous builds. The sstate-cache
7205 you point to can also be from builds on other machines.
7206
7207 When pointing to sstate build artifacts on another machine that uses
7208 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007209 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007210 paths to server paths. The paths need to take into account
7211 :term:`NATIVELSBSTRING` set by the
7212 :ref:`uninative <ref-classes-uninative>` class. For example, the
7213 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007214 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007215
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007216 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007217
7218 If a mirror uses the same structure as
7219 :term:`SSTATE_DIR`, you need to add "PATH" at the
7220 end as shown in the examples below. The build system substitutes the
7221 correct path within the directory structure.
7222 ::
7223
7224 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007225 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007226 file://.* file:///some-local-dir/sstate/PATH"
7227
Andrew Geisslerf0343792020-11-18 10:42:21 -06007228 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007229 Controls the list of files the OpenEmbedded build system scans for
7230 hardcoded installation paths. The variable uses a space-separated
7231 list of filenames (not paths) with standard wildcard characters
7232 allowed.
7233
7234 During a build, the OpenEmbedded build system creates a shared state
7235 (sstate) object during the first stage of preparing the sysroots.
7236 That object is scanned for hardcoded paths for original installation
7237 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007238 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7239 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240 than the variable being comprehensively set. The
7241 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7242 of files.
7243
7244 For details on the process, see the
7245 :ref:`staging <ref-classes-staging>` class.
7246
Andrew Geisslerf0343792020-11-18 10:42:21 -06007247 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007248 Specifies the path to the ``/lib`` subdirectory of the sysroot
7249 directory for the build host.
7250
Andrew Geisslerf0343792020-11-18 10:42:21 -06007251 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007252 Specifies the path to the ``/lib`` subdirectory of the sysroot
7253 directory for the target for which the current recipe is being built
7254 (:term:`STAGING_DIR_HOST`).
7255
Andrew Geisslerf0343792020-11-18 10:42:21 -06007256 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007257 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7258 directory for the target for which the current recipe is being built
7259 (:term:`STAGING_DIR_HOST`).
7260
Andrew Geisslerf0343792020-11-18 10:42:21 -06007261 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007262 Specifies the path to the directory containing binary configuration
7263 scripts. These scripts provide configuration information for other
7264 software that wants to make use of libraries or include files
7265 provided by the software associated with the script.
7266
7267 .. note::
7268
7269 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007270 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7271 library to which you are linking, it is recommended you use
7272 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007273
Andrew Geisslerf0343792020-11-18 10:42:21 -06007274 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007275 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7276 directory for the build host.
7277
Andrew Geisslerf0343792020-11-18 10:42:21 -06007278 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007279 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7280 directory for the target for which the current recipe is being built
7281 (:term:`STAGING_DIR_HOST`).
7282
Andrew Geisslerf0343792020-11-18 10:42:21 -06007283 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007284 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7285 directory for the build host.
7286
Andrew Geisslerf0343792020-11-18 10:42:21 -06007287 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007288 Helps construct the ``recipe-sysroots`` directory, which is used
7289 during packaging.
7290
7291 For information on how staging for recipe-specific sysroots occurs,
7292 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007293 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007294 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007295 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007296 section in the Yocto Project Overview and Concepts Manual, and the
7297 :term:`SYSROOT_DIRS` variable.
7298
7299 .. note::
7300
Andrew Geissler09036742021-06-25 14:25:14 -05007301 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007302 directory because the OpenEmbedded build system manages the
7303 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007304 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007305 task and then the OpenEmbedded build system will stage a subset of
7306 those files into the sysroot.
7307
Andrew Geisslerf0343792020-11-18 10:42:21 -06007308 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007309 Specifies the path to the sysroot directory for the system on which
7310 the component is built to run (the system that hosts the component).
7311 For most recipes, this sysroot is the one in which that recipe's
7312 :ref:`ref-tasks-populate_sysroot` task copies
7313 files. Exceptions include ``-native`` recipes, where the
7314 ``do_populate_sysroot`` task instead uses
7315 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007316 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007317 have the following values:
7318
7319 - For recipes building for the target machine, the value is
7320 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7321
7322 - For native recipes building for the build host, the value is empty
7323 given the assumption that when building for the build host, the
7324 build host's own directories should be used.
7325
7326 .. note::
7327
7328 ``-native`` recipes are not installed into host paths like such
7329 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007330 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007331 standard build environment variables such as
7332 :term:`CPPFLAGS` and
7333 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007334 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007335 headers using, for example, GCC's ``-isystem`` option.
7336
7337 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7338 should be viewed as input variables by tasks such as
7339 :ref:`ref-tasks-configure`,
7340 :ref:`ref-tasks-compile`, and
7341 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007342 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007343 for ``-native`` recipes, as they make use of host headers and
7344 libraries.
7345
Andrew Geisslerf0343792020-11-18 10:42:21 -06007346 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007347 Specifies the path to the sysroot directory used when building
7348 components that run on the build host itself.
7349
Andrew Geisslerf0343792020-11-18 10:42:21 -06007350 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007351 Specifies the path to the sysroot used for the system for which the
7352 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007353 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007354 :term:`STAGING_DIR_HOST`.
7355
7356 Some recipes build binaries that can run on the target system but
7357 those binaries in turn generate code for another different system
7358 (e.g. cross-canadian recipes). Using terminology from GNU, the
7359 primary system is referred to as the "HOST" and the secondary, or
7360 different, system is referred to as the "TARGET". Thus, the binaries
7361 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007362 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7363 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007364 sysroot used for the "TARGET" system.
7365
Andrew Geisslerf0343792020-11-18 10:42:21 -06007366 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007367 Specifies the path to the ``/etc`` subdirectory of the sysroot
7368 directory for the build host.
7369
Andrew Geisslerf0343792020-11-18 10:42:21 -06007370 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007371 Specifies the path to the ``/usr`` subdirectory of the sysroot
7372 directory for the target for which the current recipe is being built
7373 (:term:`STAGING_DIR_HOST`).
7374
Andrew Geisslerf0343792020-11-18 10:42:21 -06007375 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007376 Specifies the path to the ``/usr/include`` subdirectory of the
7377 sysroot directory for the target for which the current recipe being
7378 built (:term:`STAGING_DIR_HOST`).
7379
Andrew Geisslerf0343792020-11-18 10:42:21 -06007380 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007381 Specifies the path to the ``/usr/include`` subdirectory of the
7382 sysroot directory for the build host.
7383
Andrew Geisslerf0343792020-11-18 10:42:21 -06007384 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007385 Points to the directory containing the kernel build artifacts.
7386 Recipes building software that needs to access kernel build artifacts
7387 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007388 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007389 after the kernel has been built.
7390
Andrew Geisslerf0343792020-11-18 10:42:21 -06007391 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007392 The directory with kernel headers that are required to build
7393 out-of-tree modules.
7394
Andrew Geisslerf0343792020-11-18 10:42:21 -06007395 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007396 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7397 directory for the target for which the current recipe is being built
7398 (:term:`STAGING_DIR_HOST`).
7399
Andrew Geisslerf0343792020-11-18 10:42:21 -06007400 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007401 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7402 directory for the build host.
7403
Andrew Geisslerf0343792020-11-18 10:42:21 -06007404 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007405 Specifies the base path used to create recipe stamp files. The path
7406 to an actual stamp file is constructed by evaluating this string and
7407 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007408 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007409 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007410
7411 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7412
7413 For information on how BitBake uses stamp files to determine if a
7414 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007415 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007416 section in the Yocto Project Overview and Concepts Manual.
7417
7418 See :term:`STAMPS_DIR`,
7419 :term:`MULTIMACH_TARGET_SYS`,
7420 :term:`PN`, :term:`EXTENDPE`,
7421 :term:`PV`, and :term:`PR` for related variable
7422 information.
7423
Andrew Geisslerf0343792020-11-18 10:42:21 -06007424 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007425 Specifies the base directory in which the OpenEmbedded build system
7426 places stamps. The default directory is ``${TMPDIR}/stamps``.
7427
Andrew Geisslerf0343792020-11-18 10:42:21 -06007428 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007429 The minimal command and arguments to run ``strip``, which is used to
7430 strip symbols.
7431
Andrew Geisslerf0343792020-11-18 10:42:21 -06007432 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007433 The short (72 characters or less) summary of the binary package for
7434 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007435 :term:`SUMMARY` is used to define the
7436 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007437 not set in the recipe.
7438
Andrew Geisslerf0343792020-11-18 10:42:21 -06007439 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007440 The directory in which files checked out of a Subversion system are
7441 stored.
7442
Andrew Geisslerf0343792020-11-18 10:42:21 -06007443 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007444 Specifies the kernel boot default console. If you want to use a
7445 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007446 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007447
7448 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7449
7450 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7451 this variable to null but then checks for a value later.
7452
Andrew Geisslerf0343792020-11-18 10:42:21 -06007453 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007454 Lists additional options to add to the syslinux file. You need to set
7455 this variable in your recipe. If you want to list multiple options,
7456 separate the options with a semicolon character (``;``).
7457
7458 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7459 to create a set of options.
7460
Andrew Geisslerf0343792020-11-18 10:42:21 -06007461 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007462 Specifies the alternate serial port or turns it off. To turn off
7463 serial, set this variable to an empty string in your recipe. The
7464 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007465 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007466
7467 SYSLINUX_SERIAL ?= "0 115200"
7468
7469 The class checks for and uses the variable as needed.
7470
Andrew Geisslerf0343792020-11-18 10:42:21 -06007471 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007472 Specifies the alternate console=tty... kernel boot argument. The
7473 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007474 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007475
7476 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7477
7478 The class checks for and uses the variable as needed.
7479
Andrew Geisslerf0343792020-11-18 10:42:21 -06007480 :term:`SYSLINUX_SPLASH`
7481 An ``.LSS`` file used as the background for the VGA boot menu when
7482 you use the boot menu. You need to set this variable in your recipe.
7483
7484 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7485 variable and if found, the OpenEmbedded build system installs the
7486 splash screen.
7487
7488 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007489 Points to the temporary directory under the work directory (default
7490 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7491 where the files populated into the sysroot are assembled during the
7492 :ref:`ref-tasks-populate_sysroot` task.
7493
Andrew Geisslerf0343792020-11-18 10:42:21 -06007494 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007495 Directories that are staged into the sysroot by the
7496 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007497 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007498
7499 SYSROOT_DIRS = " \
7500 ${includedir} \
7501 ${libdir} \
7502 ${base_libdir} \
7503 ${nonarch_base_libdir} \
7504 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007505 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007506 "
7507
Andrew Geisslerf0343792020-11-18 10:42:21 -06007508 :term:`SYSROOT_DIRS_BLACKLIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007509 Directories that are not staged into the sysroot by the
7510 :ref:`ref-tasks-populate_sysroot` task. You
7511 can use this variable to exclude certain subdirectories of
7512 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007513 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007514
7515 SYSROOT_DIRS_BLACKLIST = " \
7516 ${mandir} \
7517 ${docdir} \
7518 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007519 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007520 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007521 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007522 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007523 ${datadir}/gtk-doc/html \
7524 ${datadir}/installed-tests \
7525 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007526 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007527 ${datadir}/terminfo \
7528 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007529 "
7530
Andrew Geisslerf0343792020-11-18 10:42:21 -06007531 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007532 Extra directories staged into the sysroot by the
7533 :ref:`ref-tasks-populate_sysroot` task for
7534 ``-native`` recipes, in addition to those specified in
7535 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007536 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007537
7538 SYSROOT_DIRS_NATIVE = " \
7539 ${bindir} \
7540 ${sbindir} \
7541 ${base_bindir} \
7542 ${base_sbindir} \
7543 ${libexecdir} \
7544 ${sysconfdir} \
7545 ${localstatedir} \
7546 "
7547
7548 .. note::
7549
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007550 Programs built by ``-native`` recipes run directly from the sysroot
7551 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7552 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007553
Andrew Geisslerf0343792020-11-18 10:42:21 -06007554 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007555 A list of functions to execute after files are staged into the
7556 sysroot. These functions are usually used to apply additional
7557 processing on the staged files, or to stage additional files.
7558
Andrew Geisslerf0343792020-11-18 10:42:21 -06007559 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7561 this variable specifies whether the specified service in
7562 :term:`SYSTEMD_SERVICE` should start
7563 automatically or not. By default, the service is enabled to
7564 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007565 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007566
7567 SYSTEMD_AUTO_ENABLE ??= "enable"
7568
7569 You can disable the service by setting the variable to "disable".
7570
Andrew Geisslerf0343792020-11-18 10:42:21 -06007571 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007572 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007573 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007574 configuration file that should be used. By default, the
7575 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007576 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007577
7578 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7579
7580 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007581 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007582
Andrew Geisslerf0343792020-11-18 10:42:21 -06007583 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007584 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007585 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007586 list of entry files (``*.conf``) to install that contain one boot
7587 entry per file. By default, the
7588 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007589 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007590
7591 SYSTEMD_BOOT_ENTRIES ?= ""
7592
7593 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007594 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007595
Andrew Geisslerf0343792020-11-18 10:42:21 -06007596 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007597 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007598 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007599 boot menu timeout in seconds. By default, the
7600 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007601 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007602
7603 SYSTEMD_BOOT_TIMEOUT ?= "10"
7604
7605 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007606 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007607
Andrew Geisslerf0343792020-11-18 10:42:21 -06007608 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007609 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7610 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007611 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007612 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007613 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007614
7615 SYSTEMD_PACKAGES ?= "${PN}"
7616
7617 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007618 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007619 the build system can find the systemd unit files.
7620
Andrew Geisslerf0343792020-11-18 10:42:21 -06007621 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007622 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7623 this variable specifies the systemd service name for a package.
7624
7625 When you specify this file in your recipe, use a package name
7626 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007627 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007628
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007629 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007630
Andrew Geisslerf0343792020-11-18 10:42:21 -06007631 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007632 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007633 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007634 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007635 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007636 (allowing login), assuming :term:`USE_VT` is not set to
7637 "0".
7638
Andrew Geissler09036742021-06-25 14:25:14 -05007639 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007640 run a getty on the first virtual terminal).
7641
Andrew Geisslerf0343792020-11-18 10:42:21 -06007642 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007643 This variable points to a directory were BitBake places temporary
7644 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007645 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007646
7647 T = "${WORKDIR}/temp"
7648
7649 The :term:`WORKDIR` is the directory into which
7650 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7651 file sets this variable.
7652
Andrew Geissler09036742021-06-25 14:25:14 -05007653 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007654 :term:`TMPDIR` variable, which points to the root of
7655 the directory tree where BitBake places the output of an entire
7656 build.
7657
Andrew Geisslerf0343792020-11-18 10:42:21 -06007658 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007659 The target machine's architecture. The OpenEmbedded build system
7660 supports many architectures. Here is an example list of architectures
7661 supported. This list is by no means complete as the architecture is
7662 configurable:
7663
7664 - arm
7665 - i586
7666 - x86_64
7667 - powerpc
7668 - powerpc64
7669 - mips
7670 - mipsel
7671
7672 For additional information on machine architectures, see the
7673 :term:`TUNE_ARCH` variable.
7674
Andrew Geisslerf0343792020-11-18 10:42:21 -06007675 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007676 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007677 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007678 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007679 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007680
7681 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7682
Andrew Geisslerf0343792020-11-18 10:42:21 -06007683 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007684 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007685 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007686 :term:`TUNE_CCARGS` by default.
7687
7688 .. note::
7689
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007690 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007691 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7692 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007693
Andrew Geisslerf0343792020-11-18 10:42:21 -06007694 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007695 This is a specific kernel compiler flag for a CPU or Application
7696 Binary Interface (ABI) tune. The flag is used rarely and only for
7697 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007698 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007699 variable allows the kernel (and associated modules) to use a
7700 different configuration. See the
7701 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7702 :term:`Source Directory` for an example.
7703
Andrew Geisslerf0343792020-11-18 10:42:21 -06007704 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007705 Specifies the flags to pass to the C compiler when building for the
7706 target. When building in the target context,
7707 :term:`CFLAGS` is set to the value of this variable by
7708 default.
7709
Andrew Geissler09036742021-06-25 14:25:14 -05007710 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7711 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007712 executables built using the SDK also have the flags applied.
7713
Andrew Geisslerf0343792020-11-18 10:42:21 -06007714 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007715 Specifies the flags to pass to the C pre-processor (i.e. to both the
7716 C and the C++ compilers) when building for the target. When building
7717 in the target context, :term:`CPPFLAGS` is set to the
7718 value of this variable by default.
7719
7720 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007721 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007722 value so that executables built using the SDK also have the flags
7723 applied.
7724
Andrew Geisslerf0343792020-11-18 10:42:21 -06007725 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007726 Specifies the flags to pass to the C++ compiler when building for the
7727 target. When building in the target context,
7728 :term:`CXXFLAGS` is set to the value of this variable
7729 by default.
7730
7731 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007732 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007733 value so that executables built using the SDK also have the flags
7734 applied.
7735
Andrew Geisslerf0343792020-11-18 10:42:21 -06007736 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007737 Specifies the method for handling FPU code. For FPU-less targets,
7738 which include most ARM CPUs, the variable must be set to "soft". If
7739 not, the kernel emulation gets used, which results in a performance
7740 penalty.
7741
Andrew Geisslerf0343792020-11-18 10:42:21 -06007742 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007743 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007744 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007745 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007746 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007747
7748 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7749
Andrew Geisslerf0343792020-11-18 10:42:21 -06007750 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007751 Specifies the flags to pass to the linker when building for the
7752 target. When building in the target context,
7753 :term:`LDFLAGS` is set to the value of this variable
7754 by default.
7755
7756 Additionally, the SDK's environment setup script sets the
7757 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007758 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007759 have the flags applied.
7760
Andrew Geisslerf0343792020-11-18 10:42:21 -06007761 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007762 Specifies the target's operating system. The variable can be set to
7763 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007764 for musl libc. For ARM/EABI targets, the possible values are
7765 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007766
Andrew Geisslerf0343792020-11-18 10:42:21 -06007767 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007768 Specifies the prefix used for the toolchain binary target tools.
7769
7770 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04007771 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007772
7773 - For recipes building for the target machine, the value is
7774 "${:term:`TARGET_SYS`}-".
7775
7776 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04007777 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007778
7779 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007780 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007781
Andrew Geisslerf0343792020-11-18 10:42:21 -06007782 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007783 Specifies the system, including the architecture and the operating
7784 system, for which the build is occurring in the context of the
7785 current recipe.
7786
7787 The OpenEmbedded build system automatically sets this variable based
7788 on :term:`TARGET_ARCH`,
7789 :term:`TARGET_VENDOR`, and
7790 :term:`TARGET_OS` variables.
7791
7792 .. note::
7793
Andrew Geissler09036742021-06-25 14:25:14 -05007794 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007795
7796 Consider these two examples:
7797
7798 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7799 value is "i686-linux".
7800
7801 - Given a recipe being built for a little-endian, MIPS target
7802 running Linux, the value might be "mipsel-linux".
7803
Andrew Geisslerf0343792020-11-18 10:42:21 -06007804 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007805 Specifies the name of the target vendor.
7806
Andrew Geisslerf0343792020-11-18 10:42:21 -06007807 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007808 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007809 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007810
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007811 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007812
Andrew Geisslerf0343792020-11-18 10:42:21 -06007813 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007814 Specifies a suffix to be appended onto the
7815 :term:`TMPDIR` value. The suffix identifies the
7816 ``libc`` variant for building. When you are building for multiple
7817 variants with the same :term:`Build Directory`, this
7818 mechanism ensures that output for different ``libc`` variants is kept
7819 separate to avoid potential conflicts.
7820
7821 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04007822 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007823 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007824 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007825 in no suffix being applied.
7826
Andrew Geisslerf0343792020-11-18 10:42:21 -06007827 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007828 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007829 characteristics of the generated packages and images by telling the
7830 OpenEmbedded build system which toolchain profile to use. By default,
7831 the OpenEmbedded build system builds its own internal toolchain. The
7832 variable's default value is "default", which uses that internal
7833 toolchain.
7834
7835 .. note::
7836
Andrew Geissler09036742021-06-25 14:25:14 -05007837 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007838 responsibility to ensure that the toolchain is compatible with the
7839 default toolchain. Using older or newer versions of these
7840 components might cause build problems. See the Release Notes for
7841 the Yocto Project release for the specific components with which
7842 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007843 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007844 page on the Yocto Project website and click on the "RELEASE
7845 INFORMATION" link for the appropriate release.
7846
Andrew Geissler09036742021-06-25 14:25:14 -05007847 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007848 which controls the variant of the GNU standard C library (``libc``)
7849 used during the build process: ``glibc`` or ``musl``.
7850
7851 With additional layers, it is possible to use a pre-compiled external
7852 toolchain. One example is the Sourcery G++ Toolchain. The support for
7853 this toolchain resides in the separate Mentor Graphics
7854 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007855 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007856
7857 The layer's ``README`` file contains information on how to use the
7858 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7859 be sure to add the layer to your ``bblayers.conf`` file in front of
7860 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7861 in your ``local.conf`` file to the location in which you installed
7862 the toolchain.
7863
7864 The fundamentals used for this example apply to any external
7865 toolchain. You can use ``meta-sourcery`` as a template for adding
7866 support for other external toolchains.
7867
Andrew Geisslerf0343792020-11-18 10:42:21 -06007868 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007869 The location the OpenEmbedded build system uses to export tests when
7870 the :term:`TEST_EXPORT_ONLY` variable is set
7871 to "1".
7872
Andrew Geissler09036742021-06-25 14:25:14 -05007873 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874 ``"${TMPDIR}/testimage/${PN}"``.
7875
Andrew Geisslerf0343792020-11-18 10:42:21 -06007876 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007877 Specifies to export the tests only. Set this variable to "1" if you
7878 do not want to run the tests but you want them to be exported in a
7879 manner that you to run them outside of the build system.
7880
Andrew Geisslerf0343792020-11-18 10:42:21 -06007881 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007882 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05007883 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007884
7885 .. note::
7886
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007887 Actual test results reside in the task log (``log.do_testimage``),
7888 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007889
Andrew Geisslerf0343792020-11-18 10:42:21 -06007890 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007891 For automated hardware testing, specifies the command to use to
7892 control the power of the target machine under test. Typically, this
7893 command would point to a script that performs the appropriate action
7894 (e.g. interacting with a web-enabled power strip). The specified
7895 command should expect to receive as the last argument "off", "on" or
7896 "cycle" specifying to power off, on, or cycle (power off and then
7897 power on) the device, respectively.
7898
Andrew Geisslerf0343792020-11-18 10:42:21 -06007899 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007900 For automated hardware testing, specifies additional arguments to
7901 pass through to the command specified in
7902 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007903 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007904 wish, for example, to separate the machine-specific and
7905 non-machine-specific parts of the arguments.
7906
Andrew Geisslerf0343792020-11-18 10:42:21 -06007907 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007908 The time in seconds allowed for an image to boot before automated
7909 runtime tests begin to run against an image. The default timeout
7910 period to allow the boot process to reach the login prompt is 500
7911 seconds. You can specify a different value in the ``local.conf``
7912 file.
7913
7914 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007915 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007916 section in the Yocto Project Development Tasks Manual.
7917
Andrew Geisslerf0343792020-11-18 10:42:21 -06007918 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007919 For automated hardware testing, specifies the command to use to
7920 connect to the serial console of the target machine under test. This
7921 command simply needs to connect to the serial console and forward
7922 that connection to standard input and output as any normal terminal
7923 program does.
7924
7925 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05007926 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007927
7928 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
7929
Andrew Geisslerf0343792020-11-18 10:42:21 -06007930 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007931 For automated hardware testing, specifies additional arguments to
7932 pass through to the command specified in
7933 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007934 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007935 wish, for example, to separate the machine-specific and
7936 non-machine-specific parts of the command.
7937
Andrew Geisslerf0343792020-11-18 10:42:21 -06007938 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007939 The IP address of the build machine (host machine). This IP address
7940 is usually automatically detected. However, if detection fails, this
7941 variable needs to be set to the IP address of the build machine (i.e.
7942 where the build is taking place).
7943
7944 .. note::
7945
Andrew Geissler09036742021-06-25 14:25:14 -05007946 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007947 tests such as the "dnf" test suite, which needs to download packages
7948 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007949
Andrew Geisslerf0343792020-11-18 10:42:21 -06007950 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007951 An ordered list of tests (modules) to run against an image when
7952 performing automated runtime testing.
7953
7954 The OpenEmbedded build system provides a core set of tests that can
7955 be used against images.
7956
7957 .. note::
7958
7959 Currently, there is only support for running these tests under
7960 QEMU.
7961
7962 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05007963 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007964 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007965
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007966 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007967
7968 Alternatively, you can
7969 provide the "auto" option to have all applicable tests run against
7970 the image.
7971 ::
7972
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007973 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007974
7975 Using this option causes the
7976 build system to automatically run tests that are applicable to the
7977 image. Tests that are not applicable are skipped.
7978
7979 The order in which tests are run is important. Tests that depend on
7980 another test must appear later in the list than the test on which
7981 they depend. For example, if you append the list of tests with two
7982 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05007983 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007984
7985 TEST_SUITES = "test_A test_B"
7986
7987 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007988 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007989 section in the Yocto Project Development Tasks Manual.
7990
Andrew Geisslerf0343792020-11-18 10:42:21 -06007991 :term:`TEST_TARGET`
7992 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007993 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007994
7995 TEST_TARGET = "qemu"
7996
7997 A target controller is a class that defines how an image gets
7998 deployed on a target and how a target is started. A layer can extend
7999 the controllers by adding a module in the layer's
8000 ``/lib/oeqa/controllers`` directory and by inheriting the
8001 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008002 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008003
Andrew Geissler5f350902021-07-23 13:09:54 -04008004 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008005
8006 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008007 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008008 in the Yocto Project Development Tasks Manual for more
8009 information.
8010
8011 - *"simpleremote":* Runs the tests on target hardware that is
8012 already up and running. The hardware can be on the network or it
8013 can be a device running an image on QEMU. You must also set
8014 :term:`TEST_TARGET_IP` when you use
8015 "simpleremote".
8016
8017 .. note::
8018
8019 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008020 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008021
8022 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008023 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008024 section in the Yocto Project Development Tasks Manual.
8025
8026 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008027 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008028 variable has no effect when :term:`TEST_TARGET` is
8029 set to "qemu".
8030
8031 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008032 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008033
8034 TEST_TARGET_IP = "192.168.1.4:2201"
8035
8036 Specifying a port is
8037 useful when SSH is started on a non-standard port or in cases when
8038 your hardware under test is behind a firewall or network that is not
8039 directly accessible from your host and you need to do port address
8040 translation.
8041
8042 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008043 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008044 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008045 any image that successfully builds to automatically boot under QEMU.
8046 Using the variable also adds in dependencies so that any SDK for
8047 which testing is requested is automatically built first.
8048
8049 These tests are written in Python making use of the ``unittest``
8050 module, and the majority of them run commands on the target system
8051 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8052 file in the :term:`Build Directory` to have the
8053 OpenEmbedded build system automatically run these tests after an
8054 image successfully builds:
8055
8056 TESTIMAGE_AUTO = "1"
8057
8058 For more information
8059 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008060 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008061 section in the Yocto Project Development Tasks Manual and the
Andrew Geissler595f6302022-01-24 19:11:47 +00008062 ":ref:`ref-classes-testimage*`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008063
Andrew Geisslerf0343792020-11-18 10:42:21 -06008064 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008065 The directory in which the file BitBake is currently parsing is
8066 located. Do not manually set this variable.
8067
Andrew Geisslerf0343792020-11-18 10:42:21 -06008068 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008069 The time the build was started. Times appear using the hour, minute,
8070 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8071 seconds past 1400 hours).
8072
Andrew Geisslerf0343792020-11-18 10:42:21 -06008073 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008074 This variable is the base directory the OpenEmbedded build system
8075 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008076 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008077 ``tmp`` within the :term:`Build Directory`.
8078
8079 If you want to establish this directory in a location other than the
8080 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008081 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008082
8083 #TMPDIR = "${TOPDIR}/tmp"
8084
Andrew Geissler09036742021-06-25 14:25:14 -05008085 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008086 which does not use NFS, while having the Build Directory use NFS.
8087
Andrew Geissler09036742021-06-25 14:25:14 -05008088 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008089 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8090 persistent inodes). Due to various issues with NFS and bugs in some
8091 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008092 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008093
Andrew Geisslerf0343792020-11-18 10:42:21 -06008094 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008095 This variable lists packages the OpenEmbedded build system uses when
8096 building an SDK, which contains a cross-development environment. The
8097 packages specified by this variable are part of the toolchain set
8098 that runs on the :term:`SDKMACHINE`, and each
8099 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008100 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008101
8102 $ bitbake -c populate_sdk imagename
8103
8104 In this case, a default list of packages is
8105 set in this variable, but you can add additional packages to the
8106 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008107 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008108 in the Yocto Project Application Development and the Extensible
8109 Software Development Kit (eSDK) manual for more information.
8110
8111 For background information on cross-development toolchains in the
8112 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008113 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008114 section in the Yocto Project Overview and Concepts Manual. For
8115 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008116 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008117
Andrew Geisslereff27472021-10-29 15:35:00 -05008118 Note that this variable applies to building an SDK, not an eSDK,
8119 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8120 used instead.
8121
8122 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8123 This variable allows to extend what is installed in the host
8124 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8125 applying to SDKs.
8126
Andrew Geisslerf0343792020-11-18 10:42:21 -06008127 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008128 This variable defines the name used for the toolchain output. The
8129 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008130 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008131
8132 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8133
8134 See
8135 the :term:`SDK_NAME` and
8136 :term:`SDK_VERSION` variables for additional
8137 information.
8138
Andrew Geisslerf0343792020-11-18 10:42:21 -06008139 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008140 This variable lists packages the OpenEmbedded build system uses when
8141 it creates the target part of an SDK (i.e. the part built for the
8142 target hardware), which includes libraries and headers. Use this
8143 variable to add individual packages to the part of the SDK that runs
8144 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008145 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008146 in the Yocto Project Application Development and the Extensible
8147 Software Development Kit (eSDK) manual for more information.
8148
8149 For background information on cross-development toolchains in the
8150 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008151 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008152 section in the Yocto Project Overview and Concepts Manual. For
8153 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008154 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008155
Andrew Geisslerf0343792020-11-18 10:42:21 -06008156 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008157 A sanitized version of :term:`TARGET_ARCH`. This
8158 variable is used where the architecture is needed in a value where
8159 underscores are not allowed, for example within package filenames. In
8160 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008161 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008162
8163 Do not edit this variable.
8164
Andrew Geisslerf0343792020-11-18 10:42:21 -06008165 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008166 The GNU canonical architecture for a specific architecture (i.e.
8167 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8168 this value to setup configuration.
8169
Andrew Geissler09036742021-06-25 14:25:14 -05008170 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008171 definitions can be a single static definition, or can be dynamically
8172 adjusted. You can see details for a given CPU family by looking at
8173 the architecture's ``README`` file. For example, the
8174 ``meta/conf/machine/include/mips/README`` file in the
8175 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008176 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008177
Andrew Geissler09036742021-06-25 14:25:14 -05008178 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008179 :term:`TARGET_ARCH`, which defines the target
8180 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008181 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008182
8183 TARGET_ARCH = "${TUNE_ARCH}"
8184
8185 The following list, which is by no means complete since architectures
8186 are configurable, shows supported machine architectures:
8187
8188 - arm
8189 - i586
8190 - x86_64
8191 - powerpc
8192 - powerpc64
8193 - mips
8194 - mipsel
8195
Andrew Geisslerf0343792020-11-18 10:42:21 -06008196 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008197 Specifies architecture-specific assembler flags for the target
8198 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008199 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008200 typically under ``meta/conf/machine/include/`` and are influenced
8201 through :term:`TUNE_FEATURES`. For example, the
8202 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008203 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008204
8205 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8206
8207 .. note::
8208
8209 Board Support Packages (BSPs) select the tune. The selected tune,
8210 in turn, affects the tune variables themselves (i.e. the tune can
8211 supply its own set of flags).
8212
Andrew Geisslerf0343792020-11-18 10:42:21 -06008213 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008214 Specifies architecture-specific C compiler flags for the target
8215 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008216 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008217 typically under ``meta/conf/machine/include/`` and are influenced
8218 through :term:`TUNE_FEATURES`.
8219
8220 .. note::
8221
8222 Board Support Packages (BSPs) select the tune. The selected tune,
8223 in turn, affects the tune variables themselves (i.e. the tune can
8224 supply its own set of flags).
8225
Andrew Geisslerf0343792020-11-18 10:42:21 -06008226 :term:`TUNE_FEATURES`
8227 Features used to "tune" a compiler for optimal use given a specific
8228 processor. The features are defined within the tune files and allow
8229 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8230 the features.
8231
8232 The OpenEmbedded build system verifies the features to be sure they
8233 are not conflicting and that they are supported.
8234
8235 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008236 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008237
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008238 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008239
8240 See the :term:`DEFAULTTUNE` variable for more information.
8241
8242 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008243 Specifies architecture-specific linker flags for the target system.
8244 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008245 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008246 typically under ``meta/conf/machine/include/`` and are influenced
8247 through :term:`TUNE_FEATURES`. For example, the
8248 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008249 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008250
8251 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8252
8253 .. note::
8254
8255 Board Support Packages (BSPs) select the tune. The selected tune,
8256 in turn, affects the tune variables themselves (i.e. the tune can
8257 supply its own set of flags).
8258
Andrew Geisslerf0343792020-11-18 10:42:21 -06008259 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008260 The package architecture understood by the packaging system to define
8261 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008262 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008263
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008264 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008265
8266 These tune-specific package architectures are defined in the machine
8267 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008268 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008269
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008270 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008271
Andrew Geisslerf0343792020-11-18 10:42:21 -06008272 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008273 Specifies CPU or Application Binary Interface (ABI) tuning features
8274 that conflict with feature.
8275
8276 Known tuning conflicts are specified in the machine include files in
8277 the :term:`Source Directory`. Here is an example from
8278 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8279 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008280 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008281
8282 TUNECONFLICTS[n32] = "o32 n64"
8283
Andrew Geisslerf0343792020-11-18 10:42:21 -06008284 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008285 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8286 feature. The specified feature is stored as a flag. Valid features
8287 are specified in the machine include files (e.g.
8288 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008289 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008290
8291 TUNEVALID[bigendian] = "Enable big-endian mode."
8292
8293 See the machine include files in the :term:`Source Directory`
8294 for these features.
8295
Andrew Geisslerf0343792020-11-18 10:42:21 -06008296 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008297 Configures the :term:`UBOOT_MACHINE` and can
8298 also define :term:`IMAGE_FSTYPES` for individual
8299 cases.
8300
8301 Following is an example from the ``meta-fsl-arm`` layer. ::
8302
8303 UBOOT_CONFIG ??= "sd"
8304 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8305 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8306 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8307 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8308
8309 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008310 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8311 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008312 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008313
Andrew Geissler09036742021-06-25 14:25:14 -05008314 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008315 :ref:`uboot-config <ref-classes-uboot-config>`
8316 class.
8317
Andrew Geisslerf0343792020-11-18 10:42:21 -06008318 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008319 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008320 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008321 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8322 the load address to be used in
8323 creating the dtb sections of Image Tree Source for the FIT image.
8324
Andrew Geisslerf0343792020-11-18 10:42:21 -06008325 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008326 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008327 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008328 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8329 creating the dtbo sections of Image Tree Source for the FIT image.
8330
Andrew Geisslerf0343792020-11-18 10:42:21 -06008331 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008332 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008333 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008334 command-line parameter to the ``uboot-mkimage`` utility.
8335
Andrew Geisslerf0343792020-11-18 10:42:21 -06008336 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008337 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008338 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008339 command-line parameter to the ``uboot-mkimage`` utility.
8340
Andrew Geisslerf0343792020-11-18 10:42:21 -06008341 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008342 Appends a string to the name of the local version of the U-Boot
8343 image. For example, assuming the version of the U-Boot image built
8344 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008345 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008346
8347 UBOOT_LOCALVERSION = "-yocto"
8348
Andrew Geisslerf0343792020-11-18 10:42:21 -06008349 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008350 Specifies the value passed on the ``make`` command line when building
8351 a U-Boot image. The value indicates the target platform
8352 configuration. You typically set this variable from the machine
8353 configuration file (i.e. ``conf/machine/machine_name.conf``).
8354
8355 Please see the "Selection of Processor Architecture and Board Type"
8356 section in the U-Boot README for valid values for this variable.
8357
Andrew Geisslerf0343792020-11-18 10:42:21 -06008358 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008359 Specifies the target called in the ``Makefile``. The default target
8360 is "all".
8361
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008362 :term:`UBOOT_MKIMAGE`
8363 Specifies the name of the mkimage command as used by the
8364 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8365 the FIT image. This can be used to substitute an alternative command, wrapper
8366 script or function if desired. The default is "uboot-mkimage".
8367
Andrew Geisslerf0343792020-11-18 10:42:21 -06008368 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008369 Options for the device tree compiler passed to mkimage '-D'
8370 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008371 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008372 pass the ``-D`` option to mkimage.
8373
8374 :term:`UBOOT_MKIMAGE_SIGN`
8375 Specifies the name of the mkimage command as used by the
8376 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8377 the FIT image after it has been assembled (if enabled). This can be used
8378 to substitute an alternative command, wrapper script or function if
8379 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8380
8381 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8382 Optionally specifies additional arguments for the
8383 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8384 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008385
Andrew Geisslerf0343792020-11-18 10:42:21 -06008386 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008387 Specifies the entrypoint for the RAM disk image.
8388 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008389 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008390 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8391 entrypoint to be used in creating the Image Tree Source for
8392 the FIT image.
8393
Andrew Geisslerf0343792020-11-18 10:42:21 -06008394 :term:`UBOOT_RD_LOADADDRESS`
8395 Specifies the load address for the RAM disk image.
8396 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008397 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008398 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8399 load address to be used in creating the Image Tree Source for
8400 the FIT image.
8401
8402 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008403 Enable signing of FIT image. The default value is "0".
8404
Andrew Geisslerf0343792020-11-18 10:42:21 -06008405 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008406 Location of the directory containing the RSA key and
8407 certificate used for signing FIT image.
8408
Andrew Geisslerf0343792020-11-18 10:42:21 -06008409 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008410 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008411 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8412 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8413 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8414
Andrew Geisslerf0343792020-11-18 10:42:21 -06008415 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008416 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8417 has a ``.sb`` extension.
8418
8419 The default U-Boot extension is ``.bin``
8420
Andrew Geisslerf0343792020-11-18 10:42:21 -06008421 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008422 Specifies the target used for building U-Boot. The target is passed
8423 directly as part of the "make" command (e.g. SPL and AIS). If you do
8424 not specifically set this variable, the OpenEmbedded build process
8425 passes and uses "all" for the target during the U-Boot building
8426 process.
8427
Andrew Geisslerf0343792020-11-18 10:42:21 -06008428 :term:`UNKNOWN_CONFIGURE_WHITELIST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008429 Specifies a list of options that, if reported by the configure script
8430 as being invalid, should not generate a warning during the
8431 :ref:`ref-tasks-configure` task. Normally, invalid
8432 configure options are simply not passed to the configure script (e.g.
8433 should be removed from :term:`EXTRA_OECONF` or
8434 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008435 However, there are common options that are passed to all
8436 configure scripts at a class level, but might not be valid for some
8437 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler09036742021-06-25 14:25:14 -05008438 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_WHITELIST`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008439
8440 The configure arguments check that uses
Andrew Geissler09036742021-06-25 14:25:14 -05008441 :term:`UNKNOWN_CONFIGURE_WHITELIST` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008442 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8443 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8444
Andrew Geisslerf0343792020-11-18 10:42:21 -06008445 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008446 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008447 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008448 specifies the package that contains the initscript that is enabled.
8449
8450 The default value is "${PN}". Given that almost all recipes that
8451 install initscripts package them in the main package for the recipe,
8452 you rarely need to set this variable in individual recipes.
8453
Andrew Geissler5199d832021-09-24 16:47:35 -05008454 :term:`UPSTREAM_CHECK_COMMITS`
8455 You can perform a per-recipe check for what the latest upstream
8456 source code version is by calling ``devtool latest-version recipe``. If
8457 the recipe source code is provided from Git repositories, but
8458 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8459 to ``1`` in the recipe, and the OpenEmbedded build system
8460 will compare the latest commit with the one currently specified
8461 by the recipe (:term:`SRCREV`).
8462 ::
8463
8464 UPSTREAM_CHECK_COMMITS = "1"
8465
Andrew Geisslerf0343792020-11-18 10:42:21 -06008466 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008467 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008468 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008469 the recipe source code is provided from Git repositories, the
8470 OpenEmbedded build system determines the latest upstream version by
8471 picking the latest tag from the list of all repository tags.
8472
Andrew Geissler09036742021-06-25 14:25:14 -05008473 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008474 regular expression to filter only the relevant tags should the
8475 default filter not work correctly.
8476 ::
8477
8478 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8479
Andrew Geisslerf0343792020-11-18 10:42:21 -06008480 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008481 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008482 regular expression instead of the default one when the package
8483 checking system is parsing the page found using
8484 :term:`UPSTREAM_CHECK_URI`.
8485 ::
8486
8487 UPSTREAM_CHECK_REGEX = "package_regex"
8488
Andrew Geisslerf0343792020-11-18 10:42:21 -06008489 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008490 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008491 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008492 the source code is provided from tarballs, the latest version is
8493 determined by fetching the directory listing where the tarball is and
8494 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008495 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008496 contains the link to the latest tarball.
8497 ::
8498
8499 UPSTREAM_CHECK_URI = "recipe_url"
8500
Andrew Geissler5199d832021-09-24 16:47:35 -05008501 :term:`UPSTREAM_VERSION_UNKNOWN`
8502 You can perform a per-recipe check for what the latest upstream
8503 source code version is by calling ``devtool latest-version recipe``.
8504 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8505 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8506 the recipe allows to determine what the latest upstream version is,
8507 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8508 to acknowledge that the check cannot be performed.
8509 ::
8510
8511 UPSTREAM_VERSION_UNKNOWN = "1"
8512
Andrew Geisslerf0343792020-11-18 10:42:21 -06008513 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008514 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008515 default value used for :term:`USE_DEVFS` is "1" when no value is
8516 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008517 statically populated ``/dev`` directory.
8518
Andrew Geissler09209ee2020-12-13 08:44:15 -06008519 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008520 the Yocto Project Development Tasks Manual for information on how to
8521 use this variable.
8522
Andrew Geisslerf0343792020-11-18 10:42:21 -06008523 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008524 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008525 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008526 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008527 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008528 virtual terminals in order to enable logging in through those
8529 terminals.
8530
Andrew Geissler09036742021-06-25 14:25:14 -05008531 The default value used for :term:`USE_VT` is "1" when no default value is
8532 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008533 machine configuration file for machines that do not have a graphical
8534 display attached and therefore do not need virtual terminal
8535 functionality.
8536
Andrew Geisslerf0343792020-11-18 10:42:21 -06008537 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008538 A list of classes to globally inherit. These classes are used by the
8539 OpenEmbedded build system to enable extra features (e.g.
Andrew Geissler5f350902021-07-23 13:09:54 -04008540 ``buildstats``, ``image-prelink``, and so forth).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008541
Andrew Geisslerc926e172021-05-07 16:11:35 -05008542 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008543
Andrew Geissler5f350902021-07-23 13:09:54 -04008544 USER_CLASSES ?= "buildstats image-prelink"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008545
8546 For more information, see
8547 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8548
Andrew Geisslerf0343792020-11-18 10:42:21 -06008549 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008550 If set to ``error``, forces the OpenEmbedded build system to produce
8551 an error if the user identification (``uid``) and group
8552 identification (``gid``) values are not defined in any of the files
8553 listed in :term:`USERADD_UID_TABLES` and
8554 :term:`USERADD_GID_TABLES`. If set to
8555 ``warn``, a warning will be issued instead.
8556
8557 The default behavior for the build system is to dynamically apply
8558 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008559 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008560 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008561 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008562 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008563
8564 USERADD_ERROR_DYNAMIC = "error"
8565
8566 Overriding the
8567 default behavior implies you are going to also take steps to set
8568 static ``uid`` and ``gid`` values through use of the
8569 :term:`USERADDEXTENSION`,
8570 :term:`USERADD_UID_TABLES`, and
8571 :term:`USERADD_GID_TABLES` variables.
8572
8573 .. note::
8574
8575 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008576 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008577 When it is set to ``warn``, the build system will report a warning for
8578 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8579 to ``error``, it will only report errors for recipes that are actually
8580 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008581 This saves you from having to add static IDs for recipes that you
8582 know will never be built.
8583
Andrew Geisslerf0343792020-11-18 10:42:21 -06008584 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008585 Specifies a password file to use for obtaining static group
8586 identification (``gid``) values when the OpenEmbedded build system
8587 adds a group to the system during package installation.
8588
8589 When applying static group identification (``gid``) values, the
8590 OpenEmbedded build system looks in :term:`BBPATH` for a
8591 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008592 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008593
8594
8595 USERADD_GID_TABLES = "files/group"
8596
8597 .. note::
8598
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008599 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8600 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008601
Andrew Geisslerf0343792020-11-18 10:42:21 -06008602 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008603 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8604 this variable specifies the individual packages within the recipe
8605 that require users and/or groups to be added.
8606
8607 You must set this variable if the recipe inherits the class. For
8608 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008609 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008610
8611 USERADD_PACKAGES = "${PN}"
8612
8613 .. note::
8614
Andrew Geissler09036742021-06-25 14:25:14 -05008615 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008616 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8617 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008618
Andrew Geisslerf0343792020-11-18 10:42:21 -06008619 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008620 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8621 this variable specifies for a package what parameters should pass to
8622 the ``useradd`` command if you add a user to the system when the
8623 package is installed.
8624
Andrew Geisslerc926e172021-05-07 16:11:35 -05008625 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008626
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008627 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008628 --no-create-home --shell /bin/false \
8629 --user-group messagebus"
8630
8631 For information on the
8632 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008633 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008634
Andrew Geisslerf0343792020-11-18 10:42:21 -06008635 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008636 Specifies a password file to use for obtaining static user
8637 identification (``uid``) values when the OpenEmbedded build system
8638 adds a user to the system during package installation.
8639
8640 When applying static user identification (``uid``) values, the
8641 OpenEmbedded build system looks in :term:`BBPATH` for a
8642 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008643 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008644
8645 USERADD_UID_TABLES = "files/passwd"
8646
8647 .. note::
8648
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008649 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8650 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008651
Andrew Geisslerf0343792020-11-18 10:42:21 -06008652 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008653 When set to "useradd-staticids", causes the OpenEmbedded build system
8654 to base all user and group additions on a static ``passwd`` and
8655 ``group`` files found in :term:`BBPATH`.
8656
8657 To use static user identification (``uid``) and group identification
8658 (``gid``) values, set the variable as follows in your ``local.conf``
8659 file: USERADDEXTENSION = "useradd-staticids"
8660
8661 .. note::
8662
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008663 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008664 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008665 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008666
8667 If you use static ``uid`` and ``gid`` information, you must also
8668 specify the ``files/passwd`` and ``files/group`` files by setting the
8669 :term:`USERADD_UID_TABLES` and
8670 :term:`USERADD_GID_TABLES` variables.
8671 Additionally, you should also set the
8672 :term:`USERADD_ERROR_DYNAMIC` variable.
8673
Andrew Geisslerf0343792020-11-18 10:42:21 -06008674 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675 Specifies the persistence of the target's ``/var/log`` directory,
8676 which is used to house postinstall target log files.
8677
Andrew Geissler09036742021-06-25 14:25:14 -05008678 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008679 file is not persistent. You can override this setting by setting the
8680 variable to "no" to make the log directory persistent.
8681
Andrew Geisslerf0343792020-11-18 10:42:21 -06008682 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008683 Specifies the quality assurance checks whose failures are reported as
8684 warnings by the OpenEmbedded build system. You set this variable in
8685 your distribution configuration file. For a list of the checks you
8686 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00008687 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008688
Andrew Geisslerf0343792020-11-18 10:42:21 -06008689 :term:`WKS_FILE`
8690 Specifies the location of the Wic kickstart file that is used by the
8691 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05008692 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06008693 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008694 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008695 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008696 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008697
8698 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008699 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008700 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008701 applicable when Wic images are active (i.e. when
8702 :term:`IMAGE_FSTYPES` contains entries related
8703 to Wic). If your recipe does not create Wic images, the variable has
8704 no effect.
8705
Andrew Geissler09036742021-06-25 14:25:14 -05008706 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008707 :term:`DEPENDS` variable. When you use the variable in
8708 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008709 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008710
Andrew Geissler09036742021-06-25 14:25:14 -05008711 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008712 specify a list of additional dependencies (e.g. native tools,
8713 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008714 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008715
8716 WKS_FILE_DEPENDS = "some-native-tool"
8717
8718 In the
8719 previous example, some-native-tool would be replaced with an actual
8720 native tool on which the build would depend.
8721
Andrew Geisslerf0343792020-11-18 10:42:21 -06008722 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008723 The pathname of the work directory in which the OpenEmbedded build
8724 system builds a recipe. This directory is located within the
8725 :term:`TMPDIR` directory structure and is specific to
8726 the recipe being built and the system for which it is being built.
8727
Andrew Geissler09036742021-06-25 14:25:14 -05008728 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008729
8730 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8731
8732 The actual directory depends on several things:
8733
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008734 - :term:`TMPDIR`: The top-level build output directory
8735 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8736 - :term:`PN`: The recipe name
8737 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8738 is usually the case for most recipes, then `EXTENDPE` is blank)
8739 - :term:`PV`: The recipe version
8740 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008741
8742 As an example, assume a Source Directory top-level folder name
8743 ``poky``, a default Build Directory at ``poky/build``, and a
8744 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8745 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8746 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008747 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008748
8749 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8750
Andrew Geisslerf0343792020-11-18 10:42:21 -06008751 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008752 Specifies the packages that should be installed to provide an X
8753 server and drivers for the current machine, assuming your image
8754 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8755 indirectly, includes "x11-base" in
8756 :term:`IMAGE_FEATURES`.
8757
Andrew Geissler09036742021-06-25 14:25:14 -05008758 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008759 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8760