blob: f9fd55147818839b6e5251768f1cd2dd98fc24ab [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::
Andrew Geissler9aee5002022-03-30 16:27:02 +000020 :sorted:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050021
Andrew Geisslerf0343792020-11-18 10:42:21 -060022 :term:`ABIEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050023 Extension to the Application Binary Interface (ABI) field of the GNU
24 canonical architecture name (e.g. "eabi").
25
26 ABI extensions are set in the machine include files. For example, the
27 ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the
Andrew Geisslerc926e172021-05-07 16:11:35 -050028 following extension::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050029
30 ABIEXTENSION = "eabi"
31
Andrew Geisslerf0343792020-11-18 10:42:21 -060032 :term:`ALLOW_EMPTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050033 Specifies whether to produce an output package even if it is empty.
34 By default, BitBake does not produce empty packages. This default
35 behavior can cause issues when there is an
36 :term:`RDEPENDS` or some other hard runtime
37 requirement on the existence of the package.
38
39 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -050040 conjunction with a package name override, as in::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050041
Patrick Williams0ca19cc2021-08-16 14:03:13 -050042 ALLOW_EMPTY:${PN} = "1"
43 ALLOW_EMPTY:${PN}-dev = "1"
44 ALLOW_EMPTY:${PN}-staticdev = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050045
Andrew Geisslerf0343792020-11-18 10:42:21 -060046 :term:`ALTERNATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050047 Lists commands in a package that need an alternative binary naming
48 scheme. Sometimes the same command is provided in multiple packages.
49 When this occurs, the OpenEmbedded build system needs to use the
50 alternatives system to create a different binary naming scheme so the
51 commands can co-exist.
52
William A. Kennington IIIac69b482021-06-02 12:28:27 -070053 To use the variable, list out the package's commands that are also
54 provided by another package. For example, if the ``busybox`` package
55 has four such commands, you identify them as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050056
Patrick Williams0ca19cc2021-08-16 14:03:13 -050057 ALTERNATIVE:busybox = "sh sed test bracket"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050058
59 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000060 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050061 section.
62
Andrew Geisslerf0343792020-11-18 10:42:21 -060063 :term:`ALTERNATIVE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050064 Used by the alternatives system to map duplicated commands to actual
65 locations. For example, if the ``bracket`` command provided by the
66 ``busybox`` package is duplicated through another package, you must
Andrew Geissler09036742021-06-25 14:25:14 -050067 use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual
Andrew Geisslerc926e172021-05-07 16:11:35 -050068 location::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050069
70 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
71
72 In this example, the binary for the ``bracket`` command (i.e. ``[``)
73 from the ``busybox`` package resides in ``/usr/bin/``.
74
75 .. note::
76
Andrew Geissler09036742021-06-25 14:25:14 -050077 If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050078
79 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000080 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050081 section.
82
Andrew Geisslerf0343792020-11-18 10:42:21 -060083 :term:`ALTERNATIVE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050084 Used by the alternatives system to create default priorities for
85 duplicated commands. You can use the variable to create a single
86 default regardless of the command name or package, a default for
87 specific duplicated commands regardless of the package, or a default
88 for specific commands tied to particular packages. Here are the
Andrew Geisslerc926e172021-05-07 16:11:35 -050089 available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050090
91 ALTERNATIVE_PRIORITY = "priority"
92 ALTERNATIVE_PRIORITY[name] = "priority"
93 ALTERNATIVE_PRIORITY_pkg[name] = "priority"
94
95 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +000096 ":ref:`ref-classes-update-alternatives`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050097 section.
98
Andrew Geisslerf0343792020-11-18 10:42:21 -060099 :term:`ALTERNATIVE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500100 Used by the alternatives system to create default link locations for
101 duplicated commands. You can use the variable to create a single
102 default location for all duplicated commands regardless of the
103 command name or package, a default for specific duplicated commands
104 regardless of the package, or a default for specific commands tied to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500105 particular packages. Here are the available syntax forms::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500106
107 ALTERNATIVE_TARGET = "target"
108 ALTERNATIVE_TARGET[name] = "target"
109 ALTERNATIVE_TARGET_pkg[name] = "target"
110
111 .. note::
112
Andrew Geissler09036742021-06-25 14:25:14 -0500113 If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500114 from the :term:`ALTERNATIVE_LINK_NAME` variable.
115
Andrew Geissler09036742021-06-25 14:25:14 -0500116 If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the
117 same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500118 appended to it.
119
120 Finally, if the file referenced has not been renamed, the
121 alternatives system will rename it to avoid the need to rename
122 alternative files in the :ref:`ref-tasks-install`
123 task while retaining support for the command if necessary.
124
125 For more information on the alternatives system, see the
Andrew Geissler595f6302022-01-24 19:11:47 +0000126 ":ref:`ref-classes-update-alternatives`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500127
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600128 :term:`ANY_OF_DISTRO_FEATURES`
129 When inheriting the
130 :ref:`features_check <ref-classes-features_check>`
131 class, this variable identifies a list of distribution features where
132 at least one must be enabled in the current configuration in order
133 for the OpenEmbedded build system to build the recipe. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -0500134 if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
135 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600136 the recipe will be skipped, and if the build system attempts to build
137 the recipe then an error will be triggered.
138
139
Andrew Geisslerf0343792020-11-18 10:42:21 -0600140 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500141 An override list of append strings for each target specified with
142 :term:`LABELS`.
143
144 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
145 information on how this variable is used.
146
Andrew Geisslerf0343792020-11-18 10:42:21 -0600147 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500148 The minimal command and arguments used to run ``ar``.
149
Andrew Geisslerf0343792020-11-18 10:42:21 -0600150 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500151 When used with the :ref:`archiver <ref-classes-archiver>` class,
152 determines the type of information used to create a released archive.
153 You can use this variable to create archives of patched source,
154 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500155 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500156
157 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
158 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
159 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
160 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
161 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
162 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
163 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
164 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
165
166 For information on how the variable works, see the
167 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
168
Andrew Geisslerf0343792020-11-18 10:42:21 -0600169 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500170 Minimal command and arguments needed to run the assembler.
171
Andrew Geisslerf0343792020-11-18 10:42:21 -0600172 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500173 Lists recipe names (:term:`PN` values) BitBake does not
174 attempt to build. Instead, BitBake assumes these recipes have already
175 been built.
176
Andrew Geissler09036742021-06-25 14:25:14 -0500177 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500178 tools that should not be built. An example is ``git-native``, which
179 when specified, allows for the Git binary from the host to be used
180 rather than building ``git-native``.
181
Andrew Geisslerf0343792020-11-18 10:42:21 -0600182 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500183 Provides additional ``shlibs`` provider mapping information, which
184 adds to or overwrites the information provided automatically by the
185 system. Separate multiple entries using spaces.
186
187 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500188 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500189
190 shlibname:packagename[_version]
191
192 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500193 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500194
195 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
196
Andrew Geisslerf0343792020-11-18 10:42:21 -0600197 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500198 The email address used to contact the original author or authors in
199 order to send patches and forward bugs.
200
Andrew Geisslerf0343792020-11-18 10:42:21 -0600201 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500202 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500203 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500204 packages should be checked for libraries and renamed according to
205 Debian library package naming.
206
207 The default value is "${PACKAGES}", which causes the debian class to
208 act on all packages that are explicitly generated by the recipe.
209
Andrew Geisslerf0343792020-11-18 10:42:21 -0600210 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500211 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500212 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500213
214 SRCREV = "${AUTOREV}"
215
216 If you use the previous statement to retrieve the latest version of
217 software, you need to be sure :term:`PV` contains
218 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
219 have a kernel recipe that inherits the
220 :ref:`kernel <ref-classes-kernel>` class and you use the previous
221 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500222 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500223 so that it does contain ``${SRCPV}``.
224
225 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600226 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500227 section in the Yocto Project Development Tasks Manual.
228
Andrew Geissler9aee5002022-03-30 16:27:02 +0000229 :term:`AUTO_SYSLINUXMENU`
230 Enables creating an automatic menu for the syslinux bootloader. You
231 must set this variable in your recipe. The
232 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
233
Andrew Geisslerf0343792020-11-18 10:42:21 -0600234 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500235 The list of defined CPU and Application Binary Interface (ABI)
236 tunings (i.e. "tunes") available for use by the OpenEmbedded build
237 system.
238
239 The list simply presents the tunes that are available. Not all tunes
240 may be compatible with a particular machine configuration, or with
241 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600242 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243 configuration.
244
245 To add a tune to the list, be sure to append it with spaces using the
246 "+=" BitBake operator. Do not simply replace the list by using the
247 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500248 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500249 User Manual for more information.
250
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500251 :term:`AZ_SAS`
252 Azure Storage Shared Access Signature, when using the
253 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
254 This variable can be defined to be used by the fetcher to authenticate
255 and gain access to non-public artifacts.
256 ::
257
258 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
259
260 For more information see Microsoft's Azure Storage documentation at
261 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
262
Andrew Geisslerf0343792020-11-18 10:42:21 -0600263 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500264 The directory within the :term:`Build Directory` in
265 which the OpenEmbedded build system places generated objects during a
266 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500267 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500268
269 S = "${WORKDIR}/${BP}"
270
Andrew Geissler09036742021-06-25 14:25:14 -0500271 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400272 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500273 separating these directories. The build system defaults to using
274 separate directories for ``gcc`` and some kernel recipes.
275
Andrew Geisslerf0343792020-11-18 10:42:21 -0600276 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500277 Lists "recommended-only" packages to not install. Recommended-only
278 packages are packages installed only through the
279 :term:`RRECOMMENDS` variable. You can prevent any
280 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500281 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500282
283 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
284
285 You can set this variable globally in your ``local.conf`` file or you
286 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500287 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500288
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500289 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500290
291 It is important to realize that if you choose to not install packages
292 using this variable and some other packages are dependent on them
293 (i.e. listed in a recipe's :term:`RDEPENDS`
294 variable), the OpenEmbedded build system ignores your request and
295 will install the packages to avoid dependency errors.
296
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700297 This variable is supported only when using the IPK and RPM
298 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500299
300 See the :term:`NO_RECOMMENDATIONS` and the
301 :term:`PACKAGE_EXCLUDE` variables for related
302 information.
303
Andrew Geisslerf0343792020-11-18 10:42:21 -0600304 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500305 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500306 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600307 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500308 section in the Yocto Project Development Tasks Manual for information
309 on Multilib.
310
Andrew Geissler09036742021-06-25 14:25:14 -0500311 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500312 the :term:`Source Directory`. If Multilib is not
313 being used, the value defaults to "lib".
314
Andrew Geisslerf0343792020-11-18 10:42:21 -0600315 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500316 Points to the base of the work directory for all recipes. The default
317 value is "${TMPDIR}/work".
318
Andrew Geisslerf0343792020-11-18 10:42:21 -0600319 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500320 Specifies a space-delimited list of hosts that the fetcher is allowed
321 to use to obtain the required source code. Following are
322 considerations surrounding this variable:
323
Andrew Geissler09036742021-06-25 14:25:14 -0500324 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500325 or set to "0".
326
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700327 - There is limited support for wildcard matching against the beginning of
328 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500329 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
330 ::
331
332 BB_ALLOWED_NETWORKS = "*.gnu.org"
333
334 .. note::
335
336 The use of the "``*``" character only works at the beginning of
337 a host name and it must be isolated from the remainder of the
338 host name. You cannot use the wildcard character in any other
339 location of the name or combined with the front part of the
340 name.
341
342 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
343 is not.
344
345 - Mirrors not in the host list are skipped and logged in debug.
346
347 - Attempts to access networks not in the host list cause a failure.
348
Andrew Geissler09036742021-06-25 14:25:14 -0500349 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500350 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500351 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500352 fetched from an allowed location and avoids raising an error when a
353 host that is not allowed is in a :term:`SRC_URI`
354 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500355 host listed in :term:`SRC_URI` after a successful fetch from the
356 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500357
Andrew Geisslerf0343792020-11-18 10:42:21 -0600358 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500359 Defines how BitBake handles situations where an append file
360 (``.bbappend``) has no corresponding recipe file (``.bb``). This
361 condition often occurs when layers get out of sync (e.g. ``oe-core``
362 bumps a recipe version and the old recipe no longer exists and the
363 other layer has not been updated to the new version of the recipe
364 yet).
365
366 The default fatal behavior is safest because it is the sane reaction
367 given something is out of sync. It is important to realize when your
368 changes are no longer being applied.
369
370 You can change the default behavior by setting this variable to "1",
371 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500372 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500373
374 BB_DANGLINGAPPENDS_WARNONLY = "1"
375
Andrew Geisslerf0343792020-11-18 10:42:21 -0600376 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500377 Monitors disk space and available inodes during the build and allows
378 you to control the build based on these parameters.
379
380 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500381 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500382 found in the :term:`Build Directory`. Use the
383 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500384
385 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500386
387 BB_DISKMON_DIRS = "action,dir,threshold [...]"
388
389 where:
390
391 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000392 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500393 a threshold is broken.
394 STOPTASKS: Stop the build after the currently
395 executing tasks have finished when
396 a threshold is broken.
397 WARN: Issue a warning but continue the
398 build when a threshold is broken.
399 Subsequent warnings are issued as
400 defined by the BB_DISKMON_WARNINTERVAL
401 variable, which must be defined in
402 the conf/local.conf file.
403
404 dir is:
405 Any directory you choose. You can specify one or
406 more directories to monitor by separating the
407 groupings with a space. If two directories are
408 on the same device, only the first directory
409 is monitored.
410
411 threshold is:
412 Either the minimum available disk space,
413 the minimum number of free inodes, or
414 both. You must specify at least one. To
415 omit one or the other, simply omit the value.
416 Specify the threshold using G, M, K for Gbytes,
417 Mbytes, and Kbytes, respectively. If you do
418 not specify G, M, or K, Kbytes is assumed by
419 default. Do not use GB, MB, or KB.
420
Andrew Geisslerc926e172021-05-07 16:11:35 -0500421 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500422
423 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
424 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
425 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
426
427 The first example works only if you also provide the
428 :term:`BB_DISKMON_WARNINTERVAL`
429 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000430 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500431 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
432 below 100 Kbytes. Because two directories are provided with the
433 variable, the build system also issue a warning when the disk space
434 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
435 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500436 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500437 variable.
438
439 The second example stops the build after all currently executing
440 tasks complete when the minimum disk space in the ``${TMPDIR}``
441 directory drops below 1 Gbyte. No disk monitoring occurs for the free
442 inodes in this case.
443
Andrew Geissler595f6302022-01-24 19:11:47 +0000444 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500445 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
446 disk space monitoring for the directory itself occurs in this case.
447
Andrew Geisslerf0343792020-11-18 10:42:21 -0600448 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500449 Defines the disk space and free inode warning intervals. To set these
450 intervals, define the variable in your ``conf/local.conf`` file in
451 the :term:`Build Directory`.
452
Andrew Geissler09036742021-06-25 14:25:14 -0500453 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500454 must also use the :term:`BB_DISKMON_DIRS`
455 variable and define its action as "WARN". During the build,
456 subsequent warnings are issued each time disk space or number of free
457 inodes further reduces by the respective interval.
458
Andrew Geissler09036742021-06-25 14:25:14 -0500459 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
460 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500461 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500462
463 BB_DISKMON_WARNINTERVAL = "50M,5K"
464
465 When specifying the variable in your configuration file, use the
466 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500467
468 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500469
470 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
471
472 where:
473
474 disk_space_interval is:
475 An interval of memory expressed in either
476 G, M, or K for Gbytes, Mbytes, or Kbytes,
477 respectively. You cannot use GB, MB, or KB.
478
479 disk_inode_interval is:
480 An interval of free inodes expressed in either
481 G, M, or K for Gbytes, Mbytes, or Kbytes,
482 respectively. You cannot use GB, MB, or KB.
483
Andrew Geisslerc926e172021-05-07 16:11:35 -0500484 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500485
486 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
487 BB_DISKMON_WARNINTERVAL = "50M,5K"
488
489 These variables cause the
490 OpenEmbedded build system to issue subsequent warnings each time the
491 available disk space further reduces by 50 Mbytes or the number of
492 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
493 directory. Subsequent warnings based on the interval occur each time
494 a respective interval is reached beyond the initial warning (i.e. 1
495 Gbytes and 100 Kbytes).
496
Andrew Geisslerf0343792020-11-18 10:42:21 -0600497 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500498 Causes tarballs of the source control repositories (e.g. Git
499 repositories), including metadata, to be placed in the
500 :term:`DL_DIR` directory.
501
502 For performance reasons, creating and placing tarballs of these
503 repositories is not the default action by the OpenEmbedded build
504 system.
505 ::
506
507 BB_GENERATE_MIRROR_TARBALLS = "1"
508
509 Set this variable in your
510 ``local.conf`` file in the :term:`Build Directory`.
511
512 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500513 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500514 source control work directories.
515
Andrew Geisslerf0343792020-11-18 10:42:21 -0600516 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500517 The maximum number of tasks BitBake should run in parallel at any one
518 time. The OpenEmbedded build system automatically configures this
519 variable to be equal to the number of cores on the build system. For
520 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500521 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500522 to "4".
523
524 For single socket systems (i.e. one CPU), you should not have to
525 override this variable to gain optimal parallelism during builds.
526 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500527 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500528 is not set higher than "20".
529
530 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600531 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500532 section in the Yocto Project Development Tasks Manual.
533
Andrew Geisslerf0343792020-11-18 10:42:21 -0600534 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500535 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500536 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500537 long the BitBake server stays resident between invocations.
538
539 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500540 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500541
542 BB_SERVER_TIMEOUT = "20"
543
544 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400545 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500546
Andrew Geisslerf0343792020-11-18 10:42:21 -0600547 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500548 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700549 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500550 ``quilt-native``, which is a copy of Quilt built to run on the build
551 system; "crosses" such as ``gcc-cross``, which is a compiler built to
552 run on the build machine but produces binaries that run on the target
553 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500554 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500555 "``multilib:``\ multilib_name".
556
557 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500558 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500559
560 BBCLASSEXTEND =+ "native nativesdk"
561 BBCLASSEXTEND =+ "multilib:multilib_name"
562
563 .. note::
564
Andrew Geissler09036742021-06-25 14:25:14 -0500565 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500566 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500567 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500568 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400569 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500570
Andrew Geissler09036742021-06-25 14:25:14 -0500571 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500572 Parsing once adds some limitations. For example, it is not
573 possible to include a different file depending on the variant,
574 since ``include`` statements are processed when the recipe is
575 parsed.
576
Andrew Geisslerf0343792020-11-18 10:42:21 -0600577 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500578 Lists the names of configured layers. These names are used to find
579 the other ``BBFILE_*`` variables. Typically, each layer will append
580 its name to this variable in its ``conf/layer.conf`` file.
581
Andrew Geisslerf0343792020-11-18 10:42:21 -0600582 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500583 Variable that expands to match files from
584 :term:`BBFILES` in a particular layer. This variable
585 is used in the ``conf/layer.conf`` file and must be suffixed with the
586 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
587
Andrew Geisslerf0343792020-11-18 10:42:21 -0600588 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500589 Assigns the priority for recipe files in each layer.
590
591 This variable is useful in situations where the same recipe appears
592 in more than one layer. Setting this variable allows you to
593 prioritize a layer against other layers that contain the same recipe
594 - effectively letting you control the precedence for the multiple
595 layers. The precedence established through this variable stands
596 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500597 example, a layer that has a recipe with a higher :term:`PV` value but for
598 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500599 has a lower precedence.
600
Andrew Geissler09036742021-06-25 14:25:14 -0500601 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500602 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500603 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
604 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500605 for more information. The default priority, if unspecified for a
606 layer with no dependencies, is the lowest defined priority + 1 (or 1
607 if no priorities are defined).
608
609 .. tip::
610
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500611 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500612 to list all configured layers along with their priorities.
613
Andrew Geisslerf0343792020-11-18 10:42:21 -0600614 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500615 A space-separated list of recipe files BitBake uses to build
616 software.
617
618 When specifying recipe files, you can pattern match using Python's
619 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
620 For details on the syntax, see the documentation by following the
621 previous link.
622
Andrew Geisslerf0343792020-11-18 10:42:21 -0600623 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500624 Activates content when identified layers are present. You identify
625 the layers by the collections that the layers define.
626
Andrew Geissler09036742021-06-25 14:25:14 -0500627 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500628 whose corresponding ``.bb`` file is in a layer that attempts to
629 modify other layers through ``.bbappend`` but does not want to
630 introduce a hard dependency on those other layers.
631
Andrew Geissler09036742021-06-25 14:25:14 -0500632 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000633 ``collection_name:filename_pattern``.
634
635 The following example identifies two collection names and two
636 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500637
638 BBFILES_DYNAMIC += " \
639 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
640 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
641 "
642
643 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000644 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500645
646 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500647
648 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
649 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
650 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
651
Andrew Geisslerf0343792020-11-18 10:42:21 -0600652 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500653 Variable that controls how BitBake displays logs on build failure.
654
Andrew Geisslerf0343792020-11-18 10:42:21 -0600655 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500656 If :term:`BBINCLUDELOGS` is set, specifies the
657 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500658 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500659 the entire log is printed.
660
Andrew Geisslerf0343792020-11-18 10:42:21 -0600661 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500662 Lists the layers to enable during the build. This variable is defined
663 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500664 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500665
666 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500667 /home/scottrif/poky/meta \
668 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500669 /home/scottrif/poky/meta-yocto-bsp \
670 /home/scottrif/poky/meta-mykernel \
671 "
672
673 This example enables four layers, one of which is a custom,
674 user-defined layer named ``meta-mykernel``.
675
Andrew Geisslerf0343792020-11-18 10:42:21 -0600676 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500677 Prevents BitBake from processing recipes and recipe append files.
678
Andrew Geissler09036742021-06-25 14:25:14 -0500679 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500680 ``.bbappend`` files. BitBake ignores any recipe or recipe append
681 files that match any of the expressions. It is as if BitBake does not
682 see them at all. Consequently, matching files are not parsed or
683 otherwise used by BitBake.
684
685 The values you provide are passed to Python's regular expression
686 compiler. Consequently, the syntax follows Python's Regular
687 Expression (re) syntax. The expressions are compared against the full
688 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500689 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500690
691 The following example uses a complete regular expression to tell
692 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500693 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500694
695 BBMASK = "meta-ti/recipes-misc/"
696
697 If you want to mask out multiple directories or recipes, you can
698 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500699 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500700
701 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
702 BBMASK += "/meta-oe/recipes-support/"
703 BBMASK += "/meta-foo/.*/openldap"
704 BBMASK += "opencv.*\.bbappend"
705 BBMASK += "lzma"
706
707 .. note::
708
709 When specifying a directory name, use the trailing slash character
710 to ensure you match just that directory name.
711
Andrew Geisslerf0343792020-11-18 10:42:21 -0600712 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500713 Specifies each additional separate configuration when you are
714 building targets with multiple configurations. Use this variable in
715 your ``conf/local.conf`` configuration file. Specify a
716 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500717 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500718
719 BBMULTICONFIG = "configA configB configC"
720
721 Each configuration file you
722 use must reside in the :term:`Build Directory`
723 ``conf/multiconfig`` directory (e.g.
Andrew Geisslereff27472021-10-29 15:35:00 -0500724 ``build_directory/conf/multiconfig/configA.conf``).
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500725
Andrew Geissler09036742021-06-25 14:25:14 -0500726 For information on how to use :term:`BBMULTICONFIG` in an environment
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500727 that supports building targets with multiple configurations, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600728 ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500729 section in the Yocto Project Development Tasks Manual.
730
Andrew Geisslerf0343792020-11-18 10:42:21 -0600731 :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500732 Used by BitBake to locate ``.bbclass`` and configuration files. This
733 variable is analogous to the ``PATH`` variable.
734
735 .. note::
736
737 If you run BitBake from a directory outside of the
Andrew Geissler09036742021-06-25 14:25:14 -0500738 :term:`Build Directory`, you must be sure to set :term:`BBPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500739 to point to the Build Directory. Set the variable as you would any
Andrew Geisslerc926e172021-05-07 16:11:35 -0500740 environment variable and then run BitBake::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500741
742 $ BBPATH = "build_directory"
743 $ export BBPATH
744 $ bitbake target
745
746
Andrew Geisslerf0343792020-11-18 10:42:21 -0600747 :term:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500748 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500749 BitBake remote server.
750
751 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500752 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500753
754 export BBSERVER=localhost:$port
755
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000756 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500757 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500758 data.
759
Andrew Geisslerf0343792020-11-18 10:42:21 -0600760 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500761 When inheriting the
762 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
763 this variable specifies binary configuration scripts to disable in
764 favor of using ``pkg-config`` to query the information. The
Andrew Geissler595f6302022-01-24 19:11:47 +0000765 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500766 return an error so that calls to them can be easily found and
767 replaced.
768
769 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500770 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500771
772 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
773
Andrew Geisslerf0343792020-11-18 10:42:21 -0600774 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500775 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
776 this variable specifies a wildcard for configuration scripts that
777 need editing. The scripts are edited to correct any paths that have
778 been set up during compilation so that they are correct for use when
779 installed into the sysroot and called by the build processes of other
780 recipes.
781
782 .. note::
783
Andrew Geissler09036742021-06-25 14:25:14 -0500784 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500785 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
786 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500787 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500788 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
789 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500790
791 For more information on how this variable works, see
792 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
793 You can also find general
794 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000795 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500796
Andrew Geisslerf0343792020-11-18 10:42:21 -0600797 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500798 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500799 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500800 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500801
802 ${BPN}-${PV}
803
Andrew Geisslerf0343792020-11-18 10:42:21 -0600804 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500805 This variable is a version of the :term:`PN` variable with
806 common prefixes and suffixes removed, such as ``nativesdk-``,
807 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
808 The exact lists of prefixes and suffixes removed are specified by the
809 :term:`MLPREFIX` and
810 :term:`SPECIAL_PKGSUFFIX` variables,
811 respectively.
812
Andrew Geisslerf0343792020-11-18 10:42:21 -0600813 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500814 Specifies a URL for an upstream bug tracking website for a recipe.
815 The OpenEmbedded build system does not use this variable. Rather, the
816 variable is a useful pointer in case a bug in the software being
817 built needs to be manually reported.
818
Andrew Geisslerf0343792020-11-18 10:42:21 -0600819 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500820 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500821 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822 machine name reported by the ``uname`` command.
823
Andrew Geisslerf0343792020-11-18 10:42:21 -0600824 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500825 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500826 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500827
Andrew Geisslerf0343792020-11-18 10:42:21 -0600828 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500829 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500830 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500831
Andrew Geisslerf0343792020-11-18 10:42:21 -0600832 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500833 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500834 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500835 points to GCC and passes as arguments the value of
836 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500837 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500838
Andrew Geisslerf0343792020-11-18 10:42:21 -0600839 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500840 Specifies the flags to pass to the C compiler when building for the
841 build host. When building in the ``-native`` context,
842 :term:`CFLAGS` is set to the value of this variable by
843 default.
844
Andrew Geisslerf0343792020-11-18 10:42:21 -0600845 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500846 Specifies the flags to pass to the C preprocessor (i.e. to both the C
847 and the C++ compilers) when building for the build host. When
848 building in the ``-native`` context, :term:`CPPFLAGS`
849 is set to the value of this variable by default.
850
Andrew Geisslerf0343792020-11-18 10:42:21 -0600851 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500852 Specifies the flags to pass to the C++ compiler when building for the
853 build host. When building in the ``-native`` context,
854 :term:`CXXFLAGS` is set to the value of this variable
855 by default.
856
Andrew Geisslerf0343792020-11-18 10:42:21 -0600857 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500858 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500859 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500860 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500861 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500862
Andrew Geisslerf0343792020-11-18 10:42:21 -0600863 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500864 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500865 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500866 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500867 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500868
Andrew Geisslerf0343792020-11-18 10:42:21 -0600869 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500870 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500871 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500872
Andrew Geisslerf0343792020-11-18 10:42:21 -0600873 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500874 Specifies the flags to pass to the linker when building for the build
875 host. When building in the ``-native`` context,
876 :term:`LDFLAGS` is set to the value of this variable
877 by default.
878
Andrew Geisslerf0343792020-11-18 10:42:21 -0600879 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500880 Specifies the optimization flags passed to the C compiler when
881 building for the build host or the SDK. The flags are passed through
882 the :term:`BUILD_CFLAGS` and
883 :term:`BUILDSDK_CFLAGS` default values.
884
Andrew Geissler5f350902021-07-23 13:09:54 -0400885 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500886 -pipe".
887
Andrew Geisslerf0343792020-11-18 10:42:21 -0600888 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500889 Specifies the operating system in use on the build host (e.g.
890 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler5f350902021-07-23 13:09:54 -0400891 :term:`BUILD_OS` from the OS reported by the ``uname`` command - the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500892 first word, converted to lower-case characters.
893
Andrew Geisslerf0343792020-11-18 10:42:21 -0600894 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500895 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500896 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500897 :term:`TARGET_PREFIX` when building for
898 ``native`` recipes.
899
Andrew Geisslerf0343792020-11-18 10:42:21 -0600900 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500901 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500902 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500903 points to
904 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
905
Andrew Geisslerf0343792020-11-18 10:42:21 -0600906 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500907 Specifies the system, including the architecture and the operating
908 system, to use when building for the build host (i.e. when building
909 ``native`` recipes).
910
911 The OpenEmbedded build system automatically sets this variable based
912 on :term:`BUILD_ARCH`,
913 :term:`BUILD_VENDOR`, and
914 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500915 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500916
Andrew Geisslerf0343792020-11-18 10:42:21 -0600917 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918 Specifies the vendor name to use when building for the build host.
919 The default value is an empty string ("").
920
Andrew Geisslerf0343792020-11-18 10:42:21 -0600921 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500922 Points to the location of the :term:`Build Directory`.
923 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500924 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500925 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500926 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500927 ``build`` in the current directory.
928
Andrew Geisslerf0343792020-11-18 10:42:21 -0600929 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500930 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
931 class, this variable specifies whether or not to commit the build
932 history output in a local Git repository. If set to "1", this local
Andrew Geissler595f6302022-01-24 19:11:47 +0000933 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500934 class and a commit will be created on every build for changes to each
935 top-level subdirectory of the build history output (images, packages,
936 and sdk). If you want to track changes to build history over time,
937 you should set this value to "1".
938
Andrew Geissler595f6302022-01-24 19:11:47 +0000939 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build
Andrew Geisslerc926e172021-05-07 16:11:35 -0500940 history output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941
942 BUILDHISTORY_COMMIT ?= "0"
943
Andrew Geisslerf0343792020-11-18 10:42:21 -0600944 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
946 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500947 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500948 :term:`BUILDHISTORY_COMMIT` variable must
949 be set to "1".
950
951 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500952 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500953 email@host". Providing an email address or host that is not valid
954 does not produce an error.
955
Andrew Geissler595f6302022-01-24 19:11:47 +0000956 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500957
958 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
959
Andrew Geisslerf0343792020-11-18 10:42:21 -0600960 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500961 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
962 class, this variable specifies the directory in which build history
963 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000964 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500965
Andrew Geissler595f6302022-01-24 19:11:47 +0000966 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500967
968 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
969
Andrew Geisslerf0343792020-11-18 10:42:21 -0600970 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500971 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
972 class, this variable specifies the build history features to be
973 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600974 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500975 section in the Yocto Project Development Tasks Manual.
976
977 You can specify these features in the form of a space-separated list:
978
979 - *image:* Analysis of the contents of images, which includes the
980 list of installed packages among other things.
981
982 - *package:* Analysis of the contents of individual packages.
983
984 - *sdk:* Analysis of the contents of the software development kit
985 (SDK).
986
987 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600988 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500989 (sstate) tasks.
990 This saves one file per task and lists the SHA-256 checksums for
991 each file staged (i.e. the output of the task).
992
Andrew Geissler595f6302022-01-24 19:11:47 +0000993 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -0500994 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500995
996 BUILDHISTORY_FEATURES ?= "image package sdk"
997
Andrew Geisslerf0343792020-11-18 10:42:21 -0600998 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500999 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1000 class, this variable specifies a list of paths to files copied from
1001 the image contents into the build history directory under an
1002 "image-files" directory in the directory for the image, so that you
1003 can track the contents of each file. The default is to copy
1004 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1005 changes in user and group entries. You can modify the list to include
1006 any file. Specifying an invalid path does not produce an error.
1007 Consequently, you can include files that might not always be present.
1008
Andrew Geissler595f6302022-01-24 19:11:47 +00001009 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001010 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001011
1012 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1013
Andrew Geissler5f350902021-07-23 13:09:54 -04001014 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
1015 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1016 class, this variable specifies a common path prefix that should be
1017 stripped off the beginning of paths in the task signature list when the
1018 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1019 useful when build history is populated from multiple sources that may not
1020 all use the same top level directory.
1021
Andrew Geissler595f6302022-01-24 19:11:47 +00001022 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001023
1024 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1025
1026 In this case, no prefixes will be stripped.
1027
Andrew Geisslerf0343792020-11-18 10:42:21 -06001028 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001029 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1030 class, this variable optionally specifies a remote repository to
1031 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001032 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001033 :term:`BUILDHISTORY_COMMIT` must be set to
1034 "1".
1035
1036 The repository should correspond to a remote address that specifies a
1037 repository as understood by Git, or alternatively to a remote name
1038 that you have set up manually using ``git remote`` within the local
1039 repository.
1040
Andrew Geissler595f6302022-01-24 19:11:47 +00001041 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042
1043 BUILDHISTORY_PUSH_REPO ?= ""
1044
Andrew Geisslerf0343792020-11-18 10:42:21 -06001045 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001046 Specifies the flags to pass to the C compiler when building for the
1047 SDK. When building in the ``nativesdk-`` context,
1048 :term:`CFLAGS` is set to the value of this variable by
1049 default.
1050
Andrew Geisslerf0343792020-11-18 10:42:21 -06001051 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001052 Specifies the flags to pass to the C pre-processor (i.e. to both the
1053 C and the C++ compilers) when building for the SDK. When building in
1054 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1055 to the value of this variable by default.
1056
Andrew Geisslerf0343792020-11-18 10:42:21 -06001057 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001058 Specifies the flags to pass to the C++ compiler when building for the
1059 SDK. When building in the ``nativesdk-`` context,
1060 :term:`CXXFLAGS` is set to the value of this variable
1061 by default.
1062
Andrew Geisslerf0343792020-11-18 10:42:21 -06001063 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001064 Specifies the flags to pass to the linker when building for the SDK.
1065 When building in the ``nativesdk-`` context,
1066 :term:`LDFLAGS` is set to the value of this variable
1067 by default.
1068
Andrew Geisslerf0343792020-11-18 10:42:21 -06001069 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001070 Points to the location of the directory that holds build statistics
1071 when you use and enable the
1072 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001073 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001074 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1075
Andrew Geisslerf0343792020-11-18 10:42:21 -06001076 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001077 For the BusyBox recipe, specifies whether to split the output
1078 executable file into two parts: one for features that require
1079 ``setuid root``, and one for the remaining features (i.e. those that
1080 do not require ``setuid root``).
1081
Andrew Geissler09036742021-06-25 14:25:14 -05001082 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001083 splitting the output executable file. Set the variable to "0" to get
1084 a single output executable file.
1085
Andrew Geisslerf0343792020-11-18 10:42:21 -06001086 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001087 Specifies the directory BitBake uses to store a cache of the
1088 :term:`Metadata` so it does not need to be parsed every time
1089 BitBake is started.
1090
Andrew Geisslerf0343792020-11-18 10:42:21 -06001091 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001092 The minimal command and arguments used to run the C compiler.
1093
Andrew Geisslerf0343792020-11-18 10:42:21 -06001094 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001095 Specifies the flags to pass to the C compiler. This variable is
1096 exported to an environment variable and thus made visible to the
1097 software being built during the compilation step.
1098
Andrew Geissler09036742021-06-25 14:25:14 -05001099 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001100 being built:
1101
1102 - :term:`TARGET_CFLAGS` when building for the
1103 target
1104
1105 - :term:`BUILD_CFLAGS` when building for the
1106 build host (i.e. ``-native``)
1107
1108 - :term:`BUILDSDK_CFLAGS` when building for
1109 an SDK (i.e. ``nativesdk-``)
1110
Andrew Geisslerf0343792020-11-18 10:42:21 -06001111 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001112 An internal variable specifying the special class override that
1113 should currently apply (e.g. "class-target", "class-native", and so
1114 forth). The classes that use this variable (e.g.
1115 :ref:`native <ref-classes-native>`,
1116 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1117 variable to appropriate values.
1118
1119 .. note::
1120
Andrew Geissler5f350902021-07-23 13:09:54 -04001121 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001122 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001123
1124 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001125 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001126
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001127 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001128 install my-extra-file ${D}${sysconfdir}
1129 }
1130
1131 Here is an example where ``FOO`` is set to
1132 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001133 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001134
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001135 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001136 FOO = "other"
1137
Andrew Geissler09036742021-06-25 14:25:14 -05001138 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001139 that it is included in the default value of
1140 :term:`OVERRIDES`.
1141
Andrew Geisslerf0343792020-11-18 10:42:21 -06001142 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001143 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001144 ``make clean`` command does not work for the software being built.
1145 Consequently, the OpenEmbedded build system will not try to run
1146 ``make clean`` during the :ref:`ref-tasks-configure`
1147 task, which is the default behavior.
1148
Andrew Geisslerf0343792020-11-18 10:42:21 -06001149 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001150 Provides a list of hardware features that are enabled in both
1151 :term:`MACHINE_FEATURES` and
1152 :term:`DISTRO_FEATURES`. This select list of
1153 features contains features that make sense to be controlled both at
1154 the machine and distribution configuration level. For example, the
1155 "bluetooth" feature requires hardware support but should also be
1156 optional at the distribution level, in case the hardware supports
1157 Bluetooth but you do not ever intend to use it.
1158
Andrew Geisslerf0343792020-11-18 10:42:21 -06001159 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001160 Points to ``meta/files/common-licenses`` in the
1161 :term:`Source Directory`, which is where generic license
1162 files reside.
1163
Andrew Geisslerf0343792020-11-18 10:42:21 -06001164 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001165 A regular expression that resolves to one or more hosts (when the
1166 recipe is native) or one or more targets (when the recipe is
1167 non-native) with which a recipe is compatible. The regular expression
1168 is matched against :term:`HOST_SYS`. You can use the
1169 variable to stop recipes from being built for classes of systems with
1170 which the recipes are not compatible. Stopping these builds is
1171 particularly useful with kernels. The variable also helps to increase
1172 parsing speed since the build system skips parsing recipes not
1173 compatible with the current system.
1174
Andrew Geisslerf0343792020-11-18 10:42:21 -06001175 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001176 A regular expression that resolves to one or more target machines
1177 with which a recipe is compatible. The regular expression is matched
1178 against :term:`MACHINEOVERRIDES`. You can use
1179 the variable to stop recipes from being built for machines with which
1180 the recipes are not compatible. Stopping these builds is particularly
1181 useful with kernels. The variable also helps to increase parsing
1182 speed since the build system skips parsing recipes not compatible
1183 with the current machine.
1184
Andrew Geisslerf0343792020-11-18 10:42:21 -06001185 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001186 Defines wildcards to match when installing a list of complementary
1187 packages for all the packages explicitly (or implicitly) installed in
1188 an image.
1189
1190 .. note::
1191
Andrew Geissler09036742021-06-25 14:25:14 -05001192 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001193 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1194 which is similar to the Unix style pathname pattern expansion
1195 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001196
1197 The resulting list of complementary packages is associated with an
1198 item that can be added to
1199 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001200 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001201 will install -dev packages (containing headers and other development
1202 files) for every package in the image.
1203
1204 To add a new feature item pointing to a wildcard, use a variable flag
1205 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001206 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207
1208 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1209
Andrew Geisslerf0343792020-11-18 10:42:21 -06001210 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001211 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001212 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001213 sysroots for other recipes.
1214
1215 The default is
1216 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1217 (i.e.
1218 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1219
Andrew Geisslerf0343792020-11-18 10:42:21 -06001220 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001221 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001222 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001223 ``build/conf/`` compatibility changes.
1224
Andrew Geisslerf0343792020-11-18 10:42:21 -06001225 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001226 Identifies editable or configurable files that are part of a package.
1227 If the Package Management System (PMS) is being used to update
1228 packages on the target system, it is possible that configuration
1229 files you have changed after the original installation and that you
1230 now want to remain unchanged are overwritten. In other words,
1231 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001232 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001233 variable to list the files in the package that you wish to prevent
1234 the PMS from overwriting during this update process.
1235
Andrew Geissler09036742021-06-25 14:25:14 -05001236 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001237 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001238 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001239
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001240 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001241 ${sysconfdir}/file2 ${sysconfdir}/file3"
1242
Andrew Geissler09036742021-06-25 14:25:14 -05001243 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1244 variables. The files listed within :term:`CONFFILES` must be a subset of
1245 the files listed within :term:`FILES`. Because the configuration files
1246 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001247 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001248 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001249 variable.
1250
1251 .. note::
1252
Andrew Geissler09036742021-06-25 14:25:14 -05001253 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001254 good practice to use appropriate path variables.
1255 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1256 rather than ``/usr/bin``. You can find a list of these variables at
1257 the top of the ``meta/conf/bitbake.conf`` file in the
1258 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001259
Andrew Geisslerf0343792020-11-18 10:42:21 -06001260 :term:`CONFIG_INITRAMFS_SOURCE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001261 Identifies the initial RAM filesystem (initramfs) source files. The
1262 OpenEmbedded build system receives and uses this kernel Kconfig
1263 variable as an environment variable. By default, the variable is set
1264 to null ("").
1265
Andrew Geissler09036742021-06-25 14:25:14 -05001266 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001267 with a ``.cpio`` suffix or a space-separated list of directories and
1268 files for building the initramfs image. A cpio archive should contain
1269 a filesystem archive to be used as an initramfs image. Directories
1270 should contain a filesystem layout to be included in the initramfs
1271 image. Files should contain entries according to the format described
1272 by the ``usr/gen_init_cpio`` program in the kernel tree.
1273
1274 If you specify multiple directories and files, the initramfs image
1275 will be the aggregate of all of them.
1276
1277 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001278 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001279 in the Yocto Project Development Tasks Manual.
1280
Andrew Geisslerf0343792020-11-18 10:42:21 -06001281 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001282 A list of files that contains ``autoconf`` test results relevant to
1283 the current build. This variable is used by the Autotools utilities
1284 when running ``configure``.
1285
Andrew Geisslerf0343792020-11-18 10:42:21 -06001286 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001287 The minimal arguments for GNU configure.
1288
Andrew Geisslerf0343792020-11-18 10:42:21 -06001289 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001290 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001291 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001292 class, this variable identifies distribution features that would be
1293 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001294 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1295 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001296 the recipe will be skipped, and if the build system attempts to build
1297 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001298
Andrew Geissler9aee5002022-03-30 16:27:02 +00001299 :term:`COPY_LIC_DIRS`
1300 If set to "1" along with the
1301 :term:`COPY_LIC_MANIFEST` variable, the
1302 OpenEmbedded build system copies into the image the license files,
1303 which are located in ``/usr/share/common-licenses``, for each
1304 package. The license files are placed in directories within the image
1305 itself during build time.
1306
1307 .. note::
1308
1309 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1310 newly installed packages to an image, which might be most suitable for
1311 read-only filesystems that cannot be upgraded. See the
1312 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1313 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1314 section in the Yocto Project Development Tasks Manual for
1315 information on providing license text.
1316
1317 :term:`COPY_LIC_MANIFEST`
1318 If set to "1", the OpenEmbedded build system copies the license
1319 manifest for the image to
1320 ``/usr/share/common-licenses/license.manifest`` within the image
1321 itself during build time.
1322
1323 .. note::
1324
1325 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1326 newly installed packages to an image, which might be most suitable for
1327 read-only filesystems that cannot be upgraded. See the
1328 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1329 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1330 section in the Yocto Project Development Tasks Manual for
1331 information on providing license text.
1332
Andrew Geisslerf0343792020-11-18 10:42:21 -06001333 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001334 A space-separated list of licenses to exclude from the source
1335 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1336 other words, if a license in a recipe's
1337 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001338 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001339 class.
1340
1341 .. note::
1342
Andrew Geissler09036742021-06-25 14:25:14 -05001343 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001344 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001345
1346 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001347 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001348 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001349 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001350
Andrew Geisslerf0343792020-11-18 10:42:21 -06001351 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001352 A space-separated list of licenses to include in the source archived
1353 by the :ref:`archiver <ref-classes-archiver>` class. In other
1354 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001355 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001356 source is archived by the class.
1357
1358 The default value is set by the
1359 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001360 is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001361 "GPL*", "LGPL*", and "AGPL*".
1362
Andrew Geisslerf0343792020-11-18 10:42:21 -06001363 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364 A list of recipes to exclude in the source archived by the
1365 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001366 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001367 exclusion caused through the
1368 :term:`COPYLEFT_LICENSE_INCLUDE` and
1369 :term:`COPYLEFT_LICENSE_EXCLUDE`
1370 variables, respectively.
1371
1372 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001373 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001374 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001375 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:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 A list of recipes to include in the source archived by the
1379 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001380 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001381 exclusion caused through the
1382 :term:`COPYLEFT_LICENSE_INCLUDE` and
1383 :term:`COPYLEFT_LICENSE_EXCLUDE`
1384 variables, respectively.
1385
1386 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001387 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001388 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001389 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001390
Andrew Geisslerf0343792020-11-18 10:42:21 -06001391 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001392 A space-separated list of recipe types to include in the source
1393 archived by the :ref:`archiver <ref-classes-archiver>` class.
1394 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1395 ``crosssdk``, and ``cross-canadian``.
1396
Andrew Geissler09036742021-06-25 14:25:14 -05001397 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001398 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001399 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001400
Andrew Geisslerf0343792020-11-18 10:42:21 -06001401 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001402 Specifies the list of packages to be added to the image. You should
1403 only set this variable in the ``local.conf`` configuration file found
1404 in the :term:`Build Directory`.
1405
1406 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1407 supported.
1408
Andrew Geisslerf0343792020-11-18 10:42:21 -06001409 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001410 Specifies the parent directory of the OpenEmbedded-Core Metadata
1411 layer (i.e. ``meta``).
1412
Andrew Geissler09036742021-06-25 14:25:14 -05001413 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001414 of this layer and not the layer itself. Consider an example where you
1415 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001416 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001417 points to the ``poky`` folder because it is the parent directory of
1418 the ``poky/meta`` layer.
1419
Andrew Geisslerf0343792020-11-18 10:42:21 -06001420 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001421 Lists files from the :term:`COREBASE` directory that
1422 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001423 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001424 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001425 into the extensible SDK.
1426
Andrew Geissler09036742021-06-25 14:25:14 -05001427 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 typically contains build directories and other files that should not
1429 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001430 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 are actually needed.
1432
Andrew Geisslerf0343792020-11-18 10:42:21 -06001433 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001434 The minimal command and arguments used to run the C preprocessor.
1435
Andrew Geisslerf0343792020-11-18 10:42:21 -06001436 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001437 Specifies the flags to pass to the C pre-processor (i.e. to both the
1438 C and the C++ compilers). This variable is exported to an environment
1439 variable and thus made visible to the software being built during the
1440 compilation step.
1441
Andrew Geissler09036742021-06-25 14:25:14 -05001442 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001443 being built:
1444
1445 - :term:`TARGET_CPPFLAGS` when building for
1446 the target
1447
1448 - :term:`BUILD_CPPFLAGS` when building for the
1449 build host (i.e. ``-native``)
1450
1451 - :term:`BUILDSDK_CPPFLAGS` when building
1452 for an SDK (i.e. ``nativesdk-``)
1453
Andrew Geisslerf0343792020-11-18 10:42:21 -06001454 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001455 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001456 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001457 :term:`TARGET_PREFIX` variable.
1458
1459 .. note::
1460
Andrew Geissler09036742021-06-25 14:25:14 -05001461 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001462 variable only in certain contexts (e.g. when building for kernel
1463 and kernel module recipes).
1464
Andrew Geissler9aee5002022-03-30 16:27:02 +00001465 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001466 The list of CVE IDs which are ignored. Here is
1467 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1468
1469 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001470 CVE_CHECK_IGNORE += "CVE-2020-15523"
1471
1472 :term:`CVE_CHECK_SKIP_RECIPE`
1473 The list of package names (:term:`PN`) for which
1474 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001475
Patrick Williams213cb262021-08-07 19:21:33 -05001476 :term:`CVE_PRODUCT`
1477 In a recipe, defines the name used to match the recipe name
1478 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1479
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001480 The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001481 database or matches with multiple entries in the database, the default
1482 value needs to be changed.
1483
1484 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1485
1486 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1487
Andrew Geisslerf0343792020-11-18 10:42:21 -06001488 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001489 The directory in which files checked out under the CVS system are
1490 stored.
1491
Andrew Geisslerf0343792020-11-18 10:42:21 -06001492 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001493 The minimal command and arguments used to run the C++ compiler.
1494
Andrew Geisslerf0343792020-11-18 10:42:21 -06001495 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001496 Specifies the flags to pass to the C++ compiler. This variable is
1497 exported to an environment variable and thus made visible to the
1498 software being built during the compilation step.
1499
Andrew Geissler09036742021-06-25 14:25:14 -05001500 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001501 being built:
1502
1503 - :term:`TARGET_CXXFLAGS` when building for
1504 the target
1505
1506 - :term:`BUILD_CXXFLAGS` when building for the
1507 build host (i.e. ``-native``)
1508
1509 - :term:`BUILDSDK_CXXFLAGS` when building
1510 for an SDK (i.e. ``nativesdk-``)
1511
Andrew Geisslerf0343792020-11-18 10:42:21 -06001512 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001513 The destination directory. The location in the :term:`Build Directory`
1514 where components are installed by the
1515 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001516 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001517
1518 ${WORKDIR}/image
1519
1520 .. note::
1521
1522 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001523 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001524
Andrew Geisslerf0343792020-11-18 10:42:21 -06001525 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001526 The date the build was started. Dates appear using the year, month,
1527 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1528
Andrew Geisslerf0343792020-11-18 10:42:21 -06001529 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001530 The date and time on which the current build started. The format is
1531 suitable for timestamps.
1532
Andrew Geisslerf0343792020-11-18 10:42:21 -06001533 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001534 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001535 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001536 particular package should not be renamed according to Debian library
1537 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001538 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001539
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001540 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001541
Andrew Geisslerf0343792020-11-18 10:42:21 -06001542 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001543 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001544 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001545 the library name for an individual package. Overriding the library
1546 name in these cases is rare. You must use the package name as an
1547 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001548 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001549
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001550 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001551
Andrew Geisslerf0343792020-11-18 10:42:21 -06001552 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001553 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001554 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555
Andrew Geisslerf0343792020-11-18 10:42:21 -06001556 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001557 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001558 compiling a system for debugging. This variable defaults to "-O
1559 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1560
Andrew Geisslereff27472021-10-29 15:35:00 -05001561 :term:`DEBUG_PREFIX_MAP`
1562 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1563 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1564 replace build-time paths by install-time ones in the debugging sections
1565 of binaries. This makes compiler output files location independent,
1566 at the cost of having to pass an extra command to tell the debugger
1567 where source files are.
1568
1569 This is used by the Yocto Project to guarantee
1570 :doc:`/test-manual/reproducible-builds` even when the source code of
1571 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1572 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1573 website for details.
1574
1575 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1576 not intended to be user-configurable.
1577
Andrew Geissler9aee5002022-03-30 16:27:02 +00001578 :term:`DEFAULT_PREFERENCE`
1579 Specifies a weak bias for recipe selection priority.
1580
1581 The most common usage of this is variable is to set it to "-1" within
1582 a recipe for a development version of a piece of software. Using the
1583 variable in this way causes the stable version of the recipe to build
1584 by default in the absence of :term:`PREFERRED_VERSION` being used to
1585 build the development version.
1586
1587 .. note::
1588
1589 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1590 by :term:`BBFILE_PRIORITY` if that variable is different between two
1591 layers that contain different versions of the same recipe.
1592
Andrew Geisslerf0343792020-11-18 10:42:21 -06001593 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001594 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1595 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001596 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001597 :term:`TUNE_FEATURES`.
1598
1599 The default tune is either implicitly or explicitly set by the
1600 machine (:term:`MACHINE`). However, you can override
1601 the setting using available tunes as defined with
1602 :term:`AVAILTUNES`.
1603
Andrew Geisslerf0343792020-11-18 10:42:21 -06001604 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001605 Lists a recipe's build-time dependencies. These are dependencies on
1606 other recipes whose contents (e.g. headers and shared libraries) are
1607 needed by the recipe at build time.
1608
1609 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001610 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001611
1612 DEPENDS = "bar"
1613
1614 The practical effect of the previous
1615 assignment is that all files installed by bar will be available in
1616 the appropriate staging sysroot, given by the
1617 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1618 :ref:`ref-tasks-configure` task for ``foo`` runs.
1619 This mechanism is implemented by having ``do_configure`` depend on
1620 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001621 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001622 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1623 declaration in the :ref:`base <ref-classes-base>` class.
1624
1625 .. note::
1626
Andrew Geissler09036742021-06-25 14:25:14 -05001627 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001628 explicitly. The standard classes and build-related variables are
1629 configured to automatically use the appropriate staging sysroots.
1630
Andrew Geissler09036742021-06-25 14:25:14 -05001631 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001632 that run on the build machine during the build. For example, a recipe
1633 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001634 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001635
1636 DEPENDS = "codegen-native"
1637
1638 For more
1639 information, see the :ref:`native <ref-classes-native>` class and
1640 the :term:`EXTRANATIVEPATH` variable.
1641
1642 .. note::
1643
Andrew Geissler09036742021-06-25 14:25:14 -05001644 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001645 it is a list of :term:`PROVIDES` names, which
1646 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001647 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001648 instead, as this will put files from all the packages that make
1649 up ``foo``, which includes those from ``foo-dev``, into the
1650 sysroot.
1651
Andrew Geissler09036742021-06-25 14:25:14 -05001652 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001653 itself add any runtime dependencies between the packages
1654 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001655 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001656 section in the Yocto Project Overview and Concepts Manual,
1657 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001658 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001659
Andrew Geissler09036742021-06-25 14:25:14 -05001660 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001661 recipes that install precompiled components. For example, if
1662 ``libfoo`` is a precompiled library that links against
1663 ``libbar``, then linking against ``libfoo`` requires both
1664 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001665 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001666 to the recipe that installs ``libbar``, other recipes might
1667 fail to link against ``libfoo``.
1668
1669 For information on runtime dependencies, see the
1670 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001671 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1672 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001673 BitBake User Manual for additional information on tasks and
1674 dependencies.
1675
Andrew Geisslerf0343792020-11-18 10:42:21 -06001676 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001677 Points to the general area that the OpenEmbedded build system uses to
1678 place images, packages, SDKs, and other output files that are ready
1679 to be used outside of the build system. By default, this directory
1680 resides within the :term:`Build Directory` as
1681 ``${TMPDIR}/deploy``.
1682
1683 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001684 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001685 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001686 ":ref:`overview-manual/concepts:images`",
1687 ":ref:`overview-manual/concepts:package feeds`", and
1688 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001689 Yocto Project Overview and Concepts Manual.
1690
Andrew Geisslerf0343792020-11-18 10:42:21 -06001691 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001692 Points to the area that the OpenEmbedded build system uses to place
1693 Debian packages that are ready to be used outside of the build
1694 system. This variable applies only when
1695 :term:`PACKAGE_CLASSES` contains
1696 "package_deb".
1697
1698 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001699 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001700 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001701
1702 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1703
1704 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001705 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001706 :ref:`ref-tasks-package_write_deb` task
1707 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001708 information on how packaging works, see the
1709 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001710 in the Yocto Project Overview and Concepts Manual.
1711
Andrew Geisslerf0343792020-11-18 10:42:21 -06001712 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001713 Points to the area that the OpenEmbedded build system uses to place
1714 images and other associated output files that are ready to be
1715 deployed onto the target machine. The directory is machine-specific
1716 as it contains the ``${MACHINE}`` name. By default, this directory
1717 resides within the :term:`Build Directory` as
1718 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1719
Andrew Geissler09036742021-06-25 14:25:14 -05001720 It must not be used directly in recipes when deploying files. Instead,
1721 it's only useful when a recipe needs to "read" a file already deployed
1722 by a dependency. So, it should be filled with the contents of
1723 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1724 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1725 <ref-classes-image>` class.
1726
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001727 For more information on the structure of the Build Directory, see
Andrew Geissler09209ee2020-12-13 08:44:15 -06001728 ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001729 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001730 ":ref:`overview-manual/concepts:images`" and
1731 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001732 the Yocto Project Overview and Concepts Manual.
1733
Andrew Geisslerf0343792020-11-18 10:42:21 -06001734 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001735 Points to the area that the OpenEmbedded build system uses to place
1736 IPK packages that are ready to be used outside of the build system.
1737 This variable applies only when
1738 :term:`PACKAGE_CLASSES` contains
1739 "package_ipk".
1740
1741 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001742 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001743
1744 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1745
1746 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001747 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001748 :ref:`ref-tasks-package_write_ipk` task
1749 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001750 on how packaging works, see the
1751 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001752 in the Yocto Project Overview and Concepts Manual.
1753
Andrew Geisslerf0343792020-11-18 10:42:21 -06001754 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001755 Points to the area that the OpenEmbedded build system uses to place
1756 RPM packages that are ready to be used outside of the build system.
1757 This variable applies only when
1758 :term:`PACKAGE_CLASSES` contains
1759 "package_rpm".
1760
1761 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001762 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001763
1764 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1765
1766 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001767 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001768 :ref:`ref-tasks-package_write_rpm` task
1769 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001770 on how packaging works, see the
1771 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001772 in the Yocto Project Overview and Concepts Manual.
1773
Andrew Geisslerf0343792020-11-18 10:42:21 -06001774 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001775 Points to the area that the OpenEmbedded build system uses to place
1776 tarballs that are ready to be used outside of the build system. This
1777 variable applies only when
1778 :term:`PACKAGE_CLASSES` contains
1779 "package_tar".
1780
1781 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001782 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001783
1784 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1785
1786 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001787 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001788 :ref:`ref-tasks-package_write_tar` task
1789 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001790 on how packaging works, see the
1791 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001792 in the Yocto Project Overview and Concepts Manual.
1793
Andrew Geisslerf0343792020-11-18 10:42:21 -06001794 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001795 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001796 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001797 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001798
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001799 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001800
Andrew Geissler595f6302022-01-24 19:11:47 +00001801 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001802 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001803 them into :term:`DEPLOY_DIR_IMAGE`
1804 afterwards.
1805
Andrew Geisslerf0343792020-11-18 10:42:21 -06001806 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001807 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001808 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001809 variable.
1810
Andrew Geisslerf0343792020-11-18 10:42:21 -06001811 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001812 The short name of the distribution. For information on the long name
1813 of the distribution, see the :term:`DISTRO_NAME`
1814 variable.
1815
Andrew Geissler09036742021-06-25 14:25:14 -05001816 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001817 file whose root name is the same as the variable's argument and whose
1818 filename extension is ``.conf``. For example, the distribution
1819 configuration file for the Poky distribution is named ``poky.conf``
1820 and resides in the ``meta-poky/conf/distro`` directory of the
1821 :term:`Source Directory`.
1822
Andrew Geissler09036742021-06-25 14:25:14 -05001823 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001824 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001825
1826 DISTRO = "poky"
1827
1828 Distribution configuration files are located in a ``conf/distro``
1829 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001830 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001831 spaces, and is typically all lower-case.
1832
1833 .. note::
1834
Andrew Geissler09036742021-06-25 14:25:14 -05001835 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001836 are used, which are specified within
1837 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001838
Andrew Geisslerf0343792020-11-18 10:42:21 -06001839 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001840 Specifies a codename for the distribution being built.
1841
Andrew Geisslerf0343792020-11-18 10:42:21 -06001842 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001843 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001844 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001845 variable only really applies to the more full-featured images that
1846 include ``packagegroup-base``. You can use this variable to keep
1847 distro policy out of generic images. As with all other distro
1848 variables, you set this variable in the distro ``.conf`` file.
1849
Andrew Geisslerf0343792020-11-18 10:42:21 -06001850 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001851 Specifies a list of distro-specific packages to add to all images if
1852 the packages exist. The packages might not exist or be empty (e.g.
1853 kernel modules). The list of packages are automatically installed but
1854 you can remove them.
1855
Andrew Geisslerf0343792020-11-18 10:42:21 -06001856 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001857 The software support you want in your distribution for various
1858 features. You define your distribution features in the distribution
1859 configuration file.
1860
1861 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001862 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001863 to the configure script during the
1864 :ref:`ref-tasks-configure` task for recipes that
1865 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001866 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001867 target that can optionally support X11 to have its X11 support
1868 enabled.
1869
1870 Two more examples are Bluetooth and NFS support. For a more complete
1871 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001872 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001873
Andrew Geisslerf0343792020-11-18 10:42:21 -06001874 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001875 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1876 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001877
1878 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1879 not intended to be user-configurable. It is best to just reference
1880 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001881 all distro configurations. See the ":ref:`ref-features-backfill`" section
1882 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001883
Andrew Geisslerf0343792020-11-18 10:42:21 -06001884 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001885 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1886 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001887 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001888
Andrew Geisslerf0343792020-11-18 10:42:21 -06001889 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001890 A convenience variable that gives you the default list of distro
1891 features with the exception of any features specific to the C library
1892 (``libc``).
1893
1894 When creating a custom distribution, you might find it useful to be
1895 able to reuse the default
1896 :term:`DISTRO_FEATURES` options without the
1897 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001898 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899
1900 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1901
Andrew Geisslerf0343792020-11-18 10:42:21 -06001902 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001903 Specifies a list of features that if present in the target
1904 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001905 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001906 variable is used in addition to the features filtered using the
1907 :term:`DISTRO_FEATURES_NATIVE`
1908 variable.
1909
Andrew Geisslerf0343792020-11-18 10:42:21 -06001910 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001911 Specifies a list of features that if present in the target
1912 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001913 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001914 variable is used in addition to the features filtered using the
1915 :term:`DISTRO_FEATURES_NATIVESDK`
1916 variable.
1917
Andrew Geisslerf0343792020-11-18 10:42:21 -06001918 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001919 Specifies a list of features that should be included in
1920 :term:`DISTRO_FEATURES` when building native
1921 recipes. This variable is used in addition to the features filtered
1922 using the
1923 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1924 variable.
1925
Andrew Geisslerf0343792020-11-18 10:42:21 -06001926 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001927 Specifies a list of features that should be included in
1928 :term:`DISTRO_FEATURES` when building
1929 nativesdk recipes. This variable is used in addition to the features
1930 filtered using the
1931 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1932 variable.
1933
Andrew Geisslerf0343792020-11-18 10:42:21 -06001934 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001935 The long name of the distribution. For information on the short name
1936 of the distribution, see the :term:`DISTRO` variable.
1937
Andrew Geissler09036742021-06-25 14:25:14 -05001938 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001939 configuration file whose root name is the same as the variable's
1940 argument and whose filename extension is ``.conf``. For example, the
1941 distribution configuration file for the Poky distribution is named
1942 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1943 of the :term:`Source Directory`.
1944
Andrew Geissler09036742021-06-25 14:25:14 -05001945 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001946 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001947
1948 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1949
1950 Distribution configuration files are located in a ``conf/distro``
1951 directory within the :term:`Metadata` that contains the
1952 distribution configuration.
1953
1954 .. note::
1955
Andrew Geissler09036742021-06-25 14:25:14 -05001956 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001957 configurations are used, which are specified within
1958 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001959
Andrew Geisslerf0343792020-11-18 10:42:21 -06001960 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001961 The version of the distribution.
1962
Andrew Geisslerf0343792020-11-18 10:42:21 -06001963 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001964 A colon-separated list of overrides specific to the current
1965 distribution. By default, this list includes the value of
1966 :term:`DISTRO`.
1967
Andrew Geissler09036742021-06-25 14:25:14 -05001968 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001969 apply to the distribution.
1970
Andrew Geissler09036742021-06-25 14:25:14 -05001971 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001972 is included in the default value of
1973 :term:`OVERRIDES`.
1974
Andrew Geisslerf0343792020-11-18 10:42:21 -06001975 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001976 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05001977 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001978 for everything except Git repositories. If you want tarballs of Git
1979 repositories, use the
1980 :term:`BB_GENERATE_MIRROR_TARBALLS`
1981 variable.
1982
Andrew Geissler09036742021-06-25 14:25:14 -05001983 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001984 ``conf/local.conf`` file. This directory is self-maintaining and you
1985 should not have to touch it. By default, the directory is
1986 ``downloads`` in the :term:`Build Directory`.
1987 ::
1988
1989 #DL_DIR ?= "${TOPDIR}/downloads"
1990
1991 To specify a different download directory,
1992 simply remove the comment from the line and provide your directory.
1993
1994 During a first build, the system downloads many different source code
1995 tarballs from various upstream projects. Downloading can take a
1996 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05001997 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001998 system looks there first to find source tarballs.
1999
2000 .. note::
2001
2002 When wiping and rebuilding, you can preserve this directory to
2003 speed up this part of subsequent builds.
2004
2005 You can safely share this directory between multiple builds on the
2006 same development machine. For additional information on how the build
2007 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002008 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002009 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002010 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002011 Wiki page.
2012
Andrew Geisslerf0343792020-11-18 10:42:21 -06002013 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002014 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2015 class, this variable sets the compression policy used when the
2016 OpenEmbedded build system compresses man pages and info pages. By
2017 default, the compression method used is gz (gzip). Other policies
2018 available are xz and bz2.
2019
2020 For information on policies and on how to use this variable, see the
2021 comments in the ``meta/classes/compress_doc.bbclass`` file.
2022
Andrew Geisslerf0343792020-11-18 10:42:21 -06002023 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002024 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2025 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002026 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002027 default is "grub-efi", but "systemd-boot" can be used instead.
2028
2029 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2030 :ref:`image-live <ref-classes-image-live>` classes for more
2031 information.
2032
Andrew Geisslerf0343792020-11-18 10:42:21 -06002033 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002034 Variable that controls which locales for ``glibc`` are generated
2035 during the build (useful if the target device has 64Mbytes of RAM or
2036 less).
2037
Andrew Geisslerf0343792020-11-18 10:42:21 -06002038 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002039 When used with the :ref:`report-error <ref-classes-report-error>`
2040 class, specifies the path used for storing the debug files created by
2041 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002042 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002043 allows you to submit build errors you encounter to a central
2044 database. By default, the value of this variable is
2045 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2046
Andrew Geissler09036742021-06-25 14:25:14 -05002047 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002048 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002049 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002050
2051 ERR_REPORT_DIR = "path"
2052
Andrew Geisslerf0343792020-11-18 10:42:21 -06002053 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002054 Specifies the quality assurance checks whose failures are reported as
2055 errors by the OpenEmbedded build system. You set this variable in
2056 your distribution configuration file. For a list of the checks you
2057 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002058 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002059
Andrew Geissler9aee5002022-03-30 16:27:02 +00002060 :term:`ESDK_CLASS_INHERIT_DISABLE`
2061 A list of classes to remove from the :term:`INHERIT`
2062 value globally within the extensible SDK configuration. The
2063 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2064 default value::
2065
2066 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2067
2068 Some classes are not generally applicable within the extensible SDK
2069 context. You can use this variable to disable those classes.
2070
2071 For additional information on how to customize the extensible SDK's
2072 configuration, see the
2073 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2074 section in the Yocto Project Application Development and the
2075 Extensible Software Development Kit (eSDK) manual.
2076
2077 :term:`ESDK_LOCALCONF_ALLOW`
2078 A list of variables allowed through from the OpenEmbedded build
2079 system configuration into the extensible SDK configuration. By
2080 default, the list of variables is empty and is set in the
2081 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2082
2083 This list overrides the variables specified using the
2084 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2085 other variables automatically added due to the "/" character
2086 being found at the start of the
2087 value, which is usually indicative of being a path and thus might not
2088 be valid on the system where the SDK is installed.
2089
2090 For additional information on how to customize the extensible SDK's
2091 configuration, see the
2092 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2093 section in the Yocto Project Application Development and the
2094 Extensible Software Development Kit (eSDK) manual.
2095
2096 :term:`ESDK_LOCALCONF_REMOVE`
2097 A list of variables not allowed through from the OpenEmbedded build
2098 system configuration into the extensible SDK configuration. Usually,
2099 these are variables that are specific to the machine on which the
2100 build system is running and thus would be potentially problematic
2101 within the extensible SDK.
2102
2103 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2104 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2105 excludes the following variables:
2106
2107 - :term:`CONF_VERSION`
2108 - :term:`BB_NUMBER_THREADS`
2109 - :term:`BB_NUMBER_PARSE_THREADS`
2110 - :term:`PARALLEL_MAKE`
2111 - :term:`PRSERV_HOST`
2112 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2113 - :term:`SSTATE_DIR` :term:`TMPDIR`
2114 - :term:`BB_SERVER_TIMEOUT`
2115
2116 For additional information on how to customize the extensible SDK's
2117 configuration, see the
2118 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2119 section in the Yocto Project Application Development and the
2120 Extensible Software Development Kit (eSDK) manual.
2121
Andrew Geisslerf0343792020-11-18 10:42:21 -06002122 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002123 Triggers the OpenEmbedded build system's shared libraries resolver to
2124 exclude an entire package when scanning for shared libraries.
2125
2126 .. note::
2127
2128 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002129 the internal function ``package_do_shlibs``, which is part of the
2130 :ref:`ref-tasks-package` task. You should be aware that the shared
2131 libraries resolver might implicitly define some dependencies between
2132 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002133
Andrew Geissler09036742021-06-25 14:25:14 -05002134 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002135 :term:`PRIVATE_LIBS` variable, which excludes a
2136 package's particular libraries only and not the whole package.
2137
Andrew Geissler09036742021-06-25 14:25:14 -05002138 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002139 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002140
2141 EXCLUDE_FROM_SHLIBS = "1"
2142
Andrew Geisslerf0343792020-11-18 10:42:21 -06002143 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002144 Directs BitBake to exclude a recipe from world builds (i.e.
2145 ``bitbake world``). During world builds, BitBake locates, parses and
2146 builds all recipes found in every layer exposed in the
2147 ``bblayers.conf`` configuration file.
2148
2149 To exclude a recipe from a world build using this variable, set the
2150 variable to "1" in the recipe.
2151
2152 .. note::
2153
Andrew Geissler09036742021-06-25 14:25:14 -05002154 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002155 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002156 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002157 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002158
Andrew Geisslerf0343792020-11-18 10:42:21 -06002159 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002160 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002161 version based on the recipe's :term:`PE` value. If :term:`PE`
2162 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2163 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2164 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2165 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002166
2167 See the :term:`STAMP` variable for an example.
2168
Andrew Geisslerf0343792020-11-18 10:42:21 -06002169 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002170 The full package version specification as it appears on the final
2171 packages produced by a recipe. The variable's value is normally used
2172 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002173 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002174
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002175 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002176
2177 The dependency relationships are intended to force the package
2178 manager to upgrade these types of packages in lock-step.
2179
Andrew Geisslerf0343792020-11-18 10:42:21 -06002180 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002181 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002182 tools are not in the source tree.
2183
2184 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002185 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002186 variable tells the OpenEmbedded build system to prefer the installed
2187 external tools. See the
2188 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2189 ``meta/classes`` to see how the variable is used.
2190
Andrew Geisslerf0343792020-11-18 10:42:21 -06002191 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002192 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2193 class, this variable points to the source tree, which is outside of
2194 the OpenEmbedded build system. When set, this variable sets the
2195 :term:`S` variable, which is what the OpenEmbedded build
2196 system uses to locate unpacked recipe source code.
2197
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002198 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002199 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002200 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002201 section in the Yocto Project Development Tasks Manual.
2202
Andrew Geisslerf0343792020-11-18 10:42:21 -06002203 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002204 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2205 class, this variable points to the directory in which the recipe's
2206 source code is built, which is outside of the OpenEmbedded build
2207 system. When set, this variable sets the :term:`B` variable,
2208 which is what the OpenEmbedded build system uses to locate the Build
2209 Directory.
2210
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002211 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002212 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002213 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002214 section in the Yocto Project Development Tasks Manual.
2215
Andrew Geisslerf0343792020-11-18 10:42:21 -06002216 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002217 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002218 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002219 pass to the ``autoreconf`` command that is executed during the
2220 :ref:`ref-tasks-configure` task.
2221
2222 The default value is "--exclude=autopoint".
2223
Andrew Geisslerf0343792020-11-18 10:42:21 -06002224 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002225 A list of additional features to include in an image. When listing
2226 more than one feature, separate them with a space.
2227
2228 Typically, you configure this variable in your ``local.conf`` file,
2229 which is found in the :term:`Build Directory`.
2230 Although you can use this variable from within a recipe, best
2231 practices dictate that you do not.
2232
2233 .. note::
2234
2235 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002236 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002237
2238 Here are some examples of features you can add:
2239
2240 - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2241 symbol information for debugging and profiling.
2242
2243 - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2244 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002245 'post-install-logging' features in the ":ref:`ref-features-image`"
2246 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002247 - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2248 useful if you want to develop against the libraries in the image.
2249 - "read-only-rootfs" - Creates an image whose root filesystem is
2250 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002251 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002252 section in the Yocto Project Development Tasks Manual for more
2253 information
2254 - "tools-debug" - Adds debugging tools such as gdb and strace.
2255 - "tools-sdk" - Adds development tools such as gcc, make,
2256 pkgconfig and so forth.
2257 - "tools-testapps" - Adds useful testing tools
2258 such as ts_print, aplay, arecord and so forth.
2259
2260 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002261 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002262
2263 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002264 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 -05002265 section in the Yocto Project Development Tasks Manual.
2266
Andrew Geisslerf0343792020-11-18 10:42:21 -06002267 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002268 Specifies additional options for the image creation command that has
2269 been specified in :term:`IMAGE_CMD`. When setting
2270 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002271 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002272
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002273 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002274
Andrew Geisslerf0343792020-11-18 10:42:21 -06002275 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002276 A list of recipes to build that do not provide packages for
2277 installing into the root filesystem.
2278
2279 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002280 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002281 variable to list these recipes and thus specify the dependencies. A
2282 typical example is a required bootloader in a machine configuration.
2283
2284 .. note::
2285
2286 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002287 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002288
Andrew Geisslerf0343792020-11-18 10:42:21 -06002289 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002290 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2291 :ref:`cmake <ref-classes-cmake>` class for additional information.
2292
Andrew Geisslerf0343792020-11-18 10:42:21 -06002293 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002294 Additional ``configure`` script options. See
2295 :term:`PACKAGECONFIG_CONFARGS` for
2296 additional information on passing configure script options.
2297
Andrew Geisslerf0343792020-11-18 10:42:21 -06002298 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002299 Additional GNU ``make`` options.
2300
Andrew Geissler09036742021-06-25 14:25:14 -05002301 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002302 variable to specify any required GNU options.
2303
2304 :term:`PARALLEL_MAKE` and
2305 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002306 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002307
Andrew Geisslerf0343792020-11-18 10:42:21 -06002308 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002309 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2310 variable specifies additional configuration options you want to pass
2311 to the ``scons`` command line.
2312
Andrew Geisslerf0343792020-11-18 10:42:21 -06002313 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002314 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2315 class, this variable provides image level user and group operations.
2316 This is a more global method of providing user and group
2317 configuration as compared to using the
2318 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2319 group configurations to a specific recipe.
2320
2321 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002322 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002323 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002324
2325 # EXTRA_USERS_PARAMS = "\
2326 # useradd -p '' tester; \
2327 # groupadd developers; \
2328 # userdel nobody; \
2329 # groupdel -g video; \
2330 # groupmod -g 1020 developers; \
2331 # usermod -s /bin/sh tester; \
2332 # "
2333
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002334 Additionally there is a special ``passwd-expire`` command that will
2335 cause the password for a user to be expired and thus force changing it
2336 on first login, for example::
2337
2338 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2339
2340 .. note::
2341
2342 At present, ``passwd-expire`` may only work for remote logins when
2343 using OpenSSH and not dropbear as an SSH server.
2344
Andrew Geissler9aee5002022-03-30 16:27:02 +00002345 :term:`EXTRANATIVEPATH`
2346 A list of subdirectories of
2347 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2348 added to the beginning of the environment variable ``PATH``. As an
2349 example, the following prepends
2350 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2351 ``PATH``::
2352
2353 EXTRANATIVEPATH = "foo bar"
2354
Andrew Geisslerf0343792020-11-18 10:42:21 -06002355 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002356 Defines one or more packages to include in an image when a specific
2357 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002358 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002359 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002360
2361 FEATURE_PACKAGES_widget = "package1 package2"
2362
Andrew Geissler09036742021-06-25 14:25:14 -05002363 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002364 package1 and package2 would be included in the image.
2365
2366 .. note::
2367
Andrew Geissler09036742021-06-25 14:25:14 -05002368 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002369 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002370 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002371 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002372
Andrew Geisslerf0343792020-11-18 10:42:21 -06002373 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002374 Points to the base URL of the server and location within the
2375 document-root that provides the metadata and packages required by
2376 OPKG to support runtime package management of IPK packages. You set
2377 this variable in your ``local.conf`` file.
2378
Andrew Geisslerc926e172021-05-07 16:11:35 -05002379 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002380
2381 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2382
2383 This example assumes you are serving
2384 your packages over HTTP and your databases are located in a directory
2385 named ``BOARD-dir``, which is underneath your HTTP server's
2386 document-root. In this case, the OpenEmbedded build system generates
2387 a set of configuration files for you in your target that work with
2388 the feed.
2389
Andrew Geisslerf0343792020-11-18 10:42:21 -06002390 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002391 The list of files and directories that are placed in a package. The
2392 :term:`PACKAGES` variable lists the packages
2393 generated by a recipe.
2394
Andrew Geissler09036742021-06-25 14:25:14 -05002395 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002396 identifies the resulting package. Then, provide a space-separated
2397 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002398 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002399
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002400 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002401
2402 .. note::
2403
2404 - When specifying files or paths, you can pattern match using
2405 Python's
2406 `glob <https://docs.python.org/3/library/glob.html>`_
2407 syntax. For details on the syntax, see the documentation by
2408 following the previous link.
2409
Andrew Geissler09036742021-06-25 14:25:14 -05002410 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002411 good practice to use appropriate path variables. For example,
2412 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2413 rather than ``/usr/bin``. You can find a list of these
2414 variables at the top of the ``meta/conf/bitbake.conf`` file in
2415 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002416 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002417 this file.
2418
Andrew Geissler09036742021-06-25 14:25:14 -05002419 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002420 editable and you know they should not be overwritten during the
2421 package update process by the Package Management System (PMS), you
2422 can identify these files so that the PMS will not overwrite them. See
2423 the :term:`CONFFILES` variable for information on
2424 how to identify these files to the PMS.
2425
Andrew Geisslerf0343792020-11-18 10:42:21 -06002426 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002427 Defines the file specification to match
2428 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002429 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002430 symbolic link (symlink) for shared libraries on the target platform.
2431
2432 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002433 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002434
2435 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2436
Andrew Geisslerf0343792020-11-18 10:42:21 -06002437 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002438 Extends the search path the OpenEmbedded build system uses when
2439 looking for files and patches as it processes recipes and append
2440 files. The default directories BitBake uses when it processes recipes
2441 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002442 variable. You can extend :term:`FILESPATH` variable by using
2443 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002444
2445 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002446 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002447 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002448
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002449 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002450
2451 In the above example, the build system first
2452 looks for files in a directory that has the same name as the
2453 corresponding append file.
2454
2455 .. note::
2456
Andrew Geissler09036742021-06-25 14:25:14 -05002457 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002458 expansion (``:=``) operator. Immediate expansion makes sure that
2459 BitBake evaluates :term:`THISDIR` at the time the
2460 directive is encountered rather than at some later time when
2461 expansion might result in a directory that does not contain the
2462 files you need.
2463
2464 Also, include the trailing separating colon character if you are
2465 prepending. The trailing colon character is necessary because you
2466 are directing BitBake to extend the path by prepending directories
2467 to the search path.
2468
Andrew Geisslerc926e172021-05-07 16:11:35 -05002469 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002470
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002471 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002472
2473 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002474 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002475 in the same directory as the corresponding append file.
2476
Andrew Geisslerc926e172021-05-07 16:11:35 -05002477 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002478
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002479 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002480
2481 A final example shows how you can extend the search path and include
2482 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002483 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002484
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002485 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486
2487 The previous statement appears in the
2488 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002489 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002490 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2491 override is a special :term:`PACKAGE_ARCH`
2492 definition for multiple ``meta-intel`` machines.
2493
2494 .. note::
2495
2496 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002497 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002498
2499 By prepending paths in ``.bbappend`` files, you allow multiple append
2500 files that reside in different layers but are used for the same
2501 recipe to correctly extend the path.
2502
Andrew Geisslerf0343792020-11-18 10:42:21 -06002503 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002504 A subset of :term:`OVERRIDES` used by the
2505 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002506 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002507 uses overrides to automatically extend the
2508 :term:`FILESPATH` variable. For an example of how
2509 that works, see the :term:`FILESPATH` variable
2510 description. Additionally, you find more information on how overrides
2511 are handled in the
2512 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2513 section of the BitBake User Manual.
2514
Andrew Geissler09036742021-06-25 14:25:14 -05002515 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002516
2517 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2518
2519 .. note::
2520
Andrew Geissler09036742021-06-25 14:25:14 -05002521 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002522 with expected overrides and are used in an expected manner by the
2523 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002524
Andrew Geisslerf0343792020-11-18 10:42:21 -06002525 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002526 The default set of directories the OpenEmbedded build system uses
2527 when searching for patches and files.
2528
2529 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002530 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002531 patches specified by each ``file://`` URI in a recipe's
2532 :term:`SRC_URI` statements.
2533
Andrew Geissler09036742021-06-25 14:25:14 -05002534 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002535 :ref:`ref-classes-base` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002536 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002537
2538 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2539 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2540
2541 The
Andrew Geissler09036742021-06-25 14:25:14 -05002542 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002543 from the :term:`FILESOVERRIDES` variable.
2544
2545 .. note::
2546
Andrew Geissler09036742021-06-25 14:25:14 -05002547 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002548 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002549 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002550 :term:`FILESEXTRAPATHS` variable.
2551
Andrew Geissler09036742021-06-25 14:25:14 -05002552 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002553 to directories in custom layers where append files
2554 (``.bbappend``) are used. If you want the build system to find
2555 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002556 to extend the :term:`FILESPATH` variable by using the
2557 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002558
2559 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002560 example, consider a case where there is the following directory structure
2561 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002562
2563 files/defconfig
2564 files/MACHINEA/defconfig
2565 files/MACHINEB/defconfig
2566
Andrew Geissler09036742021-06-25 14:25:14 -05002567 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002568 "file://defconfig". Given this scenario, you can set
2569 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002570 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002571 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2572 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2573 build system uses files from ``files/defconfig``.
2574
2575 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002576 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002577 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002578 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002579 the Yocto Project Development Tasks Manual. See the
2580 :ref:`ref-tasks-patch` task as well.
2581
Andrew Geisslerf0343792020-11-18 10:42:21 -06002582 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002583 Allows you to define your own file permissions settings table as part
2584 of your configuration for the packaging process. For example, suppose
2585 you need a consistent set of custom permissions for a set of groups
2586 and users across an entire work project. It is best to do this in the
2587 packages themselves but this is not always possible.
2588
2589 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2590 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2591 If you create your own file
2592 permissions setting table, you should place it in your layer or the
2593 distro's layer.
2594
Andrew Geissler09036742021-06-25 14:25:14 -05002595 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002596 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2597 to point to your custom
2598 ``fs-perms.txt``. You can specify more than a single file permissions
2599 setting table. The paths you specify to these files must be defined
2600 within the :term:`BBPATH` variable.
2601
2602 For guidance on how to create your own file permissions settings
2603 table file, examine the existing ``fs-perms.txt``.
2604
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002605 :term:`FIT_DESC`
2606 Specifies the description string encoded into a fitImage. The default
2607 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2608 class as follows::
2609
2610 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2611
Andrew Geisslerf0343792020-11-18 10:42:21 -06002612 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002613 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002614 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002615 The default value is 0.
2616
Andrew Geisslerf0343792020-11-18 10:42:21 -06002617 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002618 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2619
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002620 :term:`FIT_KERNEL_COMP_ALG`
2621 Compression algorithm to use for the kernel image inside the FIT Image.
2622 At present, the only supported values are "gzip" (default) or "none"
2623 If you set this variable to anything other than "none" you may also need
2624 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2625
2626 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2627 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2628 value is ".gz".
2629
Andrew Geisslerf0343792020-11-18 10:42:21 -06002630 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002631 Arguments to openssl genrsa for generating RSA private key for signing
2632 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2633 use.
2634
Andrew Geisslerf0343792020-11-18 10:42:21 -06002635 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002636 Arguments to openssl req for generating certificate for signing fitImage.
2637 The default value is "-batch -new". batch for non interactive mode
2638 and new for generating new keys.
2639
Andrew Geisslerf0343792020-11-18 10:42:21 -06002640 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002641 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002642 The default value is "x509".
2643
Andrew Geisslerf0343792020-11-18 10:42:21 -06002644 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002645 Specifies the signature algorithm used in creating the FIT Image.
2646 For e.g. rsa2048.
2647
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002648 :term:`FIT_SIGN_INDIVIDUAL`
2649 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2650 class will sign the kernel, dtb and ramdisk images individually in addition
2651 to signing the fitImage itself. This could be useful if you are
2652 intending to verify signatures in another context than booting via
2653 U-Boot.
2654
Andrew Geissler9aee5002022-03-30 16:27:02 +00002655 :term:`FIT_SIGN_NUMBITS`
2656 Size of private key in number of bits used in fitImage. The default
2657 value is "2048".
2658
Andrew Geisslerf0343792020-11-18 10:42:21 -06002659 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002660 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2661 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002662 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002663
Andrew Geisslerf0343792020-11-18 10:42:21 -06002664 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002665 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2666 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002667 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002668 that fonts are in the recipe's main package (i.e.
2669 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2670 need are in a package other than that main package.
2671
Andrew Geisslerf0343792020-11-18 10:42:21 -06002672 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002673 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2674 during the generation of the root filesystem.
2675
2676 Set the variable to "1" to force the removal of these packages.
2677
Andrew Geisslerf0343792020-11-18 10:42:21 -06002678 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002679 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002680 compiling an optimized system. This variable defaults to "-O2 -pipe
2681 ${DEBUG_FLAGS}".
2682
Andrew Geisslerf0343792020-11-18 10:42:21 -06002683 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002684 Enables Position Independent Executables (PIE) within the GNU C
2685 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2686 Programming (ROP) attacks much more difficult to execute.
2687
2688 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002689 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002690
2691 GCCPIE ?= "--enable-default-pie"
2692
Andrew Geisslerf0343792020-11-18 10:42:21 -06002693 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002694 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002695 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002696 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002697
2698 GCCVERSION ?= "8.%"
2699
2700 You can override this value by setting it in a
2701 configuration file such as the ``local.conf``.
2702
Andrew Geisslerf0343792020-11-18 10:42:21 -06002703 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002704 The minimal command and arguments to run the GNU Debugger.
2705
Andrew Geissler595f6302022-01-24 19:11:47 +00002706 :term:`GIR_EXTRA_LIBS_PATH`
2707 Allows to specify an extra search path for ``.so`` files
2708 in GLib related recipes using GObject introspection,
2709 and which do not compile without this setting.
2710 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2711 section for details.
2712
Andrew Geisslerf0343792020-11-18 10:42:21 -06002713 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002714 The directory in which a local copy of a Git repository is stored
2715 when it is cloned.
2716
Andrew Geisslerf0343792020-11-18 10:42:21 -06002717 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002718 Specifies the list of GLIBC locales to generate should you not wish
2719 to generate all LIBC locals, which can be time consuming.
2720
2721 .. note::
2722
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002723 If you specifically remove the locale ``en_US.UTF-8``, you must set
2724 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002725
Andrew Geissler09036742021-06-25 14:25:14 -05002726 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002727 By default, all locales are generated.
2728 ::
2729
2730 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2731
Andrew Geisslerf0343792020-11-18 10:42:21 -06002732 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002733 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2734 this variable specifies for a package what parameters should be
2735 passed to the ``groupadd`` command if you wish to add a group to the
2736 system when the package is installed.
2737
Andrew Geisslerc926e172021-05-07 16:11:35 -05002738 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002739
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002740 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002741
2742 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002743 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002744
Andrew Geisslerf0343792020-11-18 10:42:21 -06002745 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002746 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2747 this variable specifies for a package what parameters should be
2748 passed to the ``groupmems`` command if you wish to modify the members
2749 of a group when the package is installed.
2750
2751 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002752 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002753
Andrew Geisslerf0343792020-11-18 10:42:21 -06002754 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002755 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2756 and serial in the boot menu. Set this variable to "1" in your
2757 ``local.conf`` or distribution configuration file to enable graphics
2758 and serial in the menu.
2759
2760 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2761 information on how this variable is used.
2762
Andrew Geisslerf0343792020-11-18 10:42:21 -06002763 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002764 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2765 configuration. Use a semi-colon character (``;``) to separate
2766 multiple options.
2767
Andrew Geissler09036742021-06-25 14:25:14 -05002768 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002769 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2770 on how this variable is used.
2771
Andrew Geisslerf0343792020-11-18 10:42:21 -06002772 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002773 Specifies the timeout before executing the default ``LABEL`` in the
2774 GNU GRand Unified Bootloader (GRUB).
2775
Andrew Geissler09036742021-06-25 14:25:14 -05002776 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002777 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2778 on how this variable is used.
2779
Andrew Geisslerf0343792020-11-18 10:42:21 -06002780 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002781 When inheriting the
2782 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2783 this variable specifies the packages that contain the GTK+ input
2784 method modules being installed when the modules are in packages other
2785 than the main package.
2786
Andrew Geisslerf0343792020-11-18 10:42:21 -06002787 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002788 Website where more information about the software the recipe is
2789 building can be found.
2790
Andrew Geisslerf0343792020-11-18 10:42:21 -06002791 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002792 The name of the target architecture, which is normally the same as
2793 :term:`TARGET_ARCH`. The OpenEmbedded build system
2794 supports many architectures. Here is an example list of architectures
2795 supported. This list is by no means complete as the architecture is
2796 configurable:
2797
2798 - arm
2799 - i586
2800 - x86_64
2801 - powerpc
2802 - powerpc64
2803 - mips
2804 - mipsel
2805
Andrew Geisslerf0343792020-11-18 10:42:21 -06002806 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002807 Specifies architecture-specific compiler flags that are passed to the
2808 C compiler.
2809
Andrew Geissler09036742021-06-25 14:25:14 -05002810 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002811 is being built:
2812
2813 - :term:`TARGET_CC_ARCH` when building for the
2814 target
2815
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002816 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002817 ``-native``)
2818
2819 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2820 ``nativesdk-``)
2821
Andrew Geisslerf0343792020-11-18 10:42:21 -06002822 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002823 Specifies the name of the target operating system, which is normally
2824 the same as the :term:`TARGET_OS`. The variable can
2825 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2826 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2827 "linux-musleabi" values possible.
2828
Andrew Geisslerf0343792020-11-18 10:42:21 -06002829 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002830 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002831 is normally the same as :term:`TARGET_PREFIX`.
2832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 Specifies the system, including the architecture and the operating
2835 system, for which the build is occurring in the context of the
2836 current recipe.
2837
2838 The OpenEmbedded build system automatically sets this variable based
2839 on :term:`HOST_ARCH`,
2840 :term:`HOST_VENDOR`, and
2841 :term:`HOST_OS` variables.
2842
2843 .. note::
2844
2845 You do not need to set the variable yourself.
2846
2847 Consider these two examples:
2848
2849 - Given a native recipe on a 32-bit x86 machine running Linux, the
2850 value is "i686-linux".
2851
2852 - Given a recipe being built for a little-endian MIPS target running
2853 Linux, the value might be "mipsel-linux".
2854
Andrew Geissler9aee5002022-03-30 16:27:02 +00002855 :term:`HOST_VENDOR`
2856 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2857 same as :term:`TARGET_VENDOR`.
2858
Andrew Geisslerf0343792020-11-18 10:42:21 -06002859 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002860 A space-separated list (filter) of tools on the build host that
2861 should be allowed to be called from within build tasks. Using this
2862 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002863 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002864 host, the OpenEmbedded build system produces an error and the build
2865 is not started.
2866
2867 For additional information, see
2868 :term:`HOSTTOOLS_NONFATAL`.
2869
Andrew Geisslerf0343792020-11-18 10:42:21 -06002870 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002871 A space-separated list (filter) of tools on the build host that
2872 should be allowed to be called from within build tasks. Using this
2873 filter helps reduce the possibility of host contamination. Unlike
2874 :term:`HOSTTOOLS`, the OpenEmbedded build system
2875 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002876 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2877 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002878
Andrew Geissler9aee5002022-03-30 16:27:02 +00002879 :term:`ICECC_CLASS_DISABLE`
2880 Identifies user classes that you do not want the Icecream distributed
2881 compile support to consider. This variable is used by the
2882 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2883 your ``local.conf`` file.
2884
2885 When you list classes using this variable, the recipes inheriting
2886 those classes will not benefit from distributed compilation across
2887 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002888
Andrew Geisslerf0343792020-11-18 10:42:21 -06002889 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002890 Disables or enables the ``icecc`` (Icecream) function. For more
2891 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002892 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002893 section.
2894
2895 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002896 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002897
2898 ICECC_DISABLED ??= "1"
2899
Andrew Geisslerc926e172021-05-07 16:11:35 -05002900 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002901
2902 ICECC_DISABLED = ""
2903
Andrew Geisslerf0343792020-11-18 10:42:21 -06002904 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002905 Points to the ``icecc-create-env`` script that you provide. This
2906 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2907 set this variable in your ``local.conf`` file.
2908
2909 If you do not point to a script that you provide, the OpenEmbedded
2910 build system uses the default script provided by the
2911 ``icecc-create-env.bb`` recipe, which is a modified version and not
2912 the one that comes with ``icecc``.
2913
Andrew Geisslerf0343792020-11-18 10:42:21 -06002914 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002915 Extra options passed to the ``make`` command during the
2916 :ref:`ref-tasks-compile` task that specify parallel
2917 compilation. This variable usually takes the form of "-j x", where x
2918 represents the maximum number of parallel threads ``make`` can run.
2919
2920 .. note::
2921
2922 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002923 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002924
2925 If your enabled machines support multiple cores, coming up with the
2926 maximum number of parallel threads that gives you the best
2927 performance could take some experimentation since machine speed,
2928 network lag, available memory, and existing machine loads can all
2929 affect build time. Consequently, unlike the
2930 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002931 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002932 performance.
2933
Andrew Geissler09036742021-06-25 14:25:14 -05002934 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002935 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002936 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002937
Andrew Geisslerf0343792020-11-18 10:42:21 -06002938 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002939 The location of the ``icecc`` binary. You can set this variable in
2940 your ``local.conf`` file. If your ``local.conf`` file does not define
2941 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2942 to define it by locating ``icecc`` using ``which``.
2943
Andrew Geissler9aee5002022-03-30 16:27:02 +00002944 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002945 Identifies user recipes that you do not want the Icecream distributed
2946 compile support to consider. This variable is used by the
2947 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2948 your ``local.conf`` file.
2949
Andrew Geissler595f6302022-01-24 19:11:47 +00002950 When you list recipes using this variable, you are excluding them
2951 from distributed compilation across remote hosts. Instead they will
2952 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002953
Andrew Geissler9aee5002022-03-30 16:27:02 +00002954 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002955 Identifies user recipes that use an empty
2956 :term:`PARALLEL_MAKE` variable that you want to
2957 force remote distributed compilation on using the Icecream
2958 distributed compile support. This variable is used by the
2959 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2960 your ``local.conf`` file.
2961
Andrew Geisslerf0343792020-11-18 10:42:21 -06002962 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002963 The base name of image output files. This variable defaults to the
2964 recipe name (``${``\ :term:`PN`\ ``}``).
2965
Andrew Geisslerf0343792020-11-18 10:42:21 -06002966 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002967 A space-separated list of files installed into the boot partition
2968 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002969 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002970 the files are
2971 installed under the same name as the source files. To change the
2972 installed name, separate it from the original name with a semi-colon
2973 (;). Source files need to be located in
2974 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05002975 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002976
2977 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2978 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2979
2980 Alternatively, source files can be picked up using a glob pattern. In
2981 this case, the destination file must have the same name as the base
2982 name of the source file path. To install files into a directory
2983 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05002984 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002985
2986 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2987 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
2988
2989 The first example
2990 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2991 into the root of the target partition. The second example installs
2992 the same files into a ``boot`` directory within the target partition.
2993
2994 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002995 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002996 section of the Yocto Project Development Tasks Manual. Reference
2997 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002998 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002999
Andrew Geisslerf0343792020-11-18 10:42:21 -06003000 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003001 A list of classes that all images should inherit. You typically use
3002 this variable to specify the list of classes that register the
3003 different types of images the OpenEmbedded build system creates.
3004
Andrew Geissler09036742021-06-25 14:25:14 -05003005 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003006 set this variable in your ``local.conf`` or in a distribution
3007 configuration file.
3008
3009 For more information, see ``meta/classes/image_types.bbclass`` in the
3010 :term:`Source Directory`.
3011
Andrew Geisslerf0343792020-11-18 10:42:21 -06003012 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003013 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003014 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003015 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3016 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003017 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003018
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003019 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003020 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003021 ${EXTRA_IMAGECMD}"
3022
3023 You typically do not need to set this variable unless you are adding
3024 support for a new image type. For more examples on how to set this
3025 variable, see the :ref:`image_types <ref-classes-image_types>`
3026 class file, which is ``meta/classes/image_types.bbclass``.
3027
Andrew Geisslerf0343792020-11-18 10:42:21 -06003028 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029 Specifies one or more files that contain custom device tables that
3030 are passed to the ``makedevs`` command as part of creating an image.
3031 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003032 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003033 ``files/device_table-minimal.txt`` is used, which is located by
3034 :term:`BBPATH`. For details on how you should write
3035 device table files, see ``meta/files/device_table-minimal.txt`` as an
3036 example.
3037
Andrew Geissler9aee5002022-03-30 16:27:02 +00003038 :term:`IMAGE_EFI_BOOT_FILES`
3039 A space-separated list of files installed into the boot partition
3040 when preparing an image using the Wic tool with the
3041 ``bootimg-efi`` source plugin. By default,
3042 the files are
3043 installed under the same name as the source files. To change the
3044 installed name, separate it from the original name with a semi-colon
3045 (;). Source files need to be located in
3046 :term:`DEPLOY_DIR_IMAGE`. Here are two
3047 examples::
3048
3049 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3050 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3051
3052 Alternatively, source files can be picked up using a glob pattern. In
3053 this case, the destination file must have the same name as the base
3054 name of the source file path. To install files into a directory
3055 within the target location, pass its name after a semi-colon (;).
3056 Here are two examples::
3057
3058 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3059 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3060
3061 The first example
3062 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3063 into the root of the target partition. The second example installs
3064 the same files into a ``boot`` directory within the target partition.
3065
3066 You can find information on how to use the Wic tool in the
3067 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3068 section of the Yocto Project Development Tasks Manual. Reference
3069 material for Wic is located in the
3070 ":doc:`/ref-manual/kickstart`" chapter.
3071
Andrew Geisslerf0343792020-11-18 10:42:21 -06003072 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003073 The primary list of features to include in an image. Typically, you
3074 configure this variable in an image recipe. Although you can use this
3075 variable from your ``local.conf`` file, which is found in the
3076 :term:`Build Directory`, best practices dictate that you do
3077 not.
3078
3079 .. note::
3080
3081 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003082 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003083
3084 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003085 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003086
3087 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003088 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 -05003089 section in the Yocto Project Development Tasks Manual.
3090
Andrew Geisslerf0343792020-11-18 10:42:21 -06003091 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003092 Specifies the formats the OpenEmbedded build system uses during the
3093 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003094 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003095 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003096
3097 IMAGE_FSTYPES = "ext3 tar.bz2"
3098
3099 For the complete list of supported image formats from which you can
3100 choose, see :term:`IMAGE_TYPES`.
3101
3102 .. note::
3103
3104 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003105 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003106 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003107
3108 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003109 variable, you cannot update its contents by using ``:append``
3110 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003111 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003112
Andrew Geisslerf0343792020-11-18 10:42:21 -06003113 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003114 Used by recipes to specify the packages to install into an image
3115 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003116 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003117
Andrew Geissler09036742021-06-25 14:25:14 -05003118 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003119 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003120 there are "helper" classes such as the
3121 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003122 take lists used with :term:`IMAGE_FEATURES` and turn them into
3123 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003124 default contents.
3125
Andrew Geisslerc926e172021-05-07 16:11:35 -05003126 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003127
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003128 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003129
3130 Be sure to include the space
3131 between the quotation character and the start of the package name or
3132 names.
3133
3134 .. note::
3135
3136 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003137 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003138 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003139 packages for installation. Instead, use the
3140 :term:`PACKAGE_INSTALL` variable, which
3141 allows the initial RAM filesystem (initramfs) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003142 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003143 For information on creating an initramfs, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003144 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003145 section in the Yocto Project Development Tasks Manual.
3146
Andrew Geissler09036742021-06-25 14:25:14 -05003147 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003148 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003149 BitBake operator within the ``/conf/local.conf`` file or from
3150 within an image recipe is not recommended. Use of this operator
3151 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003152 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003153 value using the
3154 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003155 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003156 results in unexpected behavior when used within
3157 ``conf/local.conf``. Furthermore, the same operation from
3158 within an image recipe may or may not succeed depending on the
3159 specific situation. In both these cases, the behavior is
3160 contrary to how most users expect the ``+=`` operator to work.
3161
Andrew Geisslerf0343792020-11-18 10:42:21 -06003162 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003163 Specifies the list of locales to install into the image during the
3164 root filesystem construction process. The OpenEmbedded build system
3165 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003166 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003167 ensures that any locale packages that correspond to packages already
3168 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003169 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003170
3171 IMAGE_LINGUAS = "pt-br de-de"
3172
3173 In this example, the build system ensures any Brazilian Portuguese
3174 and German locale files that correspond to packages in the image are
3175 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3176 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3177 only provide locale files by language and not by country-specific
3178 language).
3179
3180 See the :term:`GLIBC_GENERATE_LOCALES`
3181 variable for information on generating GLIBC locales.
3182
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003183
3184 :term:`IMAGE_LINK_NAME`
3185 The name of the output image symlink (which does not include
3186 the version part as :term:`IMAGE_NAME` does). The default value
3187 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003188 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003189
3190 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3191
3192
Andrew Geisslerf0343792020-11-18 10:42:21 -06003193 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003194 The manifest file for the image. This file lists all the installed
3195 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003196 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003197
3198 packagename packagearch version
3199
Andrew Geissler09036742021-06-25 14:25:14 -05003200 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003201 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003202
Andrew Geissler09036742021-06-25 14:25:14 -05003203 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003204
3205 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003206 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003207 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003208 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003209 section in the Yocto Project Overview and Concepts Manual.
3210
Andrew Geisslerf0343792020-11-18 10:42:21 -06003211 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003212 The name of the output image files minus the extension. This variable
3213 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003214 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003215 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003216
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003217 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3218
3219 :term:`IMAGE_NAME_SUFFIX`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003220 Suffix used for the image output filename - defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003221 to distinguish the image file from other files created during image
3222 building; however if this suffix is redundant or not desired you can
3223 clear the value of this variable (set the value to ""). For example,
3224 this is typically cleared in initramfs image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003225
Andrew Geisslerf0343792020-11-18 10:42:21 -06003226 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003227 Defines a multiplier that the build system applies to the initial
3228 image size for cases when the multiplier times the returned disk
3229 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003230 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003231 the multiplier applied to the initial image size creates free disk
3232 space in the image as overhead. By default, the build process uses a
3233 multiplier of 1.3 for this variable. This default value results in
3234 30% free disk space added to the image when this method is used to
3235 determine the final generated image size. You should be aware that
3236 post install scripts and the package management system uses disk
3237 space inside this overhead area. Consequently, the multiplier does
3238 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003239 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003240 determines the overall image size.
3241
3242 The default 30% free disk space typically gives the image enough room
3243 to boot and allows for basic post installs while still leaving a
3244 small amount of free disk space. If 30% free space is inadequate, you
3245 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003246 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003247
3248 IMAGE_OVERHEAD_FACTOR = "1.5"
3249
3250 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003251 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003252 variable.
3253
Andrew Geisslerf0343792020-11-18 10:42:21 -06003254 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003255 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3256 OpenEmbedded build system. The variable is defined appropriately by
3257 the :ref:`package_deb <ref-classes-package_deb>`,
3258 :ref:`package_rpm <ref-classes-package_rpm>`,
3259 :ref:`package_ipk <ref-classes-package_ipk>`, or
3260 :ref:`package_tar <ref-classes-package_tar>` class.
3261
3262 .. note::
3263
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003264 The ``package_tar`` class is broken and is not supported. It is
3265 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003266
3267 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003268 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003269 for packaging up images and SDKs.
3270
Andrew Geissler09036742021-06-25 14:25:14 -05003271 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003272 variable is set indirectly through the appropriate
3273 :ref:`package_* <ref-classes-package>` class using the
3274 :term:`PACKAGE_CLASSES` variable. The
3275 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3276 or IPK) that appears with the variable
3277
3278 .. note::
3279
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003280 Files using the ``.tar`` format are never used as a substitute
3281 packaging format for DEB, RPM, and IPK formatted files for your image
3282 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003283
Andrew Geisslerf0343792020-11-18 10:42:21 -06003284 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003285 Specifies a list of functions to call once the OpenEmbedded build
3286 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003287 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003288
3289 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3290
3291 If you need to pass the root filesystem path to a command within the
3292 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3293 directory that becomes the root filesystem image. See the
3294 :term:`IMAGE_ROOTFS` variable for more
3295 information.
3296
Andrew Geisslerf0343792020-11-18 10:42:21 -06003297 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003298 Specifies a list of functions to call before the OpenEmbedded build
3299 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003300 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003301
3302 IMAGE_PREPROCESS_COMMAND += "function; ... "
3303
3304 If you need to pass the root filesystem path to a command within the
3305 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3306 directory that becomes the root filesystem image. See the
3307 :term:`IMAGE_ROOTFS` variable for more
3308 information.
3309
Andrew Geisslerf0343792020-11-18 10:42:21 -06003310 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003311 The location of the root filesystem while it is under construction
3312 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3313 variable is not configurable. Do not change it.
3314
Andrew Geisslerf0343792020-11-18 10:42:21 -06003315 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003316 Specifies the alignment for the output image file in Kbytes. If the
3317 size of the image is not a multiple of this value, then the size is
3318 rounded up to the nearest multiple of the value. The default value is
3319 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3320 additional information.
3321
Andrew Geisslerf0343792020-11-18 10:42:21 -06003322 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003323 Defines additional free disk space created in the image in Kbytes. By
3324 default, this variable is set to "0". This free disk space is added
3325 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003326 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003327
3328 This variable is particularly useful when you want to ensure that a
3329 specific amount of free disk space is available on a device after an
3330 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003331 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003332
3333 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3334
3335 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003336 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003337
3338 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3339
Andrew Geisslerf0343792020-11-18 10:42:21 -06003340 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003341 Defines the size in Kbytes for the generated image. The OpenEmbedded
3342 build system determines the final size for the generated image using
3343 an algorithm that takes into account the initial disk space used for
3344 the generated image, a requested size for the image, and requested
3345 additional free disk space to be added to the image. Programatically,
3346 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003347 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003348
3349 if (image-du * overhead) < rootfs-size:
3350 internal-rootfs-size = rootfs-size + xspace
3351 else:
3352 internal-rootfs-size = (image-du * overhead) + xspace
3353 where:
3354 image-du = Returned value of the du command on the image.
3355 overhead = IMAGE_OVERHEAD_FACTOR
3356 rootfs-size = IMAGE_ROOTFS_SIZE
3357 internal-rootfs-size = Initial root filesystem size before any modifications.
3358 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3359
3360 See the :term:`IMAGE_OVERHEAD_FACTOR`
3361 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3362 variables for related information.
3363
Andrew Geisslerf0343792020-11-18 10:42:21 -06003364 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003365 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003366 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003367
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003368 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003369
3370 In the previous example, the variable ensures that when "live" is
3371 listed with the :term:`IMAGE_FSTYPES` variable,
3372 the OpenEmbedded build system produces an ``ext3`` image first since
3373 one of the components of the live image is an ``ext3`` formatted
3374 partition containing the root filesystem.
3375
Andrew Geisslerf0343792020-11-18 10:42:21 -06003376 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003377 Specifies the complete list of supported image types by default:
3378
3379 - btrfs
3380 - container
3381 - cpio
3382 - cpio.gz
3383 - cpio.lz4
3384 - cpio.lzma
3385 - cpio.xz
3386 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003387 - erofs
3388 - erofs-lz4
3389 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003390 - ext2
3391 - ext2.bz2
3392 - ext2.gz
3393 - ext2.lzma
3394 - ext3
3395 - ext3.gz
3396 - ext4
3397 - ext4.gz
3398 - f2fs
3399 - hddimg
3400 - iso
3401 - jffs2
3402 - jffs2.sum
3403 - multiubi
3404 - squashfs
3405 - squashfs-lz4
3406 - squashfs-lzo
3407 - squashfs-xz
3408 - tar
3409 - tar.bz2
3410 - tar.gz
3411 - tar.lz4
3412 - tar.xz
3413 - tar.zst
3414 - ubi
3415 - ubifs
3416 - wic
3417 - wic.bz2
3418 - wic.gz
3419 - wic.lzma
3420
3421 For more information about these types of images, see
3422 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3423
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003424 :term:`IMAGE_VERSION_SUFFIX`
3425 Version suffix that is part of the default :term:`IMAGE_NAME` and
3426 :term:`KERNEL_ARTIFACT_NAME` values.
3427 Defaults to ``"-${DATETIME}"``, however you could set this to a
3428 version string that comes from your external build environment if
3429 desired, and this suffix would then be used consistently across
3430 the build artifacts.
3431
Andrew Geissler09036742021-06-25 14:25:14 -05003432 :term:`IMGDEPLOYDIR`
3433 When inheriting the :ref:`image <ref-classes-image>` class directly or
3434 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003435 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003436 that is set in the ``image`` class as follows::
3437
3438 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3439
3440 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003441 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003442 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3443
Andrew Geisslerf0343792020-11-18 10:42:21 -06003444 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003445 Helps define the recipe revision for recipes that share a common
3446 ``include`` file. You can think of this variable as part of the
3447 recipe revision as set from within an include file.
3448
3449 Suppose, for example, you have a set of recipes that are used across
3450 several projects. And, within each of those recipes the revision (its
3451 :term:`PR` value) is set accordingly. In this case, when
3452 the revision of those recipes changes, the burden is on you to find
3453 all those recipes and be sure that they get changed to reflect the
3454 updated version of the recipe. In this scenario, it can get
3455 complicated when recipes that are used in many places and provide
3456 common functionality are upgraded to a new revision.
3457
3458 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003459 :term:`INC_PR` variable inside the ``include`` files that the recipes
3460 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003461 help define the recipe revision.
3462
3463 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003464 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003465 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003466 can use the variable to set the :term:`PR` values in each recipe. You
3467 will notice that when you set a recipe's :term:`PR` you can provide more
3468 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003469
3470 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3471 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3472 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3473 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3474
3475 The
3476 first line of the example establishes the baseline revision to be
3477 used for all recipes that use the ``include`` file. The remaining
3478 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003479 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003480
Andrew Geisslerf0343792020-11-18 10:42:21 -06003481 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003482 Specifies a space-separated list of license names (as they would
3483 appear in :term:`LICENSE`) that should be excluded
3484 from the build. Recipes that provide no alternatives to listed
3485 incompatible licenses are not built. Packages that are individually
3486 licensed with the specified incompatible licenses will be deleted.
3487
3488 .. note::
3489
3490 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003491 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003492
Andrew Geissler9aee5002022-03-30 16:27:02 +00003493 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003494
3495
3496 Although you can use other settings, you might be required to
3497 remove dependencies on or provide alternatives to components that
3498 are required to produce a functional system image.
3499
Andrew Geisslerf0343792020-11-18 10:42:21 -06003500 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003501 Causes the named class or classes to be inherited globally. Anonymous
3502 functions in the class or classes are not executed for the base
3503 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003504 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003505
Andrew Geissler09036742021-06-25 14:25:14 -05003506 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003507 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3508 section in the Bitbake User Manual.
3509
Andrew Geisslerf0343792020-11-18 10:42:21 -06003510 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003511 Lists classes that will be inherited at the distribution level. It is
3512 unlikely that you want to edit this variable.
3513
3514 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003515 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003516
3517 INHERIT_DISTRO ?= "debian devshell sstate license"
3518
Andrew Geisslerf0343792020-11-18 10:42:21 -06003519 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003520 Prevents the default dependencies, namely the C compiler and standard
3521 C library (libc), from being added to :term:`DEPENDS`.
3522 This variable is usually used within recipes that do not require any
3523 compilation using the C compiler.
3524
3525 Set the variable to "1" to prevent the default dependencies from
3526 being added.
3527
Andrew Geisslerf0343792020-11-18 10:42:21 -06003528 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003529 Prevents the OpenEmbedded build system from splitting out debug
3530 information during packaging. By default, the build system splits out
3531 debugging information during the
3532 :ref:`ref-tasks-package` task. For more information on
3533 how debug information is split out, see the
3534 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3535 variable.
3536
3537 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003538 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003539 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003540
3541 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3542
Andrew Geisslerf0343792020-11-18 10:42:21 -06003543 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003544 If set to "1", causes the build to not strip binaries in resulting
3545 packages and prevents the ``-dbg`` package from containing the source
3546 files.
3547
3548 By default, the OpenEmbedded build system strips binaries and puts
3549 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003550 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003551 plan to debug in general.
3552
Andrew Geisslerf0343792020-11-18 10:42:21 -06003553 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003554 If set to "1", causes the build to not strip binaries in the
3555 resulting sysroot.
3556
3557 By default, the OpenEmbedded build system strips binaries in the
3558 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003559 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003560 this stripping.
3561
3562 If you want to use this variable, include the
3563 :ref:`staging <ref-classes-staging>` class. This class uses a
3564 ``sys_strip()`` function to test for the variable and acts
3565 accordingly.
3566
3567 .. note::
3568
Andrew Geissler09036742021-06-25 14:25:14 -05003569 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003570 special circumstances. For example, suppose you are building
3571 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003572 even if the toolchain's binaries are strippable, there are other files
3573 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003574
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003575 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
3576 Indicates the deploy directory used by ``do_bundle_initramfs`` where the
3577 :term:`INITRAMFS_IMAGE` will be fetched from.
3578 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3579 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
3580 when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
3581
Andrew Geisslerf0343792020-11-18 10:42:21 -06003582 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003583 Defines the format for the output image of an initial RAM filesystem
3584 (initramfs), which is used during boot. Supported formats are the
3585 same as those supported by the
3586 :term:`IMAGE_FSTYPES` variable.
3587
3588 The default value of this variable, which is set in the
3589 ``meta/conf/bitbake.conf`` configuration file in the
3590 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3591 initramfs mechanism, as opposed to the initial RAM filesystem
3592 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3593 an optionally compressed cpio archive.
3594
Andrew Geisslerf0343792020-11-18 10:42:21 -06003595 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003596 Specifies the :term:`PROVIDES` name of an image
3597 recipe that is used to build an initial RAM filesystem (initramfs)
Andrew Geissler09036742021-06-25 14:25:14 -05003598 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003599 additional recipe to be built as a dependency to whatever root
3600 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3601 initramfs image recipe you provide should set
3602 :term:`IMAGE_FSTYPES` to
3603 :term:`INITRAMFS_FSTYPES`.
3604
3605 An initramfs image provides a temporary root filesystem used for
3606 early system initialization (e.g. loading of modules needed to locate
3607 and mount the "real" root filesystem).
3608
3609 .. note::
3610
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003611 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3612 recipe in the :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003613 for an example initramfs recipe. To select this sample recipe as
Andrew Geissler09036742021-06-25 14:25:14 -05003614 the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003615 to "core-image-minimal-initramfs".
3616
3617 You can also find more information by referencing the
3618 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3619 the Source Directory, the :ref:`image <ref-classes-image>` class,
3620 and the :ref:`kernel <ref-classes-kernel>` class to see how to use
Andrew Geissler09036742021-06-25 14:25:14 -05003621 the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003622
Andrew Geissler09036742021-06-25 14:25:14 -05003623 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003624 initramfs image is built.
3625
3626 For more information, you can also see the
3627 :term:`INITRAMFS_IMAGE_BUNDLE`
3628 variable, which allows the generated image to be bundled inside the
3629 kernel image. Additionally, for information on creating an initramfs
Andrew Geissler09209ee2020-12-13 08:44:15 -06003630 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003631 in the Yocto Project Development Tasks Manual.
3632
Andrew Geisslerf0343792020-11-18 10:42:21 -06003633 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003634 Controls whether or not the image recipe specified by
3635 :term:`INITRAMFS_IMAGE` is run through an
3636 extra pass
3637 (:ref:`ref-tasks-bundle_initramfs`) during
3638 kernel compilation in order to build a single binary that contains
3639 both the kernel image and the initial RAM filesystem (initramfs)
3640 image. This makes use of the
3641 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3642 feature.
3643
3644 .. note::
3645
Patrick Williams93c203f2021-10-06 16:15:23 -05003646 Bundling the initramfs with the kernel conflates the code in the
3647 initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3648 compatible software may be part of a bundled initramfs.
3649
3650 .. note::
3651
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003652 Using an extra compilation pass to bundle the initramfs avoids a
3653 circular dependency between the kernel recipe and the initramfs
3654 recipe should the initramfs include kernel modules. Should that be
3655 the case, the initramfs recipe depends on the kernel for the
3656 kernel modules, and the kernel depends on the initramfs recipe
3657 since the initramfs is bundled inside the kernel image.
3658
3659 The combined binary is deposited into the ``tmp/deploy`` directory,
3660 which is part of the :term:`Build Directory`.
3661
3662 Setting the variable to "1" in a configuration file causes the
3663 OpenEmbedded build system to generate a kernel image with the
Andrew Geissler09036742021-06-25 14:25:14 -05003664 initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003665
3666 INITRAMFS_IMAGE_BUNDLE = "1"
3667
3668 By default, the
3669 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003670 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003671
3672 INITRAMFS_IMAGE_BUNDLE ?= ""
3673
3674 .. note::
3675
Andrew Geissler09036742021-06-25 14:25:14 -05003676 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003677 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003678
3679 See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003680 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003681 file for additional information. Also, for information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06003682 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003683 in the Yocto Project Development Tasks Manual.
3684
Andrew Geisslerf0343792020-11-18 10:42:21 -06003685 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003686 The link name of the initial RAM filesystem image. This variable is
3687 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003688 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003689
3690 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3691
3692 The value of the
3693 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003694 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003695
3696 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3697
3698 See the :term:`MACHINE` variable for additional
3699 information.
3700
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003701 :term:`INITRAMFS_MULTICONFIG`
3702 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3703
3704 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3705 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3706
3707 For more information on how to bundle an initramfs image from a separate
3708 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3709 section in the Yocto Project Development Tasks Manual.
3710
Andrew Geisslerf0343792020-11-18 10:42:21 -06003711 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003712 The base name of the initial RAM filesystem image. This variable is
3713 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003714 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003715
3716 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3717
3718 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003719 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003720
3721 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3722
Andrew Geisslerf0343792020-11-18 10:42:21 -06003723 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003724 Indicates list of filesystem images to concatenate and use as an
3725 initial RAM disk (``initrd``).
3726
Andrew Geissler09036742021-06-25 14:25:14 -05003727 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003728 :ref:`image-live <ref-classes-image-live>` class.
3729
Andrew Geisslerf0343792020-11-18 10:42:21 -06003730 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003731 When building a "live" bootable image (i.e. when
3732 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003733 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003734 provide the initial RAM disk image. The default value is
3735 "core-image-minimal-initramfs".
3736
3737 See the :ref:`image-live <ref-classes-image-live>` class for more
3738 information.
3739
Andrew Geisslerf0343792020-11-18 10:42:21 -06003740 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003741 The filename of the initialization script as installed to
3742 ``${sysconfdir}/init.d``.
3743
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003744 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003745 The variable is mandatory.
3746
Andrew Geisslerf0343792020-11-18 10:42:21 -06003747 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003748 A list of the packages that contain initscripts. If multiple packages
3749 are specified, you need to append the package name to the other
3750 ``INITSCRIPT_*`` as an override.
3751
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003752 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003753 The variable is optional and defaults to the :term:`PN`
3754 variable.
3755
Andrew Geisslerf0343792020-11-18 10:42:21 -06003756 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003757 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003758
3759 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3760
3761 In this example, the script has a runlevel of 99, starts the script
3762 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3763
3764 The variable's default value is "defaults", which is set in the
3765 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3766
Andrew Geissler09036742021-06-25 14:25:14 -05003767 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003768 ``update-rc.d`` command. For more information on valid parameters,
3769 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003770 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003771
Andrew Geisslerf0343792020-11-18 10:42:21 -06003772 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003773 Specifies the QA checks to skip for a specific package within a
3774 recipe. For example, to skip the check for symbolic link ``.so``
3775 files in the main package of a recipe, add the following to the
3776 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003777 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003778
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003779 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003780
Andrew Geissler595f6302022-01-24 19:11:47 +00003781 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003782 list of the valid QA checks you can specify using this variable.
3783
Andrew Geisslerf0343792020-11-18 10:42:21 -06003784 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003785 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003786 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003787 configuration level to disable this behavior.
3788
Andrew Geisslerf0343792020-11-18 10:42:21 -06003789 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003790 When the IPK backend is in use and package management is enabled on
3791 the target, you can use this variable to set up ``opkg`` in the
3792 target image to point to package feeds on a nominated server. Once
3793 the feed is established, you can perform installations or upgrades
3794 using the package manager at runtime.
3795
Andrew Geisslerf0343792020-11-18 10:42:21 -06003796 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003797 Defines the kernel architecture used when assembling the
3798 configuration. Architectures supported for this release are:
3799
3800 - powerpc
3801 - i386
3802 - x86_64
3803 - arm
3804 - qemu
3805 - mips
3806
Andrew Geissler5f350902021-07-23 13:09:54 -04003807 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003808
Andrew Geisslerf0343792020-11-18 10:42:21 -06003809 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003810 A regular expression used by the build process to explicitly identify
3811 the kernel branch that is validated, patched, and configured during a
3812 build. You must set this variable to ensure the exact kernel branch
3813 you want is being used by the build process.
3814
3815 Values for this variable are set in the kernel's recipe file and the
3816 kernel's append file. For example, if you are using the
3817 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003818 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003819 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003820
3821 KBRANCH ?= "standard/base"
3822
3823 This variable is also used from the kernel's append file to identify
3824 the kernel branch specific to a particular machine or target
3825 hardware. Continuing with the previous kernel example, the kernel's
3826 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3827 BSP layer for a given machine. For example, the append file for the
3828 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3829 machines (``meta-yocto-bsp``) is named
3830 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003831 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003832
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003833 KBRANCH:genericx86 = "standard/base"
3834 KBRANCH:genericx86-64 = "standard/base"
3835 KBRANCH:edgerouter = "standard/edgerouter"
3836 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003837
Andrew Geissler09036742021-06-25 14:25:14 -05003838 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003839 identify the kernel branch to use when building for each supported
3840 BSP.
3841
Andrew Geisslerf0343792020-11-18 10:42:21 -06003842 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3844 class, specifies an "in-tree" kernel configuration file for use
3845 during a kernel build.
3846
3847 Typically, when using a ``defconfig`` to configure a kernel during a
3848 build, you place the file in your layer in the same manner as you
3849 would place patch files and configuration fragment files (i.e.
3850 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3851 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003852 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003853 :term:`KMACHINE` variable to point to the
3854 ``defconfig`` file.
3855
3856 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003857 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003858
3859 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3860
Andrew Geissler09036742021-06-25 14:25:14 -05003861 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003862 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003863
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003864 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003865
Andrew Geisslerc926e172021-05-07 16:11:35 -05003866 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003867
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003868 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003869
3870 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003871 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003872 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003873 section in the Yocto Project Linux Kernel Development Manual.
3874
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003875 :term:`KCONFIG_MODE`
3876 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3877 class, specifies the kernel configuration values to use for options
3878 not specified in the provided ``defconfig`` file. Valid options are::
3879
3880 KCONFIG_MODE = "alldefconfig"
3881 KCONFIG_MODE = "allnoconfig"
3882
3883 In ``alldefconfig`` mode the options not explicitly specified will be
3884 assigned their Kconfig default value. In ``allnoconfig`` mode the
3885 options not explicitly specified will be disabled in the kernel
3886 config.
3887
Andrew Geissler09036742021-06-25 14:25:14 -05003888 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003889 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3890 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3891 in ``${WORKDIR}`` through a meta-layer will be handled in
3892 ``allnoconfig`` mode.
3893
3894 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003895 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003896 be explicitly set.
3897
3898 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3899 generated by copying the ``.config`` file from a working Linux kernel
3900 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05003901 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003902 not need to be explicitly set.
3903
3904 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3905 generated using the
3906 :ref:`ref-tasks-savedefconfig`
3907 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05003908 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003909
3910 KCONFIG_MODE = "alldefconfig"
3911
3912
Andrew Geisslerf0343792020-11-18 10:42:21 -06003913 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003914 Specifies an alternate kernel image type for creation in addition to
3915 the kernel image type specified using the
3916 :term:`KERNEL_IMAGETYPE` variable.
3917
Andrew Geisslerf0343792020-11-18 10:42:21 -06003918 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003919 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05003920 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003921 variable.
3922
Andrew Geissler09036742021-06-25 14:25:14 -05003923 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003924 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003925 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003926
3927 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3928
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003929 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
3930 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003931
Andrew Geisslerf0343792020-11-18 10:42:21 -06003932 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003933 A list of classes defining kernel image types that the
3934 :ref:`kernel <ref-classes-kernel>` class should inherit. You
3935 typically append this variable to enable extended image types. An
3936 example is the "kernel-fitimage", which enables fitImage support and
3937 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00003938 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003939 variable.
3940
Andrew Geisslerf0343792020-11-18 10:42:21 -06003941 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003942 Specifies the name of the generated Linux kernel device tree (i.e.
3943 the ``.dtb``) file.
3944
3945 .. note::
3946
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003947 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003948 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003949
3950 In order to use this variable, the
3951 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3952 be inherited.
3953
Andrew Geisslerf0343792020-11-18 10:42:21 -06003954 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003955 The link name of the kernel device tree binary (DTB). This variable
3956 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003957 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003958
3959 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
3960
3961 The
3962 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05003963 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003964
3965 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3966
3967 See the :term:`MACHINE` variable for additional
3968 information.
3969
Andrew Geisslerf0343792020-11-18 10:42:21 -06003970 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003971 The base name of the kernel device tree binary (DTB). This variable
3972 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003973 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003974
3975 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
3976
3977 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003978 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003979
3980 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3981
Andrew Geisslerd1e89492021-02-12 15:35:20 -06003982 :term:`KERNEL_DTC_FLAGS`
3983 Specifies the ``dtc`` flags that are passed to the Linux kernel build
3984 system when generating the device trees (via ``DTC_FLAGS`` environment
3985 variable).
3986
3987 In order to use this variable, the
3988 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
3989 be inherited.
3990
Andrew Geisslerf0343792020-11-18 10:42:21 -06003991 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003992 Specifies additional ``make`` command-line arguments the OpenEmbedded
3993 build system passes on when compiling the kernel.
3994
Andrew Geisslerf0343792020-11-18 10:42:21 -06003995 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003996 Includes additional kernel metadata. In the OpenEmbedded build
3997 system, the default Board Support Packages (BSPs)
3998 :term:`Metadata` is provided through the
3999 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004000 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004001 the kernel recipe or kernel append file to further add metadata for
4002 all BSPs or specific BSPs.
4003
4004 The metadata you add through this variable includes config fragments
4005 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004006 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004007 variable for a specific machine. In this way, you can provide
4008 validated, but optional, sets of kernel configurations and features.
4009
4010 For example, the following example from the ``linux-yocto-rt_4.12``
4011 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4012 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004013 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004014
4015 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004016 KERNEL_FEATURES:append = "${KERNEL_EXTRA_FEATURES}"
4017 KERNEL_FEATURES:append:qemuall = "cfg/virtio.scc"
4018 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4019 KERNEL_FEATURES:append:qemux86-64 = "cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004020
Andrew Geisslerf0343792020-11-18 10:42:21 -06004021 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004022 The link name of the kernel flattened image tree (FIT) image. This
4023 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004024 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004025
4026 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4027
4028 The value of the
4029 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004030 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004031
4032 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4033
4034 See the :term:`MACHINE` variable for additional
4035 information.
4036
Andrew Geisslerf0343792020-11-18 10:42:21 -06004037 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004038 The base name of the kernel flattened image tree (FIT) image. This
4039 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004040 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004041
4042 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4043
4044 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004045 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004046
4047 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4048
Andrew Geisslerf0343792020-11-18 10:42:21 -06004049 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004050 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004051 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004052
4053 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4054
4055 The value of
4056 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004057 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004058
4059 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4060
4061 See the :term:`MACHINE` variable for additional
4062 information.
4063
Andrew Geisslerf0343792020-11-18 10:42:21 -06004064 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004065 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004066 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004067 checked against the set value during the
4068 :ref:`ref-tasks-sizecheck` task. The task fails if
4069 the kernel image file is larger than the setting.
4070
Andrew Geissler09036742021-06-25 14:25:14 -05004071 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004072 limited amount of space in which the kernel image must be stored.
4073
4074 By default, this variable is not set, which means the size of the
4075 kernel image is not checked.
4076
Andrew Geisslerf0343792020-11-18 10:42:21 -06004077 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004078 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004079 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004080
4081 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4082
4083 The value of the
4084 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004085 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004086
4087 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4088
Andrew Geisslerf0343792020-11-18 10:42:21 -06004089 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004090 The type of kernel to build for a device, usually set by the machine
4091 configuration files and defaults to "zImage". This variable is used
4092 when building the kernel and is passed to ``make`` as the target to
4093 build.
4094
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004095 If you want to build an alternate kernel image type in addition to that
Andrew Geissler09036742021-06-25 14:25:14 -05004096 specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004097 variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004098
Andrew Geisslerf0343792020-11-18 10:42:21 -06004099 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004100 Lists kernel modules that need to be auto-loaded during boot.
4101
4102 .. note::
4103
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004104 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004105 variable.
4106
Andrew Geissler09036742021-06-25 14:25:14 -05004107 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004108 can be recognized by the kernel recipe or by an out-of-tree kernel
4109 module recipe (e.g. a machine configuration file, a distribution
4110 configuration file, an append file for the recipe, or the recipe
4111 itself).
4112
Andrew Geisslerc926e172021-05-07 16:11:35 -05004113 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004114
4115 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4116
Andrew Geissler09036742021-06-25 14:25:14 -05004117 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004118 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4119 the list of modules to be auto-loaded on boot. The modules appear
4120 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004121 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004122
4123 KERNEL_MODULE_AUTOLOAD += "module_name"
4124
4125 For information on how to populate the ``modname.conf`` file with
4126 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4127
Andrew Geisslerf0343792020-11-18 10:42:21 -06004128 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004129 Provides a list of modules for which the OpenEmbedded build system
4130 expects to find ``module_conf_``\ modname values that specify
4131 configuration for each of the modules. For information on how to
4132 provide those module configurations, see the
4133 :term:`module_conf_* <module_conf>` variable.
4134
Andrew Geisslerf0343792020-11-18 10:42:21 -06004135 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004136 The location of the kernel sources. This variable is set to the value
4137 of the :term:`STAGING_KERNEL_DIR` within
4138 the :ref:`module <ref-classes-module>` class. For information on
4139 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004140 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004141 section in the Yocto Project Linux Kernel Development Manual.
4142
4143 To help maximize compatibility with out-of-tree drivers used to build
4144 modules, the OpenEmbedded build system also recognizes and uses the
4145 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004146 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004147 used by external Makefiles to point to the kernel source directory.
4148
Andrew Geisslerf0343792020-11-18 10:42:21 -06004149 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004150 The location of the kernel sources. This variable is set to the value
4151 of the :term:`STAGING_KERNEL_DIR` within
4152 the :ref:`module <ref-classes-module>` class. For information on
4153 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004154 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004155 section in the Yocto Project Linux Kernel Development Manual.
4156
4157 To help maximize compatibility with out-of-tree drivers used to build
4158 modules, the OpenEmbedded build system also recognizes and uses the
4159 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004160 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004161 used by external Makefiles to point to the kernel source directory.
4162
Andrew Geisslerf0343792020-11-18 10:42:21 -06004163 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004164 Specifies the version of the kernel as extracted from ``version.h``
4165 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004166 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004167 configured. Consequently, attempting to refer to this variable in
4168 contexts prior to configuration will not work.
4169
Andrew Geisslerf0343792020-11-18 10:42:21 -06004170 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004172 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004173 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004174 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004175 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004176 ``initramfs`` recipe. Setting the variable there when the data is not
4177 needed avoids a potential dependency loop.
4178
Andrew Geisslerf0343792020-11-18 10:42:21 -06004179 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004180 Provides a short description of a configuration fragment. You use
4181 this variable in the ``.scc`` file that describes a configuration
4182 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004183 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004184
4185 define KFEATURE_DESCRIPTION "Enable SMP"
4186
Andrew Geisslerf0343792020-11-18 10:42:21 -06004187 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004188 The machine as known by the kernel. Sometimes the machine name used
4189 by the kernel does not match the machine name used by the
4190 OpenEmbedded build system. For example, the machine name that the
4191 OpenEmbedded build system understands as ``core2-32-intel-common``
4192 goes by a different name in the Linux Yocto kernel. The kernel
4193 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004194 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004195 OpenEmbedded build system machine name.
4196
4197 These mappings between different names occur in the Yocto Linux
4198 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004199 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004200
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004201 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4202 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4203 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4204 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4205 KMACHINE:core2-32-intel-common = "intel-core2-32"
4206 KBRANCH:core2-32-intel-common = "standard/base"
4207 KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004208
Andrew Geissler09036742021-06-25 14:25:14 -05004209 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004210 that the kernel understands the machine name as "intel-core2-32".
4211 However, the OpenEmbedded build system understands the machine as
4212 "core2-32-intel-common".
4213
Andrew Geisslerf0343792020-11-18 10:42:21 -06004214 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004215 Defines the kernel type to be used in assembling the configuration.
4216 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004217 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004218 section in the
4219 Yocto Project Linux Kernel Development Manual for more information on
4220 kernel types.
4221
Andrew Geissler09036742021-06-25 14:25:14 -05004222 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004223 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004224 value you use must match the value used for the
4225 :term:`LINUX_KERNEL_TYPE` value used by the
4226 kernel recipe.
4227
Andrew Geisslerf0343792020-11-18 10:42:21 -06004228 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004229 Provides a list of targets for automatic configuration.
4230
4231 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4232 information on how this variable is used.
4233
Andrew Geisslerf0343792020-11-18 10:42:21 -06004234 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004235 Lists the layers, separated by spaces, on which this recipe depends.
4236 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004237 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004238
4239 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4240
4241 In this previous example,
4242 version 3 of "anotherlayer" is compared against
4243 :term:`LAYERVERSION`\ ``_anotherlayer``.
4244
4245 An error is produced if any dependency is missing or the version
4246 numbers (if specified) do not match exactly. This variable is used in
4247 the ``conf/layer.conf`` file and must be suffixed with the name of
4248 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4249
Andrew Geisslerf0343792020-11-18 10:42:21 -06004250 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004251 When used inside the ``layer.conf`` configuration file, this variable
4252 provides the path of the current layer. This variable is not
4253 available outside of ``layer.conf`` and references are expanded
4254 immediately when parsing of the file completes.
4255
Andrew Geisslerf0343792020-11-18 10:42:21 -06004256 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004257 Lists the layers, separated by spaces, recommended for use with this
4258 layer.
4259
4260 Optionally, you can specify a specific layer version for a
4261 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004262 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004263
4264 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4265
4266 In this previous example, version 3 of "anotherlayer" is compared
4267 against ``LAYERVERSION_anotherlayer``.
4268
4269 This variable is used in the ``conf/layer.conf`` file and must be
4270 suffixed with the name of the specific layer (e.g.
4271 ``LAYERRECOMMENDS_mylayer``).
4272
Andrew Geisslerf0343792020-11-18 10:42:21 -06004273 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004274 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004275 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004276 allows the layer maintainer to indicate which combinations of the
4277 layer and OE-Core can be expected to work. The variable gives the
4278 system a way to detect when a layer has not been tested with new
4279 releases of OE-Core (e.g. the layer is not maintained).
4280
4281 To specify the OE-Core versions for which a layer is compatible, use
4282 this variable in your layer's ``conf/layer.conf`` configuration file.
4283 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004284 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004285 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004286 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004287
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004288 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004289
4290 .. note::
4291
Andrew Geissler09036742021-06-25 14:25:14 -05004292 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004293 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004294 The OpenEmbedded build system produces a warning if the variable
4295 is not set for any given layer.
4296
Andrew Geissler09209ee2020-12-13 08:44:15 -06004297 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004298 section in the Yocto Project Development Tasks Manual.
4299
Andrew Geisslerf0343792020-11-18 10:42:21 -06004300 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004301 Optionally specifies the version of a layer as a single number. You
4302 can use this within :term:`LAYERDEPENDS` for
4303 another layer in order to depend on a specific version of the layer.
4304 This variable is used in the ``conf/layer.conf`` file and must be
4305 suffixed with the name of the specific layer (e.g.
4306 ``LAYERVERSION_mylayer``).
4307
Andrew Geisslerf0343792020-11-18 10:42:21 -06004308 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004309 The minimal command and arguments used to run the linker.
4310
Andrew Geisslerf0343792020-11-18 10:42:21 -06004311 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004312 Specifies the flags to pass to the linker. This variable is exported
4313 to an environment variable and thus made visible to the software
4314 being built during the compilation step.
4315
Andrew Geissler09036742021-06-25 14:25:14 -05004316 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004317 being built:
4318
4319 - :term:`TARGET_LDFLAGS` when building for the
4320 target
4321
4322 - :term:`BUILD_LDFLAGS` when building for the
4323 build host (i.e. ``-native``)
4324
4325 - :term:`BUILDSDK_LDFLAGS` when building for
4326 an SDK (i.e. ``nativesdk-``)
4327
Andrew Geisslerf0343792020-11-18 10:42:21 -06004328 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004329 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4330 that the :ref:`debian <ref-classes-debian>` class applies its
4331 naming policy to given a recipe that packages multiple libraries.
4332
Andrew Geissler595f6302022-01-24 19:11:47 +00004333 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004334
Andrew Geisslerf0343792020-11-18 10:42:21 -06004335 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004336 Checksums of the license text in the recipe source code.
4337
4338 This variable tracks changes in license text of the source code
4339 files. If the license text is changed, it will trigger a build
4340 failure, which gives the developer an opportunity to review any
4341 license change.
4342
4343 This variable must be defined for all recipes (unless
4344 :term:`LICENSE` is set to "CLOSED").
4345
Andrew Geissler09209ee2020-12-13 08:44:15 -06004346 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004347 section in the Yocto Project Development Tasks Manual.
4348
Andrew Geisslerf0343792020-11-18 10:42:21 -06004349 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004350 The list of source licenses for the recipe. Follow these rules:
4351
4352 - Do not use spaces within individual license names.
4353
4354 - Separate license names using \| (pipe) when there is a choice
4355 between licenses.
4356
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004357 - Separate license names using & (ampersand) when there are
4358 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004359
4360 - You can use spaces between license names.
4361
4362 - For standard licenses, use the names of the files in
4363 ``meta/files/common-licenses/`` or the
4364 :term:`SPDXLICENSEMAP` flag names defined in
4365 ``meta/conf/licenses.conf``.
4366
Andrew Geisslerc926e172021-05-07 16:11:35 -05004367 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004368
Andrew Geissler9aee5002022-03-30 16:27:02 +00004369 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4370 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4371 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004372
4373 The first example is from the
4374 recipes for Qt, which the user may choose to distribute under either
4375 the LGPL version 2.1 or GPL version 3. The second example is from
4376 Cairo where two licenses cover different parts of the source code.
4377 The final example is from ``sysstat``, which presents a single
4378 license.
4379
4380 You can also specify licenses on a per-package basis to handle
4381 situations where components of the output have different licenses.
4382 For example, a piece of software whose code is licensed under GPLv2
4383 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004384 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004385
Andrew Geissler9aee5002022-03-30 16:27:02 +00004386 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4387 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004388 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004389
Andrew Geisslerf0343792020-11-18 10:42:21 -06004390 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004391 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004392 build system to create an extra package (i.e.
4393 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4394 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004395 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004396
4397 The ``${PN}-lic`` package installs a directory in
4398 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4399 name, and installs files in that directory that contain license and
4400 copyright information (i.e. copies of the appropriate license files
4401 from ``meta/common-licenses`` that match the licenses specified in
4402 the :term:`LICENSE` variable of the recipe metadata
4403 and copies of files marked in
4404 :term:`LIC_FILES_CHKSUM` as containing
4405 license text).
4406
4407 For related information on providing license text, see the
4408 :term:`COPY_LIC_DIRS` variable, the
4409 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004410 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004411 section in the Yocto Project Development Tasks Manual.
4412
Andrew Geisslerf0343792020-11-18 10:42:21 -06004413 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004414 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004415 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004416 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004417 separate them with spaces.
4418
4419 This value is independent of :term:`LICENSE` and is
4420 typically used to mark recipes that might require additional licenses
4421 in order to be used in a commercial product. For more information,
4422 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004423 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004424 section in the Yocto Project Development Tasks Manual.
4425
Andrew Geissler9aee5002022-03-30 16:27:02 +00004426 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004427 Lists license flags that when specified in
4428 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004429 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004430 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004431 section in the Yocto Project Development Tasks Manual.
4432
Andrew Geisslerf0343792020-11-18 10:42:21 -06004433 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004434 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004435 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004436 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004437 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004438 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004439
4440 LICENSE_PATH += "path-to-additional-common-licenses"
4441
Andrew Geisslerf0343792020-11-18 10:42:21 -06004442 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004443 Defines the kernel type to be used in assembling the configuration.
4444 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004445 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004446 section in the
4447 Yocto Project Linux Kernel Development Manual for more information on
4448 kernel types.
4449
Andrew Geissler09036742021-06-25 14:25:14 -05004450 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004451 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004452 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004453 the kernel tools to find the appropriate description within the
4454 kernel :term:`Metadata` with which to build out the sources
4455 and configuration.
4456
Andrew Geisslerf0343792020-11-18 10:42:21 -06004457 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004458 The Linux version from ``kernel.org`` on which the Linux kernel image
4459 being built using the OpenEmbedded build system is based. You define
4460 this variable in the kernel recipe. For example, the
4461 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004462 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004463
4464 LINUX_VERSION ?= "3.4.24"
4465
Andrew Geissler09036742021-06-25 14:25:14 -05004466 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004467 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004468
4469 PV = "${LINUX_VERSION}+git${SRCPV}"
4470
Andrew Geisslerf0343792020-11-18 10:42:21 -06004471 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004472 A string extension compiled into the version string of the Linux
4473 kernel built with the OpenEmbedded build system. You define this
4474 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004475 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004476
4477 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4478
4479 Defining this variable essentially sets the Linux kernel
4480 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4481 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004482 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004483
4484 $ uname -r
4485 3.7.0-rc8-custom
4486
Andrew Geisslerf0343792020-11-18 10:42:21 -06004487 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004488 Specifies the directory to which the OpenEmbedded build system writes
4489 overall log files. The default directory is ``${TMPDIR}/log``.
4490
4491 For the directory containing logs specific to each task, see the
4492 :term:`T` variable.
4493
Andrew Geisslerf0343792020-11-18 10:42:21 -06004494 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004495 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004496 :term:`MACHINE` in the ``local.conf`` file found in the
4497 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004498 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004499 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004500
4501 MACHINE ?= "qemux86"
4502
4503 The variable corresponds to a machine configuration file of the same
4504 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004505 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004506 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004507 the :term:`Source Directory` in
4508 ``meta/conf/machine``.
4509
4510 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004511 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004512
4513 MACHINE ?= "qemuarm"
4514 MACHINE ?= "qemuarm64"
4515 MACHINE ?= "qemumips"
4516 MACHINE ?= "qemumips64"
4517 MACHINE ?= "qemuppc"
4518 MACHINE ?= "qemux86"
4519 MACHINE ?= "qemux86-64"
4520 MACHINE ?= "genericx86"
4521 MACHINE ?= "genericx86-64"
4522 MACHINE ?= "beaglebone"
4523 MACHINE ?= "edgerouter"
4524
4525 The last five are Yocto Project reference hardware
4526 boards, which are provided in the ``meta-yocto-bsp`` layer.
4527
4528 .. note::
4529
4530 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004531 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004532
Andrew Geisslerf0343792020-11-18 10:42:21 -06004533 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004534 Specifies the name of the machine-specific architecture. This
4535 variable is set automatically from :term:`MACHINE` or
4536 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004537 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004538
Andrew Geisslerf0343792020-11-18 10:42:21 -06004539 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004540 A list of required machine-specific packages to install as part of
4541 the image being built. The build process depends on these packages
4542 being present. Furthermore, because this is a "machine-essential"
4543 variable, the list of packages are essential for the machine to boot.
4544 The impact of this variable affects images based on
4545 ``packagegroup-core-boot``, including the ``core-image-minimal``
4546 image.
4547
4548 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004549 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004550 that the image being built has a build dependency on the variable's
4551 list of packages. In other words, the image will not build if a file
4552 in this list is not found.
4553
4554 As an example, suppose the machine for which you are building
4555 requires ``example-init`` to be run during boot to initialize the
4556 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004557 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004558
4559 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4560
Andrew Geisslerf0343792020-11-18 10:42:21 -06004561 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004562 A list of recommended machine-specific packages to install as part of
4563 the image being built. The build process does not depend on these
4564 packages being present. However, because this is a
4565 "machine-essential" variable, the list of packages are essential for
4566 the machine to boot. The impact of this variable affects images based
4567 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4568 image.
4569
Andrew Geissler09036742021-06-25 14:25:14 -05004570 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004571 variable with the exception that the image being built does not have
4572 a build dependency on the variable's list of packages. In other
4573 words, the image will still build if a package in this list is not
4574 found. Typically, this variable is used to handle essential kernel
4575 modules, whose functionality may be selected to be built into the
4576 kernel rather than as a module, in which case a package will not be
4577 produced.
4578
4579 Consider an example where you have a custom kernel where a specific
4580 touchscreen driver is required for the machine to be usable. However,
4581 the driver can be built as a module or into the kernel depending on
4582 the kernel configuration. If the driver is built as a module, you
4583 want it to be installed. But, when the driver is built into the
4584 kernel, you still want the build to succeed. This variable sets up a
4585 "recommends" relationship so that in the latter case, the build will
4586 not fail due to the missing package. To accomplish this, assuming the
4587 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004588 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004589
4590 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4591
4592 .. note::
4593
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004594 In this example, the ``kernel-module-ab123`` recipe needs to
4595 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4596 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4597 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004598
4599 Some examples of these machine essentials are flash, screen,
4600 keyboard, mouse, or touchscreen drivers (depending on the machine).
4601
Andrew Geisslerf0343792020-11-18 10:42:21 -06004602 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004603 A list of machine-specific packages to install as part of the image
4604 being built that are not essential for the machine to boot. However,
4605 the build process for more fully-featured images depends on the
4606 packages being present.
4607
4608 This variable affects all images based on ``packagegroup-base``,
4609 which does not include the ``core-image-minimal`` or
4610 ``core-image-full-cmdline`` images.
4611
Andrew Geissler09036742021-06-25 14:25:14 -05004612 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004613 with the exception that the image being built has a build dependency
4614 on the variable's list of packages. In other words, the image will
4615 not build if a file in this list is not found.
4616
4617 An example is a machine that has WiFi capability but is not essential
4618 for the machine to boot the image. However, if you are building a
4619 more fully-featured image, you want to enable the WiFi. The package
4620 containing the firmware for the WiFi hardware is always expected to
4621 exist, so it is acceptable for the build process to depend upon
4622 finding the package. In this case, assuming the package for the
4623 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004624 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004625
4626 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4627
Andrew Geisslerf0343792020-11-18 10:42:21 -06004628 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004629 A list of machine-specific packages to install as part of the image
4630 being built that are not essential for booting the machine. The image
4631 being built has no build dependency on this list of packages.
4632
4633 This variable affects only images based on ``packagegroup-base``,
4634 which does not include the ``core-image-minimal`` or
4635 ``core-image-full-cmdline`` images.
4636
Andrew Geissler09036742021-06-25 14:25:14 -05004637 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004638 with the exception that the image being built does not have a build
4639 dependency on the variable's list of packages. In other words, the
4640 image will build if a file in this list is not found.
4641
4642 An example is a machine that has WiFi capability but is not essential
4643 For the machine to boot the image. However, if you are building a
4644 more fully-featured image, you want to enable WiFi. In this case, the
4645 package containing the WiFi kernel module will not be produced if the
4646 WiFi driver is built into the kernel, in which case you still want
4647 the build to succeed instead of failing as a result of the package
4648 not being found. To accomplish this, assuming the package for the
4649 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004650 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004651
4652 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4653
Andrew Geisslerf0343792020-11-18 10:42:21 -06004654 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004655 Specifies the list of hardware features the
4656 :term:`MACHINE` is capable of supporting. For related
4657 information on enabling features, see the
4658 :term:`DISTRO_FEATURES`,
4659 :term:`COMBINED_FEATURES`, and
4660 :term:`IMAGE_FEATURES` variables.
4661
4662 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004663 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004664
Andrew Geisslerf0343792020-11-18 10:42:21 -06004665 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004666 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4667 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004668
4669 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4670 not intended to be user-configurable. It is best to just reference
4671 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004672 all machine configurations. See the ":ref:`ref-features-backfill`"
4673 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004674
Andrew Geisslerf0343792020-11-18 10:42:21 -06004675 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004676 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4677 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004678 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004679
Andrew Geisslerf0343792020-11-18 10:42:21 -06004680 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004681 A colon-separated list of overrides that apply to the current
4682 machine. By default, this list includes the value of
4683 :term:`MACHINE`.
4684
Andrew Geissler09036742021-06-25 14:25:14 -05004685 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004686 should apply to a machine. For example, all machines emulated in QEMU
4687 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4688 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004689 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004690
4691 MACHINEOVERRIDES =. "qemuall:"
4692
4693 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004694 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004695 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004696 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004697
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004698 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004699 file://wired-setup \
4700 "
4701
4702 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004703 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004704 value of :term:`OVERRIDES`.
4705
Andrew Geisslerf0343792020-11-18 10:42:21 -06004706 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004707 The email address of the distribution maintainer.
4708
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004709 :term:`METADATA_BRANCH`
4710 The branch currently checked out for the OpenEmbedded-Core layer (path
4711 determined by :term:`COREBASE`).
4712
4713 :term:`METADATA_REVISION`
4714 The revision currently checked out for the OpenEmbedded-Core layer (path
4715 determined by :term:`COREBASE`).
4716
Andrew Geisslerf0343792020-11-18 10:42:21 -06004717 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004718 Specifies additional paths from which the OpenEmbedded build system
4719 gets source code. When the build system searches for source code, it
4720 first tries the local download directory. If that location fails, the
4721 build system tries locations defined by
4722 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004723 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004724
4725 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004726 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004727 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4728
Andrew Geisslerf0343792020-11-18 10:42:21 -06004729 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004730 Specifies a prefix has been added to :term:`PN` to create a
4731 special version of a recipe or package (i.e. a Multilib version). The
4732 variable is used in places where the prefix needs to be added to or
4733 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004734 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004735
4736 .. note::
4737
Andrew Geissler09036742021-06-25 14:25:14 -05004738 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004739 historical and comes from a time when ``nativesdk`` was a suffix
4740 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004741 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004742
Andrew Geissler09036742021-06-25 14:25:14 -05004743 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004744 :term:`BBCLASSEXTEND` is used to provide a
4745 ``nativesdk`` version of a recipe in addition to the target version.
4746 If that recipe declares build-time dependencies on tasks in other
4747 recipes by using :term:`DEPENDS`, then a dependency on
4748 "foo" will automatically get rewritten to a dependency on
4749 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004750 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004751
4752 do_foo[depends] += "recipe:do_foo"
4753
4754 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004755 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004756
4757 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4758
Andrew Geissler09036742021-06-25 14:25:14 -05004759 :term:`module_autoload`
4760 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004761 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004762 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004763
4764 module_autoload_rfcomm = "rfcomm"
4765
Andrew Geisslerc926e172021-05-07 16:11:35 -05004766 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004767
4768 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4769
4770 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4771
Andrew Geissler09036742021-06-25 14:25:14 -05004772 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004773 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004774 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4775 file.
4776
4777 You can use this variable anywhere that it can be recognized by the
4778 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4779 configuration file, a distribution configuration file, an append file
4780 for the recipe, or the recipe itself). If you use this variable, you
4781 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004782 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004783 variable.
4784
Andrew Geisslerc926e172021-05-07 16:11:35 -05004785 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004786
4787 module_conf_module_name = "modprobe.d-syntax"
4788
4789 You must use the kernel module name override.
4790
4791 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004792 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004793
Andrew Geissler5f350902021-07-23 13:09:54 -04004794 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004795 populate the ``/etc/modprobe.d/modname.conf`` file with
4796 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004797 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004798
4799 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4800
4801 For information on how to specify kernel modules to auto-load on
4802 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4803
Andrew Geisslerf0343792020-11-18 10:42:21 -06004804 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004805 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4806 "0" to disable creation of this file, which contains all of the
4807 kernel modules resulting from a kernel build.
4808
Andrew Geisslerf0343792020-11-18 10:42:21 -06004809 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004810 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004811 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004812
4813 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4814
4815 The value
4816 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004817 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004818
4819 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4820
4821 See the :term:`MACHINE` variable for additional information.
4822
Andrew Geisslerf0343792020-11-18 10:42:21 -06004823 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004824 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004825 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004826
4827 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4828
4829 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004830 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004831
4832 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4833
Andrew Geisslerf0343792020-11-18 10:42:21 -06004834 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004835 Uniquely identifies the type of the target system for which packages
4836 are being built. This variable allows output for different types of
4837 target systems to be put into different subdirectories of the same
4838 output directory.
4839
Andrew Geisslerc926e172021-05-07 16:11:35 -05004840 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004841
4842 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4843
4844 Some classes (e.g.
4845 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004846 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004847
4848 See the :term:`STAMP` variable for an example. See the
4849 :term:`STAGING_DIR_TARGET` variable for more information.
4850
Andrew Geisslerf0343792020-11-18 10:42:21 -06004851 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004852 A string identifying the host distribution. Strings consist of the
4853 host distributor ID followed by the release, as reported by the
4854 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4855 example, when running a build on Ubuntu 12.10, the value is
4856 "Ubuntu-12.10". If this information is unable to be determined, the
4857 value resolves to "Unknown".
4858
4859 This variable is used by default to isolate native shared state
4860 packages for different distributions (e.g. to avoid problems with
4861 ``glibc`` version incompatibilities). Additionally, the variable is
4862 checked against
4863 :term:`SANITY_TESTED_DISTROS` if that
4864 variable is set.
4865
Andrew Geisslerf0343792020-11-18 10:42:21 -06004866 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004867 The minimal command and arguments to run ``nm``.
4868
Andrew Geisslerf0343792020-11-18 10:42:21 -06004869 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004870 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004871 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004872 licenses that are not in any way common. Also, new licenses are added
4873 occasionally to avoid introducing a lot of common license files,
4874 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004875 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004876 not exist in common licenses.
4877
Andrew Geissler09036742021-06-25 14:25:14 -05004878 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004879 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004880
4881 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4882
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004883 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004884 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004885 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004886
4887 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4888
Andrew Geisslerf0343792020-11-18 10:42:21 -06004889 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004890 Prevents installation of all "recommended-only" packages.
4891 Recommended-only packages are packages installed only through the
4892 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05004893 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004894
4895 NO_RECOMMENDATIONS = "1"
4896
4897 You can set this variable globally in your ``local.conf`` file or you
4898 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05004899 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004900
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004901 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004902
4903 It is important to realize that if you choose to not install packages
4904 using this variable and some other packages are dependent on them
4905 (i.e. listed in a recipe's :term:`RDEPENDS`
4906 variable), the OpenEmbedded build system ignores your request and
4907 will install the packages to avoid dependency errors.
4908
4909 .. note::
4910
4911 Some recommended packages might be required for certain system
4912 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004913 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004914
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004915 This variable is only supported when using the IPK and RPM
4916 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004917
4918 See the :term:`BAD_RECOMMENDATIONS` and
4919 the :term:`PACKAGE_EXCLUDE` variables for
4920 related information.
4921
Andrew Geisslerf0343792020-11-18 10:42:21 -06004922 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004923 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004924 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05004925 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004926 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004927
4928 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004929 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
4930 FILES:${PN}-dbg = "/usr/src/debug/"
4931 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004932
Andrew Geissler09036742021-06-25 14:25:14 -05004933 :term:`NON_MULTILIB_RECIPES`
4934 A list of recipes that should not be built for multilib. OE-Core's
4935 ``multilib.conf`` file defines a reasonable starting point for this
4936 list with::
4937
4938 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
4939
Andrew Geisslerf0343792020-11-18 10:42:21 -06004940 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004941 The minimal command and arguments to run ``objcopy``.
4942
Andrew Geisslerf0343792020-11-18 10:42:21 -06004943 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004944 The minimal command and arguments to run ``objdump``.
4945
Andrew Geisslerf0343792020-11-18 10:42:21 -06004946 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004947 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
4948 this variable specifies additional arguments passed to the "sed"
4949 command. The sed command alters any paths in configuration scripts
4950 that have been set up during compilation. Inheriting this class
4951 results in all paths in these scripts being changed to point into the
4952 ``sysroots/`` directory so that all builds that use the script will
4953 use the correct directories for the cross compiling layout.
4954
4955 See the ``meta/classes/binconfig.bbclass`` in the
4956 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00004957 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004958
Andrew Geisslerf0343792020-11-18 10:42:21 -06004959 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004960 An internal variable used to tell the OpenEmbedded build system what
4961 Python modules to import for every Python function run by the system.
4962
4963 .. note::
4964
4965 Do not set this variable. It is for internal use only.
4966
Andrew Geisslerf0343792020-11-18 10:42:21 -06004967 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004968 The name of the build environment setup script for the purposes of
4969 setting up the environment within the extensible SDK. The default
4970 value is "oe-init-build-env".
4971
4972 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05004973 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004974
Andrew Geisslerf0343792020-11-18 10:42:21 -06004975 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004976 Controls how the OpenEmbedded build system spawns interactive
4977 terminals on the host development system (e.g. using the BitBake
4978 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06004979 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004980 the Yocto Project Development Tasks Manual.
4981
Andrew Geissler5f350902021-07-23 13:09:54 -04004982 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004983
4984 - auto
4985 - gnome
4986 - xfce
4987 - rxvt
4988 - screen
4989 - konsole
4990 - none
4991
Andrew Geisslerf0343792020-11-18 10:42:21 -06004992 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004993 The directory from which the top-level build environment setup script
4994 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004995 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05004996 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004997 contains the script.
4998
4999 For additional information on how this variable is used, see the
5000 initialization script.
5001
Andrew Geisslerf0343792020-11-18 10:42:21 -06005002 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005003 Declares the oldest version of the Linux kernel that the produced
5004 binaries must support. This variable is passed into the build of the
5005 Embedded GNU C Library (``glibc``).
5006
5007 The default for this variable comes from the
5008 ``meta/conf/bitbake.conf`` configuration file. You can override this
5009 default by setting the variable in a custom distribution
5010 configuration file.
5011
Andrew Geisslerf0343792020-11-18 10:42:21 -06005012 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005013 A colon-separated list of overrides that currently apply. Overrides
5014 are a BitBake mechanism that allows variables to be selectively
5015 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005016 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005017 the current recipe being built, the machine for which it is being
5018 built, and so forth.
5019
5020 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005021 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005022 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005023 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005024
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005025 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005026
5027 See the
5028 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5029 section in the BitBake User Manual for more information on the
5030 overrides mechanism.
5031
Andrew Geissler09036742021-06-25 14:25:14 -05005032 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005033 :term:`CLASSOVERRIDE`,
5034 :term:`MACHINEOVERRIDES`, and
5035 :term:`DISTROOVERRIDES` variables. Another
5036 important override included by default is ``pn-${PN}``. This override
5037 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005038 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005039
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005040 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005041
5042 .. note::
5043
Andrew Geissler09036742021-06-25 14:25:14 -05005044 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005045 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005046 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005047 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005048
Andrew Geisslerf0343792020-11-18 10:42:21 -06005049 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005050 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005051
5052 ${PN}-${PV}
5053
Andrew Geisslerf0343792020-11-18 10:42:21 -06005054 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005055 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005056
5057 You may find you need to inject additional metadata into packages.
5058 This variable allows you to do that by setting the injected data as
5059 the value. Multiple fields can be added by splitting the content with
5060 the literal separator "\n".
5061
5062 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5063 to do package type specific settings. It can also be made package
5064 specific by using the package name as a suffix.
5065
5066 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005067 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005068 section in the Yocto Project Development Tasks Manual.
5069
Andrew Geisslerf0343792020-11-18 10:42:21 -06005070 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005071 The architecture of the resulting package or packages.
5072
5073 By default, the value of this variable is set to
5074 :term:`TUNE_PKGARCH` when building for the
5075 target, :term:`BUILD_ARCH` when building for the
5076 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5077 SDK.
5078
5079 .. note::
5080
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005081 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005082
5083 However, if your recipe's output packages are built specific to the
5084 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005085 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005086 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005087
5088 PACKAGE_ARCH = "${MACHINE_ARCH}"
5089
Andrew Geisslerf0343792020-11-18 10:42:21 -06005090 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005091 Specifies a list of architectures compatible with the target machine.
5092 This variable is set automatically and should not normally be
5093 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005094 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005095 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5096
Andrew Geisslerf0343792020-11-18 10:42:21 -06005097 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005098 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005099 that those added packages can pick up files that would normally be
5100 included in the default package.
5101
Andrew Geisslerf0343792020-11-18 10:42:21 -06005102 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005103 This variable, which is set in the ``local.conf`` configuration file
5104 found in the ``conf`` folder of the
5105 :term:`Build Directory`, specifies the package manager the
5106 OpenEmbedded build system uses when packaging data.
5107
5108 You can provide one or more of the following arguments for the
5109 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5110 package_tar"
5111
5112 .. note::
5113
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005114 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005115 class has limited functionality due to no support for package
5116 dependencies by that backend. Therefore, it is recommended that
5117 you do not use it.
5118
5119 The build system uses only the first argument in the list as the
5120 package manager when creating your image or SDK. However, packages
5121 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005122 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005123
5124 PACKAGE_CLASSES ?= "package_ipk"
5125
5126 The OpenEmbedded build system uses
5127 the IPK package manager to create your image or SDK.
5128
5129 For information on packaging and build performance effects as a
5130 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005131 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005132
Andrew Geisslerf0343792020-11-18 10:42:21 -06005133 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005134 Determines how to split up and package debug and source information
5135 when creating debugging packages to be used with the GNU Project
5136 Debugger (GDB). In general, based on the value of this variable,
5137 you can combine the source and debug info in a single package,
5138 you can break out the source into a separate package that can be
5139 installed independently, or you can choose to not have the source
5140 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005141
Patrick Williams93c203f2021-10-06 16:15:23 -05005142 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005143
Patrick Williams93c203f2021-10-06 16:15:23 -05005144 - "``.debug``": All debugging and source info is placed in a single
5145 ``*-dbg`` package; debug symbol files are placed next to the
5146 binary in a ``.debug`` directory so that, if a binary is installed
5147 into ``/bin``, the corresponding debug symbol file is installed
5148 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5149 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005150
Patrick Williams93c203f2021-10-06 16:15:23 -05005151 - "``debug-file-directory``": As above, all debugging and source info
5152 is placed in a single ``*-dbg`` package; debug symbol files are
5153 placed entirely under the directory ``/usr/lib/debug`` and separated
5154 by the path from where the binary is installed, so that if a binary
5155 is installed in ``/bin``, the corresponding debug symbols are installed
5156 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5157 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005158
Patrick Williams93c203f2021-10-06 16:15:23 -05005159 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5160 ``*-dbg`` package as with the ``.debug`` value, while source is
5161 placed in a separate ``*-src`` package, which can be installed
5162 independently. This is the default setting for this variable,
5163 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005164
Patrick Williams93c203f2021-10-06 16:15:23 -05005165 - "``debug-without-src``": The same behavior as with the ``.debug``
5166 setting, but no source is packaged at all.
5167
5168 .. note::
5169
5170 Much of the above package splitting can be overridden via
5171 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005172
5173 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005174 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005175 in the Yocto Project Development Tasks Manual.
5176
Andrew Geisslerf0343792020-11-18 10:42:21 -06005177 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005178 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005179 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005180
5181 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5182
5183 You can set this variable globally in your ``local.conf`` file or you
5184 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005185 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005186
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005187 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005188
5189 If you choose to not install a package using this variable and some
5190 other package is dependent on it (i.e. listed in a recipe's
5191 :term:`RDEPENDS` variable), the OpenEmbedded build
5192 system generates a fatal installation error. Because the build system
5193 halts the process with a fatal error, you can use the variable with
5194 an iterative development process to remove specific components from a
5195 system.
5196
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005197 This variable is supported only when using the IPK and RPM
5198 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005199
5200 See the :term:`NO_RECOMMENDATIONS` and the
5201 :term:`BAD_RECOMMENDATIONS` variables for
5202 related information.
5203
Andrew Geissler9aee5002022-03-30 16:27:02 +00005204 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5205 Prevents specific packages from being installed when you are
5206 installing complementary packages.
5207
5208 You might find that you want to prevent installing certain packages
5209 when you are installing complementary packages. For example, if you
5210 are using :term:`IMAGE_FEATURES` to install
5211 ``dev-pkgs``, you might not want to install all packages from a
5212 particular multilib. If you find yourself in this situation, you can
5213 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5214 expressions to match the packages you want to exclude.
5215
Andrew Geisslerf0343792020-11-18 10:42:21 -06005216 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005217 Specifies the list of architectures compatible with the device CPU.
5218 This variable is useful when you build for several different devices
5219 that use miscellaneous processors such as XScale and ARM926-EJS.
5220
Andrew Geisslerf0343792020-11-18 10:42:21 -06005221 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005222 Optionally specifies the package architectures used as part of the
5223 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005224 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005225 URI, which is constructed using the
5226 :term:`PACKAGE_FEED_URIS` and
5227 :term:`PACKAGE_FEED_BASE_PATHS`
5228 variables.
5229
5230 .. note::
5231
Andrew Geissler09036742021-06-25 14:25:14 -05005232 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005233 variable to allow specific package architectures. If you do
5234 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005235 case, you can omit this variable. Omitting the variable results in
5236 all available architectures for the current machine being included
5237 into remote package feeds.
5238
Andrew Geissler09036742021-06-25 14:25:14 -05005239 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5240 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005241 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005242
5243 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5244 https://example.com/packagerepos/updates"
5245 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5246 PACKAGE_FEED_ARCHS = "all core2-64"
5247
5248 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005249
5250 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005251
5252 https://example.com/packagerepos/release/rpm/all
5253 https://example.com/packagerepos/release/rpm/core2-64
5254 https://example.com/packagerepos/release/rpm-dev/all
5255 https://example.com/packagerepos/release/rpm-dev/core2-64
5256 https://example.com/packagerepos/updates/rpm/all
5257 https://example.com/packagerepos/updates/rpm/core2-64
5258 https://example.com/packagerepos/updates/rpm-dev/all
5259 https://example.com/packagerepos/updates/rpm-dev/core2-64
5260
Andrew Geisslerf0343792020-11-18 10:42:21 -06005261 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005262 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005263 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005264 package feed URI used by the OpenEmbedded build system. The base path
5265 lies between the :term:`PACKAGE_FEED_URIS`
5266 and :term:`PACKAGE_FEED_ARCHS` variables.
5267
Andrew Geissler09036742021-06-25 14:25:14 -05005268 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5269 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005270 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005271
5272 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5273 https://example.com/packagerepos/updates"
5274 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5275 PACKAGE_FEED_ARCHS = "all core2-64"
5276
5277 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005278
5279 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005280
5281 https://example.com/packagerepos/release/rpm/all
5282 https://example.com/packagerepos/release/rpm/core2-64
5283 https://example.com/packagerepos/release/rpm-dev/all
5284 https://example.com/packagerepos/release/rpm-dev/core2-64
5285 https://example.com/packagerepos/updates/rpm/all
5286 https://example.com/packagerepos/updates/rpm/core2-64
5287 https://example.com/packagerepos/updates/rpm-dev/all
5288 https://example.com/packagerepos/updates/rpm-dev/core2-64
5289
Andrew Geisslerf0343792020-11-18 10:42:21 -06005290 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005291 Specifies the front portion of the package feed URI used by the
5292 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005293 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005294 :term:`PACKAGE_FEED_BASE_PATHS`, and
5295 :term:`PACKAGE_FEED_ARCHS` variables.
5296
Andrew Geissler09036742021-06-25 14:25:14 -05005297 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5298 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005299 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005300
5301 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5302 https://example.com/packagerepos/updates"
5303 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5304 PACKAGE_FEED_ARCHS = "all core2-64"
5305
5306 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005307
5308 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005309
5310 https://example.com/packagerepos/release/rpm/all
5311 https://example.com/packagerepos/release/rpm/core2-64
5312 https://example.com/packagerepos/release/rpm-dev/all
5313 https://example.com/packagerepos/release/rpm-dev/core2-64
5314 https://example.com/packagerepos/updates/rpm/all
5315 https://example.com/packagerepos/updates/rpm/core2-64
5316 https://example.com/packagerepos/updates/rpm-dev/all
5317 https://example.com/packagerepos/updates/rpm-dev/core2-64
5318
Andrew Geisslerf0343792020-11-18 10:42:21 -06005319 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005320 The final list of packages passed to the package manager for
5321 installation into the image.
5322
5323 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005324 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005325 not the final list of packages that are actually installed. This
5326 variable is internal to the image construction code. Consequently, in
5327 general, you should use the
5328 :term:`IMAGE_INSTALL` variable to specify
5329 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005330 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005331 image. When working with an initial RAM filesystem (initramfs) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005332 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Andrew Geissler09209ee2020-12-13 08:44:15 -06005333 initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005334 in the Yocto Project Development Tasks Manual.
5335
Andrew Geisslerf0343792020-11-18 10:42:21 -06005336 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005337 Specifies a list of packages the OpenEmbedded build system attempts
5338 to install when creating an image. If a listed package fails to
5339 install, the build system does not generate an error. This variable
5340 is generally not user-defined.
5341
Andrew Geisslerf0343792020-11-18 10:42:21 -06005342 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005343 Specifies a list of functions run to pre-process the
5344 :term:`PKGD` directory prior to splitting the files out
5345 to individual packages.
5346
Andrew Geisslerf0343792020-11-18 10:42:21 -06005347 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005348 Specifies a list of dependencies for post-installation and
5349 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005350 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005351 creation time rather than on the target but depends on a native tool
5352 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005353 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005354
5355 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005356 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005357 section in the Yocto Project Development Tasks Manual.
5358
Andrew Geisslerf0343792020-11-18 10:42:21 -06005359 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005361 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005362 recipes when you specify features and then arguments that define
5363 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005364 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005365
5366 PACKAGECONFIG ??= "f1 f2 f3 ..."
5367 PACKAGECONFIG[f1] = "\
5368 --with-f1, \
5369 --without-f1, \
5370 build-deps-for-f1, \
5371 runtime-deps-for-f1, \
5372 runtime-recommends-for-f1, \
5373 packageconfig-conflicts-for-f1"
5374 PACKAGECONFIG[f2] = "\
5375 ... and so on and so on ...
5376
Andrew Geissler5f350902021-07-23 13:09:54 -04005377 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005378 list of the features to enable. Following the features, you can
5379 determine the behavior of each feature by providing up to six
5380 order-dependent arguments, which are separated by commas. You can
5381 omit any argument you like but must retain the separating commas. The
5382 order is important and specifies the following:
5383
5384 1. Extra arguments that should be added to the configure script
5385 argument list (:term:`EXTRA_OECONF` or
5386 :term:`PACKAGECONFIG_CONFARGS`) if
5387 the feature is enabled.
5388
Andrew Geissler09036742021-06-25 14:25:14 -05005389 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5390 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005391
5392 3. Additional build dependencies (:term:`DEPENDS`)
5393 that should be added if the feature is enabled.
5394
5395 4. Additional runtime dependencies (:term:`RDEPENDS`)
5396 that should be added if the feature is enabled.
5397
5398 5. Additional runtime recommendations
5399 (:term:`RRECOMMENDS`) that should be added if
5400 the feature is enabled.
5401
Andrew Geissler09036742021-06-25 14:25:14 -05005402 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005403 settings for this feature.
5404
Andrew Geissler09036742021-06-25 14:25:14 -05005405 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005406 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5407 three arguments that determine the feature's behavior.
5408 ::
5409
5410 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5411
5412 The
5413 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5414 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005415 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005416 other hand, if the feature is disabled say through a ``.bbappend``
5417 file in another layer, then the second argument ``--without-gtk3`` is
5418 added to the configure script instead.
5419
Andrew Geissler09036742021-06-25 14:25:14 -05005420 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005421 regardless of whether you are creating a block or changing a block.
5422 When creating a block, use the structure inside your recipe.
5423
Andrew Geissler09036742021-06-25 14:25:14 -05005424 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005425 so one of two ways:
5426
5427 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005428 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005429 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005430 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005431
5432 PACKAGECONFIG = "f4 f5"
5433
Andrew Geisslerc926e172021-05-07 16:11:35 -05005434 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005435
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005436 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005437
5438 - *Configuration file:* This method is identical to changing the
5439 block through an append file except you edit your ``local.conf``
5440 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005441 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005442
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005443 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005444
Andrew Geisslerc926e172021-05-07 16:11:35 -05005445 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005446
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005447 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005448
Andrew Geisslerf0343792020-11-18 10:42:21 -06005449 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005450 A space-separated list of configuration options generated from the
5451 :term:`PACKAGECONFIG` setting.
5452
5453 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005454 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5455 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5456 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005457 handles the ``do_configure`` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005458 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005459
Andrew Geisslerf0343792020-11-18 10:42:21 -06005460 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005461 For recipes inheriting the
5462 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005463 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005464 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5465 should not be automatically created by the ``packagegroup`` recipe,
5466 which is the default behavior.
5467
Andrew Geisslerf0343792020-11-18 10:42:21 -06005468 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005469 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005470 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005471
Andrew Geissler5199d832021-09-24 16:47:35 -05005472 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005473
5474 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005475 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005476 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005477 package. If a file matches the :term:`FILES` variable for more than one
5478 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005479 (leftmost) package.
5480
5481 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005482 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005483 :ref:`ref-tasks-install` task) are not generated,
5484 unless generation is forced through the
5485 :term:`ALLOW_EMPTY` variable.
5486
Andrew Geisslerf0343792020-11-18 10:42:21 -06005487 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005488 A promise that your recipe satisfies runtime dependencies for
5489 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005490 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005491 only states that they should be satisfied. For example, if a hard,
5492 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005493 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005494 variable, but a package with the module name is never actually
5495 produced, then the other package will be broken. Thus, if you attempt
5496 to include that package in an image, you will get a dependency
5497 failure from the packaging system during the
5498 :ref:`ref-tasks-rootfs` task.
5499
5500 Typically, if there is a chance that such a situation can occur and
5501 the package that is not created is valid without the dependency being
5502 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005503 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005504
Andrew Geissler09036742021-06-25 14:25:14 -05005505 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005506 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005507 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005508 section in the Yocto Project Development Tasks Manual.
5509
Andrew Geisslerf0343792020-11-18 10:42:21 -06005510 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005511 Specifies a list of functions run to perform additional splitting of
5512 files into individual packages. Recipes can either prepend to this
5513 variable or prepend to the ``populate_packages`` function in order to
5514 perform additional package splitting. In either case, the function
5515 should set :term:`PACKAGES`,
5516 :term:`FILES`, :term:`RDEPENDS` and
5517 other packaging variables appropriately in order to perform the
5518 desired splitting.
5519
Andrew Geisslerf0343792020-11-18 10:42:21 -06005520 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005521 Extra options passed to the ``make`` command during the
5522 :ref:`ref-tasks-compile` task in order to specify
5523 parallel compilation on the local build host. This variable is
5524 usually in the form "-j x", where x represents the maximum number of
5525 parallel threads ``make`` can run.
5526
5527 .. note::
5528
Andrew Geissler09036742021-06-25 14:25:14 -05005529 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005530 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5531 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005532
5533 By default, the OpenEmbedded build system automatically sets this
5534 variable to be equal to the number of cores the build system uses.
5535
5536 .. note::
5537
5538 If the software being built experiences dependency issues during
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005539 the ``do_compile`` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005540 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005541 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005542 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005543 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005544
5545 For single socket systems (i.e. one CPU), you should not have to
5546 override this variable to gain optimal parallelism during builds.
5547 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005548 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005549 not set higher than "-j 20".
5550
5551 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005552 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005553 section in the Yocto Project Development Tasks Manual.
5554
Andrew Geisslerf0343792020-11-18 10:42:21 -06005555 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005556 Extra options passed to the ``make install`` command during the
5557 :ref:`ref-tasks-install` task in order to specify
5558 parallel installation. This variable defaults to the value of
5559 :term:`PARALLEL_MAKE`.
5560
5561 .. note::
5562
Andrew Geissler09036742021-06-25 14:25:14 -05005563 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005564 be called with
5565 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5566 way to ensure this is to use the ``oe_runmake`` function.
5567
5568 If the software being built experiences dependency issues during
5569 the ``do_install`` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005570 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005571 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005572 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005573 section in the Yocto Project Development Tasks Manual.
5574
Andrew Geisslerf0343792020-11-18 10:42:21 -06005575 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005576 Determines the action to take when a patch fails. You can set this
5577 variable to one of two values: "noop" and "user".
5578
5579 The default value of "noop" causes the build to simply fail when the
5580 OpenEmbedded build system cannot successfully apply a patch. Setting
5581 the value to "user" causes the build system to launch a shell and
5582 places you in the right location so that you can manually resolve the
5583 conflicts.
5584
5585 Set this variable in your ``local.conf`` file.
5586
Andrew Geisslerf0343792020-11-18 10:42:21 -06005587 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005588 Specifies the utility used to apply patches for a recipe during the
5589 :ref:`ref-tasks-patch` task. You can specify one of
5590 three utilities: "patch", "quilt", or "git". The default utility used
5591 is "quilt" except for the quilt-native recipe itself. Because the
5592 quilt tool is not available at the time quilt-native is being
5593 patched, it uses "patch".
5594
5595 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005596 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005597
5598 PATCHTOOL = "patch"
5599 PATCHTOOL = "quilt"
5600 PATCHTOOL = "git"
5601
Andrew Geisslerf0343792020-11-18 10:42:21 -06005602 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005603 The epoch of the recipe. By default, this variable is unset. The
5604 variable is used to make upgrades possible when the versioning scheme
5605 changes in some backwards incompatible way.
5606
Andrew Geissler09036742021-06-25 14:25:14 -05005607 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005608
Patrick Williams45852732022-04-02 08:58:32 -05005609 :term:`PEP517_BUILD_API`
5610 When used by recipes that inherit the :ref:`python_pep517
5611 <ref-classes-python_pep517>` class, specifies the entry point to the
5612 PEP-517 compliant build API (such as ``flit_core.buildapi``).
5613
Andrew Geissler9aee5002022-03-30 16:27:02 +00005614 :term:`PEP517_WHEEL_PATH`
5615 When used by recipes that inherit the
5616 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5617 denotes the path to ``dist/`` (short for distribution) where the
5618 binary archive ``wheel`` is built.
5619
Andrew Geisslerf0343792020-11-18 10:42:21 -06005620 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005621 Specifies the recipe or package name and includes all version and
5622 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5623 ``bash-4.2-r1/``). This variable is comprised of the following:
5624 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5625
Andrew Geisslerf0343792020-11-18 10:42:21 -06005626 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005627 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5628 class, this variable identifies packages that contain the pixbuf
5629 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5630 class assumes that the loaders are in the recipe's main package (i.e.
5631 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5632 loaders you need are in a package other than that main package.
5633
Andrew Geisslerf0343792020-11-18 10:42:21 -06005634 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005635 The name of the resulting package created by the OpenEmbedded build
5636 system.
5637
5638 .. note::
5639
Andrew Geissler09036742021-06-25 14:25:14 -05005640 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005641
5642 For example, when the :ref:`debian <ref-classes-debian>` class
5643 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005644 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005645
Andrew Geisslerf0343792020-11-18 10:42:21 -06005646 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005647 The path to ``pkg-config`` files for the current build context.
5648 ``pkg-config`` reads this variable from the environment.
5649
Andrew Geisslerf0343792020-11-18 10:42:21 -06005650 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005651 Points to the destination directory for files to be packaged before
5652 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005653 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005654
5655 ${WORKDIR}/package
5656
5657 Do not change this default.
5658
Andrew Geisslerf0343792020-11-18 10:42:21 -06005659 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005660 Points to a shared, global-state directory that holds data generated
5661 during the packaging process. During the packaging process, the
5662 :ref:`ref-tasks-packagedata` task packages data
5663 for each recipe and installs it into this temporary, shared area.
5664 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005665 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005666
5667 ${STAGING_DIR_HOST}/pkgdata
5668
5669 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005670 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005671 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005672 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005673 section in the Yocto Project Development Tasks Manual. For more
5674 information on the shared, global-state directory, see
5675 :term:`STAGING_DIR_HOST`.
5676
Andrew Geisslerf0343792020-11-18 10:42:21 -06005677 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005678 Points to the parent directory for files to be packaged after they
5679 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005680 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005681
5682 ${WORKDIR}/packages-split
5683
5684 Under this directory, the build system creates directories for each
5685 package specified in :term:`PACKAGES`. Do not change
5686 this default.
5687
Andrew Geisslerf0343792020-11-18 10:42:21 -06005688 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005689 Points to a temporary work area where the
5690 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005691 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005692
5693 ${WORKDIR}/pkgdata
5694
5695 Do not change this default.
5696
5697 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005698 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005699 :term:`PKGDATA_DIR` to make it available globally.
5700
Andrew Geisslerf0343792020-11-18 10:42:21 -06005701 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005702 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005703 is set to :term:`PE`.
5704
Andrew Geisslerf0343792020-11-18 10:42:21 -06005705 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005706 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005707 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005708
Andrew Geisslerf0343792020-11-18 10:42:21 -06005709 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005710 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005711 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005712
Andrew Geisslerf0343792020-11-18 10:42:21 -06005713 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005714 This variable can have two separate functions depending on the
5715 context: a recipe name or a resulting package name.
5716
Andrew Geissler09036742021-06-25 14:25:14 -05005717 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005718 OpenEmbedded build system as input to create a package. The name is
5719 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005720 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005721 will be "expat".
5722
5723 The variable refers to a package name in the context of a file
5724 created or produced by the OpenEmbedded build system.
5725
Andrew Geissler09036742021-06-25 14:25:14 -05005726 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005727 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005728 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005729 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005730 and ``lib64-bash``, respectively.
5731
Andrew Geisslerf0343792020-11-18 10:42:21 -06005732 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005733 Specifies a list of functions to call once the OpenEmbedded build
5734 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005735 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005736
5737 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5738
5739 If you need to pass the SDK path to a command within a function, you
5740 can use ``${SDK_DIR}``, which points to the parent directory used by
5741 the OpenEmbedded build system when creating SDK output. See the
5742 :term:`SDK_DIR` variable for more information.
5743
Andrew Geisslerf0343792020-11-18 10:42:21 -06005744 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005745 Specifies a list of functions to call once the OpenEmbedded build
5746 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005747 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005748
5749 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5750
5751 If you need to pass the SDK path to a command within a function, you
5752 can use ``${SDK_DIR}``, which points to the parent directory used by
5753 the OpenEmbedded build system when creating SDK output. See the
5754 :term:`SDK_DIR` variable for more information.
5755
Andrew Geisslerf0343792020-11-18 10:42:21 -06005756 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005757 The revision of the recipe. The default value for this variable is
5758 "r0". Subsequent revisions of the recipe conventionally have the
5759 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005760 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005761
5762 .. note::
5763
Andrew Geissler09036742021-06-25 14:25:14 -05005764 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005765 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005766 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005767 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005768 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005769 mechanisms.
5770
Andrew Geissler09036742021-06-25 14:25:14 -05005771 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005772 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005773 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005774 :term:`PKGR`, helps the package manager distinguish which
5775 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005776 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5777 the same :term:`PV` usually means that the packages all install the same
5778 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005779 packaging fixes.
5780
5781 .. note::
5782
Andrew Geissler09036742021-06-25 14:25:14 -05005783 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005784 package contents or metadata.
5785
Andrew Geissler5f350902021-07-23 13:09:54 -04005786 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005787 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005788 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005789 in the Yocto Project Development Tasks Manual for more information.
5790
Andrew Geisslerf0343792020-11-18 10:42:21 -06005791 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005792 If multiple recipes provide the same item, this variable determines
5793 which recipe is preferred and thus provides the item (i.e. the
5794 preferred provider). You should always suffix this variable with the
5795 name of the provided item. And, you should define the variable using
5796 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005797 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005798
5799 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5800
5801 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005802 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005803 the recipe you prefer to provide "virtual/kernel".
5804
Andrew Geisslerc926e172021-05-07 16:11:35 -05005805 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005806
5807 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5808 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5809
5810 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005811 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005812 section in the Yocto Project Development Tasks Manual.
5813
5814 .. note::
5815
Andrew Geissler09036742021-06-25 14:25:14 -05005816 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005817 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005818 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005819 desirable since this mechanism is designed to select between mutually
5820 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005821
Andrew Geisslerf0343792020-11-18 10:42:21 -06005822 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005823 If there are multiple versions of a recipe available, this variable
5824 determines which version should be given preference. You must always
5825 suffix the variable with the :term:`PN` you want to select (`python` in
5826 the first example below), and you should specify the :term:`PV`
5827 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005828
Andrew Geissler09036742021-06-25 14:25:14 -05005829 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005830 through the "``%``" character. You can use the character to match any
5831 number of characters, which can be useful when specifying versions
5832 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005833 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005834
5835 PREFERRED_VERSION_python = "3.4.0"
5836 PREFERRED_VERSION_linux-yocto = "5.0%"
5837
5838 .. note::
5839
5840 The use of the "%" character is limited in that it only works at the end of the
5841 string. You cannot use the wildcard character in any other
5842 location of the string.
5843
5844 The specified version is matched against :term:`PV`, which
5845 does not necessarily match the version part of the recipe's filename.
5846 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005847 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005848
5849 PV = "1.1+git${SRCPV}"
5850
5851 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005852 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005853
5854 PREFERRED_VERSION_foo = "1.1+git%"
5855
5856 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005857 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005858
5859 PREFERRED_VERSION_foo = "git"
5860
Andrew Geissler09036742021-06-25 14:25:14 -05005861 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005862 configuration files in a way that is hard to change. You can use
5863 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005864 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005865
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005866 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005867
5868 Although not recommended, worst case, you can also use the
5869 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005870 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005871
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005872 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005873
5874 .. note::
5875
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005876 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005877 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005878
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005879 If a recipe with the specified version is not available, a warning
5880 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5881 to be an error instead.
5882
Andrew Geisslerf0343792020-11-18 10:42:21 -06005883 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005884 Specifies additional paths from which the OpenEmbedded build system
5885 gets source code. When the build system searches for source code, it
5886 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005887 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005888 source, and then locations specified by
5889 :term:`MIRRORS` in that order.
5890
5891 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005892 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005893 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5894
5895 Typically, you could add a specific server for the build system to
5896 attempt before any others by adding something like the following to
5897 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005898 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005899
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005900 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00005901 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5902 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5903 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5904 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005905
5906 These changes cause the
5907 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5908 direct them to the ``http://`` sources mirror. You can use
5909 ``file://`` URLs to point to local directories or network shares as
5910 well.
5911
Andrew Geisslerf0343792020-11-18 10:42:21 -06005912 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005913 Indicates the importance of a package.
5914
Andrew Geissler09036742021-06-25 14:25:14 -05005915 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005916 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05005917 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005918 normally set within recipes.
5919
Andrew Geissler09036742021-06-25 14:25:14 -05005920 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005921 "optional", which is the default.
5922
Andrew Geisslerf0343792020-11-18 10:42:21 -06005923 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005924 Specifies libraries installed within a recipe that should be ignored
5925 by the OpenEmbedded build system's shared library resolver. This
5926 variable is typically used when software being built by a recipe has
5927 its own private versions of a library normally provided by another
5928 recipe. In this case, you would not want the package containing the
5929 private libraries to be set as a dependency on other unrelated
5930 packages that should instead depend on the package providing the
5931 standard version of the library.
5932
5933 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05005934 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005935
5936 PRIVATE_LIBS = "libmozjs.so \
5937 libxpcom.so \
5938 libnspr4.so \
5939 libxul.so \
5940 libmozalloc.so \
5941 libplc4.so \
5942 libplds4.so"
5943
5944 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005945 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005946 section in the Yocto Project Overview and Concepts Manual.
5947
Andrew Geisslerf0343792020-11-18 10:42:21 -06005948 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005949 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05005950 default, a recipe's own :term:`PN` is implicitly already in its
5951 :term:`PROVIDES` list and therefore does not need to mention that it
5952 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005953 aliases are synonyms for the recipe and can be useful for satisfying
5954 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05005955 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005956
Andrew Geissler09036742021-06-25 14:25:14 -05005957 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05005958 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005959
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005960 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005961
Andrew Geissler09036742021-06-25 14:25:14 -05005962 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005963 results in the "eudev" recipe also being available as simply "udev".
5964
5965 .. note::
5966
Andrew Geisslerd1e89492021-02-12 15:35:20 -06005967 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
5968 to `PROVIDES`, so while using "+=" in the above example may not be
5969 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005970
5971 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05005972 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005973 virtual target is a name that corresponds to some particular
5974 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05005975 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005976 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05005977 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005978
5979 Conventionally, virtual targets have names on the form
5980 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5981 of the name and has no syntactical significance.
5982
5983 The :term:`PREFERRED_PROVIDER` variable is
5984 used to select which particular recipe provides a virtual target.
5985
5986 .. note::
5987
5988 A corresponding mechanism for virtual runtime dependencies
5989 (packages) exists. However, the mechanism does not depend on any
5990 special functionality beyond ordinary variable assignments. For
5991 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5992 the component that manages the ``/dev`` directory.
5993
5994 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05005995 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005996
5997 VIRTUAL-RUNTIME_dev_manager = "udev"
5998
5999
Andrew Geisslerf0343792020-11-18 10:42:21 -06006000 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006001 The network based :term:`PR` service host and port.
6002
6003 The ``conf/local.conf.sample.extended`` configuration file in the
6004 :term:`Source Directory` shows how the
Andrew Geissler09036742021-06-25 14:25:14 -05006005 :term:`PRSERV_HOST` variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006006
6007 PRSERV_HOST = "localhost:0"
6008
6009 You must
6010 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06006011 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006012 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006013
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006014
6015 :term:`PSEUDO_IGNORE_PATHS`
6016 A comma-separated (without spaces) list of path prefixes that should be ignored
6017 by pseudo when monitoring and recording file operations, in order to avoid
6018 problems with files being written to outside of the pseudo context and
6019 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6020 and can include partial directory (or file) names.
6021
6022
Andrew Geisslerf0343792020-11-18 10:42:21 -06006023 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006024 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006025 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006026 functionality is enabled when building a recipe. You should not set
6027 this variable directly. Enabling and disabling building Package Tests
6028 at build time should be done by adding "ptest" to (or removing it
6029 from) :term:`DISTRO_FEATURES`.
6030
Andrew Geisslerf0343792020-11-18 10:42:21 -06006031 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006032 The version of the recipe. The version is normally extracted from the
6033 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006034 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6035 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006036 building an unstable (i.e. development) version from a source code
6037 repository (e.g. Git or Subversion).
6038
Andrew Geissler09036742021-06-25 14:25:14 -05006039 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006040
Andrew Geisslerf0343792020-11-18 10:42:21 -06006041 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006042 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006043 :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006044 Application Binary Interface (ABI) currently in use for Python. By
6045 default, the ABI is "m". You do not have to set this variable as the
6046 OpenEmbedded build system sets it for you.
6047
6048 The OpenEmbedded build system uses the ABI to construct directory
6049 names used when installing the Python headers and libraries in
6050 sysroot (e.g. ``.../python3.3m/...``).
6051
Andrew Geisslerf0343792020-11-18 10:42:21 -06006052 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006054 :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006055 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006056 be "python3". You do not have to set this variable as the
6057 OpenEmbedded build system automatically sets it for you.
6058
6059 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006060 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006061
6062 DEPENDS += "${PYTHON_PN}-native"
6063
6064 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006065 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006066
Andrew Geisslerf0343792020-11-18 10:42:21 -06006067 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006068 The minimal command and arguments to run ``ranlib``.
6069
Andrew Geisslerf0343792020-11-18 10:42:21 -06006070 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006071 The list of packages that conflict with packages. Note that packages
6072 will not be installed if conflicting packages are not first removed.
6073
6074 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006075 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006076
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006077 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006078
6079 BitBake, which the OpenEmbedded build system uses, supports
6080 specifying versioned dependencies. Although the syntax varies
6081 depending on the packaging format, BitBake hides these differences
6082 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006083 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006084
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006085 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006086
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006087 For ``operator``, you can specify the following:
6088
6089 - =
6090 - <
6091 - >
6092 - <=
6093 - >=
6094
6095 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006096 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006097
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006098 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006099
Andrew Geisslerf0343792020-11-18 10:42:21 -06006100 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006101 Lists runtime dependencies of a package. These dependencies are other
6102 packages that must be installed in order for the package to function
6103 correctly. As an example, the following assignment declares that the
6104 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006105 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006106
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006107 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006108
6109 The most common types of package
6110 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006111 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006112 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006113 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006114 section in the Yocto Project Overview and Concepts Manual.
6115
Andrew Geissler09036742021-06-25 14:25:14 -05006116 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006117 ``bar`` and ``baz`` will be declared as dependencies inside the
6118 package ``foo`` when it is written out by one of the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006119 :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006120 Exactly how this is done depends on which package format is used,
6121 which is determined by
6122 :term:`PACKAGE_CLASSES`. When the
6123 corresponding package manager installs the package, it will know to
6124 also install the packages on which it depends.
6125
6126 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006127 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 added. This dependency is from the recipe's
6129 :ref:`ref-tasks-build` (not to be confused with
6130 :ref:`ref-tasks-compile`) task to the
6131 ``do_package_write_*`` task of the recipes that build ``bar`` and
6132 ``baz``.
6133
Andrew Geissler09036742021-06-25 14:25:14 -05006134 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006135 names of other packages - they cannot be recipe names. Although
6136 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006137 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006138 variable. For an example of the default list of packages created from
6139 a recipe, see the :term:`PACKAGES` variable.
6140
Andrew Geissler09036742021-06-25 14:25:14 -05006141 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006142 you should always use the variable in a form with an attached package
6143 name (remember that a single recipe can build multiple packages). For
6144 example, suppose you are building a development package that depends
6145 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006146 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006147
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006148 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006149
6150 In the example,
6151 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006152 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006153 the variable.
6154
6155 .. note::
6156
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006157 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006158 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006159 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006160 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006161 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006162
Andrew Geissler09036742021-06-25 14:25:14 -05006163 The package names you use with :term:`RDEPENDS` must appear as they would
6164 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006165 allows a different name to be used for the final package (e.g. the
6166 :ref:`debian <ref-classes-debian>` class uses this to rename
6167 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006168 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006169 independent of the package format used.
6170
6171 BitBake, which the OpenEmbedded build system uses, supports
6172 specifying versioned dependencies. Although the syntax varies
6173 depending on the packaging format, BitBake hides these differences
6174 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006175 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006176
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006177 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006178
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006179 For ``operator``, you can specify the following:
6180
6181 - =
6182 - <
6183 - >
6184 - <=
6185 - >=
6186
6187 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006188
6189 .. note::
6190
Andrew Geissler09036742021-06-25 14:25:14 -05006191 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006192 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006193
6194 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006195 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006196
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006197 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006198
6199 For information on build-time dependencies, see the
6200 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006201 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6202 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006203 BitBake User Manual for additional information on tasks and
6204 dependencies.
6205
Andrew Geissler5199d832021-09-24 16:47:35 -05006206 :term:`RECIPE_NO_UPDATE_REASON`
6207 If a recipe should not be replaced by a more recent upstream version,
6208 putting the reason why in this variable in a recipe allows
6209 ``devtool check-upgrade-status`` command to display it, as explained
6210 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6211 section.
6212
Andrew Geisslerf0343792020-11-18 10:42:21 -06006213 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006214 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006215 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006216 class, this variable identifies distribution features that must exist
6217 in the current configuration in order for the OpenEmbedded build
6218 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006219 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6220 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006221 the recipe will be skipped, and if the build system attempts to build
6222 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006223
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006224 :term:`REQUIRED_VERSION`
6225 If there are multiple versions of a recipe available, this variable
6226 determines which version should be given preference.
6227 :term:`REQUIRED_VERSION` works in exactly the same manner as
6228 :term:`PREFERRED_VERSION`, except that if the specified version is not
6229 available then an error message is shown and the build fails
6230 immediately.
6231
6232 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6233 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6234
Andrew Geisslerf0343792020-11-18 10:42:21 -06006235 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006236 With ``rm_work`` enabled, this variable specifies a list of recipes
6237 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006238 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006239 details.
6240
Andrew Geisslerf0343792020-11-18 10:42:21 -06006241 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006242 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006243 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006244
6245 ROOT_HOME ??= "/home/root"
6246
6247 .. note::
6248
6249 This default value is likely used because some embedded solutions
6250 prefer to have a read-only root filesystem and prefer to keep
6251 writeable data in one place.
6252
6253 You can override the default by setting the variable in any layer or
6254 in the ``local.conf`` file. Because the default is set using a "weak"
6255 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006256 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006257
6258 ROOT_HOME = "/root"
6259 ROOT_HOME ?= "/root"
6260
6261 These
6262 override examples use ``/root``, which is probably the most commonly
6263 used override.
6264
Andrew Geisslerf0343792020-11-18 10:42:21 -06006265 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006266 Indicates a filesystem image to include as the root filesystem.
6267
Andrew Geissler09036742021-06-25 14:25:14 -05006268 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006269 :ref:`image-live <ref-classes-image-live>` class.
6270
Andrew Geisslerf0343792020-11-18 10:42:21 -06006271 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006272 Specifies a list of functions to call after the OpenEmbedded build
6273 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006274 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006275
6276 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6277
6278 If you need to pass the root filesystem path to a command within a
6279 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6280 directory that becomes the root filesystem image. See the
6281 :term:`IMAGE_ROOTFS` variable for more
6282 information.
6283
Andrew Geisslerf0343792020-11-18 10:42:21 -06006284 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006285 Specifies a list of functions to call once the OpenEmbedded build
6286 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006287 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006288
6289 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6290
6291 If you need to pass the root filesystem path to a command within a
6292 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6293 directory that becomes the root filesystem image. See the
6294 :term:`IMAGE_ROOTFS` variable for more
6295 information.
6296
Andrew Geisslerf0343792020-11-18 10:42:21 -06006297 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006298 Specifies a list of functions to call after the OpenEmbedded build
6299 system has removed unnecessary packages. When runtime package
6300 management is disabled in the image, several packages are removed
6301 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006302 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006303
6304 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6305
6306 If you need to pass the root filesystem path to a command within a
6307 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6308 directory that becomes the root filesystem image. See the
6309 :term:`IMAGE_ROOTFS` variable for more
6310 information.
6311
Andrew Geisslerf0343792020-11-18 10:42:21 -06006312 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006313 Specifies a list of functions to call before the OpenEmbedded build
6314 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006315 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006316
6317 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6318
6319 If you need to pass the root filesystem path to a command within a
6320 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6321 directory that becomes the root filesystem image. See the
6322 :term:`IMAGE_ROOTFS` variable for more
6323 information.
6324
Andrew Geisslerf0343792020-11-18 10:42:21 -06006325 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006326 A list of package name aliases that a package also provides. These
6327 aliases are useful for satisfying runtime dependencies of other
6328 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006329 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006330
6331 .. note::
6332
Andrew Geissler09036742021-06-25 14:25:14 -05006333 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006334
6335 As with all package-controlling variables, you must always use the
6336 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006337 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006338
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006339 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006340
Andrew Geisslerf0343792020-11-18 10:42:21 -06006341 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006342 A list of packages that extends the usability of a package being
6343 built. The package being built does not depend on this list of
6344 packages in order to successfully build, but rather uses them for
6345 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006346 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006347
Andrew Geissler09036742021-06-25 14:25:14 -05006348 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006349 list of packages when installing the built package. However, you can
6350 prevent listed packages from being installed by using the
6351 :term:`BAD_RECOMMENDATIONS`,
6352 :term:`NO_RECOMMENDATIONS`, and
6353 :term:`PACKAGE_EXCLUDE` variables.
6354
Andrew Geissler09036742021-06-25 14:25:14 -05006355 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006356 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006357 through the :term:`PACKAGES` or
6358 :term:`PACKAGES_DYNAMIC` variables or the
6359 :term:`RPROVIDES` variable, or an error will occur
6360 during the build. If such a recipe does exist and the package is not
6361 produced, the build continues without error.
6362
Andrew Geissler09036742021-06-25 14:25:14 -05006363 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006364 you should always attach an override to the variable to specify the
6365 particular package whose usability is being extended. For example,
6366 suppose you are building a development package that is extended to
6367 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006368 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006369
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006370 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006371
6372 In the
6373 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006374 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006375 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006376
6377 BitBake, which the OpenEmbedded build system uses, supports
6378 specifying versioned recommends. Although the syntax varies depending
6379 on the packaging format, BitBake hides these differences from you.
6380 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006381 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006382
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006383 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006384
6385 For ``operator``, you can specify the following:
6386
6387 - =
6388 - <
6389 - >
6390 - <=
6391 - >=
6392
6393 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006394 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006395
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006396 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006397
Andrew Geisslerf0343792020-11-18 10:42:21 -06006398 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006399 A list of packages replaced by a package. The package manager uses
6400 this variable to determine which package should be installed to
6401 replace other package(s) during an upgrade. In order to also have the
6402 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006403 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006404
6405 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006406 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006407
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006408 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006409
6410 BitBake, which the OpenEmbedded build system uses, supports
6411 specifying versioned replacements. Although the syntax varies
6412 depending on the packaging format, BitBake hides these differences
6413 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006414 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006415
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006416 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006417
6418 For ``operator``, you can specify the following:
6419
6420 - =
6421 - <
6422 - >
6423 - <=
6424 - >=
6425
6426 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006427 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006428
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006429 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006430
Andrew Geisslerf0343792020-11-18 10:42:21 -06006431 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006432 A list of additional packages that you can suggest for installation
6433 by the package manager at the time a package is installed. Not all
6434 package managers support this functionality.
6435
6436 As with all package-controlling variables, you must always use this
6437 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006438 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006439
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006440 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006441
Andrew Geisslerf0343792020-11-18 10:42:21 -06006442 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006443 The location in the :term:`Build Directory` where
6444 unpacked recipe source code resides. By default, this directory is
6445 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6446 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6447 version. If the source tarball extracts the code to a directory named
6448 anything other than ``${BPN}-${PV}``, or if the source code is
6449 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006450 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006451 to find the unpacked source.
6452
6453 As an example, assume a :term:`Source Directory`
6454 top-level folder named ``poky`` and a default Build Directory at
6455 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006456 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006457
6458 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6459
6460 The unpacked source code resides in the ``db-5.1.19`` folder.
6461
6462 This next example assumes a Git repository. By default, Git
6463 repositories are cloned to ``${WORKDIR}/git`` during
6464 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006465 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006466 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006467
Andrew Geissler9aee5002022-03-30 16:27:02 +00006468 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006469 S = "${WORKDIR}/git"
6470
Andrew Geisslerf0343792020-11-18 10:42:21 -06006471 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006472 Specifies a list of command-line utilities that should be checked for
6473 during the initial sanity checking process when running BitBake. If
6474 any of the utilities are not installed on the build host, then
6475 BitBake immediately exits with an error.
6476
Andrew Geisslerf0343792020-11-18 10:42:21 -06006477 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006478 A list of the host distribution identifiers that the build system has
6479 been tested against. Identifiers consist of the host distributor ID
6480 followed by the release, as reported by the ``lsb_release`` tool or
6481 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006482 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006483 not empty and the current value of
6484 :term:`NATIVELSBSTRING` does not appear in the
6485 list, then the build system reports a warning that indicates the
6486 current host distribution has not been tested as a build host.
6487
Andrew Geisslerf0343792020-11-18 10:42:21 -06006488 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006489 The target architecture for the SDK. Typically, you do not directly
6490 set this variable. Instead, use :term:`SDKMACHINE`.
6491
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006492 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006493 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006494 "1" and a ``conf/templateconf.conf`` file exists in the build directory
6495 (:term:`TOPDIR`) then this will be copied into the SDK.
6496
Andrew Geisslerf0343792020-11-18 10:42:21 -06006497 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006498 The directory set up and used by the
6499 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6500 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006501 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006502
6503 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6504
Andrew Geisslerf0343792020-11-18 10:42:21 -06006505 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006506 The parent directory used by the OpenEmbedded build system when
6507 creating SDK output. The
6508 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006509 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006510
6511 SDK_DIR = "${WORKDIR}/sdk"
6512
6513 .. note::
6514
Andrew Geissler09036742021-06-25 14:25:14 -05006515 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6516 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006517
Andrew Geisslerf0343792020-11-18 10:42:21 -06006518 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006519 Controls whether or not shared state artifacts are copied into the
6520 extensible SDK. The default value of "full" copies all of the
6521 required shared state artifacts into the extensible SDK. The value
6522 "minimal" leaves these artifacts out of the SDK.
6523
6524 .. note::
6525
6526 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006527 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6528 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006529
Andrew Geisslerf0343792020-11-18 10:42:21 -06006530 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006531 The manifest file for the host part of the SDK. This file lists all
6532 the installed packages that make up the host part of the SDK. The
6533 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006534 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006535
6536 packagename packagearch version
6537
6538 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006539 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006540
6541 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6542
6543 The location is derived using the :term:`SDK_DEPLOY` and
6544 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6545
Andrew Geisslerf0343792020-11-18 10:42:21 -06006546 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006547 When set to "1", specifies to include the packagedata for all recipes
6548 in the "world" target in the extensible SDK. Including this data
6549 allows the ``devtool search`` command to find these recipes in search
6550 results, as well as allows the ``devtool add`` command to map
6551 dependencies more effectively.
6552
6553 .. note::
6554
Andrew Geissler09036742021-06-25 14:25:14 -05006555 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006556 variable significantly increases build time because all of world
6557 needs to be built. Enabling the variable also slightly increases
6558 the size of the extensible SDK.
6559
Andrew Geisslerf0343792020-11-18 10:42:21 -06006560 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006561 When set to "1", specifies to include the toolchain in the extensible
6562 SDK. Including the toolchain is useful particularly when
6563 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6564 the SDK reasonably small but you still want to provide a usable
6565 toolchain. For example, suppose you want to use the toolchain from an
6566 IDE or from other tools and you do not want to perform additional
6567 steps to install the toolchain.
6568
Andrew Geissler09036742021-06-25 14:25:14 -05006569 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6570 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6571 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006572
Andrew Geisslerf0343792020-11-18 10:42:21 -06006573 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006574 The base name for SDK output files. The name is derived from the
6575 :term:`DISTRO`, :term:`TCLIBC`,
6576 :term:`SDK_ARCH`,
6577 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006578 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006579
6580 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6581
Andrew Geisslerf0343792020-11-18 10:42:21 -06006582 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006583 Specifies the operating system for which the SDK will be built. The
6584 default value is the value of :term:`BUILD_OS`.
6585
Andrew Geisslerf0343792020-11-18 10:42:21 -06006586 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006587 The location used by the OpenEmbedded build system when creating SDK
6588 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006589 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006590
6591 SDK_DIR = "${WORKDIR}/sdk"
6592 SDK_OUTPUT = "${SDK_DIR}/image"
6593 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6594
6595 .. note::
6596
Andrew Geissler09036742021-06-25 14:25:14 -05006597 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006598 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6599 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006600
Andrew Geisslerf0343792020-11-18 10:42:21 -06006601 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006602 Specifies a list of architectures compatible with the SDK machine.
6603 This variable is set automatically and should not normally be
6604 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006605 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006606 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6607
Andrew Geisslerf0343792020-11-18 10:42:21 -06006608 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006609 Specifies a list of functions to call once the OpenEmbedded build
6610 system creates the SDK. You can specify functions separated by
6611 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6612
6613 If you need to pass an SDK path to a command within a function, you
6614 can use ``${SDK_DIR}``, which points to the parent directory used by
6615 the OpenEmbedded build system when creating SDK output. See the
6616 :term:`SDK_DIR` variable for more information.
6617
Andrew Geisslerf0343792020-11-18 10:42:21 -06006618 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006619 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006620 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006621 :term:`TARGET_PREFIX` when building
6622 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6623
Andrew Geisslerf0343792020-11-18 10:42:21 -06006624 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006625 A list of shared state tasks added to the extensible SDK. By default,
6626 the following tasks are added:
6627
6628 - do_populate_lic
6629 - do_package_qa
6630 - do_populate_sysroot
6631 - do_deploy
6632
6633 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006634 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006635 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006636 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006637 tasks that are needed in order to build
6638 :term:`SDK_TARGETS`).
6639
Andrew Geisslerf0343792020-11-18 10:42:21 -06006640 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006641 Specifies the system, including the architecture and the operating
6642 system, for which the SDK will be built.
6643
6644 The OpenEmbedded build system automatically sets this variable based
6645 on :term:`SDK_ARCH`,
6646 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006647 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006648 variable yourself.
6649
Andrew Geisslerf0343792020-11-18 10:42:21 -06006650 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006651 The manifest file for the target part of the SDK. This file lists all
6652 the installed packages that make up the target part of the SDK. The
6653 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006654 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006655
6656 packagename packagearch version
6657
6658 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006659 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006660
6661 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6662
6663 The location is derived using the :term:`SDK_DEPLOY` and
6664 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6665
Andrew Geisslerf0343792020-11-18 10:42:21 -06006666 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006667 A list of targets to install from shared state as part of the
6668 standard or extensible SDK installation. The default value is "${PN}"
6669 (i.e. the image from which the SDK is built).
6670
Andrew Geissler09036742021-06-25 14:25:14 -05006671 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006672 would not be changed.
6673
Andrew Geisslerf0343792020-11-18 10:42:21 -06006674 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006675 The title to be printed when running the SDK installer. By default,
6676 this title is based on the :term:`DISTRO_NAME` or
6677 :term:`DISTRO` variable and is set in the
6678 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006679 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006680
6681 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6682
6683 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006684 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006685
6686 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006687 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006688 section in the Yocto Project Application Development and the
6689 Extensible Software Development Kit (eSDK) manual.
6690
Andrew Geisslerf0343792020-11-18 10:42:21 -06006691 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006692 An optional URL for an update server for the extensible SDK. If set,
6693 the value is used as the default update server when running
6694 ``devtool sdk-update`` within the extensible SDK.
6695
Andrew Geisslerf0343792020-11-18 10:42:21 -06006696 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006697 Specifies the name of the SDK vendor.
6698
Andrew Geisslerf0343792020-11-18 10:42:21 -06006699 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006700 Specifies the version of the SDK. The Poky distribution configuration file
6701 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006702 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006703
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006704 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006705
6706 For additional information, see the
6707 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006708 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006709
Andrew Geisslerf0343792020-11-18 10:42:21 -06006710 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006711 The default installation directory for the Extensible SDK. By
6712 default, this directory is based on the :term:`DISTRO`
6713 variable and is set in the
6714 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006715 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006716
6717 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6718
6719 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006720 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006721
6722 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006723 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006724 section in the Yocto Project Application Development and the
6725 Extensible Software Development Kit (eSDK) manual.
6726
Andrew Geisslerf0343792020-11-18 10:42:21 -06006727 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006728 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006729 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006730
6731 $ bitbake -c populate_sdk imagename
6732
Andrew Geisslerf0343792020-11-18 10:42:21 -06006733 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00006734 The machine for which the SDK is built. In other words, the SDK is built
6735 such that it runs on the target you specify with the :term:`SDKMACHINE`
6736 value. The value points to a corresponding ``.conf`` file under
6737 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6738 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6739 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006740
Andrew Geissler595f6302022-01-24 19:11:47 +00006741 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6742 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006743
6744 .. note::
6745
Andrew Geissler09036742021-06-25 14:25:14 -05006746 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006747 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00006748 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006749
Andrew Geisslerf0343792020-11-18 10:42:21 -06006750 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006751 Defines the path offered to the user for installation of the SDK that
6752 is generated by the OpenEmbedded build system. The path appears as
6753 the default location for installing the SDK when you run the SDK's
6754 installation script. You can override the offered path when you run
6755 the script.
6756
Andrew Geisslerf0343792020-11-18 10:42:21 -06006757 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006758 The full path to the sysroot used for cross-compilation within an SDK
6759 as it will be when installed into the default
6760 :term:`SDKPATH`.
6761
Andrew Geisslerf0343792020-11-18 10:42:21 -06006762 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006763 The section in which packages should be categorized. Package
6764 management utilities can make use of this variable.
6765
Andrew Geisslerf0343792020-11-18 10:42:21 -06006766 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767 Specifies the optimization flags passed to the C compiler when
6768 building for the target. The flags are passed through the default
6769 value of the :term:`TARGET_CFLAGS` variable.
6770
Andrew Geissler09036742021-06-25 14:25:14 -05006771 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006772 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6773 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006774
Andrew Geisslerf0343792020-11-18 10:42:21 -06006775 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006776 Defines a serial console (TTY) to enable using
6777 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6778 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006779 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006780
6781 SERIAL_CONSOLE = "115200 ttyS0"
6782
6783 .. note::
6784
Andrew Geissler09036742021-06-25 14:25:14 -05006785 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006786 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006787
Andrew Geisslerf0343792020-11-18 10:42:21 -06006788 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006789 Defines a serial console (TTY) to enable using
6790 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6791 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006792 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006793
6794 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6795
Andrew Geisslerf0343792020-11-18 10:42:21 -06006796 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006797 Specifies serial consoles, which must be listed in
6798 :term:`SERIAL_CONSOLES`, to check against
6799 ``/proc/console`` before enabling them using getty. This variable
6800 allows aliasing in the format: <device>:<alias>. If a device was
6801 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006802 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006803
6804 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6805
6806 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006807 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6808 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6809 incompatible with customizations such as the following::
6810
6811 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006812
Andrew Geissler595f6302022-01-24 19:11:47 +00006813 :term:`SETUPTOOLS_BUILD_ARGS`
6814 When used by recipes that inherit the
6815 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6816 be used to specify additional arguments to be passed to ``setup.py build``
6817 in the ``setuptools3_do_compile()`` task.
6818
6819 :term:`SETUPTOOLS_INSTALL_ARGS`
6820 When used by recipes that inherit the
6821 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6822 be used to specify additional arguments to be passed to ``setup.py install``
6823 in the ``setuptools3_do_install()`` task.
6824
6825 :term:`SETUPTOOLS_SETUP_PATH`
6826 When used by recipes that inherit the
6827 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6828 be used to specify the directory in which the ``setup.py`` file is
6829 located if it is not at the root of the source tree (as specified by
6830 :term:`S`). For example, in a recipe where the sources are fetched from
6831 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6832 subdirectory, you would have this::
6833
6834 S = "${WORKDIR}/git"
6835 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6836
Andrew Geisslerf0343792020-11-18 10:42:21 -06006837 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006838 A list of recipe dependencies that should not be used to determine
6839 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006840 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006841
6842 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6843
6844 In the previous example, ``intone`` depends on ``mplayer2``.
6845
6846 You can use the special token ``"*"`` on the left-hand side of the
6847 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006848 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006849
6850 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6851
6852 In the previous example, all recipes except ``quilt-native`` ignore
6853 task signatures from the ``quilt-native`` recipe when determining
6854 their task signatures.
6855
6856 Use of this variable is one mechanism to remove dependencies that
6857 affect task signatures and thus force rebuilds when a recipe changes.
6858
6859 .. note::
6860
6861 If you add an inappropriate dependency for a recipe relationship,
6862 the software might break during runtime if the interface of the
6863 second recipe was changed after the first recipe had been built.
6864
Andrew Geisslerf0343792020-11-18 10:42:21 -06006865 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006866 A list of recipes that are completely stable and will never change.
6867 The ABI for the recipes in the list are presented by output from the
6868 tasks run to build the recipe. Use of this variable is one way to
6869 remove dependencies from one recipe on another that affect task
6870 signatures and thus force rebuilds when the recipe changes.
6871
6872 .. note::
6873
6874 If you add an inappropriate variable to this list, the software
6875 might break at runtime if the interface of the recipe was changed
6876 after the other had been built.
6877
Andrew Geisslerf0343792020-11-18 10:42:21 -06006878 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006879 Specifies the number of bits for the target system CPU. The value
6880 should be either "32" or "64".
6881
Andrew Geisslerf0343792020-11-18 10:42:21 -06006882 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006883 Specifies the endian byte order of the target system. The value
6884 should be either "le" for little-endian or "be" for big-endian.
6885
Andrew Geisslerf0343792020-11-18 10:42:21 -06006886 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006887 Enables removal of all files from the "Provides" section of an RPM
6888 package. Removal of these files is required for packages containing
6889 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6890
6891 To enable file removal, set the variable to "1" in your
6892 ``conf/local.conf`` configuration file in your:
6893 :term:`Build Directory`.
6894 ::
6895
6896 SKIP_FILEDEPS = "1"
6897
Andrew Geissler9aee5002022-03-30 16:27:02 +00006898 :term:`SKIP_RECIPE`
6899 Used to prevent the OpenEmbedded build system from building a given
6900 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
6901 and provide a reason, which will be reported when attempting to
6902 build the recipe.
6903
6904 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
6905 variable in your ``local.conf`` file or distribution configuration.
6906 Here is an example which prevents ``myrecipe`` from being built::
6907
6908 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
6909
Andrew Geisslerf0343792020-11-18 10:42:21 -06006910 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006911 Groups together machines based upon the same family of SOC (System On
6912 Chip). You typically set this variable in a common ``.inc`` file that
6913 you include in the configuration files of all the machines.
6914
6915 .. note::
6916
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006917 You must include ``conf/machine/include/soc-family.inc`` for this
6918 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919
Andrew Geisslerf0343792020-11-18 10:42:21 -06006920 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006921 Defines the suffix for shared libraries used on the target platform.
6922 By default, this suffix is ".so.*" for all Linux-based systems and is
6923 defined in the ``meta/conf/bitbake.conf`` configuration file.
6924
6925 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006926 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006927
Andrew Geisslerf0343792020-11-18 10:42:21 -06006928 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006929 Defines the suffix for the development symbolic link (symlink) for
6930 shared libraries on the target platform. By default, this suffix is
6931 ".so" for Linux-based systems and is defined in the
6932 ``meta/conf/bitbake.conf`` configuration file.
6933
6934 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006935 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006936
Andrew Geisslereff27472021-10-29 15:35:00 -05006937 :term:`SOURCE_DATE_EPOCH`
6938 This defines a date expressed in number of seconds since
6939 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
6940 multiple build systems to force a timestamp in built binaries.
6941 Many upstream projects already support this variable.
6942
6943 You will find more details in the `official specifications
6944 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
6945
6946 A value for each recipe is computed from the sources by
6947 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
6948
6949 If a recipe wishes to override the default behavior, it should set its
6950 own :term:`SOURCE_DATE_EPOCH` value::
6951
6952 SOURCE_DATE_EPOCH = "1613559011"
6953
Andrew Geisslerf0343792020-11-18 10:42:21 -06006954 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006955 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05006956 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006957 your ``local.conf`` configuration file ensures the source for all
6958 recipes are fetched regardless of whether or not a recipe is
6959 compatible with the configuration. A recipe is considered
6960 incompatible with the currently configured machine when either or
6961 both the :term:`COMPATIBLE_MACHINE`
6962 variable and :term:`COMPATIBLE_HOST` variables
6963 specify compatibility with a machine other than that of the current
6964 machine or host.
6965
6966 .. note::
6967
Andrew Geissler09036742021-06-25 14:25:14 -05006968 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006969 variable unless you are creating a source mirror. In other words,
6970 do not set the variable during a normal build.
6971
Andrew Geisslerf0343792020-11-18 10:42:21 -06006972 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006973 Defines your own :term:`PREMIRRORS` from which to
6974 first fetch source before attempting to fetch from the upstream
6975 specified in :term:`SRC_URI`.
6976
6977 To use this variable, you must globally inherit the
6978 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05006979 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006980
6981 INHERIT += "own-mirrors"
6982 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
6983
6984 .. note::
6985
Andrew Geissler09036742021-06-25 14:25:14 -05006986 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006987
Andrew Geisslerf0343792020-11-18 10:42:21 -06006988 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006989 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05006990 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006991 mappings, see the ``meta/conf/licenses.conf`` file.
6992
6993 For additional information, see the :term:`LICENSE`
6994 variable.
6995
Andrew Geisslerf0343792020-11-18 10:42:21 -06006996 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006997 A list of prefixes for :term:`PN` used by the OpenEmbedded
6998 build system to create variants of recipes or packages. The list
6999 specifies the prefixes to strip off during certain circumstances such
7000 as the generation of the :term:`BPN` variable.
7001
Andrew Geisslerf0343792020-11-18 10:42:21 -06007002 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007003 The file type for the Secondary Program Loader (SPL). Some devices
7004 use an SPL from which to boot (e.g. the BeagleBone development
7005 board). For such cases, you can declare the file type of the SPL
7006 binary in the ``u-boot.inc`` include file, which is used in the
7007 U-Boot recipe.
7008
7009 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007010 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007011
7012 # Some versions of u-boot build an SPL (Second Program Loader) image that
7013 # should be packaged along with the u-boot binary as well as placed in the
7014 # deploy directory. For those versions they can set the following variables
7015 # to allow packaging the SPL.
7016 SPL_BINARY ?= ""
7017 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7018 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7019 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7020
Andrew Geissler09036742021-06-25 14:25:14 -05007021 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007022 various ``SPL_*`` variables used by the OpenEmbedded build system.
7023
7024 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007025 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007026 section in the Yocto Project Board Support Package Developer's Guide
7027 for additional information.
7028
Andrew Geisslerf0343792020-11-18 10:42:21 -06007029 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007030
Andrew Geissler595f6302022-01-24 19:11:47 +00007031 See the BitBake manual for the initial description for this variable:
7032 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007033
Andrew Geissler595f6302022-01-24 19:11:47 +00007034 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007035
Andrew Geissler595f6302022-01-24 19:11:47 +00007036 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007037
7038 - ``apply`` - Whether to apply the patch or not. The default
7039 action is to apply the patch.
7040
7041 - ``striplevel`` - Which striplevel to use when applying the
7042 patch. The default level is 1.
7043
7044 - ``patchdir`` - Specifies the directory in which the patch should
7045 be applied. The default is ``${``\ :term:`S`\ ``}``.
7046
7047 Here are options specific to recipes building code from a revision
7048 control system:
7049
7050 - ``mindate`` - Apply the patch only if
7051 :term:`SRCDATE` is equal to or greater than
7052 ``mindate``.
7053
Andrew Geissler09036742021-06-25 14:25:14 -05007054 - ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007055 than ``maxdate``.
7056
Andrew Geissler09036742021-06-25 14:25:14 -05007057 - ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007058 greater than ``minrev``.
7059
Andrew Geissler09036742021-06-25 14:25:14 -05007060 - ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007061 than ``maxrev``.
7062
Andrew Geissler09036742021-06-25 14:25:14 -05007063 - ``rev`` - Apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007064 ``rev``.
7065
Andrew Geissler09036742021-06-25 14:25:14 -05007066 - ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007067 ``rev``.
7068
Andrew Geissler595f6302022-01-24 19:11:47 +00007069 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007070
Andrew Geissler595f6302022-01-24 19:11:47 +00007071 If you want the build system to pick up files specified through
7072 a :term:`SRC_URI` statement from your append file, you need to be
7073 sure to extend the :term:`FILESPATH` variable by also using the
7074 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007075
Andrew Geisslerf0343792020-11-18 10:42:21 -06007076 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007077 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007078 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007079 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007080 variable to "0" disables this behavior.
7081
Andrew Geisslerf0343792020-11-18 10:42:21 -06007082 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007083 The date of the source code used to build the package. This variable
7084 applies only if the source was fetched from a Source Code Manager
7085 (SCM).
7086
Andrew Geisslerf0343792020-11-18 10:42:21 -06007087 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007088 Returns the version string of the current package. This string is
7089 used to help define the value of :term:`PV`.
7090
Andrew Geissler09036742021-06-25 14:25:14 -05007091 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007092 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007093 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007094
7095 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7096
Andrew Geissler09036742021-06-25 14:25:14 -05007097 Recipes that need to define :term:`PV` do so with the help of the
7098 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007099 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007100 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007101
7102 PV = "0.12-git${SRCPV}"
7103
Andrew Geisslerf0343792020-11-18 10:42:21 -06007104 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007105 The revision of the source code used to build the package. This
7106 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7107 that if you want to build a fixed revision and you want to avoid
7108 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007109 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007110 identifier and not just a tag.
7111
7112 .. note::
7113
7114 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007115 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007116 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007117 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007118 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007119
Andrew Geissler09036742021-06-25 14:25:14 -05007120 :term:`SRCTREECOVEREDTASKS`
7121 A list of tasks that are typically not relevant (and therefore skipped)
7122 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7123 class. The default value as set in that class file is the set of tasks
7124 that are rarely needed when using external source::
7125
7126 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7127
7128 The notable exception is when processing external kernel source as
7129 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7130 class file (formatted for aesthetics)::
7131
7132 SRCTREECOVEREDTASKS += "\
7133 do_validate_branches \
7134 do_kernel_configcheck \
7135 do_kernel_checkout \
7136 do_fetch \
7137 do_unpack \
7138 do_patch \
7139 "
7140
7141 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7142 variables for more information.
7143
Andrew Geisslerf0343792020-11-18 10:42:21 -06007144 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007145 The directory for the shared state cache.
7146
Andrew Geisslerf0343792020-11-18 10:42:21 -06007147 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007148 If set to "1", allows fetches from mirrors that are specified in
7149 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007150 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7151 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7152 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007153 your shared state cache, but you want to disable any other fetching
7154 from the network.
7155
Andrew Geisslerf0343792020-11-18 10:42:21 -06007156 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007157 Configures the OpenEmbedded build system to search other mirror
7158 locations for prebuilt cache data objects before building out the
7159 data. This variable works like fetcher :term:`MIRRORS`
7160 and :term:`PREMIRRORS` and points to the cache
7161 locations to check for the shared state (sstate) objects.
7162
7163 You can specify a filesystem directory or a remote URL such as HTTP
7164 or FTP. The locations you specify need to contain the shared state
7165 cache (sstate-cache) results from previous builds. The sstate-cache
7166 you point to can also be from builds on other machines.
7167
7168 When pointing to sstate build artifacts on another machine that uses
7169 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007170 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007171 paths to server paths. The paths need to take into account
7172 :term:`NATIVELSBSTRING` set by the
7173 :ref:`uninative <ref-classes-uninative>` class. For example, the
7174 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007175 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007176
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007177 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007178
7179 If a mirror uses the same structure as
7180 :term:`SSTATE_DIR`, you need to add "PATH" at the
7181 end as shown in the examples below. The build system substitutes the
7182 correct path within the directory structure.
7183 ::
7184
7185 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007186 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007187 file://.* file:///some-local-dir/sstate/PATH"
7188
Andrew Geisslerf0343792020-11-18 10:42:21 -06007189 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007190 Controls the list of files the OpenEmbedded build system scans for
7191 hardcoded installation paths. The variable uses a space-separated
7192 list of filenames (not paths) with standard wildcard characters
7193 allowed.
7194
7195 During a build, the OpenEmbedded build system creates a shared state
7196 (sstate) object during the first stage of preparing the sysroots.
7197 That object is scanned for hardcoded paths for original installation
7198 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007199 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7200 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007201 than the variable being comprehensively set. The
7202 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7203 of files.
7204
7205 For details on the process, see the
7206 :ref:`staging <ref-classes-staging>` class.
7207
Andrew Geisslerf0343792020-11-18 10:42:21 -06007208 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007209 Specifies the path to the ``/lib`` subdirectory of the sysroot
7210 directory for the build host.
7211
Andrew Geisslerf0343792020-11-18 10:42:21 -06007212 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007213 Specifies the path to the ``/lib`` subdirectory of the sysroot
7214 directory for the target for which the current recipe is being built
7215 (:term:`STAGING_DIR_HOST`).
7216
Andrew Geisslerf0343792020-11-18 10:42:21 -06007217 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007218 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7219 directory for the target for which the current recipe is being built
7220 (:term:`STAGING_DIR_HOST`).
7221
Andrew Geisslerf0343792020-11-18 10:42:21 -06007222 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007223 Specifies the path to the directory containing binary configuration
7224 scripts. These scripts provide configuration information for other
7225 software that wants to make use of libraries or include files
7226 provided by the software associated with the script.
7227
7228 .. note::
7229
7230 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007231 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7232 library to which you are linking, it is recommended you use
7233 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007234
Andrew Geisslerf0343792020-11-18 10:42:21 -06007235 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007236 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7237 directory for the build host.
7238
Andrew Geisslerf0343792020-11-18 10:42:21 -06007239 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007240 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7241 directory for the target for which the current recipe is being built
7242 (:term:`STAGING_DIR_HOST`).
7243
Andrew Geisslerf0343792020-11-18 10:42:21 -06007244 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007245 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7246 directory for the build host.
7247
Andrew Geisslerf0343792020-11-18 10:42:21 -06007248 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007249 Helps construct the ``recipe-sysroots`` directory, which is used
7250 during packaging.
7251
7252 For information on how staging for recipe-specific sysroots occurs,
7253 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007254 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007255 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007256 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007257 section in the Yocto Project Overview and Concepts Manual, and the
7258 :term:`SYSROOT_DIRS` variable.
7259
7260 .. note::
7261
Andrew Geissler09036742021-06-25 14:25:14 -05007262 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007263 directory because the OpenEmbedded build system manages the
7264 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007265 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007266 task and then the OpenEmbedded build system will stage a subset of
7267 those files into the sysroot.
7268
Andrew Geisslerf0343792020-11-18 10:42:21 -06007269 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007270 Specifies the path to the sysroot directory for the system on which
7271 the component is built to run (the system that hosts the component).
7272 For most recipes, this sysroot is the one in which that recipe's
7273 :ref:`ref-tasks-populate_sysroot` task copies
7274 files. Exceptions include ``-native`` recipes, where the
7275 ``do_populate_sysroot`` task instead uses
7276 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007277 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007278 have the following values:
7279
7280 - For recipes building for the target machine, the value is
7281 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7282
7283 - For native recipes building for the build host, the value is empty
7284 given the assumption that when building for the build host, the
7285 build host's own directories should be used.
7286
7287 .. note::
7288
7289 ``-native`` recipes are not installed into host paths like such
7290 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007291 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007292 standard build environment variables such as
7293 :term:`CPPFLAGS` and
7294 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007295 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007296 headers using, for example, GCC's ``-isystem`` option.
7297
7298 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7299 should be viewed as input variables by tasks such as
7300 :ref:`ref-tasks-configure`,
7301 :ref:`ref-tasks-compile`, and
7302 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007303 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007304 for ``-native`` recipes, as they make use of host headers and
7305 libraries.
7306
Andrew Geisslerf0343792020-11-18 10:42:21 -06007307 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007308 Specifies the path to the sysroot directory used when building
7309 components that run on the build host itself.
7310
Andrew Geisslerf0343792020-11-18 10:42:21 -06007311 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007312 Specifies the path to the sysroot used for the system for which the
7313 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007314 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007315 :term:`STAGING_DIR_HOST`.
7316
7317 Some recipes build binaries that can run on the target system but
7318 those binaries in turn generate code for another different system
7319 (e.g. cross-canadian recipes). Using terminology from GNU, the
7320 primary system is referred to as the "HOST" and the secondary, or
7321 different, system is referred to as the "TARGET". Thus, the binaries
7322 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007323 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7324 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007325 sysroot used for the "TARGET" system.
7326
Andrew Geisslerf0343792020-11-18 10:42:21 -06007327 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007328 Specifies the path to the ``/etc`` subdirectory of the sysroot
7329 directory for the build host.
7330
Andrew Geisslerf0343792020-11-18 10:42:21 -06007331 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007332 Specifies the path to the ``/usr`` subdirectory of the sysroot
7333 directory for the target for which the current recipe is being built
7334 (:term:`STAGING_DIR_HOST`).
7335
Andrew Geisslerf0343792020-11-18 10:42:21 -06007336 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007337 Specifies the path to the ``/usr/include`` subdirectory of the
7338 sysroot directory for the target for which the current recipe being
7339 built (:term:`STAGING_DIR_HOST`).
7340
Andrew Geisslerf0343792020-11-18 10:42:21 -06007341 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007342 Specifies the path to the ``/usr/include`` subdirectory of the
7343 sysroot directory for the build host.
7344
Andrew Geisslerf0343792020-11-18 10:42:21 -06007345 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007346 Points to the directory containing the kernel build artifacts.
7347 Recipes building software that needs to access kernel build artifacts
7348 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007349 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007350 after the kernel has been built.
7351
Andrew Geisslerf0343792020-11-18 10:42:21 -06007352 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007353 The directory with kernel headers that are required to build
7354 out-of-tree modules.
7355
Andrew Geisslerf0343792020-11-18 10:42:21 -06007356 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007357 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7358 directory for the target for which the current recipe is being built
7359 (:term:`STAGING_DIR_HOST`).
7360
Andrew Geisslerf0343792020-11-18 10:42:21 -06007361 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007362 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7363 directory for the build host.
7364
Andrew Geisslerf0343792020-11-18 10:42:21 -06007365 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007366 Specifies the base path used to create recipe stamp files. The path
7367 to an actual stamp file is constructed by evaluating this string and
7368 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007369 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007370 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007371
7372 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7373
7374 For information on how BitBake uses stamp files to determine if a
7375 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007376 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007377 section in the Yocto Project Overview and Concepts Manual.
7378
7379 See :term:`STAMPS_DIR`,
7380 :term:`MULTIMACH_TARGET_SYS`,
7381 :term:`PN`, :term:`EXTENDPE`,
7382 :term:`PV`, and :term:`PR` for related variable
7383 information.
7384
Andrew Geisslerf0343792020-11-18 10:42:21 -06007385 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007386 Specifies the base directory in which the OpenEmbedded build system
7387 places stamps. The default directory is ``${TMPDIR}/stamps``.
7388
Andrew Geisslerf0343792020-11-18 10:42:21 -06007389 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007390 The minimal command and arguments to run ``strip``, which is used to
7391 strip symbols.
7392
Andrew Geisslerf0343792020-11-18 10:42:21 -06007393 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007394 The short (72 characters or less) summary of the binary package for
7395 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007396 :term:`SUMMARY` is used to define the
7397 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007398 not set in the recipe.
7399
Andrew Geisslerf0343792020-11-18 10:42:21 -06007400 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007401 The directory in which files checked out of a Subversion system are
7402 stored.
7403
Andrew Geisslerf0343792020-11-18 10:42:21 -06007404 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007405 Specifies the kernel boot default console. If you want to use a
7406 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007407 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007408
7409 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7410
7411 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7412 this variable to null but then checks for a value later.
7413
Andrew Geisslerf0343792020-11-18 10:42:21 -06007414 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007415 Lists additional options to add to the syslinux file. You need to set
7416 this variable in your recipe. If you want to list multiple options,
7417 separate the options with a semicolon character (``;``).
7418
7419 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7420 to create a set of options.
7421
Andrew Geisslerf0343792020-11-18 10:42:21 -06007422 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007423 Specifies the alternate serial port or turns it off. To turn off
7424 serial, set this variable to an empty string in your recipe. The
7425 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007426 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007427
7428 SYSLINUX_SERIAL ?= "0 115200"
7429
7430 The class checks for and uses the variable as needed.
7431
Andrew Geisslerf0343792020-11-18 10:42:21 -06007432 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007433 Specifies the alternate console=tty... kernel boot argument. The
7434 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007435 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007436
7437 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7438
7439 The class checks for and uses the variable as needed.
7440
Andrew Geisslerf0343792020-11-18 10:42:21 -06007441 :term:`SYSLINUX_SPLASH`
7442 An ``.LSS`` file used as the background for the VGA boot menu when
7443 you use the boot menu. You need to set this variable in your recipe.
7444
7445 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7446 variable and if found, the OpenEmbedded build system installs the
7447 splash screen.
7448
7449 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007450 Points to the temporary directory under the work directory (default
7451 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7452 where the files populated into the sysroot are assembled during the
7453 :ref:`ref-tasks-populate_sysroot` task.
7454
Andrew Geisslerf0343792020-11-18 10:42:21 -06007455 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007456 Directories that are staged into the sysroot by the
7457 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007458 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007459
7460 SYSROOT_DIRS = " \
7461 ${includedir} \
7462 ${libdir} \
7463 ${base_libdir} \
7464 ${nonarch_base_libdir} \
7465 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007466 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007467 "
7468
Andrew Geissler9aee5002022-03-30 16:27:02 +00007469 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007470 Directories that are not staged into the sysroot by the
7471 :ref:`ref-tasks-populate_sysroot` task. You
7472 can use this variable to exclude certain subdirectories of
7473 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007474 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007475
Andrew Geissler9aee5002022-03-30 16:27:02 +00007476 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007477 ${mandir} \
7478 ${docdir} \
7479 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007480 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007481 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007482 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007483 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007484 ${datadir}/gtk-doc/html \
7485 ${datadir}/installed-tests \
7486 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007487 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007488 ${datadir}/terminfo \
7489 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007490 "
7491
Andrew Geisslerf0343792020-11-18 10:42:21 -06007492 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007493 Extra directories staged into the sysroot by the
7494 :ref:`ref-tasks-populate_sysroot` task for
7495 ``-native`` recipes, in addition to those specified in
7496 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007497 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007498
7499 SYSROOT_DIRS_NATIVE = " \
7500 ${bindir} \
7501 ${sbindir} \
7502 ${base_bindir} \
7503 ${base_sbindir} \
7504 ${libexecdir} \
7505 ${sysconfdir} \
7506 ${localstatedir} \
7507 "
7508
7509 .. note::
7510
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007511 Programs built by ``-native`` recipes run directly from the sysroot
7512 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7513 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007514
Andrew Geisslerf0343792020-11-18 10:42:21 -06007515 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007516 A list of functions to execute after files are staged into the
7517 sysroot. These functions are usually used to apply additional
7518 processing on the staged files, or to stage additional files.
7519
Andrew Geisslerf0343792020-11-18 10:42:21 -06007520 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007521 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7522 this variable specifies whether the specified service in
7523 :term:`SYSTEMD_SERVICE` should start
7524 automatically or not. By default, the service is enabled to
7525 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007526 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007527
7528 SYSTEMD_AUTO_ENABLE ??= "enable"
7529
7530 You can disable the service by setting the variable to "disable".
7531
Andrew Geisslerf0343792020-11-18 10:42:21 -06007532 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007533 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007534 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007535 configuration file that should be used. By default, the
7536 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007537 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007538
7539 SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf"
7540
7541 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007542 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007543
Andrew Geisslerf0343792020-11-18 10:42:21 -06007544 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007545 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007546 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007547 list of entry files (``*.conf``) to install that contain one boot
7548 entry per file. By default, the
7549 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007550 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007551
7552 SYSTEMD_BOOT_ENTRIES ?= ""
7553
7554 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007555 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007556
Andrew Geisslerf0343792020-11-18 10:42:21 -06007557 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007558 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007559 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560 boot menu timeout in seconds. By default, the
7561 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007562 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007563
7564 SYSTEMD_BOOT_TIMEOUT ?= "10"
7565
7566 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007567 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007568
Andrew Geisslerf0343792020-11-18 10:42:21 -06007569 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007570 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7571 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007572 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007573 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007574 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007575
7576 SYSTEMD_PACKAGES ?= "${PN}"
7577
7578 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007579 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007580 the build system can find the systemd unit files.
7581
Andrew Geisslerf0343792020-11-18 10:42:21 -06007582 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007583 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7584 this variable specifies the systemd service name for a package.
7585
7586 When you specify this file in your recipe, use a package name
7587 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007588 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007589
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007590 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007591
Andrew Geisslerf0343792020-11-18 10:42:21 -06007592 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007593 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007594 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007595 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007596 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007597 (allowing login), assuming :term:`USE_VT` is not set to
7598 "0".
7599
Andrew Geissler09036742021-06-25 14:25:14 -05007600 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007601 run a getty on the first virtual terminal).
7602
Andrew Geisslerf0343792020-11-18 10:42:21 -06007603 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007604 This variable points to a directory were BitBake places temporary
7605 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007606 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007607
7608 T = "${WORKDIR}/temp"
7609
7610 The :term:`WORKDIR` is the directory into which
7611 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7612 file sets this variable.
7613
Andrew Geissler09036742021-06-25 14:25:14 -05007614 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007615 :term:`TMPDIR` variable, which points to the root of
7616 the directory tree where BitBake places the output of an entire
7617 build.
7618
Andrew Geisslerf0343792020-11-18 10:42:21 -06007619 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007620 The target machine's architecture. The OpenEmbedded build system
7621 supports many architectures. Here is an example list of architectures
7622 supported. This list is by no means complete as the architecture is
7623 configurable:
7624
7625 - arm
7626 - i586
7627 - x86_64
7628 - powerpc
7629 - powerpc64
7630 - mips
7631 - mipsel
7632
7633 For additional information on machine architectures, see the
7634 :term:`TUNE_ARCH` variable.
7635
Andrew Geisslerf0343792020-11-18 10:42:21 -06007636 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007637 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007638 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007639 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007640 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007641
7642 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7643
Andrew Geisslerf0343792020-11-18 10:42:21 -06007644 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007645 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007646 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007647 :term:`TUNE_CCARGS` by default.
7648
7649 .. note::
7650
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007651 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007652 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7653 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007654
Andrew Geisslerf0343792020-11-18 10:42:21 -06007655 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007656 This is a specific kernel compiler flag for a CPU or Application
7657 Binary Interface (ABI) tune. The flag is used rarely and only for
7658 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007659 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007660 variable allows the kernel (and associated modules) to use a
7661 different configuration. See the
7662 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7663 :term:`Source Directory` for an example.
7664
Andrew Geisslerf0343792020-11-18 10:42:21 -06007665 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007666 Specifies the flags to pass to the C compiler when building for the
7667 target. When building in the target context,
7668 :term:`CFLAGS` is set to the value of this variable by
7669 default.
7670
Andrew Geissler09036742021-06-25 14:25:14 -05007671 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7672 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007673 executables built using the SDK also have the flags applied.
7674
Andrew Geisslerf0343792020-11-18 10:42:21 -06007675 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007676 Specifies the flags to pass to the C pre-processor (i.e. to both the
7677 C and the C++ compilers) when building for the target. When building
7678 in the target context, :term:`CPPFLAGS` is set to the
7679 value of this variable by default.
7680
7681 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007682 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007683 value so that executables built using the SDK also have the flags
7684 applied.
7685
Andrew Geisslerf0343792020-11-18 10:42:21 -06007686 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007687 Specifies the flags to pass to the C++ compiler when building for the
7688 target. When building in the target context,
7689 :term:`CXXFLAGS` is set to the value of this variable
7690 by default.
7691
7692 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007693 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007694 value so that executables built using the SDK also have the flags
7695 applied.
7696
Andrew Geisslerf0343792020-11-18 10:42:21 -06007697 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007698 Specifies the method for handling FPU code. For FPU-less targets,
7699 which include most ARM CPUs, the variable must be set to "soft". If
7700 not, the kernel emulation gets used, which results in a performance
7701 penalty.
7702
Andrew Geisslerf0343792020-11-18 10:42:21 -06007703 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007704 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007705 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007706 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007707 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007708
7709 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7710
Andrew Geisslerf0343792020-11-18 10:42:21 -06007711 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007712 Specifies the flags to pass to the linker when building for the
7713 target. When building in the target context,
7714 :term:`LDFLAGS` is set to the value of this variable
7715 by default.
7716
7717 Additionally, the SDK's environment setup script sets the
7718 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007719 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007720 have the flags applied.
7721
Andrew Geisslerf0343792020-11-18 10:42:21 -06007722 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007723 Specifies the target's operating system. The variable can be set to
7724 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007725 for musl libc. For ARM/EABI targets, the possible values are
7726 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007727
Andrew Geisslerf0343792020-11-18 10:42:21 -06007728 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007729 Specifies the prefix used for the toolchain binary target tools.
7730
7731 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04007732 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007733
7734 - For recipes building for the target machine, the value is
7735 "${:term:`TARGET_SYS`}-".
7736
7737 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04007738 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007739
7740 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007741 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007742
Andrew Geisslerf0343792020-11-18 10:42:21 -06007743 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007744 Specifies the system, including the architecture and the operating
7745 system, for which the build is occurring in the context of the
7746 current recipe.
7747
7748 The OpenEmbedded build system automatically sets this variable based
7749 on :term:`TARGET_ARCH`,
7750 :term:`TARGET_VENDOR`, and
7751 :term:`TARGET_OS` variables.
7752
7753 .. note::
7754
Andrew Geissler09036742021-06-25 14:25:14 -05007755 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007756
7757 Consider these two examples:
7758
7759 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7760 value is "i686-linux".
7761
7762 - Given a recipe being built for a little-endian, MIPS target
7763 running Linux, the value might be "mipsel-linux".
7764
Andrew Geisslerf0343792020-11-18 10:42:21 -06007765 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007766 Specifies the name of the target vendor.
7767
Andrew Geisslerf0343792020-11-18 10:42:21 -06007768 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007769 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007770 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007771
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007772 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007773
Andrew Geisslerf0343792020-11-18 10:42:21 -06007774 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007775 Specifies a suffix to be appended onto the
7776 :term:`TMPDIR` value. The suffix identifies the
7777 ``libc`` variant for building. When you are building for multiple
7778 variants with the same :term:`Build Directory`, this
7779 mechanism ensures that output for different ``libc`` variants is kept
7780 separate to avoid potential conflicts.
7781
7782 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04007783 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007784 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007785 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007786 in no suffix being applied.
7787
Andrew Geisslerf0343792020-11-18 10:42:21 -06007788 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007789 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007790 characteristics of the generated packages and images by telling the
7791 OpenEmbedded build system which toolchain profile to use. By default,
7792 the OpenEmbedded build system builds its own internal toolchain. The
7793 variable's default value is "default", which uses that internal
7794 toolchain.
7795
7796 .. note::
7797
Andrew Geissler09036742021-06-25 14:25:14 -05007798 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007799 responsibility to ensure that the toolchain is compatible with the
7800 default toolchain. Using older or newer versions of these
7801 components might cause build problems. See the Release Notes for
7802 the Yocto Project release for the specific components with which
7803 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007804 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007805 page on the Yocto Project website and click on the "RELEASE
7806 INFORMATION" link for the appropriate release.
7807
Andrew Geissler09036742021-06-25 14:25:14 -05007808 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007809 which controls the variant of the GNU standard C library (``libc``)
7810 used during the build process: ``glibc`` or ``musl``.
7811
7812 With additional layers, it is possible to use a pre-compiled external
7813 toolchain. One example is the Sourcery G++ Toolchain. The support for
7814 this toolchain resides in the separate Mentor Graphics
7815 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007816 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007817
7818 The layer's ``README`` file contains information on how to use the
7819 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7820 be sure to add the layer to your ``bblayers.conf`` file in front of
7821 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7822 in your ``local.conf`` file to the location in which you installed
7823 the toolchain.
7824
7825 The fundamentals used for this example apply to any external
7826 toolchain. You can use ``meta-sourcery`` as a template for adding
7827 support for other external toolchains.
7828
Andrew Geisslerf0343792020-11-18 10:42:21 -06007829 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007830 The location the OpenEmbedded build system uses to export tests when
7831 the :term:`TEST_EXPORT_ONLY` variable is set
7832 to "1".
7833
Andrew Geissler09036742021-06-25 14:25:14 -05007834 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007835 ``"${TMPDIR}/testimage/${PN}"``.
7836
Andrew Geisslerf0343792020-11-18 10:42:21 -06007837 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007838 Specifies to export the tests only. Set this variable to "1" if you
7839 do not want to run the tests but you want them to be exported in a
7840 manner that you to run them outside of the build system.
7841
Andrew Geisslerf0343792020-11-18 10:42:21 -06007842 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007843 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05007844 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007845
7846 .. note::
7847
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007848 Actual test results reside in the task log (``log.do_testimage``),
7849 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007850
Andrew Geisslerf0343792020-11-18 10:42:21 -06007851 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007852 For automated hardware testing, specifies the command to use to
7853 control the power of the target machine under test. Typically, this
7854 command would point to a script that performs the appropriate action
7855 (e.g. interacting with a web-enabled power strip). The specified
7856 command should expect to receive as the last argument "off", "on" or
7857 "cycle" specifying to power off, on, or cycle (power off and then
7858 power on) the device, respectively.
7859
Andrew Geisslerf0343792020-11-18 10:42:21 -06007860 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007861 For automated hardware testing, specifies additional arguments to
7862 pass through to the command specified in
7863 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007864 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007865 wish, for example, to separate the machine-specific and
7866 non-machine-specific parts of the arguments.
7867
Andrew Geisslerf0343792020-11-18 10:42:21 -06007868 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007869 The time in seconds allowed for an image to boot before automated
7870 runtime tests begin to run against an image. The default timeout
7871 period to allow the boot process to reach the login prompt is 500
7872 seconds. You can specify a different value in the ``local.conf``
7873 file.
7874
7875 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007876 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007877 section in the Yocto Project Development Tasks Manual.
7878
Andrew Geisslerf0343792020-11-18 10:42:21 -06007879 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007880 For automated hardware testing, specifies the command to use to
7881 connect to the serial console of the target machine under test. This
7882 command simply needs to connect to the serial console and forward
7883 that connection to standard input and output as any normal terminal
7884 program does.
7885
7886 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05007887 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007888
7889 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
7890
Andrew Geisslerf0343792020-11-18 10:42:21 -06007891 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007892 For automated hardware testing, specifies additional arguments to
7893 pass through to the command specified in
7894 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05007895 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007896 wish, for example, to separate the machine-specific and
7897 non-machine-specific parts of the command.
7898
Andrew Geisslerf0343792020-11-18 10:42:21 -06007899 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007900 The IP address of the build machine (host machine). This IP address
7901 is usually automatically detected. However, if detection fails, this
7902 variable needs to be set to the IP address of the build machine (i.e.
7903 where the build is taking place).
7904
7905 .. note::
7906
Andrew Geissler09036742021-06-25 14:25:14 -05007907 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007908 tests such as the "dnf" test suite, which needs to download packages
7909 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007910
Andrew Geisslerf0343792020-11-18 10:42:21 -06007911 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007912 An ordered list of tests (modules) to run against an image when
7913 performing automated runtime testing.
7914
7915 The OpenEmbedded build system provides a core set of tests that can
7916 be used against images.
7917
7918 .. note::
7919
7920 Currently, there is only support for running these tests under
7921 QEMU.
7922
7923 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05007924 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007925 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007926
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007927 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007928
7929 Alternatively, you can
7930 provide the "auto" option to have all applicable tests run against
7931 the image.
7932 ::
7933
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007934 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007935
7936 Using this option causes the
7937 build system to automatically run tests that are applicable to the
7938 image. Tests that are not applicable are skipped.
7939
7940 The order in which tests are run is important. Tests that depend on
7941 another test must appear later in the list than the test on which
7942 they depend. For example, if you append the list of tests with two
7943 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05007944 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007945
7946 TEST_SUITES = "test_A test_B"
7947
7948 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007949 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007950 section in the Yocto Project Development Tasks Manual.
7951
Andrew Geisslerf0343792020-11-18 10:42:21 -06007952 :term:`TEST_TARGET`
7953 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007954 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007955
7956 TEST_TARGET = "qemu"
7957
7958 A target controller is a class that defines how an image gets
7959 deployed on a target and how a target is started. A layer can extend
7960 the controllers by adding a module in the layer's
7961 ``/lib/oeqa/controllers`` directory and by inheriting the
7962 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05007963 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06007964
Andrew Geissler5f350902021-07-23 13:09:54 -04007965 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06007966
7967 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007968 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06007969 in the Yocto Project Development Tasks Manual for more
7970 information.
7971
7972 - *"simpleremote":* Runs the tests on target hardware that is
7973 already up and running. The hardware can be on the network or it
7974 can be a device running an image on QEMU. You must also set
7975 :term:`TEST_TARGET_IP` when you use
7976 "simpleremote".
7977
7978 .. note::
7979
7980 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007981 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06007982
7983 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007984 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06007985 section in the Yocto Project Development Tasks Manual.
7986
7987 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05007988 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06007989 variable has no effect when :term:`TEST_TARGET` is
7990 set to "qemu".
7991
7992 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007993 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06007994
7995 TEST_TARGET_IP = "192.168.1.4:2201"
7996
7997 Specifying a port is
7998 useful when SSH is started on a non-standard port or in cases when
7999 your hardware under test is behind a firewall or network that is not
8000 directly accessible from your host and you need to do port address
8001 translation.
8002
8003 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008004 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008005 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008006 any image that successfully builds to automatically boot under QEMU.
8007 Using the variable also adds in dependencies so that any SDK for
8008 which testing is requested is automatically built first.
8009
8010 These tests are written in Python making use of the ``unittest``
8011 module, and the majority of them run commands on the target system
8012 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8013 file in the :term:`Build Directory` to have the
8014 OpenEmbedded build system automatically run these tests after an
8015 image successfully builds:
8016
8017 TESTIMAGE_AUTO = "1"
8018
8019 For more information
8020 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008021 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008022 section in the Yocto Project Development Tasks Manual and the
Andrew Geissler595f6302022-01-24 19:11:47 +00008023 ":ref:`ref-classes-testimage*`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008024
Andrew Geisslerf0343792020-11-18 10:42:21 -06008025 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008026 The directory in which the file BitBake is currently parsing is
8027 located. Do not manually set this variable.
8028
Andrew Geisslerf0343792020-11-18 10:42:21 -06008029 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008030 The time the build was started. Times appear using the hour, minute,
8031 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8032 seconds past 1400 hours).
8033
Andrew Geisslerf0343792020-11-18 10:42:21 -06008034 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008035 This variable is the base directory the OpenEmbedded build system
8036 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008037 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008038 ``tmp`` within the :term:`Build Directory`.
8039
8040 If you want to establish this directory in a location other than the
8041 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008042 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008043
8044 #TMPDIR = "${TOPDIR}/tmp"
8045
Andrew Geissler09036742021-06-25 14:25:14 -05008046 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008047 which does not use NFS, while having the Build Directory use NFS.
8048
Andrew Geissler09036742021-06-25 14:25:14 -05008049 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008050 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8051 persistent inodes). Due to various issues with NFS and bugs in some
8052 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008053 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008054
Andrew Geisslerf0343792020-11-18 10:42:21 -06008055 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008056 This variable lists packages the OpenEmbedded build system uses when
8057 building an SDK, which contains a cross-development environment. The
8058 packages specified by this variable are part of the toolchain set
8059 that runs on the :term:`SDKMACHINE`, and each
8060 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008061 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062
8063 $ bitbake -c populate_sdk imagename
8064
8065 In this case, a default list of packages is
8066 set in this variable, but you can add additional packages to the
8067 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008068 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008069 in the Yocto Project Application Development and the Extensible
8070 Software Development Kit (eSDK) manual for more information.
8071
8072 For background information on cross-development toolchains in the
8073 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008074 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008075 section in the Yocto Project Overview and Concepts Manual. For
8076 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008077 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008078
Andrew Geisslereff27472021-10-29 15:35:00 -05008079 Note that this variable applies to building an SDK, not an eSDK,
8080 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8081 used instead.
8082
8083 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8084 This variable allows to extend what is installed in the host
8085 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8086 applying to SDKs.
8087
Andrew Geisslerf0343792020-11-18 10:42:21 -06008088 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008089 This variable defines the name used for the toolchain output. The
8090 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008091 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008092
8093 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8094
8095 See
8096 the :term:`SDK_NAME` and
8097 :term:`SDK_VERSION` variables for additional
8098 information.
8099
Andrew Geisslerf0343792020-11-18 10:42:21 -06008100 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008101 This variable lists packages the OpenEmbedded build system uses when
8102 it creates the target part of an SDK (i.e. the part built for the
8103 target hardware), which includes libraries and headers. Use this
8104 variable to add individual packages to the part of the SDK that runs
8105 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008106 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008107 in the Yocto Project Application Development and the Extensible
8108 Software Development Kit (eSDK) manual for more information.
8109
8110 For background information on cross-development toolchains in the
8111 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008112 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008113 section in the Yocto Project Overview and Concepts Manual. For
8114 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008115 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008116
Andrew Geisslerf0343792020-11-18 10:42:21 -06008117 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008118 A sanitized version of :term:`TARGET_ARCH`. This
8119 variable is used where the architecture is needed in a value where
8120 underscores are not allowed, for example within package filenames. In
8121 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008122 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008123
8124 Do not edit this variable.
8125
Andrew Geisslerf0343792020-11-18 10:42:21 -06008126 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008127 The GNU canonical architecture for a specific architecture (i.e.
8128 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8129 this value to setup configuration.
8130
Andrew Geissler09036742021-06-25 14:25:14 -05008131 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008132 definitions can be a single static definition, or can be dynamically
8133 adjusted. You can see details for a given CPU family by looking at
8134 the architecture's ``README`` file. For example, the
8135 ``meta/conf/machine/include/mips/README`` file in the
8136 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008137 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008138
Andrew Geissler09036742021-06-25 14:25:14 -05008139 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008140 :term:`TARGET_ARCH`, which defines the target
8141 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008142 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008143
8144 TARGET_ARCH = "${TUNE_ARCH}"
8145
8146 The following list, which is by no means complete since architectures
8147 are configurable, shows supported machine architectures:
8148
8149 - arm
8150 - i586
8151 - x86_64
8152 - powerpc
8153 - powerpc64
8154 - mips
8155 - mipsel
8156
Andrew Geisslerf0343792020-11-18 10:42:21 -06008157 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008158 Specifies architecture-specific assembler flags for the target
8159 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008160 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008161 typically under ``meta/conf/machine/include/`` and are influenced
8162 through :term:`TUNE_FEATURES`. For example, the
8163 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008164 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008165
8166 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8167
8168 .. note::
8169
8170 Board Support Packages (BSPs) select the tune. The selected tune,
8171 in turn, affects the tune variables themselves (i.e. the tune can
8172 supply its own set of flags).
8173
Andrew Geisslerf0343792020-11-18 10:42:21 -06008174 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008175 Specifies architecture-specific C compiler flags for the target
8176 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008177 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008178 typically under ``meta/conf/machine/include/`` and are influenced
8179 through :term:`TUNE_FEATURES`.
8180
8181 .. note::
8182
8183 Board Support Packages (BSPs) select the tune. The selected tune,
8184 in turn, affects the tune variables themselves (i.e. the tune can
8185 supply its own set of flags).
8186
Andrew Geisslerf0343792020-11-18 10:42:21 -06008187 :term:`TUNE_FEATURES`
8188 Features used to "tune" a compiler for optimal use given a specific
8189 processor. The features are defined within the tune files and allow
8190 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8191 the features.
8192
8193 The OpenEmbedded build system verifies the features to be sure they
8194 are not conflicting and that they are supported.
8195
8196 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008197 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008198
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008199 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008200
8201 See the :term:`DEFAULTTUNE` variable for more information.
8202
8203 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008204 Specifies architecture-specific linker flags for the target system.
8205 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008206 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008207 typically under ``meta/conf/machine/include/`` and are influenced
8208 through :term:`TUNE_FEATURES`. For example, the
8209 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008210 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008211
8212 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8213
8214 .. note::
8215
8216 Board Support Packages (BSPs) select the tune. The selected tune,
8217 in turn, affects the tune variables themselves (i.e. the tune can
8218 supply its own set of flags).
8219
Andrew Geisslerf0343792020-11-18 10:42:21 -06008220 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008221 The package architecture understood by the packaging system to define
8222 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008223 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008224
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008225 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008226
8227 These tune-specific package architectures are defined in the machine
8228 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008229 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008230
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008231 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008232
Andrew Geisslerf0343792020-11-18 10:42:21 -06008233 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008234 Specifies CPU or Application Binary Interface (ABI) tuning features
8235 that conflict with feature.
8236
8237 Known tuning conflicts are specified in the machine include files in
8238 the :term:`Source Directory`. Here is an example from
8239 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8240 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008241 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008242
8243 TUNECONFLICTS[n32] = "o32 n64"
8244
Andrew Geisslerf0343792020-11-18 10:42:21 -06008245 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008246 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8247 feature. The specified feature is stored as a flag. Valid features
8248 are specified in the machine include files (e.g.
8249 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008250 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251
8252 TUNEVALID[bigendian] = "Enable big-endian mode."
8253
8254 See the machine include files in the :term:`Source Directory`
8255 for these features.
8256
Andrew Geisslerf0343792020-11-18 10:42:21 -06008257 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008258 Configures the :term:`UBOOT_MACHINE` and can
8259 also define :term:`IMAGE_FSTYPES` for individual
8260 cases.
8261
8262 Following is an example from the ``meta-fsl-arm`` layer. ::
8263
8264 UBOOT_CONFIG ??= "sd"
8265 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8266 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8267 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8268 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8269
8270 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008271 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8272 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008273 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008274
Andrew Geissler09036742021-06-25 14:25:14 -05008275 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008276 :ref:`uboot-config <ref-classes-uboot-config>`
8277 class.
8278
Andrew Geisslerf0343792020-11-18 10:42:21 -06008279 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008280 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008281 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008282 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8283 the load address to be used in
8284 creating the dtb sections of Image Tree Source for the FIT image.
8285
Andrew Geisslerf0343792020-11-18 10:42:21 -06008286 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008287 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008288 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008289 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8290 creating the dtbo sections of Image Tree Source for the FIT image.
8291
Andrew Geisslerf0343792020-11-18 10:42:21 -06008292 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008293 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008294 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008295 command-line parameter to the ``uboot-mkimage`` utility.
8296
Andrew Geisslerf0343792020-11-18 10:42:21 -06008297 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008298 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008299 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008300 command-line parameter to the ``uboot-mkimage`` utility.
8301
Andrew Geisslerf0343792020-11-18 10:42:21 -06008302 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008303 Appends a string to the name of the local version of the U-Boot
8304 image. For example, assuming the version of the U-Boot image built
8305 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008306 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008307
8308 UBOOT_LOCALVERSION = "-yocto"
8309
Andrew Geisslerf0343792020-11-18 10:42:21 -06008310 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008311 Specifies the value passed on the ``make`` command line when building
8312 a U-Boot image. The value indicates the target platform
8313 configuration. You typically set this variable from the machine
8314 configuration file (i.e. ``conf/machine/machine_name.conf``).
8315
8316 Please see the "Selection of Processor Architecture and Board Type"
8317 section in the U-Boot README for valid values for this variable.
8318
Andrew Geisslerf0343792020-11-18 10:42:21 -06008319 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008320 Specifies the target called in the ``Makefile``. The default target
8321 is "all".
8322
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008323 :term:`UBOOT_MKIMAGE`
8324 Specifies the name of the mkimage command as used by the
8325 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8326 the FIT image. This can be used to substitute an alternative command, wrapper
8327 script or function if desired. The default is "uboot-mkimage".
8328
Andrew Geisslerf0343792020-11-18 10:42:21 -06008329 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008330 Options for the device tree compiler passed to mkimage '-D'
8331 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008332 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008333 pass the ``-D`` option to mkimage.
8334
8335 :term:`UBOOT_MKIMAGE_SIGN`
8336 Specifies the name of the mkimage command as used by the
8337 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8338 the FIT image after it has been assembled (if enabled). This can be used
8339 to substitute an alternative command, wrapper script or function if
8340 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8341
8342 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8343 Optionally specifies additional arguments for the
8344 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8345 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008346
Andrew Geisslerf0343792020-11-18 10:42:21 -06008347 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008348 Specifies the entrypoint for the RAM disk image.
8349 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008350 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008351 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8352 entrypoint to be used in creating the Image Tree Source for
8353 the FIT image.
8354
Andrew Geisslerf0343792020-11-18 10:42:21 -06008355 :term:`UBOOT_RD_LOADADDRESS`
8356 Specifies the load address for the RAM disk image.
8357 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008358 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008359 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8360 load address to be used in creating the Image Tree Source for
8361 the FIT image.
8362
8363 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008364 Enable signing of FIT image. The default value is "0".
8365
Andrew Geisslerf0343792020-11-18 10:42:21 -06008366 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008367 Location of the directory containing the RSA key and
8368 certificate used for signing FIT image.
8369
Andrew Geisslerf0343792020-11-18 10:42:21 -06008370 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008371 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008372 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8373 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8374 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8375
Andrew Geisslerf0343792020-11-18 10:42:21 -06008376 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008377 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8378 has a ``.sb`` extension.
8379
8380 The default U-Boot extension is ``.bin``
8381
Andrew Geisslerf0343792020-11-18 10:42:21 -06008382 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008383 Specifies the target used for building U-Boot. The target is passed
8384 directly as part of the "make" command (e.g. SPL and AIS). If you do
8385 not specifically set this variable, the OpenEmbedded build process
8386 passes and uses "all" for the target during the U-Boot building
8387 process.
8388
Andrew Geissler9aee5002022-03-30 16:27:02 +00008389 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008390 Specifies a list of options that, if reported by the configure script
8391 as being invalid, should not generate a warning during the
8392 :ref:`ref-tasks-configure` task. Normally, invalid
8393 configure options are simply not passed to the configure script (e.g.
8394 should be removed from :term:`EXTRA_OECONF` or
8395 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008396 However, there are common options that are passed to all
8397 configure scripts at a class level, but might not be valid for some
8398 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00008399 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008400
8401 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00008402 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008403 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8404 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8405
Andrew Geisslerf0343792020-11-18 10:42:21 -06008406 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008407 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008408 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008409 specifies the package that contains the initscript that is enabled.
8410
8411 The default value is "${PN}". Given that almost all recipes that
8412 install initscripts package them in the main package for the recipe,
8413 you rarely need to set this variable in individual recipes.
8414
Andrew Geissler5199d832021-09-24 16:47:35 -05008415 :term:`UPSTREAM_CHECK_COMMITS`
8416 You can perform a per-recipe check for what the latest upstream
8417 source code version is by calling ``devtool latest-version recipe``. If
8418 the recipe source code is provided from Git repositories, but
8419 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8420 to ``1`` in the recipe, and the OpenEmbedded build system
8421 will compare the latest commit with the one currently specified
8422 by the recipe (:term:`SRCREV`).
8423 ::
8424
8425 UPSTREAM_CHECK_COMMITS = "1"
8426
Andrew Geisslerf0343792020-11-18 10:42:21 -06008427 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008428 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008429 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008430 the recipe source code is provided from Git repositories, the
8431 OpenEmbedded build system determines the latest upstream version by
8432 picking the latest tag from the list of all repository tags.
8433
Andrew Geissler09036742021-06-25 14:25:14 -05008434 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008435 regular expression to filter only the relevant tags should the
8436 default filter not work correctly.
8437 ::
8438
8439 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8440
Andrew Geisslerf0343792020-11-18 10:42:21 -06008441 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008442 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008443 regular expression instead of the default one when the package
8444 checking system is parsing the page found using
8445 :term:`UPSTREAM_CHECK_URI`.
8446 ::
8447
8448 UPSTREAM_CHECK_REGEX = "package_regex"
8449
Andrew Geisslerf0343792020-11-18 10:42:21 -06008450 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008451 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008452 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008453 the source code is provided from tarballs, the latest version is
8454 determined by fetching the directory listing where the tarball is and
8455 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008456 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008457 contains the link to the latest tarball.
8458 ::
8459
8460 UPSTREAM_CHECK_URI = "recipe_url"
8461
Andrew Geissler5199d832021-09-24 16:47:35 -05008462 :term:`UPSTREAM_VERSION_UNKNOWN`
8463 You can perform a per-recipe check for what the latest upstream
8464 source code version is by calling ``devtool latest-version recipe``.
8465 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8466 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8467 the recipe allows to determine what the latest upstream version is,
8468 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8469 to acknowledge that the check cannot be performed.
8470 ::
8471
8472 UPSTREAM_VERSION_UNKNOWN = "1"
8473
Andrew Geisslerf0343792020-11-18 10:42:21 -06008474 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008475 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008476 default value used for :term:`USE_DEVFS` is "1" when no value is
8477 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008478 statically populated ``/dev`` directory.
8479
Andrew Geissler09209ee2020-12-13 08:44:15 -06008480 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008481 the Yocto Project Development Tasks Manual for information on how to
8482 use this variable.
8483
Andrew Geisslerf0343792020-11-18 10:42:21 -06008484 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008485 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008486 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008487 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008488 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008489 virtual terminals in order to enable logging in through those
8490 terminals.
8491
Andrew Geissler09036742021-06-25 14:25:14 -05008492 The default value used for :term:`USE_VT` is "1" when no default value is
8493 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008494 machine configuration file for machines that do not have a graphical
8495 display attached and therefore do not need virtual terminal
8496 functionality.
8497
Andrew Geisslerf0343792020-11-18 10:42:21 -06008498 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008499 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00008500 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008501
Andrew Geisslerc926e172021-05-07 16:11:35 -05008502 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008503
Andrew Geissler9aee5002022-03-30 16:27:02 +00008504 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008505
8506 For more information, see
8507 ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8508
Andrew Geisslerf0343792020-11-18 10:42:21 -06008509 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008510 If set to ``error``, forces the OpenEmbedded build system to produce
8511 an error if the user identification (``uid``) and group
8512 identification (``gid``) values are not defined in any of the files
8513 listed in :term:`USERADD_UID_TABLES` and
8514 :term:`USERADD_GID_TABLES`. If set to
8515 ``warn``, a warning will be issued instead.
8516
8517 The default behavior for the build system is to dynamically apply
8518 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008519 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008520 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008521 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008522 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008523
8524 USERADD_ERROR_DYNAMIC = "error"
8525
8526 Overriding the
8527 default behavior implies you are going to also take steps to set
8528 static ``uid`` and ``gid`` values through use of the
8529 :term:`USERADDEXTENSION`,
8530 :term:`USERADD_UID_TABLES`, and
8531 :term:`USERADD_GID_TABLES` variables.
8532
8533 .. note::
8534
8535 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008536 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008537 When it is set to ``warn``, the build system will report a warning for
8538 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8539 to ``error``, it will only report errors for recipes that are actually
8540 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008541 This saves you from having to add static IDs for recipes that you
8542 know will never be built.
8543
Andrew Geisslerf0343792020-11-18 10:42:21 -06008544 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008545 Specifies a password file to use for obtaining static group
8546 identification (``gid``) values when the OpenEmbedded build system
8547 adds a group to the system during package installation.
8548
8549 When applying static group identification (``gid``) values, the
8550 OpenEmbedded build system looks in :term:`BBPATH` for a
8551 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008552 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008553
8554
8555 USERADD_GID_TABLES = "files/group"
8556
8557 .. note::
8558
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008559 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8560 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008561
Andrew Geisslerf0343792020-11-18 10:42:21 -06008562 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008563 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8564 this variable specifies the individual packages within the recipe
8565 that require users and/or groups to be added.
8566
8567 You must set this variable if the recipe inherits the class. For
8568 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008569 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008570
8571 USERADD_PACKAGES = "${PN}"
8572
8573 .. note::
8574
Andrew Geissler09036742021-06-25 14:25:14 -05008575 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008576 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8577 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008578
Andrew Geisslerf0343792020-11-18 10:42:21 -06008579 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008580 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8581 this variable specifies for a package what parameters should pass to
8582 the ``useradd`` command if you add a user to the system when the
8583 package is installed.
8584
Andrew Geisslerc926e172021-05-07 16:11:35 -05008585 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008586
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008587 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008588 --no-create-home --shell /bin/false \
8589 --user-group messagebus"
8590
8591 For information on the
8592 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008593 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008594
Andrew Geisslerf0343792020-11-18 10:42:21 -06008595 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008596 Specifies a password file to use for obtaining static user
8597 identification (``uid``) values when the OpenEmbedded build system
8598 adds a user to the system during package installation.
8599
8600 When applying static user identification (``uid``) values, the
8601 OpenEmbedded build system looks in :term:`BBPATH` for a
8602 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008603 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008604
8605 USERADD_UID_TABLES = "files/passwd"
8606
8607 .. note::
8608
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008609 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8610 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008611
Andrew Geisslerf0343792020-11-18 10:42:21 -06008612 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008613 When set to "useradd-staticids", causes the OpenEmbedded build system
8614 to base all user and group additions on a static ``passwd`` and
8615 ``group`` files found in :term:`BBPATH`.
8616
8617 To use static user identification (``uid``) and group identification
8618 (``gid``) values, set the variable as follows in your ``local.conf``
8619 file: USERADDEXTENSION = "useradd-staticids"
8620
8621 .. note::
8622
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008623 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008624 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008625 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008626
8627 If you use static ``uid`` and ``gid`` information, you must also
8628 specify the ``files/passwd`` and ``files/group`` files by setting the
8629 :term:`USERADD_UID_TABLES` and
8630 :term:`USERADD_GID_TABLES` variables.
8631 Additionally, you should also set the
8632 :term:`USERADD_ERROR_DYNAMIC` variable.
8633
Andrew Geisslerf0343792020-11-18 10:42:21 -06008634 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008635 Specifies the persistence of the target's ``/var/log`` directory,
8636 which is used to house postinstall target log files.
8637
Andrew Geissler09036742021-06-25 14:25:14 -05008638 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008639 file is not persistent. You can override this setting by setting the
8640 variable to "no" to make the log directory persistent.
8641
Andrew Geisslerf0343792020-11-18 10:42:21 -06008642 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008643 Specifies the quality assurance checks whose failures are reported as
8644 warnings by the OpenEmbedded build system. You set this variable in
8645 your distribution configuration file. For a list of the checks you
8646 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00008647 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008648
Andrew Geisslerf0343792020-11-18 10:42:21 -06008649 :term:`WKS_FILE`
8650 Specifies the location of the Wic kickstart file that is used by the
8651 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05008652 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06008653 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008654 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008655 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008656 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008657
8658 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008659 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008660 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008661 applicable when Wic images are active (i.e. when
8662 :term:`IMAGE_FSTYPES` contains entries related
8663 to Wic). If your recipe does not create Wic images, the variable has
8664 no effect.
8665
Andrew Geissler09036742021-06-25 14:25:14 -05008666 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008667 :term:`DEPENDS` variable. When you use the variable in
8668 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008669 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008670
Andrew Geissler09036742021-06-25 14:25:14 -05008671 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008672 specify a list of additional dependencies (e.g. native tools,
8673 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008674 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675
8676 WKS_FILE_DEPENDS = "some-native-tool"
8677
8678 In the
8679 previous example, some-native-tool would be replaced with an actual
8680 native tool on which the build would depend.
8681
Andrew Geisslerf0343792020-11-18 10:42:21 -06008682 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008683 The pathname of the work directory in which the OpenEmbedded build
8684 system builds a recipe. This directory is located within the
8685 :term:`TMPDIR` directory structure and is specific to
8686 the recipe being built and the system for which it is being built.
8687
Andrew Geissler09036742021-06-25 14:25:14 -05008688 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008689
8690 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8691
8692 The actual directory depends on several things:
8693
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008694 - :term:`TMPDIR`: The top-level build output directory
8695 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8696 - :term:`PN`: The recipe name
8697 - :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8698 is usually the case for most recipes, then `EXTENDPE` is blank)
8699 - :term:`PV`: The recipe version
8700 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008701
8702 As an example, assume a Source Directory top-level folder name
8703 ``poky``, a default Build Directory at ``poky/build``, and a
8704 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8705 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8706 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008707 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008708
8709 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8710
Andrew Geisslerf0343792020-11-18 10:42:21 -06008711 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008712 Specifies the packages that should be installed to provide an X
8713 server and drivers for the current machine, assuming your image
8714 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8715 indirectly, includes "x11-base" in
8716 :term:`IMAGE_FEATURES`.
8717
Andrew Geissler09036742021-06-25 14:25:14 -05008718 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008719 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8720