blob: 1685a267763f9f612620bd464366ee4f40b538ba [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.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600138
Andrew Geisslerf0343792020-11-18 10:42:21 -0600139 :term:`APPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500140 An override list of append strings for each target specified with
141 :term:`LABELS`.
142
143 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
144 information on how this variable is used.
145
Andrew Geisslerf0343792020-11-18 10:42:21 -0600146 :term:`AR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500147 The minimal command and arguments used to run ``ar``.
148
Andrew Geisslerf0343792020-11-18 10:42:21 -0600149 :term:`ARCHIVER_MODE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500150 When used with the :ref:`archiver <ref-classes-archiver>` class,
151 determines the type of information used to create a released archive.
152 You can use this variable to create archives of patched source,
153 original source, configured source, and so forth by employing the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500154 following variable flags (varflags)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500155
156 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files.
157 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default.
158 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
159 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and do_patch.
160 ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists files and directories to exclude from diff.
161 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
162 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
163 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
164
165 For information on how the variable works, see the
166 ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
167
Andrew Geisslerf0343792020-11-18 10:42:21 -0600168 :term:`AS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500169 Minimal command and arguments needed to run the assembler.
170
Andrew Geisslerf0343792020-11-18 10:42:21 -0600171 :term:`ASSUME_PROVIDED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500172 Lists recipe names (:term:`PN` values) BitBake does not
173 attempt to build. Instead, BitBake assumes these recipes have already
174 been built.
175
Andrew Geissler09036742021-06-25 14:25:14 -0500176 In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500177 tools that should not be built. An example is ``git-native``, which
178 when specified, allows for the Git binary from the host to be used
179 rather than building ``git-native``.
180
Andrew Geisslerf0343792020-11-18 10:42:21 -0600181 :term:`ASSUME_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500182 Provides additional ``shlibs`` provider mapping information, which
183 adds to or overwrites the information provided automatically by the
184 system. Separate multiple entries using spaces.
185
186 As an example, use the following form to add an ``shlib`` provider of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500187 shlibname in packagename with the optional version::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500188
189 shlibname:packagename[_version]
190
191 Here is an example that adds a shared library named ``libEGL.so.1``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500192 as being provided by the ``libegl-implementation`` package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500193
194 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
195
Andrew Geisslerf0343792020-11-18 10:42:21 -0600196 :term:`AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500197 The email address used to contact the original author or authors in
198 order to send patches and forward bugs.
199
Andrew Geisslerf0343792020-11-18 10:42:21 -0600200 :term:`AUTO_LIBNAME_PKGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500201 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -0500202 which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500203 packages should be checked for libraries and renamed according to
204 Debian library package naming.
205
206 The default value is "${PACKAGES}", which causes the debian class to
207 act on all packages that are explicitly generated by the recipe.
208
Andrew Geisslerf0343792020-11-18 10:42:21 -0600209 :term:`AUTOREV`
Andrew Geissler09036742021-06-25 14:25:14 -0500210 When :term:`SRCREV` is set to the value of this variable, it specifies to
Andrew Geisslerc926e172021-05-07 16:11:35 -0500211 use the latest source revision in the repository. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500212
213 SRCREV = "${AUTOREV}"
214
215 If you use the previous statement to retrieve the latest version of
216 software, you need to be sure :term:`PV` contains
217 ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
218 have a kernel recipe that inherits the
219 :ref:`kernel <ref-classes-kernel>` class and you use the previous
220 statement. In this example, ``${SRCPV}`` does not automatically get
Andrew Geissler09036742021-06-25 14:25:14 -0500221 into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500222 so that it does contain ``${SRCPV}``.
223
224 For more information see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600225 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500226 section in the Yocto Project Development Tasks Manual.
227
Andrew Geissler9aee5002022-03-30 16:27:02 +0000228 :term:`AUTO_SYSLINUXMENU`
229 Enables creating an automatic menu for the syslinux bootloader. You
230 must set this variable in your recipe. The
231 :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
232
Andrew Geisslerf0343792020-11-18 10:42:21 -0600233 :term:`AVAILTUNES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234 The list of defined CPU and Application Binary Interface (ABI)
235 tunings (i.e. "tunes") available for use by the OpenEmbedded build
236 system.
237
238 The list simply presents the tunes that are available. Not all tunes
239 may be compatible with a particular machine configuration, or with
240 each other in a
Andrew Geissler09209ee2020-12-13 08:44:15 -0600241 :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500242 configuration.
243
244 To add a tune to the list, be sure to append it with spaces using the
245 "+=" BitBake operator. Do not simply replace the list by using the
246 "=" operator. See the
Patrick Williams213cb262021-08-07 19:21:33 -0500247 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500248 User Manual for more information.
249
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500250 :term:`AZ_SAS`
251 Azure Storage Shared Access Signature, when using the
252 :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
253 This variable can be defined to be used by the fetcher to authenticate
254 and gain access to non-public artifacts.
255 ::
256
257 AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
258
259 For more information see Microsoft's Azure Storage documentation at
260 https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
261
Andrew Geisslerf0343792020-11-18 10:42:21 -0600262 :term:`B`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500263 The directory within the :term:`Build Directory` in
264 which the OpenEmbedded build system places generated objects during a
265 recipe's build process. By default, this directory is the same as the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500266 :term:`S` directory, which is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500267
268 S = "${WORKDIR}/${BP}"
269
Andrew Geissler09036742021-06-25 14:25:14 -0500270 You can separate the (:term:`S`) directory and the directory pointed to
Andrew Geissler5f350902021-07-23 13:09:54 -0400271 by the :term:`B` variable. Most Autotools-based recipes support
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500272 separating these directories. The build system defaults to using
273 separate directories for ``gcc`` and some kernel recipes.
274
Andrew Geisslerf0343792020-11-18 10:42:21 -0600275 :term:`BAD_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500276 Lists "recommended-only" packages to not install. Recommended-only
277 packages are packages installed only through the
278 :term:`RRECOMMENDS` variable. You can prevent any
279 of these "recommended" packages from being installed by listing them
Andrew Geissler09036742021-06-25 14:25:14 -0500280 with the :term:`BAD_RECOMMENDATIONS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500281
282 BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
283
284 You can set this variable globally in your ``local.conf`` file or you
285 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -0500286 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500287
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500288 BAD_RECOMMENDATIONS:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500289
290 It is important to realize that if you choose to not install packages
291 using this variable and some other packages are dependent on them
292 (i.e. listed in a recipe's :term:`RDEPENDS`
293 variable), the OpenEmbedded build system ignores your request and
294 will install the packages to avoid dependency errors.
295
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700296 This variable is supported only when using the IPK and RPM
297 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500298
299 See the :term:`NO_RECOMMENDATIONS` and the
300 :term:`PACKAGE_EXCLUDE` variables for related
301 information.
302
Andrew Geisslerf0343792020-11-18 10:42:21 -0600303 :term:`BASE_LIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500304 The library directory name for the CPU or Application Binary
Andrew Geissler09036742021-06-25 14:25:14 -0500305 Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
Andrew Geissler09209ee2020-12-13 08:44:15 -0600306 context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500307 section in the Yocto Project Development Tasks Manual for information
308 on Multilib.
309
Andrew Geissler09036742021-06-25 14:25:14 -0500310 The :term:`BASE_LIB` variable is defined in the machine include files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500311 the :term:`Source Directory`. If Multilib is not
312 being used, the value defaults to "lib".
313
Andrew Geisslerf0343792020-11-18 10:42:21 -0600314 :term:`BASE_WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500315 Points to the base of the work directory for all recipes. The default
316 value is "${TMPDIR}/work".
317
Andrew Geisslerf0343792020-11-18 10:42:21 -0600318 :term:`BB_ALLOWED_NETWORKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500319 Specifies a space-delimited list of hosts that the fetcher is allowed
320 to use to obtain the required source code. Following are
321 considerations surrounding this variable:
322
Andrew Geissler09036742021-06-25 14:25:14 -0500323 - This host list is only used if :term:`BB_NO_NETWORK` is either not set
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500324 or set to "0".
325
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700326 - There is limited support for wildcard matching against the beginning of
327 host names. For example, the following setting matches
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500328 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
329 ::
330
331 BB_ALLOWED_NETWORKS = "*.gnu.org"
332
333 .. note::
334
335 The use of the "``*``" character only works at the beginning of
336 a host name and it must be isolated from the remainder of the
337 host name. You cannot use the wildcard character in any other
338 location of the name or combined with the front part of the
339 name.
340
341 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
342 is not.
343
344 - Mirrors not in the host list are skipped and logged in debug.
345
346 - Attempts to access networks not in the host list cause a failure.
347
Andrew Geissler09036742021-06-25 14:25:14 -0500348 Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500349 :term:`PREMIRRORS` is very useful. Adding the host
Andrew Geissler09036742021-06-25 14:25:14 -0500350 you want to use to :term:`PREMIRRORS` results in the source code being
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500351 fetched from an allowed location and avoids raising an error when a
352 host that is not allowed is in a :term:`SRC_URI`
353 statement. This is because the fetcher does not attempt to use the
Andrew Geissler09036742021-06-25 14:25:14 -0500354 host listed in :term:`SRC_URI` after a successful fetch from the
355 :term:`PREMIRRORS` occurs.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500356
Andrew Geisslerf0343792020-11-18 10:42:21 -0600357 :term:`BB_DANGLINGAPPENDS_WARNONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500358 Defines how BitBake handles situations where an append file
359 (``.bbappend``) has no corresponding recipe file (``.bb``). This
360 condition often occurs when layers get out of sync (e.g. ``oe-core``
361 bumps a recipe version and the old recipe no longer exists and the
362 other layer has not been updated to the new version of the recipe
363 yet).
364
365 The default fatal behavior is safest because it is the sane reaction
366 given something is out of sync. It is important to realize when your
367 changes are no longer being applied.
368
369 You can change the default behavior by setting this variable to "1",
370 "yes", or "true" in your ``local.conf`` file, which is located in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500371 :term:`Build Directory`: Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500372
373 BB_DANGLINGAPPENDS_WARNONLY = "1"
374
Andrew Geisslerf0343792020-11-18 10:42:21 -0600375 :term:`BB_DISKMON_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500376 Monitors disk space and available inodes during the build and allows
377 you to control the build based on these parameters.
378
379 Disk space monitoring is disabled by default. To enable monitoring,
Andrew Geissler09036742021-06-25 14:25:14 -0500380 add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500381 found in the :term:`Build Directory`. Use the
382 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500383
384 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500385
386 BB_DISKMON_DIRS = "action,dir,threshold [...]"
387
388 where:
389
390 action is:
Andrew Geissler595f6302022-01-24 19:11:47 +0000391 ABORT: Immediately stop the build when
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500392 a threshold is broken.
393 STOPTASKS: Stop the build after the currently
394 executing tasks have finished when
395 a threshold is broken.
396 WARN: Issue a warning but continue the
397 build when a threshold is broken.
398 Subsequent warnings are issued as
399 defined by the BB_DISKMON_WARNINTERVAL
400 variable, which must be defined in
401 the conf/local.conf file.
402
403 dir is:
404 Any directory you choose. You can specify one or
405 more directories to monitor by separating the
406 groupings with a space. If two directories are
407 on the same device, only the first directory
408 is monitored.
409
410 threshold is:
411 Either the minimum available disk space,
412 the minimum number of free inodes, or
413 both. You must specify at least one. To
414 omit one or the other, simply omit the value.
415 Specify the threshold using G, M, K for Gbytes,
416 Mbytes, and Kbytes, respectively. If you do
417 not specify G, M, or K, Kbytes is assumed by
418 default. Do not use GB, MB, or KB.
419
Andrew Geisslerc926e172021-05-07 16:11:35 -0500420 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500421
422 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
423 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
424 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
425
426 The first example works only if you also provide the
427 :term:`BB_DISKMON_WARNINTERVAL`
428 variable in the ``conf/local.conf``. This example causes the build
Andrew Geissler595f6302022-01-24 19:11:47 +0000429 system to immediately stop when either the disk space in
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500430 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
431 below 100 Kbytes. Because two directories are provided with the
432 variable, the build system also issue a warning when the disk space
433 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
434 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
Andrew Geissler09036742021-06-25 14:25:14 -0500435 during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500436 variable.
437
438 The second example stops the build after all currently executing
439 tasks complete when the minimum disk space in the ``${TMPDIR}``
440 directory drops below 1 Gbyte. No disk monitoring occurs for the free
441 inodes in this case.
442
Andrew Geissler595f6302022-01-24 19:11:47 +0000443 The final example immediately stops the build when the number of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500444 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
445 disk space monitoring for the directory itself occurs in this case.
446
Andrew Geisslerf0343792020-11-18 10:42:21 -0600447 :term:`BB_DISKMON_WARNINTERVAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500448 Defines the disk space and free inode warning intervals. To set these
449 intervals, define the variable in your ``conf/local.conf`` file in
450 the :term:`Build Directory`.
451
Andrew Geissler09036742021-06-25 14:25:14 -0500452 If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500453 must also use the :term:`BB_DISKMON_DIRS`
454 variable and define its action as "WARN". During the build,
455 subsequent warnings are issued each time disk space or number of free
456 inodes further reduces by the respective interval.
457
Andrew Geissler09036742021-06-25 14:25:14 -0500458 If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
459 do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
Andrew Geisslerc926e172021-05-07 16:11:35 -0500460 monitoring interval defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500461
462 BB_DISKMON_WARNINTERVAL = "50M,5K"
463
464 When specifying the variable in your configuration file, use the
465 following form:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500466
467 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500468
469 BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
470
471 where:
472
473 disk_space_interval is:
474 An interval of memory expressed in either
475 G, M, or K for Gbytes, Mbytes, or Kbytes,
476 respectively. You cannot use GB, MB, or KB.
477
478 disk_inode_interval is:
479 An interval of free inodes expressed in either
480 G, M, or K for Gbytes, Mbytes, or Kbytes,
481 respectively. You cannot use GB, MB, or KB.
482
Andrew Geisslerc926e172021-05-07 16:11:35 -0500483 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500484
485 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
486 BB_DISKMON_WARNINTERVAL = "50M,5K"
487
488 These variables cause the
489 OpenEmbedded build system to issue subsequent warnings each time the
490 available disk space further reduces by 50 Mbytes or the number of
491 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
492 directory. Subsequent warnings based on the interval occur each time
493 a respective interval is reached beyond the initial warning (i.e. 1
494 Gbytes and 100 Kbytes).
495
Andrew Geisslerf0343792020-11-18 10:42:21 -0600496 :term:`BB_GENERATE_MIRROR_TARBALLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500497 Causes tarballs of the source control repositories (e.g. Git
498 repositories), including metadata, to be placed in the
499 :term:`DL_DIR` directory.
500
501 For performance reasons, creating and placing tarballs of these
502 repositories is not the default action by the OpenEmbedded build
503 system.
504 ::
505
506 BB_GENERATE_MIRROR_TARBALLS = "1"
507
508 Set this variable in your
509 ``local.conf`` file in the :term:`Build Directory`.
510
511 Once you have the tarballs containing your source files, you can
Andrew Geissler09036742021-06-25 14:25:14 -0500512 clean up your :term:`DL_DIR` directory by deleting any Git or other
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500513 source control work directories.
514
Andrew Geisslerf0343792020-11-18 10:42:21 -0600515 :term:`BB_NUMBER_THREADS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500516 The maximum number of tasks BitBake should run in parallel at any one
517 time. The OpenEmbedded build system automatically configures this
518 variable to be equal to the number of cores on the build system. For
519 example, a system with a dual core processor that also uses
Andrew Geissler09036742021-06-25 14:25:14 -0500520 hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500521 to "4".
522
523 For single socket systems (i.e. one CPU), you should not have to
524 override this variable to gain optimal parallelism during builds.
525 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -0500526 CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500527 is not set higher than "20".
528
529 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600530 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500531 section in the Yocto Project Development Tasks Manual.
532
Andrew Geisslerf0343792020-11-18 10:42:21 -0600533 :term:`BB_SERVER_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500534 Specifies the time (in seconds) after which to unload the BitBake
Andrew Geissler09036742021-06-25 14:25:14 -0500535 server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500536 long the BitBake server stays resident between invocations.
537
538 For example, the following statement in your ``local.conf`` file
Andrew Geisslerc926e172021-05-07 16:11:35 -0500539 instructs the server to be unloaded after 20 seconds of inactivity::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500540
541 BB_SERVER_TIMEOUT = "20"
542
543 If you want the server to never be unloaded,
Andrew Geissler5f350902021-07-23 13:09:54 -0400544 set :term:`BB_SERVER_TIMEOUT` to "-1".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500545
Andrew Geisslerf0343792020-11-18 10:42:21 -0600546 :term:`BBCLASSEXTEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500547 Allows you to extend a recipe so that it builds variants of the
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700548 software. There are common variants for recipes as "natives" like
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500549 ``quilt-native``, which is a copy of Quilt built to run on the build
550 system; "crosses" such as ``gcc-cross``, which is a compiler built to
551 run on the build machine but produces binaries that run on the target
552 :term:`MACHINE`; "nativesdk", which targets the SDK
Andrew Geissler09036742021-06-25 14:25:14 -0500553 machine instead of :term:`MACHINE`; and "mulitlibs" in the form
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500554 "``multilib:``\ multilib_name".
555
556 To build a different variant of the recipe with a minimal amount of
Andrew Geisslerc926e172021-05-07 16:11:35 -0500557 code, it usually is as simple as adding the following to your recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500558
559 BBCLASSEXTEND =+ "native nativesdk"
560 BBCLASSEXTEND =+ "multilib:multilib_name"
561
562 .. note::
563
Andrew Geissler09036742021-06-25 14:25:14 -0500564 Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500565 variants by rewriting variable values and applying overrides such
Patrick Williams0ca19cc2021-08-16 14:03:13 -0500566 as ``:class-native``. For example, to generate a native version of
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500567 a recipe, a :term:`DEPENDS` on "foo" is rewritten
Andrew Geissler5f350902021-07-23 13:09:54 -0400568 to a :term:`DEPENDS` on "foo-native".
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500569
Andrew Geissler09036742021-06-25 14:25:14 -0500570 Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500571 Parsing once adds some limitations. For example, it is not
572 possible to include a different file depending on the variant,
573 since ``include`` statements are processed when the recipe is
574 parsed.
575
Andrew Geisslerf0343792020-11-18 10:42:21 -0600576 :term:`BBFILE_COLLECTIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500577 Lists the names of configured layers. These names are used to find
578 the other ``BBFILE_*`` variables. Typically, each layer will append
579 its name to this variable in its ``conf/layer.conf`` file.
580
Andrew Geisslerf0343792020-11-18 10:42:21 -0600581 :term:`BBFILE_PATTERN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500582 Variable that expands to match files from
583 :term:`BBFILES` in a particular layer. This variable
584 is used in the ``conf/layer.conf`` file and must be suffixed with the
585 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
586
Andrew Geisslerf0343792020-11-18 10:42:21 -0600587 :term:`BBFILE_PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500588 Assigns the priority for recipe files in each layer.
589
590 This variable is useful in situations where the same recipe appears
591 in more than one layer. Setting this variable allows you to
592 prioritize a layer against other layers that contain the same recipe
Andrew Geissler615f2f12022-07-15 14:00:58 -0500593 --- effectively letting you control the precedence for the multiple
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500594 layers. The precedence established through this variable stands
595 regardless of a recipe's version (:term:`PV` variable). For
Andrew Geissler09036742021-06-25 14:25:14 -0500596 example, a layer that has a recipe with a higher :term:`PV` value but for
597 which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500598 has a lower precedence.
599
Andrew Geissler09036742021-06-25 14:25:14 -0500600 A larger value for the :term:`BBFILE_PRIORITY` variable results in a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500601 higher precedence. For example, the value 6 has a higher precedence
Andrew Geissler09036742021-06-25 14:25:14 -0500602 than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
603 is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500604 for more information. The default priority, if unspecified for a
605 layer with no dependencies, is the lowest defined priority + 1 (or 1
606 if no priorities are defined).
607
608 .. tip::
609
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500610 You can use the command ``bitbake-layers show-layers``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500611 to list all configured layers along with their priorities.
612
Andrew Geisslerf0343792020-11-18 10:42:21 -0600613 :term:`BBFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500614 A space-separated list of recipe files BitBake uses to build
615 software.
616
617 When specifying recipe files, you can pattern match using Python's
618 `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
619 For details on the syntax, see the documentation by following the
620 previous link.
621
Andrew Geisslerf0343792020-11-18 10:42:21 -0600622 :term:`BBFILES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500623 Activates content when identified layers are present. You identify
624 the layers by the collections that the layers define.
625
Andrew Geissler09036742021-06-25 14:25:14 -0500626 Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500627 whose corresponding ``.bb`` file is in a layer that attempts to
628 modify other layers through ``.bbappend`` but does not want to
629 introduce a hard dependency on those other layers.
630
Andrew Geissler09036742021-06-25 14:25:14 -0500631 Use the following form for :term:`BBFILES_DYNAMIC`:
Andrew Geissler595f6302022-01-24 19:11:47 +0000632 ``collection_name:filename_pattern``.
633
634 The following example identifies two collection names and two
635 filename patterns::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500636
637 BBFILES_DYNAMIC += " \
638 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
639 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
640 "
641
642 This next example shows an error message that occurs because invalid
Andrew Geissler595f6302022-01-24 19:11:47 +0000643 entries are found, which cause parsing to fail:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500644
645 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500646
647 ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
648 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
649 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
650
Andrew Geisslerf0343792020-11-18 10:42:21 -0600651 :term:`BBINCLUDELOGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500652 Variable that controls how BitBake displays logs on build failure.
653
Andrew Geisslerf0343792020-11-18 10:42:21 -0600654 :term:`BBINCLUDELOGS_LINES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500655 If :term:`BBINCLUDELOGS` is set, specifies the
656 maximum number of lines from the task log file to print when
Andrew Geissler09036742021-06-25 14:25:14 -0500657 reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500658 the entire log is printed.
659
Andrew Geisslerf0343792020-11-18 10:42:21 -0600660 :term:`BBLAYERS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500661 Lists the layers to enable during the build. This variable is defined
662 in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
Andrew Geisslerc926e172021-05-07 16:11:35 -0500663 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500664
665 BBLAYERS = " \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500666 /home/scottrif/poky/meta \
667 /home/scottrif/poky/meta-poky \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500668 /home/scottrif/poky/meta-yocto-bsp \
669 /home/scottrif/poky/meta-mykernel \
670 "
671
672 This example enables four layers, one of which is a custom,
673 user-defined layer named ``meta-mykernel``.
674
Andrew Geisslerf0343792020-11-18 10:42:21 -0600675 :term:`BBMASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500676 Prevents BitBake from processing recipes and recipe append files.
677
Andrew Geissler09036742021-06-25 14:25:14 -0500678 You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500679 ``.bbappend`` files. BitBake ignores any recipe or recipe append
680 files that match any of the expressions. It is as if BitBake does not
681 see them at all. Consequently, matching files are not parsed or
682 otherwise used by BitBake.
683
684 The values you provide are passed to Python's regular expression
685 compiler. Consequently, the syntax follows Python's Regular
686 Expression (re) syntax. The expressions are compared against the full
687 paths to the files. For complete syntax information, see Python's
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500688 documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500689
690 The following example uses a complete regular expression to tell
691 BitBake to ignore all recipe and recipe append files in the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500692 ``meta-ti/recipes-misc/`` directory::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500693
694 BBMASK = "meta-ti/recipes-misc/"
695
696 If you want to mask out multiple directories or recipes, you can
697 specify multiple regular expression fragments. This next example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500698 masks out multiple directories and individual recipes::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500699
700 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
701 BBMASK += "/meta-oe/recipes-support/"
702 BBMASK += "/meta-foo/.*/openldap"
703 BBMASK += "opencv.*\.bbappend"
704 BBMASK += "lzma"
705
706 .. note::
707
708 When specifying a directory name, use the trailing slash character
709 to ensure you match just that directory name.
710
Andrew Geisslerf0343792020-11-18 10:42:21 -0600711 :term:`BBMULTICONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500712 Specifies each additional separate configuration when you are
713 building targets with multiple configurations. Use this variable in
714 your ``conf/local.conf`` configuration file. Specify a
715 multiconfigname for each configuration file you are using. For
Andrew Geisslerc926e172021-05-07 16:11:35 -0500716 example, the following line specifies three configuration files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500717
718 BBMULTICONFIG = "configA configB configC"
719
Andrew Geissler615f2f12022-07-15 14:00:58 -0500720 Each configuration file you use must reside in a ``multiconfig``
721 subdirectory of a configuration directory within a layer, or
722 within the :term:`Build Directory` (e.g.
723 ``build_directory/conf/multiconfig/configA.conf`` or
724 ``mylayer/conf/multiconfig/configB.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:`BBSERVER`
Andrew Geissler09036742021-06-25 14:25:14 -0500732 If defined in the BitBake environment, :term:`BBSERVER` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500733 BitBake remote server.
734
735 Use the following format to export the variable to the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -0500736 environment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500737
738 export BBSERVER=localhost:$port
739
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000740 By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
Andrew Geissler09036742021-06-25 14:25:14 -0500741 Consequently, :term:`BBSERVER` is excluded from checksum and dependency
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500742 data.
743
Andrew Geisslerf0343792020-11-18 10:42:21 -0600744 :term:`BINCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500745 When inheriting the
746 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
747 this variable specifies binary configuration scripts to disable in
748 favor of using ``pkg-config`` to query the information. The
Andrew Geissler595f6302022-01-24 19:11:47 +0000749 :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500750 return an error so that calls to them can be easily found and
751 replaced.
752
753 To add multiple scripts, separate them by spaces. Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -0500754 from the ``libpng`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500755
756 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
757
Andrew Geisslerf0343792020-11-18 10:42:21 -0600758 :term:`BINCONFIG_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500759 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
760 this variable specifies a wildcard for configuration scripts that
761 need editing. The scripts are edited to correct any paths that have
762 been set up during compilation so that they are correct for use when
763 installed into the sysroot and called by the build processes of other
764 recipes.
765
766 .. note::
767
Andrew Geissler09036742021-06-25 14:25:14 -0500768 The :term:`BINCONFIG_GLOB` variable uses
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500769 `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
770 which is recognition and expansion of wildcards during pattern
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500771 matching. Shell globbing is very similar to
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500772 `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
773 and `glob <https://docs.python.org/3/library/glob.html>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500774
775 For more information on how this variable works, see
776 ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
777 You can also find general
778 information on the class in the
Andrew Geissler595f6302022-01-24 19:11:47 +0000779 ":ref:`ref-classes-binconfig`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500780
Andrew Geisslerf0343792020-11-18 10:42:21 -0600781 :term:`BP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500782 The base recipe name and version but without any special recipe name
Andrew Geissler09036742021-06-25 14:25:14 -0500783 suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
Andrew Geisslerc926e172021-05-07 16:11:35 -0500784 comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500785
786 ${BPN}-${PV}
787
Andrew Geisslerf0343792020-11-18 10:42:21 -0600788 :term:`BPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500789 This variable is a version of the :term:`PN` variable with
790 common prefixes and suffixes removed, such as ``nativesdk-``,
791 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
792 The exact lists of prefixes and suffixes removed are specified by the
793 :term:`MLPREFIX` and
794 :term:`SPECIAL_PKGSUFFIX` variables,
795 respectively.
796
Andrew Geisslerf0343792020-11-18 10:42:21 -0600797 :term:`BUGTRACKER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500798 Specifies a URL for an upstream bug tracking website for a recipe.
799 The OpenEmbedded build system does not use this variable. Rather, the
800 variable is a useful pointer in case a bug in the software being
801 built needs to be manually reported.
802
Andrew Geisslerf0343792020-11-18 10:42:21 -0600803 :term:`BUILD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500804 Specifies the architecture of the build host (e.g. ``i686``). The
Andrew Geissler09036742021-06-25 14:25:14 -0500805 OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500806 machine name reported by the ``uname`` command.
807
Andrew Geisslerf0343792020-11-18 10:42:21 -0600808 :term:`BUILD_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500809 Specifies the architecture-specific assembler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500810 host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500811
Andrew Geisslerf0343792020-11-18 10:42:21 -0600812 :term:`BUILD_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500813 Specifies the architecture-specific C compiler flags for the build
Andrew Geissler09036742021-06-25 14:25:14 -0500814 host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500815
Andrew Geisslerf0343792020-11-18 10:42:21 -0600816 :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500817 Specifies the linker command to be used for the build host when the C
Andrew Geissler09036742021-06-25 14:25:14 -0500818 compiler is being used as the linker. By default, :term:`BUILD_CCLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500819 points to GCC and passes as arguments the value of
820 :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500821 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500822
Andrew Geisslerf0343792020-11-18 10:42:21 -0600823 :term:`BUILD_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500824 Specifies the flags to pass to the C compiler when building for the
825 build host. When building in the ``-native`` context,
826 :term:`CFLAGS` is set to the value of this variable by
827 default.
828
Andrew Geisslerf0343792020-11-18 10:42:21 -0600829 :term:`BUILD_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500830 Specifies the flags to pass to the C preprocessor (i.e. to both the C
831 and the C++ compilers) when building for the build host. When
832 building in the ``-native`` context, :term:`CPPFLAGS`
833 is set to the value of this variable by default.
834
Andrew Geisslerf0343792020-11-18 10:42:21 -0600835 :term:`BUILD_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500836 Specifies the flags to pass to the C++ compiler when building for the
837 build host. When building in the ``-native`` context,
838 :term:`CXXFLAGS` is set to the value of this variable
839 by default.
840
Andrew Geisslerf0343792020-11-18 10:42:21 -0600841 :term:`BUILD_FC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500842 Specifies the Fortran compiler command for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500843 default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500844 value of :term:`BUILD_CC_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500845 :term:`BUILD_CC_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500846
Andrew Geisslerf0343792020-11-18 10:42:21 -0600847 :term:`BUILD_LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500848 Specifies the linker command for the build host. By default,
Andrew Geissler09036742021-06-25 14:25:14 -0500849 :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500850 the value of :term:`BUILD_LD_ARCH`, assuming
Andrew Geissler09036742021-06-25 14:25:14 -0500851 :term:`BUILD_LD_ARCH` is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500852
Andrew Geisslerf0343792020-11-18 10:42:21 -0600853 :term:`BUILD_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500854 Specifies architecture-specific linker flags for the build host. By
Andrew Geissler09036742021-06-25 14:25:14 -0500855 default, the value of :term:`BUILD_LD_ARCH` is empty.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500856
Andrew Geisslerf0343792020-11-18 10:42:21 -0600857 :term:`BUILD_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500858 Specifies the flags to pass to the linker when building for the build
859 host. When building in the ``-native`` context,
860 :term:`LDFLAGS` is set to the value of this variable
861 by default.
862
Andrew Geisslerf0343792020-11-18 10:42:21 -0600863 :term:`BUILD_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500864 Specifies the optimization flags passed to the C compiler when
865 building for the build host or the SDK. The flags are passed through
866 the :term:`BUILD_CFLAGS` and
867 :term:`BUILDSDK_CFLAGS` default values.
868
Andrew Geissler5f350902021-07-23 13:09:54 -0400869 The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500870 -pipe".
871
Andrew Geisslerf0343792020-11-18 10:42:21 -0600872 :term:`BUILD_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500873 Specifies the operating system in use on the build host (e.g.
874 "linux"). The OpenEmbedded build system sets the value of
Andrew Geissler615f2f12022-07-15 14:00:58 -0500875 :term:`BUILD_OS` from the OS reported by the ``uname`` command --- the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500876 first word, converted to lower-case characters.
877
Andrew Geisslerf0343792020-11-18 10:42:21 -0600878 :term:`BUILD_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500879 The toolchain binary prefix used for native recipes. The OpenEmbedded
Andrew Geissler09036742021-06-25 14:25:14 -0500880 build system uses the :term:`BUILD_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500881 :term:`TARGET_PREFIX` when building for
882 ``native`` recipes.
883
Andrew Geisslerf0343792020-11-18 10:42:21 -0600884 :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500885 Specifies the command to be used to strip debugging symbols from
Andrew Geissler09036742021-06-25 14:25:14 -0500886 binaries produced for the build host. By default, :term:`BUILD_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500887 points to
888 ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
889
Andrew Geisslerf0343792020-11-18 10:42:21 -0600890 :term:`BUILD_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500891 Specifies the system, including the architecture and the operating
892 system, to use when building for the build host (i.e. when building
893 ``native`` recipes).
894
895 The OpenEmbedded build system automatically sets this variable based
896 on :term:`BUILD_ARCH`,
897 :term:`BUILD_VENDOR`, and
898 :term:`BUILD_OS`. You do not need to set the
Andrew Geissler09036742021-06-25 14:25:14 -0500899 :term:`BUILD_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500900
Andrew Geisslerf0343792020-11-18 10:42:21 -0600901 :term:`BUILD_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500902 Specifies the vendor name to use when building for the build host.
903 The default value is an empty string ("").
904
Andrew Geisslerf0343792020-11-18 10:42:21 -0600905 :term:`BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500906 Points to the location of the :term:`Build Directory`.
907 You can define this directory indirectly through the
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500908 :ref:`structure-core-script` script by passing in a Build
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500909 Directory path when you run the script. If you run the script and do
Andrew Geissler09036742021-06-25 14:25:14 -0500910 not provide a Build Directory path, the :term:`BUILDDIR` defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500911 ``build`` in the current directory.
912
Andrew Geisslerf0343792020-11-18 10:42:21 -0600913 :term:`BUILDHISTORY_COMMIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500914 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
915 class, this variable specifies whether or not to commit the build
916 history output in a local Git repository. If set to "1", this local
Andrew Geissler595f6302022-01-24 19:11:47 +0000917 repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500918 class and a commit will be created on every build for changes to each
919 top-level subdirectory of the build history output (images, packages,
920 and sdk). If you want to track changes to build history over time,
921 you should set this value to "1".
922
Andrew Geissler595f6302022-01-24 19:11:47 +0000923 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build
Andrew Geisslerc926e172021-05-07 16:11:35 -0500924 history output in a local Git repository::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500925
926 BUILDHISTORY_COMMIT ?= "0"
927
Andrew Geisslerf0343792020-11-18 10:42:21 -0600928 :term:`BUILDHISTORY_COMMIT_AUTHOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500929 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
930 class, this variable specifies the author to use for each Git commit.
Andrew Geissler09036742021-06-25 14:25:14 -0500931 In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500932 :term:`BUILDHISTORY_COMMIT` variable must
933 be set to "1".
934
935 Git requires that the value you provide for the
Andrew Geissler09036742021-06-25 14:25:14 -0500936 :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500937 email@host". Providing an email address or host that is not valid
938 does not produce an error.
939
Andrew Geissler595f6302022-01-24 19:11:47 +0000940 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500941
942 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
943
Andrew Geisslerf0343792020-11-18 10:42:21 -0600944 :term:`BUILDHISTORY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500945 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
946 class, this variable specifies the directory in which build history
947 information is kept. For more information on how the variable works,
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000948 see the :ref:`ref-classes-buildhistory` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500949
Andrew Geissler595f6302022-01-24 19:11:47 +0000950 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500951
952 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
953
Andrew Geisslerf0343792020-11-18 10:42:21 -0600954 :term:`BUILDHISTORY_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500955 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
956 class, this variable specifies the build history features to be
957 enabled. For more information on how build history works, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600958 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500959 section in the Yocto Project Development Tasks Manual.
960
961 You can specify these features in the form of a space-separated list:
962
963 - *image:* Analysis of the contents of images, which includes the
964 list of installed packages among other things.
965
966 - *package:* Analysis of the contents of individual packages.
967
968 - *sdk:* Analysis of the contents of the software development kit
969 (SDK).
970
971 - *task:* Save output file signatures for
Andrew Geissler09209ee2020-12-13 08:44:15 -0600972 :ref:`shared state <overview-manual/concepts:shared state cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500973 (sstate) tasks.
974 This saves one file per task and lists the SHA-256 checksums for
975 each file staged (i.e. the output of the task).
976
Andrew Geissler595f6302022-01-24 19:11:47 +0000977 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
Andrew Geisslerc926e172021-05-07 16:11:35 -0500978 features::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500979
980 BUILDHISTORY_FEATURES ?= "image package sdk"
981
Andrew Geisslerf0343792020-11-18 10:42:21 -0600982 :term:`BUILDHISTORY_IMAGE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500983 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
984 class, this variable specifies a list of paths to files copied from
985 the image contents into the build history directory under an
986 "image-files" directory in the directory for the image, so that you
987 can track the contents of each file. The default is to copy
988 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
989 changes in user and group entries. You can modify the list to include
990 any file. Specifying an invalid path does not produce an error.
991 Consequently, you can include files that might not always be present.
992
Andrew Geissler595f6302022-01-24 19:11:47 +0000993 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500994 following files::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500995
996 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
997
Andrew Geissler5f350902021-07-23 13:09:54 -0400998 :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
999 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1000 class, this variable specifies a common path prefix that should be
1001 stripped off the beginning of paths in the task signature list when the
1002 ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1003 useful when build history is populated from multiple sources that may not
1004 all use the same top level directory.
1005
Andrew Geissler595f6302022-01-24 19:11:47 +00001006 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geissler5f350902021-07-23 13:09:54 -04001007
1008 BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1009
1010 In this case, no prefixes will be stripped.
1011
Andrew Geisslerf0343792020-11-18 10:42:21 -06001012 :term:`BUILDHISTORY_PUSH_REPO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001013 When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1014 class, this variable optionally specifies a remote repository to
1015 which build history pushes Git changes. In order for
Andrew Geissler09036742021-06-25 14:25:14 -05001016 :term:`BUILDHISTORY_PUSH_REPO` to work,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001017 :term:`BUILDHISTORY_COMMIT` must be set to
1018 "1".
1019
1020 The repository should correspond to a remote address that specifies a
1021 repository as understood by Git, or alternatively to a remote name
1022 that you have set up manually using ``git remote`` within the local
1023 repository.
1024
Andrew Geissler595f6302022-01-24 19:11:47 +00001025 By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001026
1027 BUILDHISTORY_PUSH_REPO ?= ""
1028
Andrew Geisslerf0343792020-11-18 10:42:21 -06001029 :term:`BUILDSDK_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001030 Specifies the flags to pass to the C compiler when building for the
1031 SDK. When building in the ``nativesdk-`` context,
1032 :term:`CFLAGS` is set to the value of this variable by
1033 default.
1034
Andrew Geisslerf0343792020-11-18 10:42:21 -06001035 :term:`BUILDSDK_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001036 Specifies the flags to pass to the C pre-processor (i.e. to both the
1037 C and the C++ compilers) when building for the SDK. When building in
1038 the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1039 to the value of this variable by default.
1040
Andrew Geisslerf0343792020-11-18 10:42:21 -06001041 :term:`BUILDSDK_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001042 Specifies the flags to pass to the C++ compiler when building for the
1043 SDK. When building in the ``nativesdk-`` context,
1044 :term:`CXXFLAGS` is set to the value of this variable
1045 by default.
1046
Andrew Geisslerf0343792020-11-18 10:42:21 -06001047 :term:`BUILDSDK_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001048 Specifies the flags to pass to the linker when building for the SDK.
1049 When building in the ``nativesdk-`` context,
1050 :term:`LDFLAGS` is set to the value of this variable
1051 by default.
1052
Andrew Geisslerf0343792020-11-18 10:42:21 -06001053 :term:`BUILDSTATS_BASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001054 Points to the location of the directory that holds build statistics
1055 when you use and enable the
1056 :ref:`buildstats <ref-classes-buildstats>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001057 :term:`BUILDSTATS_BASE` directory defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001058 ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1059
Andrew Geisslerf0343792020-11-18 10:42:21 -06001060 :term:`BUSYBOX_SPLIT_SUID`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001061 For the BusyBox recipe, specifies whether to split the output
1062 executable file into two parts: one for features that require
1063 ``setuid root``, and one for the remaining features (i.e. those that
1064 do not require ``setuid root``).
1065
Andrew Geissler09036742021-06-25 14:25:14 -05001066 The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001067 splitting the output executable file. Set the variable to "0" to get
1068 a single output executable file.
1069
Andrew Geisslerf0343792020-11-18 10:42:21 -06001070 :term:`CACHE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001071 Specifies the directory BitBake uses to store a cache of the
1072 :term:`Metadata` so it does not need to be parsed every time
1073 BitBake is started.
1074
Andrew Geisslerf0343792020-11-18 10:42:21 -06001075 :term:`CC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001076 The minimal command and arguments used to run the C compiler.
1077
Andrew Geisslerf0343792020-11-18 10:42:21 -06001078 :term:`CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001079 Specifies the flags to pass to the C compiler. This variable is
1080 exported to an environment variable and thus made visible to the
1081 software being built during the compilation step.
1082
Andrew Geissler09036742021-06-25 14:25:14 -05001083 Default initialization for :term:`CFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001084 being built:
1085
1086 - :term:`TARGET_CFLAGS` when building for the
1087 target
1088
1089 - :term:`BUILD_CFLAGS` when building for the
1090 build host (i.e. ``-native``)
1091
1092 - :term:`BUILDSDK_CFLAGS` when building for
1093 an SDK (i.e. ``nativesdk-``)
1094
Andrew Geisslerf0343792020-11-18 10:42:21 -06001095 :term:`CLASSOVERRIDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001096 An internal variable specifying the special class override that
1097 should currently apply (e.g. "class-target", "class-native", and so
1098 forth). The classes that use this variable (e.g.
1099 :ref:`native <ref-classes-native>`,
1100 :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1101 variable to appropriate values.
1102
1103 .. note::
1104
Andrew Geissler5f350902021-07-23 13:09:54 -04001105 :term:`CLASSOVERRIDE` gets its default "class-target" value from the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001106 ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001107
1108 As an example, the following override allows you to install extra
Andrew Geisslerc926e172021-05-07 16:11:35 -05001109 files, but only when building for the target::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001110
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001111 do_install:append:class-target() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001112 install my-extra-file ${D}${sysconfdir}
1113 }
1114
1115 Here is an example where ``FOO`` is set to
1116 "native" when building for the build host, and to "other" when not
Andrew Geisslerc926e172021-05-07 16:11:35 -05001117 building for the build host::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001118
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001119 FOO:class-native = "native"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001120 FOO = "other"
1121
Andrew Geissler09036742021-06-25 14:25:14 -05001122 The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001123 that it is included in the default value of
1124 :term:`OVERRIDES`.
1125
Andrew Geisslerf0343792020-11-18 10:42:21 -06001126 :term:`CLEANBROKEN`
Andrew Geissler09036742021-06-25 14:25:14 -05001127 If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001128 ``make clean`` command does not work for the software being built.
1129 Consequently, the OpenEmbedded build system will not try to run
1130 ``make clean`` during the :ref:`ref-tasks-configure`
1131 task, which is the default behavior.
1132
Andrew Geisslerf0343792020-11-18 10:42:21 -06001133 :term:`COMBINED_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001134 Provides a list of hardware features that are enabled in both
1135 :term:`MACHINE_FEATURES` and
1136 :term:`DISTRO_FEATURES`. This select list of
1137 features contains features that make sense to be controlled both at
1138 the machine and distribution configuration level. For example, the
1139 "bluetooth" feature requires hardware support but should also be
1140 optional at the distribution level, in case the hardware supports
1141 Bluetooth but you do not ever intend to use it.
1142
Andrew Geisslerf0343792020-11-18 10:42:21 -06001143 :term:`COMMON_LICENSE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001144 Points to ``meta/files/common-licenses`` in the
1145 :term:`Source Directory`, which is where generic license
1146 files reside.
1147
Andrew Geisslerf0343792020-11-18 10:42:21 -06001148 :term:`COMPATIBLE_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001149 A regular expression that resolves to one or more hosts (when the
1150 recipe is native) or one or more targets (when the recipe is
1151 non-native) with which a recipe is compatible. The regular expression
1152 is matched against :term:`HOST_SYS`. You can use the
1153 variable to stop recipes from being built for classes of systems with
1154 which the recipes are not compatible. Stopping these builds is
1155 particularly useful with kernels. The variable also helps to increase
1156 parsing speed since the build system skips parsing recipes not
1157 compatible with the current system.
1158
Andrew Geisslerf0343792020-11-18 10:42:21 -06001159 :term:`COMPATIBLE_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001160 A regular expression that resolves to one or more target machines
1161 with which a recipe is compatible. The regular expression is matched
1162 against :term:`MACHINEOVERRIDES`. You can use
1163 the variable to stop recipes from being built for machines with which
1164 the recipes are not compatible. Stopping these builds is particularly
1165 useful with kernels. The variable also helps to increase parsing
1166 speed since the build system skips parsing recipes not compatible
1167 with the current machine.
1168
Andrew Geisslerf0343792020-11-18 10:42:21 -06001169 :term:`COMPLEMENTARY_GLOB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001170 Defines wildcards to match when installing a list of complementary
1171 packages for all the packages explicitly (or implicitly) installed in
1172 an image.
1173
1174 .. note::
1175
Andrew Geissler09036742021-06-25 14:25:14 -05001176 The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001177 (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1178 which is similar to the Unix style pathname pattern expansion
1179 (`glob <https://docs.python.org/3/library/glob.html>`__).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001180
1181 The resulting list of complementary packages is associated with an
1182 item that can be added to
1183 :term:`IMAGE_FEATURES`. An example usage of
Andrew Geissler09036742021-06-25 14:25:14 -05001184 this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001185 will install -dev packages (containing headers and other development
1186 files) for every package in the image.
1187
1188 To add a new feature item pointing to a wildcard, use a variable flag
1189 to specify the feature item name and use the value to specify the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001190 wildcard. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001191
1192 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1193
Andrew Geisslerf0343792020-11-18 10:42:21 -06001194 :term:`COMPONENTS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001195 Stores sysroot components for each recipe. The OpenEmbedded build
Andrew Geissler5f350902021-07-23 13:09:54 -04001196 system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001197 sysroots for other recipes.
1198
1199 The default is
1200 "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1201 (i.e.
1202 "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1203
Andrew Geisslerf0343792020-11-18 10:42:21 -06001204 :term:`CONF_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001205 Tracks the version of the local configuration file (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05001206 ``local.conf``). The value for :term:`CONF_VERSION` increments each time
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001207 ``build/conf/`` compatibility changes.
1208
Andrew Geisslerf0343792020-11-18 10:42:21 -06001209 :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001210 Identifies editable or configurable files that are part of a package.
1211 If the Package Management System (PMS) is being used to update
1212 packages on the target system, it is possible that configuration
1213 files you have changed after the original installation and that you
1214 now want to remain unchanged are overwritten. In other words,
1215 editable files might exist in the package that you do not want reset
Andrew Geissler09036742021-06-25 14:25:14 -05001216 as part of the package update process. You can use the :term:`CONFFILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001217 variable to list the files in the package that you wish to prevent
1218 the PMS from overwriting during this update process.
1219
Andrew Geissler09036742021-06-25 14:25:14 -05001220 To use the :term:`CONFFILES` variable, provide a package name override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001221 that identifies the resulting package. Then, provide a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001222 space-separated list of files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001223
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001224 CONFFILES:${PN} += "${sysconfdir}/file1 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001225 ${sysconfdir}/file2 ${sysconfdir}/file3"
1226
Andrew Geissler09036742021-06-25 14:25:14 -05001227 There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1228 variables. The files listed within :term:`CONFFILES` must be a subset of
1229 the files listed within :term:`FILES`. Because the configuration files
1230 you provide with :term:`CONFFILES` are simply being identified so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001231 the PMS will not overwrite them, it makes sense that the files must
Andrew Geissler09036742021-06-25 14:25:14 -05001232 already be included as part of the package through the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001233 variable.
1234
1235 .. note::
1236
Andrew Geissler09036742021-06-25 14:25:14 -05001237 When specifying paths as part of the :term:`CONFFILES` variable, it is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001238 good practice to use appropriate path variables.
1239 For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1240 rather than ``/usr/bin``. You can find a list of these variables at
1241 the top of the ``meta/conf/bitbake.conf`` file in the
1242 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001243
Andrew Geisslerf0343792020-11-18 10:42:21 -06001244 :term:`CONFIG_INITRAMFS_SOURCE`
Patrick Williams2194f502022-10-16 14:26:09 -05001245 Identifies the initial RAM filesystem (:term:`Initramfs`) source files. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001246 OpenEmbedded build system receives and uses this kernel Kconfig
1247 variable as an environment variable. By default, the variable is set
1248 to null ("").
1249
Andrew Geissler09036742021-06-25 14:25:14 -05001250 The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001251 with a ``.cpio`` suffix or a space-separated list of directories and
Patrick Williams2194f502022-10-16 14:26:09 -05001252 files for building the :term:`Initramfs` image. A cpio archive should contain
1253 a filesystem archive to be used as an :term:`Initramfs` image. Directories
1254 should contain a filesystem layout to be included in the :term:`Initramfs`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001255 image. Files should contain entries according to the format described
1256 by the ``usr/gen_init_cpio`` program in the kernel tree.
1257
Patrick Williams2194f502022-10-16 14:26:09 -05001258 If you specify multiple directories and files, the :term:`Initramfs` image
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001259 will be the aggregate of all of them.
1260
Patrick Williams2194f502022-10-16 14:26:09 -05001261 For information on creating an :term:`Initramfs`, see the
1262 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001263 in the Yocto Project Development Tasks Manual.
1264
Andrew Geisslerf0343792020-11-18 10:42:21 -06001265 :term:`CONFIG_SITE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001266 A list of files that contains ``autoconf`` test results relevant to
1267 the current build. This variable is used by the Autotools utilities
1268 when running ``configure``.
1269
Andrew Geisslerf0343792020-11-18 10:42:21 -06001270 :term:`CONFIGURE_FLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001271 The minimal arguments for GNU configure.
1272
Andrew Geisslerf0343792020-11-18 10:42:21 -06001273 :term:`CONFLICT_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001274 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001275 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001276 class, this variable identifies distribution features that would be
1277 in conflict should the recipe be built. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05001278 :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1279 appears in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06001280 the recipe will be skipped, and if the build system attempts to build
1281 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001282
Andrew Geissler615f2f12022-07-15 14:00:58 -05001283 :term:`CONVERSION_CMD`
1284 This variable is used for storing image conversion commands.
1285 Image conversion can convert an image into different objects like:
1286
1287 - Compressed version of the image
1288
1289 - Checksums for the image
1290
1291 An example of :term:`CONVERSION_CMD` from :ref:`image-types
1292 <ref-classes-image_types>` class is::
1293
1294 CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
1295
Andrew Geissler9aee5002022-03-30 16:27:02 +00001296 :term:`COPY_LIC_DIRS`
1297 If set to "1" along with the
1298 :term:`COPY_LIC_MANIFEST` variable, the
1299 OpenEmbedded build system copies into the image the license files,
1300 which are located in ``/usr/share/common-licenses``, for each
1301 package. The license files are placed in directories within the image
1302 itself during build time.
1303
1304 .. note::
1305
1306 The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1307 newly installed packages to an image, which might be most suitable for
1308 read-only filesystems that cannot be upgraded. See the
1309 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1310 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1311 section in the Yocto Project Development Tasks Manual for
1312 information on providing license text.
1313
1314 :term:`COPY_LIC_MANIFEST`
1315 If set to "1", the OpenEmbedded build system copies the license
1316 manifest for the image to
1317 ``/usr/share/common-licenses/license.manifest`` within the image
1318 itself during build time.
1319
1320 .. note::
1321
1322 The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1323 newly installed packages to an image, which might be most suitable for
1324 read-only filesystems that cannot be upgraded. See the
1325 :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1326 You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1327 section in the Yocto Project Development Tasks Manual for
1328 information on providing license text.
1329
Andrew Geisslerf0343792020-11-18 10:42:21 -06001330 :term:`COPYLEFT_LICENSE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001331 A space-separated list of licenses to exclude from the source
1332 archived by the :ref:`archiver <ref-classes-archiver>` class. In
1333 other words, if a license in a recipe's
1334 :term:`LICENSE` value is in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05001335 :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001336 class.
1337
1338 .. note::
1339
Andrew Geissler09036742021-06-25 14:25:14 -05001340 The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001341 :term:`COPYLEFT_LICENSE_INCLUDE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001342
1343 The default value, which is "CLOSED Proprietary", for
Andrew Geissler09036742021-06-25 14:25:14 -05001344 :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001345 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001346 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001347
Andrew Geisslerf0343792020-11-18 10:42:21 -06001348 :term:`COPYLEFT_LICENSE_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001349 A space-separated list of licenses to include in the source archived
1350 by the :ref:`archiver <ref-classes-archiver>` class. In other
1351 words, if a license in a recipe's :term:`LICENSE`
Andrew Geissler09036742021-06-25 14:25:14 -05001352 value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001353 source is archived by the class.
1354
1355 The default value is set by the
1356 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001357 is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001358 "GPL*", "LGPL*", and "AGPL*".
1359
Andrew Geisslerf0343792020-11-18 10:42:21 -06001360 :term:`COPYLEFT_PN_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001361 A list of recipes to exclude in the source archived by the
1362 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001363 :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001364 exclusion caused through the
1365 :term:`COPYLEFT_LICENSE_INCLUDE` and
1366 :term:`COPYLEFT_LICENSE_EXCLUDE`
1367 variables, respectively.
1368
1369 The default value, which is "" indicating to not explicitly exclude
Andrew Geissler09036742021-06-25 14:25:14 -05001370 any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001371 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001372 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001373
Andrew Geisslerf0343792020-11-18 10:42:21 -06001374 :term:`COPYLEFT_PN_INCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001375 A list of recipes to include in the source archived by the
1376 :ref:`archiver <ref-classes-archiver>` class. The
Andrew Geissler09036742021-06-25 14:25:14 -05001377 :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001378 exclusion caused through the
1379 :term:`COPYLEFT_LICENSE_INCLUDE` and
1380 :term:`COPYLEFT_LICENSE_EXCLUDE`
1381 variables, respectively.
1382
1383 The default value, which is "" indicating to not explicitly include
Andrew Geissler09036742021-06-25 14:25:14 -05001384 any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001385 :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
Andrew Geissler595f6302022-01-24 19:11:47 +00001386 is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001387
Andrew Geisslerf0343792020-11-18 10:42:21 -06001388 :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001389 A space-separated list of recipe types to include in the source
1390 archived by the :ref:`archiver <ref-classes-archiver>` class.
1391 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1392 ``crosssdk``, and ``cross-canadian``.
1393
Andrew Geissler09036742021-06-25 14:25:14 -05001394 The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001395 is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
Andrew Geissler595f6302022-01-24 19:11:47 +00001396 class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001397
Andrew Geisslerf0343792020-11-18 10:42:21 -06001398 :term:`CORE_IMAGE_EXTRA_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001399 Specifies the list of packages to be added to the image. You should
1400 only set this variable in the ``local.conf`` configuration file found
1401 in the :term:`Build Directory`.
1402
1403 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1404 supported.
1405
Andrew Geisslerf0343792020-11-18 10:42:21 -06001406 :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001407 Specifies the parent directory of the OpenEmbedded-Core Metadata
1408 layer (i.e. ``meta``).
1409
Andrew Geissler09036742021-06-25 14:25:14 -05001410 It is an important distinction that :term:`COREBASE` points to the parent
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001411 of this layer and not the layer itself. Consider an example where you
1412 have cloned the Poky Git repository and retained the ``poky`` name
Andrew Geissler09036742021-06-25 14:25:14 -05001413 for your local copy of the repository. In this case, :term:`COREBASE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001414 points to the ``poky`` folder because it is the parent directory of
1415 the ``poky/meta`` layer.
1416
Andrew Geisslerf0343792020-11-18 10:42:21 -06001417 :term:`COREBASE_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001418 Lists files from the :term:`COREBASE` directory that
1419 should be copied other than the layers listed in the
Andrew Geissler09036742021-06-25 14:25:14 -05001420 ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001421 to copy metadata from the OpenEmbedded build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001422 into the extensible SDK.
1423
Andrew Geissler09036742021-06-25 14:25:14 -05001424 Explicitly listing files in :term:`COREBASE` is needed because it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001425 typically contains build directories and other files that should not
1426 normally be copied into the extensible SDK. Consequently, the value
Andrew Geissler09036742021-06-25 14:25:14 -05001427 of :term:`COREBASE_FILES` is used in order to only copy the files that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001428 are actually needed.
1429
Andrew Geisslerf0343792020-11-18 10:42:21 -06001430 :term:`CPP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001431 The minimal command and arguments used to run the C preprocessor.
1432
Andrew Geisslerf0343792020-11-18 10:42:21 -06001433 :term:`CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001434 Specifies the flags to pass to the C pre-processor (i.e. to both the
1435 C and the C++ compilers). This variable is exported to an environment
1436 variable and thus made visible to the software being built during the
1437 compilation step.
1438
Andrew Geissler09036742021-06-25 14:25:14 -05001439 Default initialization for :term:`CPPFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001440 being built:
1441
1442 - :term:`TARGET_CPPFLAGS` when building for
1443 the target
1444
1445 - :term:`BUILD_CPPFLAGS` when building for the
1446 build host (i.e. ``-native``)
1447
1448 - :term:`BUILDSDK_CPPFLAGS` when building
1449 for an SDK (i.e. ``nativesdk-``)
1450
Andrew Geisslerf0343792020-11-18 10:42:21 -06001451 :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001452 The toolchain binary prefix for the target tools. The
Andrew Geissler09036742021-06-25 14:25:14 -05001453 :term:`CROSS_COMPILE` variable is the same as the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001454 :term:`TARGET_PREFIX` variable.
1455
1456 .. note::
1457
Andrew Geissler09036742021-06-25 14:25:14 -05001458 The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001459 variable only in certain contexts (e.g. when building for kernel
1460 and kernel module recipes).
1461
Andrew Geissler9aee5002022-03-30 16:27:02 +00001462 :term:`CVE_CHECK_IGNORE`
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001463 The list of CVE IDs which are ignored. Here is
1464 an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1465
1466 # This is windows only issue.
Andrew Geissler9aee5002022-03-30 16:27:02 +00001467 CVE_CHECK_IGNORE += "CVE-2020-15523"
1468
1469 :term:`CVE_CHECK_SKIP_RECIPE`
1470 The list of package names (:term:`PN`) for which
1471 CVEs (Common Vulnerabilities and Exposures) are ignored.
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001472
Patrick Williams213cb262021-08-07 19:21:33 -05001473 :term:`CVE_PRODUCT`
1474 In a recipe, defines the name used to match the recipe name
1475 against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1476
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001477 The default is ${:term:`BPN`}. If it does not match the name in the NIST CVE
Patrick Williams213cb262021-08-07 19:21:33 -05001478 database or matches with multiple entries in the database, the default
1479 value needs to be changed.
1480
1481 Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1482
1483 CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1484
Patrick Williams03907ee2022-05-01 06:28:52 -05001485 Sometimes the product name is not specific enough, for example
1486 "tar" has been matching CVEs for the GNU ``tar`` package and also
1487 the ``node-tar`` node.js extension. To avoid this problem, use the
1488 vendor name as a prefix. The syntax for this is::
1489
1490 CVE_PRODUCT = "vendor:package"
1491
Andrew Geisslerf0343792020-11-18 10:42:21 -06001492 :term:`CVSDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001493 The directory in which files checked out under the CVS system are
1494 stored.
1495
Andrew Geisslerf0343792020-11-18 10:42:21 -06001496 :term:`CXX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001497 The minimal command and arguments used to run the C++ compiler.
1498
Andrew Geisslerf0343792020-11-18 10:42:21 -06001499 :term:`CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001500 Specifies the flags to pass to the C++ compiler. This variable is
1501 exported to an environment variable and thus made visible to the
1502 software being built during the compilation step.
1503
Andrew Geissler09036742021-06-25 14:25:14 -05001504 Default initialization for :term:`CXXFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001505 being built:
1506
1507 - :term:`TARGET_CXXFLAGS` when building for
1508 the target
1509
1510 - :term:`BUILD_CXXFLAGS` when building for the
1511 build host (i.e. ``-native``)
1512
1513 - :term:`BUILDSDK_CXXFLAGS` when building
1514 for an SDK (i.e. ``nativesdk-``)
1515
Andrew Geisslerf0343792020-11-18 10:42:21 -06001516 :term:`D`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001517 The destination directory. The location in the :term:`Build Directory`
1518 where components are installed by the
1519 :ref:`ref-tasks-install` task. This location defaults
Andrew Geisslerc926e172021-05-07 16:11:35 -05001520 to::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001521
1522 ${WORKDIR}/image
1523
1524 .. note::
1525
1526 Tasks that read from or write to this directory should run under
Andrew Geissler09209ee2020-12-13 08:44:15 -06001527 :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001528
Andrew Geisslerf0343792020-11-18 10:42:21 -06001529 :term:`DATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001530 The date the build was started. Dates appear using the year, month,
1531 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1532
Andrew Geisslerf0343792020-11-18 10:42:21 -06001533 :term:`DATETIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001534 The date and time on which the current build started. The format is
1535 suitable for timestamps.
1536
Andrew Geisslerf0343792020-11-18 10:42:21 -06001537 :term:`DEBIAN_NOAUTONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001538 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001539 which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001540 particular package should not be renamed according to Debian library
1541 package naming. You must use the package name as an override when you
Andrew Geisslerc926e172021-05-07 16:11:35 -05001542 set this variable. Here is an example from the ``fontconfig`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001543
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001544 DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001545
Andrew Geisslerf0343792020-11-18 10:42:21 -06001546 :term:`DEBIANNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001547 When the :ref:`debian <ref-classes-debian>` class is inherited,
Andrew Geissler09036742021-06-25 14:25:14 -05001548 which is the default behavior, :term:`DEBIANNAME` allows you to override
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001549 the library name for an individual package. Overriding the library
1550 name in these cases is rare. You must use the package name as an
1551 override when you set this variable. Here is an example from the
Andrew Geisslerc926e172021-05-07 16:11:35 -05001552 ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001553
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001554 DEBIANNAME:${PN} = "dbus-1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001555
Andrew Geisslerf0343792020-11-18 10:42:21 -06001556 :term:`DEBUG_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001557 Specifies to build packages with debugging information. This
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001558 influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001559
Andrew Geisslerf0343792020-11-18 10:42:21 -06001560 :term:`DEBUG_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001561 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001562 compiling a system for debugging. This variable defaults to "-O
1563 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1564
Andrew Geisslereff27472021-10-29 15:35:00 -05001565 :term:`DEBUG_PREFIX_MAP`
1566 Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1567 ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1568 replace build-time paths by install-time ones in the debugging sections
1569 of binaries. This makes compiler output files location independent,
1570 at the cost of having to pass an extra command to tell the debugger
1571 where source files are.
1572
1573 This is used by the Yocto Project to guarantee
1574 :doc:`/test-manual/reproducible-builds` even when the source code of
1575 a package uses the ``__FILE__`` or ``assert()`` macros. See the
1576 `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1577 website for details.
1578
1579 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1580 not intended to be user-configurable.
1581
Andrew Geissler9aee5002022-03-30 16:27:02 +00001582 :term:`DEFAULT_PREFERENCE`
1583 Specifies a weak bias for recipe selection priority.
1584
1585 The most common usage of this is variable is to set it to "-1" within
1586 a recipe for a development version of a piece of software. Using the
1587 variable in this way causes the stable version of the recipe to build
1588 by default in the absence of :term:`PREFERRED_VERSION` being used to
1589 build the development version.
1590
1591 .. note::
1592
1593 The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1594 by :term:`BBFILE_PRIORITY` if that variable is different between two
1595 layers that contain different versions of the same recipe.
1596
Andrew Geisslerf0343792020-11-18 10:42:21 -06001597 :term:`DEFAULTTUNE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001598 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1599 the "tune") used by the OpenEmbedded build system. The
Andrew Geissler09036742021-06-25 14:25:14 -05001600 :term:`DEFAULTTUNE` helps define
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001601 :term:`TUNE_FEATURES`.
1602
1603 The default tune is either implicitly or explicitly set by the
1604 machine (:term:`MACHINE`). However, you can override
1605 the setting using available tunes as defined with
1606 :term:`AVAILTUNES`.
1607
Andrew Geisslerf0343792020-11-18 10:42:21 -06001608 :term:`DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001609 Lists a recipe's build-time dependencies. These are dependencies on
1610 other recipes whose contents (e.g. headers and shared libraries) are
1611 needed by the recipe at build time.
1612
1613 As an example, consider a recipe ``foo`` that contains the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05001614 assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001615
1616 DEPENDS = "bar"
1617
1618 The practical effect of the previous
1619 assignment is that all files installed by bar will be available in
1620 the appropriate staging sysroot, given by the
1621 :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1622 :ref:`ref-tasks-configure` task for ``foo`` runs.
Patrick Williams2194f502022-10-16 14:26:09 -05001623 This mechanism is implemented by having :ref:`ref-tasks-configure` depend on
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001624 the :ref:`ref-tasks-populate_sysroot` task of
Andrew Geissler09036742021-06-25 14:25:14 -05001625 each recipe listed in :term:`DEPENDS`, through a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001626 ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1627 declaration in the :ref:`base <ref-classes-base>` class.
1628
1629 .. note::
1630
Andrew Geissler09036742021-06-25 14:25:14 -05001631 It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001632 explicitly. The standard classes and build-related variables are
1633 configured to automatically use the appropriate staging sysroots.
1634
Andrew Geissler09036742021-06-25 14:25:14 -05001635 As another example, :term:`DEPENDS` can also be used to add utilities
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001636 that run on the build machine during the build. For example, a recipe
1637 that makes use of a code generator built by the recipe ``codegen``
Andrew Geisslerc926e172021-05-07 16:11:35 -05001638 might have the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001639
1640 DEPENDS = "codegen-native"
1641
1642 For more
1643 information, see the :ref:`native <ref-classes-native>` class and
1644 the :term:`EXTRANATIVEPATH` variable.
1645
1646 .. note::
1647
Andrew Geissler09036742021-06-25 14:25:14 -05001648 - :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001649 it is a list of :term:`PROVIDES` names, which
1650 usually match recipe names. Putting a package name such as
Andrew Geissler09036742021-06-25 14:25:14 -05001651 "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001652 instead, as this will put files from all the packages that make
1653 up ``foo``, which includes those from ``foo-dev``, into the
1654 sysroot.
1655
Andrew Geissler09036742021-06-25 14:25:14 -05001656 - One recipe having another recipe in :term:`DEPENDS` does not by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001657 itself add any runtime dependencies between the packages
1658 produced by the two recipes. However, as explained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001659 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001660 section in the Yocto Project Overview and Concepts Manual,
1661 runtime dependencies will often be added automatically, meaning
Andrew Geissler5f350902021-07-23 13:09:54 -04001662 :term:`DEPENDS` alone is sufficient for most recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001663
Andrew Geissler09036742021-06-25 14:25:14 -05001664 - Counterintuitively, :term:`DEPENDS` is often necessary even for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001665 recipes that install precompiled components. For example, if
1666 ``libfoo`` is a precompiled library that links against
1667 ``libbar``, then linking against ``libfoo`` requires both
1668 ``libfoo`` and ``libbar`` to be available in the sysroot.
Andrew Geissler09036742021-06-25 14:25:14 -05001669 Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001670 to the recipe that installs ``libbar``, other recipes might
1671 fail to link against ``libfoo``.
1672
1673 For information on runtime dependencies, see the
1674 :term:`RDEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05001675 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1676 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001677 BitBake User Manual for additional information on tasks and
1678 dependencies.
1679
Andrew Geisslerf0343792020-11-18 10:42:21 -06001680 :term:`DEPLOY_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001681 Points to the general area that the OpenEmbedded build system uses to
1682 place images, packages, SDKs, and other output files that are ready
1683 to be used outside of the build system. By default, this directory
1684 resides within the :term:`Build Directory` as
1685 ``${TMPDIR}/deploy``.
1686
1687 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001688 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001689 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001690 ":ref:`overview-manual/concepts:images`",
1691 ":ref:`overview-manual/concepts:package feeds`", and
1692 ":ref:`overview-manual/concepts:application development sdk`" sections all in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001693 Yocto Project Overview and Concepts Manual.
1694
Andrew Geisslerf0343792020-11-18 10:42:21 -06001695 :term:`DEPLOY_DIR_DEB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001696 Points to the area that the OpenEmbedded build system uses to place
1697 Debian packages that are ready to be used outside of the build
1698 system. This variable applies only when
1699 :term:`PACKAGE_CLASSES` contains
1700 "package_deb".
1701
1702 The BitBake configuration file initially defines the
Andrew Geissler5f350902021-07-23 13:09:54 -04001703 :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
Andrew Geisslerc926e172021-05-07 16:11:35 -05001704 :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001705
1706 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1707
1708 The :ref:`package_deb <ref-classes-package_deb>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001709 :term:`DEPLOY_DIR_DEB` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001710 :ref:`ref-tasks-package_write_deb` task
1711 writes Debian packages into the appropriate folder. For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06001712 information on how packaging works, see the
1713 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001714 in the Yocto Project Overview and Concepts Manual.
1715
Andrew Geisslerf0343792020-11-18 10:42:21 -06001716 :term:`DEPLOY_DIR_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001717 Points to the area that the OpenEmbedded build system uses to place
1718 images and other associated output files that are ready to be
1719 deployed onto the target machine. The directory is machine-specific
1720 as it contains the ``${MACHINE}`` name. By default, this directory
1721 resides within the :term:`Build Directory` as
1722 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1723
Andrew Geissler09036742021-06-25 14:25:14 -05001724 It must not be used directly in recipes when deploying files. Instead,
1725 it's only useful when a recipe needs to "read" a file already deployed
1726 by a dependency. So, it should be filled with the contents of
1727 :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1728 with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1729 <ref-classes-image>` class.
1730
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001731 For more information on the structure of the Build Directory, see
Andrew Geissler615f2f12022-07-15 14:00:58 -05001732 ":ref:`ref-manual/structure:the build directory --- \`\`build/\`\``" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001733 For more detail on the contents of the ``deploy`` directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06001734 ":ref:`overview-manual/concepts:images`" and
1735 ":ref:`overview-manual/concepts:application development sdk`" sections both in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001736 the Yocto Project Overview and Concepts Manual.
1737
Andrew Geisslerf0343792020-11-18 10:42:21 -06001738 :term:`DEPLOY_DIR_IPK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001739 Points to the area that the OpenEmbedded build system uses to place
1740 IPK packages that are ready to be used outside of the build system.
1741 This variable applies only when
1742 :term:`PACKAGE_CLASSES` contains
1743 "package_ipk".
1744
1745 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001746 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001747
1748 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1749
1750 The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001751 :term:`DEPLOY_DIR_IPK` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001752 :ref:`ref-tasks-package_write_ipk` task
1753 writes IPK packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001754 on how packaging works, see the
1755 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001756 in the Yocto Project Overview and Concepts Manual.
1757
Andrew Geisslerf0343792020-11-18 10:42:21 -06001758 :term:`DEPLOY_DIR_RPM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001759 Points to the area that the OpenEmbedded build system uses to place
1760 RPM packages that are ready to be used outside of the build system.
1761 This variable applies only when
1762 :term:`PACKAGE_CLASSES` contains
1763 "package_rpm".
1764
1765 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001766 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001767
1768 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1769
1770 The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001771 :term:`DEPLOY_DIR_RPM` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001772 :ref:`ref-tasks-package_write_rpm` task
1773 writes RPM packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001774 on how packaging works, see the
1775 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001776 in the Yocto Project Overview and Concepts Manual.
1777
Andrew Geisslerf0343792020-11-18 10:42:21 -06001778 :term:`DEPLOY_DIR_TAR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001779 Points to the area that the OpenEmbedded build system uses to place
1780 tarballs that are ready to be used outside of the build system. This
1781 variable applies only when
1782 :term:`PACKAGE_CLASSES` contains
1783 "package_tar".
1784
1785 The BitBake configuration file initially defines this variable as a
Andrew Geisslerc926e172021-05-07 16:11:35 -05001786 sub-folder of :term:`DEPLOY_DIR`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001787
1788 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1789
1790 The :ref:`package_tar <ref-classes-package_tar>` class uses the
Andrew Geissler09036742021-06-25 14:25:14 -05001791 :term:`DEPLOY_DIR_TAR` variable to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001792 :ref:`ref-tasks-package_write_tar` task
1793 writes TAR packages into the appropriate folder. For more information
Andrew Geissler09209ee2020-12-13 08:44:15 -06001794 on how packaging works, see the
1795 ":ref:`overview-manual/concepts:package feeds`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001796 in the Yocto Project Overview and Concepts Manual.
1797
Andrew Geisslerf0343792020-11-18 10:42:21 -06001798 :term:`DEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001799 When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
Andrew Geissler09036742021-06-25 14:25:14 -05001800 :term:`DEPLOYDIR` points to a temporary work area for deployed files that
Andrew Geissler595f6302022-01-24 19:11:47 +00001801 is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001802
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001803 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001804
Andrew Geissler595f6302022-01-24 19:11:47 +00001805 Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
Andrew Geissler09036742021-06-25 14:25:14 -05001806 deployed into :term:`DEPLOYDIR`, and the class will take care of copying
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001807 them into :term:`DEPLOY_DIR_IMAGE`
1808 afterwards.
1809
Andrew Geisslerf0343792020-11-18 10:42:21 -06001810 :term:`DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001811 The package description used by package managers. If not set,
Andrew Geissler09036742021-06-25 14:25:14 -05001812 :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001813 variable.
1814
Andrew Geisslerf0343792020-11-18 10:42:21 -06001815 :term:`DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001816 The short name of the distribution. For information on the long name
1817 of the distribution, see the :term:`DISTRO_NAME`
1818 variable.
1819
Andrew Geissler09036742021-06-25 14:25:14 -05001820 The :term:`DISTRO` variable corresponds to a distribution configuration
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001821 file whose root name is the same as the variable's argument and whose
1822 filename extension is ``.conf``. For example, the distribution
1823 configuration file for the Poky distribution is named ``poky.conf``
1824 and resides in the ``meta-poky/conf/distro`` directory of the
1825 :term:`Source Directory`.
1826
Andrew Geissler09036742021-06-25 14:25:14 -05001827 Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05001828 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001829
1830 DISTRO = "poky"
1831
1832 Distribution configuration files are located in a ``conf/distro``
1833 directory within the :term:`Metadata` that contains the
Andrew Geissler09036742021-06-25 14:25:14 -05001834 distribution configuration. The value for :term:`DISTRO` must not contain
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001835 spaces, and is typically all lower-case.
1836
1837 .. note::
1838
Andrew Geissler09036742021-06-25 14:25:14 -05001839 If the :term:`DISTRO` variable is blank, a set of default configurations
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001840 are used, which are specified within
1841 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001842
Andrew Geisslerf0343792020-11-18 10:42:21 -06001843 :term:`DISTRO_CODENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001844 Specifies a codename for the distribution being built.
1845
Andrew Geisslerf0343792020-11-18 10:42:21 -06001846 :term:`DISTRO_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001847 Specifies a list of distro-specific packages to add to all images.
Andrew Geissler595f6302022-01-24 19:11:47 +00001848 This variable takes effect through ``packagegroup-base`` so the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001849 variable only really applies to the more full-featured images that
1850 include ``packagegroup-base``. You can use this variable to keep
1851 distro policy out of generic images. As with all other distro
1852 variables, you set this variable in the distro ``.conf`` file.
1853
Andrew Geisslerf0343792020-11-18 10:42:21 -06001854 :term:`DISTRO_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001855 Specifies a list of distro-specific packages to add to all images if
1856 the packages exist. The packages might not exist or be empty (e.g.
1857 kernel modules). The list of packages are automatically installed but
1858 you can remove them.
1859
Andrew Geisslerf0343792020-11-18 10:42:21 -06001860 :term:`DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001861 The software support you want in your distribution for various
1862 features. You define your distribution features in the distribution
1863 configuration file.
1864
1865 In most cases, the presence or absence of a feature in
Andrew Geissler09036742021-06-25 14:25:14 -05001866 :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001867 to the configure script during the
1868 :ref:`ref-tasks-configure` task for recipes that
1869 optionally support the feature. For example, specifying "x11" in
Andrew Geissler09036742021-06-25 14:25:14 -05001870 :term:`DISTRO_FEATURES`, causes every piece of software built for the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001871 target that can optionally support X11 to have its X11 support
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05001872 enabled.
1873
1874 .. note::
1875
1876 Just enabling :term:`DISTRO_FEATURES` alone doesn't
1877 enable feature support for packages. Mechanisms such as making
1878 :term:`PACKAGECONFIG` track :term:`DISTRO_FEATURES` are used
1879 to enable/disable package features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001880
1881 Two more examples are Bluetooth and NFS support. For a more complete
1882 list of features that ships with the Yocto Project and that you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001883 provide with this variable, see the ":ref:`ref-features-distro`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001884
Andrew Geisslerf0343792020-11-18 10:42:21 -06001885 :term:`DISTRO_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05001886 Features to be added to :term:`DISTRO_FEATURES` if not also present in
1887 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001888
1889 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1890 not intended to be user-configurable. It is best to just reference
1891 the variable to see which distro features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001892 all distro configurations. See the ":ref:`ref-features-backfill`" section
1893 for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001894
Andrew Geisslerf0343792020-11-18 10:42:21 -06001895 :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05001896 Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1897 backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001898 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001899
Andrew Geisslerf0343792020-11-18 10:42:21 -06001900 :term:`DISTRO_FEATURES_DEFAULT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001901 A convenience variable that gives you the default list of distro
1902 features with the exception of any features specific to the C library
1903 (``libc``).
1904
1905 When creating a custom distribution, you might find it useful to be
1906 able to reuse the default
1907 :term:`DISTRO_FEATURES` options without the
1908 need to write out the full set. Here is an example that uses
Andrew Geissler09036742021-06-25 14:25:14 -05001909 :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001910
1911 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1912
Andrew Geisslerf0343792020-11-18 10:42:21 -06001913 :term:`DISTRO_FEATURES_FILTER_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001914 Specifies a list of features that if present in the target
1915 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001916 included in :term:`DISTRO_FEATURES` when building native recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001917 variable is used in addition to the features filtered using the
1918 :term:`DISTRO_FEATURES_NATIVE`
1919 variable.
1920
Andrew Geisslerf0343792020-11-18 10:42:21 -06001921 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001922 Specifies a list of features that if present in the target
1923 :term:`DISTRO_FEATURES` value should be
Andrew Geissler09036742021-06-25 14:25:14 -05001924 included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001925 variable is used in addition to the features filtered using the
1926 :term:`DISTRO_FEATURES_NATIVESDK`
1927 variable.
1928
Andrew Geisslerf0343792020-11-18 10:42:21 -06001929 :term:`DISTRO_FEATURES_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001930 Specifies a list of features that should be included in
1931 :term:`DISTRO_FEATURES` when building native
1932 recipes. This variable is used in addition to the features filtered
1933 using the
1934 :term:`DISTRO_FEATURES_FILTER_NATIVE`
1935 variable.
1936
Andrew Geisslerf0343792020-11-18 10:42:21 -06001937 :term:`DISTRO_FEATURES_NATIVESDK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001938 Specifies a list of features that should be included in
1939 :term:`DISTRO_FEATURES` when building
1940 nativesdk recipes. This variable is used in addition to the features
1941 filtered using the
1942 :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1943 variable.
1944
Andrew Geisslerf0343792020-11-18 10:42:21 -06001945 :term:`DISTRO_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001946 The long name of the distribution. For information on the short name
1947 of the distribution, see the :term:`DISTRO` variable.
1948
Andrew Geissler09036742021-06-25 14:25:14 -05001949 The :term:`DISTRO_NAME` variable corresponds to a distribution
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001950 configuration file whose root name is the same as the variable's
1951 argument and whose filename extension is ``.conf``. For example, the
1952 distribution configuration file for the Poky distribution is named
1953 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1954 of the :term:`Source Directory`.
1955
Andrew Geissler09036742021-06-25 14:25:14 -05001956 Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
Andrew Geisslerc926e172021-05-07 16:11:35 -05001957 as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001958
1959 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1960
1961 Distribution configuration files are located in a ``conf/distro``
1962 directory within the :term:`Metadata` that contains the
1963 distribution configuration.
1964
1965 .. note::
1966
Andrew Geissler09036742021-06-25 14:25:14 -05001967 If the :term:`DISTRO_NAME` variable is blank, a set of default
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001968 configurations are used, which are specified within
1969 ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001970
Andrew Geisslerf0343792020-11-18 10:42:21 -06001971 :term:`DISTRO_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001972 The version of the distribution.
1973
Andrew Geisslerf0343792020-11-18 10:42:21 -06001974 :term:`DISTROOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001975 A colon-separated list of overrides specific to the current
1976 distribution. By default, this list includes the value of
1977 :term:`DISTRO`.
1978
Andrew Geissler09036742021-06-25 14:25:14 -05001979 You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001980 apply to the distribution.
1981
Andrew Geissler09036742021-06-25 14:25:14 -05001982 The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001983 is included in the default value of
1984 :term:`OVERRIDES`.
1985
Andrew Geisslerf0343792020-11-18 10:42:21 -06001986 :term:`DL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001987 The central download directory used by the build process to store
Andrew Geissler09036742021-06-25 14:25:14 -05001988 downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001989 for everything except Git repositories. If you want tarballs of Git
1990 repositories, use the
1991 :term:`BB_GENERATE_MIRROR_TARBALLS`
1992 variable.
1993
Andrew Geissler09036742021-06-25 14:25:14 -05001994 You can set this directory by defining the :term:`DL_DIR` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001995 ``conf/local.conf`` file. This directory is self-maintaining and you
1996 should not have to touch it. By default, the directory is
1997 ``downloads`` in the :term:`Build Directory`.
1998 ::
1999
2000 #DL_DIR ?= "${TOPDIR}/downloads"
2001
2002 To specify a different download directory,
2003 simply remove the comment from the line and provide your directory.
2004
2005 During a first build, the system downloads many different source code
2006 tarballs from various upstream projects. Downloading can take a
2007 while, particularly if your network connection is slow. Tarballs are
Andrew Geissler09036742021-06-25 14:25:14 -05002008 all stored in the directory defined by :term:`DL_DIR` and the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002009 system looks there first to find source tarballs.
2010
2011 .. note::
2012
2013 When wiping and rebuilding, you can preserve this directory to
2014 speed up this part of subsequent builds.
2015
2016 You can safely share this directory between multiple builds on the
2017 same development machine. For additional information on how the build
2018 process gets source files when working behind a firewall or proxy
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002019 server, see this specific question in the ":doc:`faq`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002020 chapter. You can also refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002021 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002022 Wiki page.
2023
Andrew Geisslerf0343792020-11-18 10:42:21 -06002024 :term:`DOC_COMPRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002025 When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2026 class, this variable sets the compression policy used when the
2027 OpenEmbedded build system compresses man pages and info pages. By
2028 default, the compression method used is gz (gzip). Other policies
2029 available are xz and bz2.
2030
2031 For information on policies and on how to use this variable, see the
2032 comments in the ``meta/classes/compress_doc.bbclass`` file.
2033
Andrew Geisslerf0343792020-11-18 10:42:21 -06002034 :term:`EFI_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002035 When building bootable images (i.e. where ``hddimg``, ``iso``, or
2036 ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
Andrew Geissler09036742021-06-25 14:25:14 -05002037 :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002038 default is "grub-efi", but "systemd-boot" can be used instead.
2039
2040 See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2041 :ref:`image-live <ref-classes-image-live>` classes for more
2042 information.
2043
Andrew Geisslerf0343792020-11-18 10:42:21 -06002044 :term:`ENABLE_BINARY_LOCALE_GENERATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002045 Variable that controls which locales for ``glibc`` are generated
2046 during the build (useful if the target device has 64Mbytes of RAM or
2047 less).
2048
Andrew Geisslerf0343792020-11-18 10:42:21 -06002049 :term:`ERR_REPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002050 When used with the :ref:`report-error <ref-classes-report-error>`
2051 class, specifies the path used for storing the debug files created by
2052 the :ref:`error reporting
Andrew Geissler09209ee2020-12-13 08:44:15 -06002053 tool <dev-manual/common-tasks:using the error reporting tool>`, which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002054 allows you to submit build errors you encounter to a central
2055 database. By default, the value of this variable is
2056 ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2057
Andrew Geissler09036742021-06-25 14:25:14 -05002058 You can set :term:`ERR_REPORT_DIR` to the path you want the error
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002059 reporting tool to store the debug files as follows in your
Andrew Geisslerc926e172021-05-07 16:11:35 -05002060 ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002061
2062 ERR_REPORT_DIR = "path"
2063
Andrew Geisslerf0343792020-11-18 10:42:21 -06002064 :term:`ERROR_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002065 Specifies the quality assurance checks whose failures are reported as
2066 errors by the OpenEmbedded build system. You set this variable in
2067 your distribution configuration file. For a list of the checks you
2068 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00002069 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002070
Andrew Geissler9aee5002022-03-30 16:27:02 +00002071 :term:`ESDK_CLASS_INHERIT_DISABLE`
2072 A list of classes to remove from the :term:`INHERIT`
2073 value globally within the extensible SDK configuration. The
2074 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2075 default value::
2076
2077 ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2078
2079 Some classes are not generally applicable within the extensible SDK
2080 context. You can use this variable to disable those classes.
2081
2082 For additional information on how to customize the extensible SDK's
2083 configuration, see the
2084 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2085 section in the Yocto Project Application Development and the
2086 Extensible Software Development Kit (eSDK) manual.
2087
2088 :term:`ESDK_LOCALCONF_ALLOW`
2089 A list of variables allowed through from the OpenEmbedded build
2090 system configuration into the extensible SDK configuration. By
2091 default, the list of variables is empty and is set in the
2092 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2093
2094 This list overrides the variables specified using the
2095 :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2096 other variables automatically added due to the "/" character
2097 being found at the start of the
2098 value, which is usually indicative of being a path and thus might not
2099 be valid on the system where the SDK is installed.
2100
2101 For additional information on how to customize the extensible SDK's
2102 configuration, see the
2103 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2104 section in the Yocto Project Application Development and the
2105 Extensible Software Development Kit (eSDK) manual.
2106
2107 :term:`ESDK_LOCALCONF_REMOVE`
2108 A list of variables not allowed through from the OpenEmbedded build
2109 system configuration into the extensible SDK configuration. Usually,
2110 these are variables that are specific to the machine on which the
2111 build system is running and thus would be potentially problematic
2112 within the extensible SDK.
2113
2114 By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2115 :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2116 excludes the following variables:
2117
2118 - :term:`CONF_VERSION`
2119 - :term:`BB_NUMBER_THREADS`
2120 - :term:`BB_NUMBER_PARSE_THREADS`
2121 - :term:`PARALLEL_MAKE`
2122 - :term:`PRSERV_HOST`
2123 - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2124 - :term:`SSTATE_DIR` :term:`TMPDIR`
2125 - :term:`BB_SERVER_TIMEOUT`
2126
2127 For additional information on how to customize the extensible SDK's
2128 configuration, see the
2129 ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2130 section in the Yocto Project Application Development and the
2131 Extensible Software Development Kit (eSDK) manual.
2132
Andrew Geisslerf0343792020-11-18 10:42:21 -06002133 :term:`EXCLUDE_FROM_SHLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002134 Triggers the OpenEmbedded build system's shared libraries resolver to
2135 exclude an entire package when scanning for shared libraries.
2136
2137 .. note::
2138
2139 The shared libraries resolver's functionality results in part from
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002140 the internal function ``package_do_shlibs``, which is part of the
2141 :ref:`ref-tasks-package` task. You should be aware that the shared
2142 libraries resolver might implicitly define some dependencies between
2143 packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002144
Andrew Geissler09036742021-06-25 14:25:14 -05002145 The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002146 :term:`PRIVATE_LIBS` variable, which excludes a
2147 package's particular libraries only and not the whole package.
2148
Andrew Geissler09036742021-06-25 14:25:14 -05002149 Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
Andrew Geisslerc926e172021-05-07 16:11:35 -05002150 particular package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002151
2152 EXCLUDE_FROM_SHLIBS = "1"
2153
Andrew Geisslerf0343792020-11-18 10:42:21 -06002154 :term:`EXCLUDE_FROM_WORLD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002155 Directs BitBake to exclude a recipe from world builds (i.e.
2156 ``bitbake world``). During world builds, BitBake locates, parses and
2157 builds all recipes found in every layer exposed in the
2158 ``bblayers.conf`` configuration file.
2159
2160 To exclude a recipe from a world build using this variable, set the
2161 variable to "1" in the recipe.
2162
2163 .. note::
2164
Andrew Geissler09036742021-06-25 14:25:14 -05002165 Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002166 world build in order to satisfy dependencies of other recipes. Adding
Andrew Geissler09036742021-06-25 14:25:14 -05002167 a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002168 explicitly added to the list of build targets in a world build.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002169
Andrew Geisslerf0343792020-11-18 10:42:21 -06002170 :term:`EXTENDPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002171 Used with file and pathnames to create a prefix for a recipe's
Andrew Geissler09036742021-06-25 14:25:14 -05002172 version based on the recipe's :term:`PE` value. If :term:`PE`
2173 is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2174 value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2175 If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2176 :term:`EXTENDPE` becomes "".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002177
2178 See the :term:`STAMP` variable for an example.
2179
Andrew Geisslerf0343792020-11-18 10:42:21 -06002180 :term:`EXTENDPKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002181 The full package version specification as it appears on the final
2182 packages produced by a recipe. The variable's value is normally used
2183 to fix a runtime dependency to the exact same version of another
Andrew Geisslerc926e172021-05-07 16:11:35 -05002184 package in the same recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002185
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002186 RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002187
2188 The dependency relationships are intended to force the package
2189 manager to upgrade these types of packages in lock-step.
2190
Andrew Geisslerf0343792020-11-18 10:42:21 -06002191 :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geissler09036742021-06-25 14:25:14 -05002192 When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002193 tools are not in the source tree.
2194
2195 When kernel tools are available in the tree, they are preferred over
Andrew Geissler09036742021-06-25 14:25:14 -05002196 any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002197 variable tells the OpenEmbedded build system to prefer the installed
2198 external tools. See the
2199 :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2200 ``meta/classes`` to see how the variable is used.
2201
Andrew Geisslerf0343792020-11-18 10:42:21 -06002202 :term:`EXTERNALSRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002203 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2204 class, this variable points to the source tree, which is outside of
2205 the OpenEmbedded build system. When set, this variable sets the
2206 :term:`S` variable, which is what the OpenEmbedded build
2207 system uses to locate unpacked recipe source code.
2208
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002209 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002210 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002211 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002212 section in the Yocto Project Development Tasks Manual.
2213
Andrew Geisslerf0343792020-11-18 10:42:21 -06002214 :term:`EXTERNALSRC_BUILD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002215 When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2216 class, this variable points to the directory in which the recipe's
2217 source code is built, which is outside of the OpenEmbedded build
2218 system. When set, this variable sets the :term:`B` variable,
2219 which is what the OpenEmbedded build system uses to locate the Build
2220 Directory.
2221
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002222 See the ":ref:`ref-classes-externalsrc`" section for details. You
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002223 can also find information on how to use this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002224 ":ref:`dev-manual/common-tasks:building software from an external source`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002225 section in the Yocto Project Development Tasks Manual.
2226
Andrew Geisslerf0343792020-11-18 10:42:21 -06002227 :term:`EXTRA_AUTORECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002228 For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
Andrew Geissler09036742021-06-25 14:25:14 -05002229 class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002230 pass to the ``autoreconf`` command that is executed during the
2231 :ref:`ref-tasks-configure` task.
2232
2233 The default value is "--exclude=autopoint".
2234
Andrew Geisslerf0343792020-11-18 10:42:21 -06002235 :term:`EXTRA_IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002236 A list of additional features to include in an image. When listing
2237 more than one feature, separate them with a space.
2238
2239 Typically, you configure this variable in your ``local.conf`` file,
2240 which is found in the :term:`Build Directory`.
2241 Although you can use this variable from within a recipe, best
2242 practices dictate that you do not.
2243
2244 .. note::
2245
2246 To enable primary features from within the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002247 :term:`IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002248
2249 Here are some examples of features you can add:
2250
Andrew Geissler615f2f12022-07-15 14:00:58 -05002251 - "dbg-pkgs" --- adds -dbg packages for all installed packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002252 symbol information for debugging and profiling.
2253
Andrew Geissler615f2f12022-07-15 14:00:58 -05002254 - "debug-tweaks" --- makes an image suitable for debugging. For example, allows root logins without passwords and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002255 enables post-installation logging. See the 'allow-empty-password' and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002256 'post-install-logging' features in the ":ref:`ref-features-image`"
2257 section for more information.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002258 - "dev-pkgs" --- adds -dev packages for all installed packages. This is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002259 useful if you want to develop against the libraries in the image.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002260 - "read-only-rootfs" --- creates an image whose root filesystem is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002261 read-only. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002262 ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002263 section in the Yocto Project Development Tasks Manual for more
2264 information
Andrew Geissler615f2f12022-07-15 14:00:58 -05002265 - "tools-debug" --- adds debugging tools such as gdb and strace.
2266 - "tools-sdk" --- adds development tools such as gcc, make,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002267 pkgconfig and so forth.
Andrew Geissler615f2f12022-07-15 14:00:58 -05002268 - "tools-testapps" --- adds useful testing tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002269 such as ts_print, aplay, arecord and so forth.
2270
2271 For a complete list of image features that ships with the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002272 Project, see the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002273
2274 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06002275 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 -05002276 section in the Yocto Project Development Tasks Manual.
2277
Andrew Geisslerf0343792020-11-18 10:42:21 -06002278 :term:`EXTRA_IMAGECMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002279 Specifies additional options for the image creation command that has
2280 been specified in :term:`IMAGE_CMD`. When setting
2281 this variable, use an override for the associated image type. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002282 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002283
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002284 EXTRA_IMAGECMD:ext3 ?= "-i 4096"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002285
Andrew Geisslerf0343792020-11-18 10:42:21 -06002286 :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002287 A list of recipes to build that do not provide packages for
2288 installing into the root filesystem.
2289
2290 Sometimes a recipe is required to build the final image but is not
Andrew Geissler09036742021-06-25 14:25:14 -05002291 needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002292 variable to list these recipes and thus specify the dependencies. A
2293 typical example is a required bootloader in a machine configuration.
2294
2295 .. note::
2296
2297 To add packages to the root filesystem, see the various
Andrew Geissler95ac1b82021-03-31 14:34:31 -05002298 :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002299
Andrew Geisslerf0343792020-11-18 10:42:21 -06002300 :term:`EXTRA_OECMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002301 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2302 :ref:`cmake <ref-classes-cmake>` class for additional information.
2303
Andrew Geisslerf0343792020-11-18 10:42:21 -06002304 :term:`EXTRA_OECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002305 Additional ``configure`` script options. See
2306 :term:`PACKAGECONFIG_CONFARGS` for
2307 additional information on passing configure script options.
2308
Andrew Geisslerf0343792020-11-18 10:42:21 -06002309 :term:`EXTRA_OEMAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002310 Additional GNU ``make`` options.
2311
Andrew Geissler09036742021-06-25 14:25:14 -05002312 Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002313 variable to specify any required GNU options.
2314
2315 :term:`PARALLEL_MAKE` and
2316 :term:`PARALLEL_MAKEINST` also make use of
Andrew Geissler09036742021-06-25 14:25:14 -05002317 :term:`EXTRA_OEMAKE` to pass the required flags.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002318
Andrew Geisslerf0343792020-11-18 10:42:21 -06002319 :term:`EXTRA_OESCONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002320 When inheriting the :ref:`scons <ref-classes-scons>` class, this
2321 variable specifies additional configuration options you want to pass
2322 to the ``scons`` command line.
2323
Andrew Geisslerf0343792020-11-18 10:42:21 -06002324 :term:`EXTRA_USERS_PARAMS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002325 When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2326 class, this variable provides image level user and group operations.
2327 This is a more global method of providing user and group
2328 configuration as compared to using the
2329 :ref:`useradd <ref-classes-useradd>` class, which ties user and
2330 group configurations to a specific recipe.
2331
2332 The set list of commands you can configure using the
Andrew Geissler595f6302022-01-24 19:11:47 +00002333 :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
Andrew Geisslerc926e172021-05-07 16:11:35 -05002334 commands map to the normal Unix commands of the same names::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002335
2336 # EXTRA_USERS_PARAMS = "\
2337 # useradd -p '' tester; \
2338 # groupadd developers; \
2339 # userdel nobody; \
2340 # groupdel -g video; \
2341 # groupmod -g 1020 developers; \
2342 # usermod -s /bin/sh tester; \
2343 # "
2344
Patrick Williams03907ee2022-05-01 06:28:52 -05002345 Hardcoded passwords are supported via the ``-p`` parameters for
2346 ``useradd`` or ``usermod``, but only hashed.
2347
2348 Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2349 passwords. First on host, create the (escaped) password hash::
2350
2351 printf "%q" $(mkpasswd -m sha256crypt tester01)
2352
2353 The resulting hash is set to a variable and used in ``useradd`` command parameters::
2354
2355 inherit extrausers
2356 PASSWD = "\$X\$ABC123\$A-Long-Hash"
2357 EXTRA_USERS_PARAMS = "\
2358 useradd -p '${PASSWD}' tester-jim; \
2359 useradd -p '${PASSWD}' tester-sue; \
2360 "
2361
2362 Finally, here is an example that sets the root password::
2363
2364 inherit extrausers
2365 EXTRA_USERS_PARAMS = "\
2366 usermod -p '${PASSWD}' root; \
2367 "
2368
2369 .. note::
2370
2371 From a security perspective, hardcoding a default password is not
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002372 generally a good idea or even legal in some jurisdictions. It is
2373 recommended that you do not do this if you are building a production
Patrick Williams03907ee2022-05-01 06:28:52 -05002374 image.
2375
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002376 Additionally there is a special ``passwd-expire`` command that will
2377 cause the password for a user to be expired and thus force changing it
2378 on first login, for example::
2379
2380 EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2381
2382 .. note::
2383
2384 At present, ``passwd-expire`` may only work for remote logins when
2385 using OpenSSH and not dropbear as an SSH server.
2386
Andrew Geissler9aee5002022-03-30 16:27:02 +00002387 :term:`EXTRANATIVEPATH`
2388 A list of subdirectories of
2389 ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2390 added to the beginning of the environment variable ``PATH``. As an
2391 example, the following prepends
2392 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2393 ``PATH``::
2394
2395 EXTRANATIVEPATH = "foo bar"
2396
Andrew Geisslerf0343792020-11-18 10:42:21 -06002397 :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002398 Defines one or more packages to include in an image when a specific
2399 item is included in :term:`IMAGE_FEATURES`.
Andrew Geissler09036742021-06-25 14:25:14 -05002400 When setting the value, :term:`FEATURE_PACKAGES` should have the name of
Andrew Geisslerc926e172021-05-07 16:11:35 -05002401 the feature item as an override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002402
2403 FEATURE_PACKAGES_widget = "package1 package2"
2404
Andrew Geissler09036742021-06-25 14:25:14 -05002405 In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002406 package1 and package2 would be included in the image.
2407
2408 .. note::
2409
Andrew Geissler09036742021-06-25 14:25:14 -05002410 Packages installed by features defined through :term:`FEATURE_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002411 are often package groups. While similarly named, you should not
Andrew Geissler09036742021-06-25 14:25:14 -05002412 confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002413 are discussed elsewhere in the documentation.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002414
Andrew Geisslerf0343792020-11-18 10:42:21 -06002415 :term:`FEED_DEPLOYDIR_BASE_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002416 Points to the base URL of the server and location within the
2417 document-root that provides the metadata and packages required by
2418 OPKG to support runtime package management of IPK packages. You set
2419 this variable in your ``local.conf`` file.
2420
Andrew Geisslerc926e172021-05-07 16:11:35 -05002421 Consider the following example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002422
2423 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2424
2425 This example assumes you are serving
2426 your packages over HTTP and your databases are located in a directory
2427 named ``BOARD-dir``, which is underneath your HTTP server's
2428 document-root. In this case, the OpenEmbedded build system generates
2429 a set of configuration files for you in your target that work with
2430 the feed.
2431
Andrew Geisslerf0343792020-11-18 10:42:21 -06002432 :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002433 The list of files and directories that are placed in a package. The
2434 :term:`PACKAGES` variable lists the packages
2435 generated by a recipe.
2436
Andrew Geissler09036742021-06-25 14:25:14 -05002437 To use the :term:`FILES` variable, provide a package name override that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002438 identifies the resulting package. Then, provide a space-separated
2439 list of files or paths that identify the files you want included as
Andrew Geisslerc926e172021-05-07 16:11:35 -05002440 part of the resulting package. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002441
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002442 FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002443
2444 .. note::
2445
2446 - When specifying files or paths, you can pattern match using
2447 Python's
2448 `glob <https://docs.python.org/3/library/glob.html>`_
2449 syntax. For details on the syntax, see the documentation by
2450 following the previous link.
2451
Andrew Geissler09036742021-06-25 14:25:14 -05002452 - When specifying paths as part of the :term:`FILES` variable, it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002453 good practice to use appropriate path variables. For example,
2454 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2455 rather than ``/usr/bin``. You can find a list of these
2456 variables at the top of the ``meta/conf/bitbake.conf`` file in
2457 the :term:`Source Directory`. You will also
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002458 find the default values of the various ``FILES:*`` variables in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002459 this file.
2460
Andrew Geissler09036742021-06-25 14:25:14 -05002461 If some of the files you provide with the :term:`FILES` variable are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002462 editable and you know they should not be overwritten during the
2463 package update process by the Package Management System (PMS), you
2464 can identify these files so that the PMS will not overwrite them. See
2465 the :term:`CONFFILES` variable for information on
2466 how to identify these files to the PMS.
2467
Andrew Geisslerf0343792020-11-18 10:42:21 -06002468 :term:`FILES_SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002469 Defines the file specification to match
2470 :term:`SOLIBSDEV`. In other words,
Andrew Geissler09036742021-06-25 14:25:14 -05002471 :term:`FILES_SOLIBSDEV` defines the full path name of the development
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002472 symbolic link (symlink) for shared libraries on the target platform.
2473
2474 The following statement from the ``bitbake.conf`` shows how it is
Andrew Geisslerc926e172021-05-07 16:11:35 -05002475 set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002476
2477 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2478
Andrew Geisslerf0343792020-11-18 10:42:21 -06002479 :term:`FILESEXTRAPATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002480 Extends the search path the OpenEmbedded build system uses when
2481 looking for files and patches as it processes recipes and append
2482 files. The default directories BitBake uses when it processes recipes
2483 are initially defined by the :term:`FILESPATH`
Andrew Geissler09036742021-06-25 14:25:14 -05002484 variable. You can extend :term:`FILESPATH` variable by using
2485 :term:`FILESEXTRAPATHS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002486
2487 Best practices dictate that you accomplish this by using
Andrew Geissler09036742021-06-25 14:25:14 -05002488 :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
Andrew Geisslerc926e172021-05-07 16:11:35 -05002489 prepend paths as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002490
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002491 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002492
2493 In the above example, the build system first
2494 looks for files in a directory that has the same name as the
2495 corresponding append file.
2496
2497 .. note::
2498
Andrew Geissler09036742021-06-25 14:25:14 -05002499 When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002500 expansion (``:=``) operator. Immediate expansion makes sure that
2501 BitBake evaluates :term:`THISDIR` at the time the
2502 directive is encountered rather than at some later time when
2503 expansion might result in a directory that does not contain the
2504 files you need.
2505
2506 Also, include the trailing separating colon character if you are
2507 prepending. The trailing colon character is necessary because you
2508 are directing BitBake to extend the path by prepending directories
2509 to the search path.
2510
Andrew Geisslerc926e172021-05-07 16:11:35 -05002511 Here is another common use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002512
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002513 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002514
2515 In this example, the build system extends the
Andrew Geissler09036742021-06-25 14:25:14 -05002516 :term:`FILESPATH` variable to include a directory named ``files`` that is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002517 in the same directory as the corresponding append file.
2518
Andrew Geisslerc926e172021-05-07 16:11:35 -05002519 This next example specifically adds three paths::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002520
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002521 FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002522
2523 A final example shows how you can extend the search path and include
2524 a :term:`MACHINE`-specific override, which is useful
Andrew Geisslerc926e172021-05-07 16:11:35 -05002525 in a BSP layer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002526
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002527 FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002528
2529 The previous statement appears in the
2530 ``linux-yocto-dev.bbappend`` file, which is found in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002531 :ref:`overview-manual/development-environment:yocto project source repositories` in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002532 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2533 override is a special :term:`PACKAGE_ARCH`
2534 definition for multiple ``meta-intel`` machines.
2535
2536 .. note::
2537
2538 For a layer that supports a single BSP, the override could just be
Andrew Geissler09036742021-06-25 14:25:14 -05002539 the value of :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002540
2541 By prepending paths in ``.bbappend`` files, you allow multiple append
2542 files that reside in different layers but are used for the same
2543 recipe to correctly extend the path.
2544
Andrew Geisslerf0343792020-11-18 10:42:21 -06002545 :term:`FILESOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002546 A subset of :term:`OVERRIDES` used by the
2547 OpenEmbedded build system for creating
Andrew Geissler09036742021-06-25 14:25:14 -05002548 :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002549 uses overrides to automatically extend the
2550 :term:`FILESPATH` variable. For an example of how
2551 that works, see the :term:`FILESPATH` variable
2552 description. Additionally, you find more information on how overrides
2553 are handled in the
2554 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2555 section of the BitBake User Manual.
2556
Andrew Geissler09036742021-06-25 14:25:14 -05002557 By default, the :term:`FILESOVERRIDES` variable is defined as::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002558
2559 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2560
2561 .. note::
2562
Andrew Geissler09036742021-06-25 14:25:14 -05002563 Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002564 with expected overrides and are used in an expected manner by the
2565 build system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002566
Andrew Geisslerf0343792020-11-18 10:42:21 -06002567 :term:`FILESPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002568 The default set of directories the OpenEmbedded build system uses
2569 when searching for patches and files.
2570
2571 During the build process, BitBake searches each directory in
Andrew Geissler09036742021-06-25 14:25:14 -05002572 :term:`FILESPATH` in the specified order when looking for files and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002573 patches specified by each ``file://`` URI in a recipe's
2574 :term:`SRC_URI` statements.
2575
Andrew Geissler09036742021-06-25 14:25:14 -05002576 The default value for the :term:`FILESPATH` variable is defined in the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002577 :ref:`ref-classes-base` class found in ``meta/classes`` in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002578 :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002579
2580 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2581 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2582
2583 The
Andrew Geissler09036742021-06-25 14:25:14 -05002584 :term:`FILESPATH` variable is automatically extended using the overrides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002585 from the :term:`FILESOVERRIDES` variable.
2586
2587 .. note::
2588
Andrew Geissler09036742021-06-25 14:25:14 -05002589 - Do not hand-edit the :term:`FILESPATH` variable. If you want the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002590 build system to look in directories other than the defaults,
Andrew Geissler09036742021-06-25 14:25:14 -05002591 extend the :term:`FILESPATH` variable by using the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002592 :term:`FILESEXTRAPATHS` variable.
2593
Andrew Geissler09036742021-06-25 14:25:14 -05002594 - Be aware that the default :term:`FILESPATH` directories do not map
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002595 to directories in custom layers where append files
2596 (``.bbappend``) are used. If you want the build system to find
2597 patches or files that reside with your append files, you need
Andrew Geissler09036742021-06-25 14:25:14 -05002598 to extend the :term:`FILESPATH` variable by using the
2599 :term:`FILESEXTRAPATHS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002600
2601 You can take advantage of this searching behavior in useful ways. For
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002602 example, consider a case where there is the following directory structure
2603 for general and machine-specific configurations::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002604
2605 files/defconfig
2606 files/MACHINEA/defconfig
2607 files/MACHINEB/defconfig
2608
Andrew Geissler09036742021-06-25 14:25:14 -05002609 Also in the example, the :term:`SRC_URI` statement contains
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002610 "file://defconfig". Given this scenario, you can set
2611 :term:`MACHINE` to "MACHINEA" and cause the build
Andrew Geissler09036742021-06-25 14:25:14 -05002612 system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002613 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2614 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2615 build system uses files from ``files/defconfig``.
2616
2617 You can find out more about the patching process in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002618 ":ref:`overview-manual/concepts:patching`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002619 in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06002620 ":ref:`dev-manual/common-tasks:patching code`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002621 the Yocto Project Development Tasks Manual. See the
2622 :ref:`ref-tasks-patch` task as well.
2623
Andrew Geisslerf0343792020-11-18 10:42:21 -06002624 :term:`FILESYSTEM_PERMS_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002625 Allows you to define your own file permissions settings table as part
2626 of your configuration for the packaging process. For example, suppose
2627 you need a consistent set of custom permissions for a set of groups
2628 and users across an entire work project. It is best to do this in the
2629 packages themselves but this is not always possible.
2630
2631 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2632 which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2633 If you create your own file
2634 permissions setting table, you should place it in your layer or the
2635 distro's layer.
2636
Andrew Geissler09036742021-06-25 14:25:14 -05002637 You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002638 ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2639 to point to your custom
2640 ``fs-perms.txt``. You can specify more than a single file permissions
2641 setting table. The paths you specify to these files must be defined
2642 within the :term:`BBPATH` variable.
2643
2644 For guidance on how to create your own file permissions settings
2645 table file, examine the existing ``fs-perms.txt``.
2646
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002647 :term:`FIT_DESC`
2648 Specifies the description string encoded into a fitImage. The default
2649 value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2650 class as follows::
2651
2652 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2653
Andrew Geisslerf0343792020-11-18 10:42:21 -06002654 :term:`FIT_GENERATE_KEYS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002655 Decides whether to generate the keys for signing fitImage if they
Andrew Geissler09036742021-06-25 14:25:14 -05002656 don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002657 The default value is 0.
2658
Andrew Geisslerf0343792020-11-18 10:42:21 -06002659 :term:`FIT_HASH_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002660 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2661
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002662 :term:`FIT_KERNEL_COMP_ALG`
2663 Compression algorithm to use for the kernel image inside the FIT Image.
2664 At present, the only supported values are "gzip" (default) or "none"
2665 If you set this variable to anything other than "none" you may also need
2666 to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2667
2668 :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2669 File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2670 value is ".gz".
2671
Andrew Geisslerf0343792020-11-18 10:42:21 -06002672 :term:`FIT_KEY_GENRSA_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002673 Arguments to openssl genrsa for generating RSA private key for signing
2674 fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2675 use.
2676
Andrew Geisslerf0343792020-11-18 10:42:21 -06002677 :term:`FIT_KEY_REQ_ARGS`
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002678 Arguments to openssl req for generating certificate for signing fitImage.
2679 The default value is "-batch -new". batch for non interactive mode
2680 and new for generating new keys.
2681
Andrew Geisslerf0343792020-11-18 10:42:21 -06002682 :term:`FIT_KEY_SIGN_PKCS`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05002683 Format for public key certificate used in signing fitImage.
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05002684 The default value is "x509".
2685
Andrew Geisslerf0343792020-11-18 10:42:21 -06002686 :term:`FIT_SIGN_ALG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002687 Specifies the signature algorithm used in creating the FIT Image.
2688 For e.g. rsa2048.
2689
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002690 :term:`FIT_SIGN_INDIVIDUAL`
2691 If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2692 class will sign the kernel, dtb and ramdisk images individually in addition
2693 to signing the fitImage itself. This could be useful if you are
2694 intending to verify signatures in another context than booting via
2695 U-Boot.
2696
Andrew Geissler9aee5002022-03-30 16:27:02 +00002697 :term:`FIT_SIGN_NUMBITS`
2698 Size of private key in number of bits used in fitImage. The default
2699 value is "2048".
2700
Andrew Geisslerf0343792020-11-18 10:42:21 -06002701 :term:`FONT_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002702 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2703 this variable specifies the runtime dependencies for font packages.
Andrew Geissler5f350902021-07-23 13:09:54 -04002704 By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002705
Andrew Geisslerf0343792020-11-18 10:42:21 -06002706 :term:`FONT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002707 When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2708 this variable identifies packages containing font files that need to
Andrew Geissler595f6302022-01-24 19:11:47 +00002709 be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002710 that fonts are in the recipe's main package (i.e.
2711 ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2712 need are in a package other than that main package.
2713
Andrew Geisslerf0343792020-11-18 10:42:21 -06002714 :term:`FORCE_RO_REMOVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002715 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2716 during the generation of the root filesystem.
2717
2718 Set the variable to "1" to force the removal of these packages.
2719
Andrew Geisslerf0343792020-11-18 10:42:21 -06002720 :term:`FULL_OPTIMIZATION`
William A. Kennington IIIac69b482021-06-02 12:28:27 -07002721 The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002722 compiling an optimized system. This variable defaults to "-O2 -pipe
2723 ${DEBUG_FLAGS}".
2724
Andrew Geisslerf0343792020-11-18 10:42:21 -06002725 :term:`GCCPIE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002726 Enables Position Independent Executables (PIE) within the GNU C
2727 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2728 Programming (ROP) attacks much more difficult to execute.
2729
2730 By default the ``security_flags.inc`` file enables PIE by setting the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002731 variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002732
2733 GCCPIE ?= "--enable-default-pie"
2734
Andrew Geisslerf0343792020-11-18 10:42:21 -06002735 :term:`GCCVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002736 Specifies the default version of the GNU C Compiler (GCC) used for
Andrew Geissler09036742021-06-25 14:25:14 -05002737 compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002738 ``meta/conf/distro/include/tcmode-default.inc`` include file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002739
2740 GCCVERSION ?= "8.%"
2741
2742 You can override this value by setting it in a
2743 configuration file such as the ``local.conf``.
2744
Andrew Geisslerf0343792020-11-18 10:42:21 -06002745 :term:`GDB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002746 The minimal command and arguments to run the GNU Debugger.
2747
Andrew Geissler595f6302022-01-24 19:11:47 +00002748 :term:`GIR_EXTRA_LIBS_PATH`
2749 Allows to specify an extra search path for ``.so`` files
2750 in GLib related recipes using GObject introspection,
2751 and which do not compile without this setting.
2752 See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2753 section for details.
2754
Andrew Geisslerf0343792020-11-18 10:42:21 -06002755 :term:`GITDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002756 The directory in which a local copy of a Git repository is stored
2757 when it is cloned.
2758
Andrew Geisslerf0343792020-11-18 10:42:21 -06002759 :term:`GLIBC_GENERATE_LOCALES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002760 Specifies the list of GLIBC locales to generate should you not wish
2761 to generate all LIBC locals, which can be time consuming.
2762
2763 .. note::
2764
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002765 If you specifically remove the locale ``en_US.UTF-8``, you must set
2766 :term:`IMAGE_LINGUAS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002767
Andrew Geissler09036742021-06-25 14:25:14 -05002768 You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002769 By default, all locales are generated.
2770 ::
2771
2772 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2773
Andrew Geisslerf0343792020-11-18 10:42:21 -06002774 :term:`GROUPADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002775 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2776 this variable specifies for a package what parameters should be
2777 passed to the ``groupadd`` command if you wish to add a group to the
2778 system when the package is installed.
2779
Andrew Geisslerc926e172021-05-07 16:11:35 -05002780 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002781
Patrick Williams0ca19cc2021-08-16 14:03:13 -05002782 GROUPADD_PARAM:${PN} = "-r netdev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002783
2784 For information on the standard Linux shell command
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002785 ``groupadd``, see https://linux.die.net/man/8/groupadd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002786
Andrew Geisslerf0343792020-11-18 10:42:21 -06002787 :term:`GROUPMEMS_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002788 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2789 this variable specifies for a package what parameters should be
2790 passed to the ``groupmems`` command if you wish to modify the members
2791 of a group when the package is installed.
2792
2793 For information on the standard Linux shell command ``groupmems``,
Andrew Geisslerd1e89492021-02-12 15:35:20 -06002794 see https://linux.die.net/man/8/groupmems.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002795
Andrew Geisslerf0343792020-11-18 10:42:21 -06002796 :term:`GRUB_GFXSERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002797 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2798 and serial in the boot menu. Set this variable to "1" in your
2799 ``local.conf`` or distribution configuration file to enable graphics
2800 and serial in the menu.
2801
2802 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2803 information on how this variable is used.
2804
Andrew Geisslerf0343792020-11-18 10:42:21 -06002805 :term:`GRUB_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002806 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2807 configuration. Use a semi-colon character (``;``) to separate
2808 multiple options.
2809
Andrew Geissler09036742021-06-25 14:25:14 -05002810 The :term:`GRUB_OPTS` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002811 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2812 on how this variable is used.
2813
Andrew Geisslerf0343792020-11-18 10:42:21 -06002814 :term:`GRUB_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002815 Specifies the timeout before executing the default ``LABEL`` in the
2816 GNU GRand Unified Bootloader (GRUB).
2817
Andrew Geissler09036742021-06-25 14:25:14 -05002818 The :term:`GRUB_TIMEOUT` variable is optional. See the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002819 :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2820 on how this variable is used.
2821
Andrew Geisslerf0343792020-11-18 10:42:21 -06002822 :term:`GTKIMMODULES_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002823 When inheriting the
2824 :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2825 this variable specifies the packages that contain the GTK+ input
2826 method modules being installed when the modules are in packages other
2827 than the main package.
2828
Andrew Geisslerf0343792020-11-18 10:42:21 -06002829 :term:`HOMEPAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002830 Website where more information about the software the recipe is
2831 building can be found.
2832
Andrew Geisslerf0343792020-11-18 10:42:21 -06002833 :term:`HOST_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002834 The name of the target architecture, which is normally the same as
2835 :term:`TARGET_ARCH`. The OpenEmbedded build system
2836 supports many architectures. Here is an example list of architectures
2837 supported. This list is by no means complete as the architecture is
2838 configurable:
2839
2840 - arm
2841 - i586
2842 - x86_64
2843 - powerpc
2844 - powerpc64
2845 - mips
2846 - mipsel
2847
Andrew Geisslerf0343792020-11-18 10:42:21 -06002848 :term:`HOST_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002849 Specifies architecture-specific compiler flags that are passed to the
2850 C compiler.
2851
Andrew Geissler09036742021-06-25 14:25:14 -05002852 Default initialization for :term:`HOST_CC_ARCH` varies depending on what
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002853 is being built:
2854
2855 - :term:`TARGET_CC_ARCH` when building for the
2856 target
2857
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002858 - :term:`BUILD_CC_ARCH` when building for the build host (i.e.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002859 ``-native``)
2860
2861 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2862 ``nativesdk-``)
2863
Andrew Geisslerf0343792020-11-18 10:42:21 -06002864 :term:`HOST_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002865 Specifies the name of the target operating system, which is normally
2866 the same as the :term:`TARGET_OS`. The variable can
2867 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2868 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2869 "linux-musleabi" values possible.
2870
Andrew Geisslerf0343792020-11-18 10:42:21 -06002871 :term:`HOST_PREFIX`
Andrew Geissler09036742021-06-25 14:25:14 -05002872 Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002873 is normally the same as :term:`TARGET_PREFIX`.
2874
Andrew Geisslerf0343792020-11-18 10:42:21 -06002875 :term:`HOST_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002876 Specifies the system, including the architecture and the operating
2877 system, for which the build is occurring in the context of the
2878 current recipe.
2879
2880 The OpenEmbedded build system automatically sets this variable based
2881 on :term:`HOST_ARCH`,
2882 :term:`HOST_VENDOR`, and
2883 :term:`HOST_OS` variables.
2884
2885 .. note::
2886
2887 You do not need to set the variable yourself.
2888
2889 Consider these two examples:
2890
2891 - Given a native recipe on a 32-bit x86 machine running Linux, the
2892 value is "i686-linux".
2893
2894 - Given a recipe being built for a little-endian MIPS target running
2895 Linux, the value might be "mipsel-linux".
2896
Andrew Geissler9aee5002022-03-30 16:27:02 +00002897 :term:`HOST_VENDOR`
2898 Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2899 same as :term:`TARGET_VENDOR`.
2900
Andrew Geisslerf0343792020-11-18 10:42:21 -06002901 :term:`HOSTTOOLS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002902 A space-separated list (filter) of tools on the build host that
2903 should be allowed to be called from within build tasks. Using this
2904 filter helps reduce the possibility of host contamination. If a tool
Andrew Geissler09036742021-06-25 14:25:14 -05002905 specified in the value of :term:`HOSTTOOLS` is not found on the build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002906 host, the OpenEmbedded build system produces an error and the build
2907 is not started.
2908
2909 For additional information, see
2910 :term:`HOSTTOOLS_NONFATAL`.
2911
Andrew Geisslerf0343792020-11-18 10:42:21 -06002912 :term:`HOSTTOOLS_NONFATAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002913 A space-separated list (filter) of tools on the build host that
2914 should be allowed to be called from within build tasks. Using this
2915 filter helps reduce the possibility of host contamination. Unlike
2916 :term:`HOSTTOOLS`, the OpenEmbedded build system
2917 does not produce an error if a tool specified in the value of
Andrew Geissler09036742021-06-25 14:25:14 -05002918 :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2919 use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002920
Andrew Geissler9aee5002022-03-30 16:27:02 +00002921 :term:`ICECC_CLASS_DISABLE`
2922 Identifies user classes that you do not want the Icecream distributed
2923 compile support to consider. This variable is used by the
2924 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2925 your ``local.conf`` file.
2926
2927 When you list classes using this variable, the recipes inheriting
2928 those classes will not benefit from distributed compilation across
2929 remote hosts. Instead they will be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002930
Andrew Geisslerf0343792020-11-18 10:42:21 -06002931 :term:`ICECC_DISABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002932 Disables or enables the ``icecc`` (Icecream) function. For more
2933 information on this function and best practices for using this
Andrew Geissler595f6302022-01-24 19:11:47 +00002934 variable, see the ":ref:`ref-classes-icecc`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002935 section.
2936
2937 Setting this variable to "1" in your ``local.conf`` disables the
Andrew Geisslerc926e172021-05-07 16:11:35 -05002938 function::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002939
2940 ICECC_DISABLED ??= "1"
2941
Andrew Geisslerc926e172021-05-07 16:11:35 -05002942 To enable the function, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002943
2944 ICECC_DISABLED = ""
2945
Andrew Geisslerf0343792020-11-18 10:42:21 -06002946 :term:`ICECC_ENV_EXEC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002947 Points to the ``icecc-create-env`` script that you provide. This
2948 variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2949 set this variable in your ``local.conf`` file.
2950
2951 If you do not point to a script that you provide, the OpenEmbedded
2952 build system uses the default script provided by the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05002953 :oe_git:`icecc-create-env_0.1.bb
2954 </openembedded-core/tree/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb>`
2955 recipe, which is a modified version and not the one that comes with
2956 ``icecream``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002957
Andrew Geisslerf0343792020-11-18 10:42:21 -06002958 :term:`ICECC_PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002959 Extra options passed to the ``make`` command during the
2960 :ref:`ref-tasks-compile` task that specify parallel
2961 compilation. This variable usually takes the form of "-j x", where x
2962 represents the maximum number of parallel threads ``make`` can run.
2963
2964 .. note::
2965
2966 The options passed affect builds on all enabled machines on the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05002967 network, which are machines running the ``iceccd`` daemon.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002968
2969 If your enabled machines support multiple cores, coming up with the
2970 maximum number of parallel threads that gives you the best
2971 performance could take some experimentation since machine speed,
2972 network lag, available memory, and existing machine loads can all
2973 affect build time. Consequently, unlike the
2974 :term:`PARALLEL_MAKE` variable, there is no
Andrew Geissler09036742021-06-25 14:25:14 -05002975 rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002976 performance.
2977
Andrew Geissler09036742021-06-25 14:25:14 -05002978 If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002979 use it (i.e. the system does not detect and assign the number of
Andrew Geissler09036742021-06-25 14:25:14 -05002980 cores as is done with :term:`PARALLEL_MAKE`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002981
Andrew Geisslerf0343792020-11-18 10:42:21 -06002982 :term:`ICECC_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002983 The location of the ``icecc`` binary. You can set this variable in
2984 your ``local.conf`` file. If your ``local.conf`` file does not define
2985 this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
2986 to define it by locating ``icecc`` using ``which``.
2987
Andrew Geissler9aee5002022-03-30 16:27:02 +00002988 :term:`ICECC_RECIPE_DISABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002989 Identifies user recipes that you do not want the Icecream distributed
2990 compile support to consider. This variable is used by the
2991 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2992 your ``local.conf`` file.
2993
Andrew Geissler595f6302022-01-24 19:11:47 +00002994 When you list recipes using this variable, you are excluding them
2995 from distributed compilation across remote hosts. Instead they will
2996 be built locally.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002997
Andrew Geissler9aee5002022-03-30 16:27:02 +00002998 :term:`ICECC_RECIPE_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002999 Identifies user recipes that use an empty
3000 :term:`PARALLEL_MAKE` variable that you want to
3001 force remote distributed compilation on using the Icecream
3002 distributed compile support. This variable is used by the
3003 :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3004 your ``local.conf`` file.
3005
Andrew Geisslerf0343792020-11-18 10:42:21 -06003006 :term:`IMAGE_BASENAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003007 The base name of image output files. This variable defaults to the
3008 recipe name (``${``\ :term:`PN`\ ``}``).
3009
Andrew Geisslerf0343792020-11-18 10:42:21 -06003010 :term:`IMAGE_BOOT_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003011 A space-separated list of files installed into the boot partition
3012 when preparing an image using the Wic tool with the
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003013 ``bootimg-partition`` source plugin. By default,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003014 the files are
3015 installed under the same name as the source files. To change the
3016 installed name, separate it from the original name with a semi-colon
3017 (;). Source files need to be located in
3018 :term:`DEPLOY_DIR_IMAGE`. Here are two
Andrew Geisslerc926e172021-05-07 16:11:35 -05003019 examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003020
3021 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3022 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3023
3024 Alternatively, source files can be picked up using a glob pattern. In
3025 this case, the destination file must have the same name as the base
3026 name of the source file path. To install files into a directory
3027 within the target location, pass its name after a semi-colon (;).
Andrew Geisslerc926e172021-05-07 16:11:35 -05003028 Here are two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003029
3030 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3031 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3032
3033 The first example
3034 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3035 into the root of the target partition. The second example installs
3036 the same files into a ``boot`` directory within the target partition.
3037
3038 You can find information on how to use the Wic tool in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003039 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003040 section of the Yocto Project Development Tasks Manual. Reference
3041 material for Wic is located in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003042 ":doc:`/ref-manual/kickstart`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003043
Andrew Geisslerf0343792020-11-18 10:42:21 -06003044 :term:`IMAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003045 A list of classes that all images should inherit. You typically use
3046 this variable to specify the list of classes that register the
3047 different types of images the OpenEmbedded build system creates.
3048
Andrew Geissler09036742021-06-25 14:25:14 -05003049 The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003050 set this variable in your ``local.conf`` or in a distribution
3051 configuration file.
3052
3053 For more information, see ``meta/classes/image_types.bbclass`` in the
3054 :term:`Source Directory`.
3055
Andrew Geisslerf0343792020-11-18 10:42:21 -06003056 :term:`IMAGE_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003057 Specifies the command to create the image file for a specific image
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05003058 type, which corresponds to the value set in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003059 :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3060 ``btrfs``, and so forth). When setting this variable, you should use
Andrew Geisslerc926e172021-05-07 16:11:35 -05003061 an override for the associated type. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003062
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003063 IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
Andrew Geissler09036742021-06-25 14:25:14 -05003064 --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003065 ${EXTRA_IMAGECMD}"
3066
3067 You typically do not need to set this variable unless you are adding
3068 support for a new image type. For more examples on how to set this
3069 variable, see the :ref:`image_types <ref-classes-image_types>`
3070 class file, which is ``meta/classes/image_types.bbclass``.
3071
Andrew Geisslerf0343792020-11-18 10:42:21 -06003072 :term:`IMAGE_DEVICE_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003073 Specifies one or more files that contain custom device tables that
3074 are passed to the ``makedevs`` command as part of creating an image.
3075 These files list basic device nodes that should be created under
Andrew Geissler09036742021-06-25 14:25:14 -05003076 ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003077 ``files/device_table-minimal.txt`` is used, which is located by
3078 :term:`BBPATH`. For details on how you should write
3079 device table files, see ``meta/files/device_table-minimal.txt`` as an
3080 example.
3081
Andrew Geissler9aee5002022-03-30 16:27:02 +00003082 :term:`IMAGE_EFI_BOOT_FILES`
3083 A space-separated list of files installed into the boot partition
3084 when preparing an image using the Wic tool with the
3085 ``bootimg-efi`` source plugin. By default,
3086 the files are
3087 installed under the same name as the source files. To change the
3088 installed name, separate it from the original name with a semi-colon
3089 (;). Source files need to be located in
3090 :term:`DEPLOY_DIR_IMAGE`. Here are two
3091 examples::
3092
3093 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3094 IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3095
3096 Alternatively, source files can be picked up using a glob pattern. In
3097 this case, the destination file must have the same name as the base
3098 name of the source file path. To install files into a directory
3099 within the target location, pass its name after a semi-colon (;).
3100 Here are two examples::
3101
3102 IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3103 IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3104
3105 The first example
3106 installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3107 into the root of the target partition. The second example installs
3108 the same files into a ``boot`` directory within the target partition.
3109
3110 You can find information on how to use the Wic tool in the
3111 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3112 section of the Yocto Project Development Tasks Manual. Reference
3113 material for Wic is located in the
3114 ":doc:`/ref-manual/kickstart`" chapter.
3115
Andrew Geisslerf0343792020-11-18 10:42:21 -06003116 :term:`IMAGE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003117 The primary list of features to include in an image. Typically, you
3118 configure this variable in an image recipe. Although you can use this
3119 variable from your ``local.conf`` file, which is found in the
3120 :term:`Build Directory`, best practices dictate that you do
3121 not.
3122
3123 .. note::
3124
3125 To enable extra features from outside the image recipe, use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003126 :term:`EXTRA_IMAGE_FEATURES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003127
3128 For a list of image features that ships with the Yocto Project, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003129 the ":ref:`ref-features-image`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003130
3131 For an example that shows how to customize your image by using this
Andrew Geissler09209ee2020-12-13 08:44:15 -06003132 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 -05003133 section in the Yocto Project Development Tasks Manual.
3134
Andrew Geisslerf0343792020-11-18 10:42:21 -06003135 :term:`IMAGE_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003136 Specifies the formats the OpenEmbedded build system uses during the
3137 build when creating the root filesystem. For example, setting
Andrew Geissler09036742021-06-25 14:25:14 -05003138 :term:`IMAGE_FSTYPES` as follows causes the build system to create root
Andrew Geisslerc926e172021-05-07 16:11:35 -05003139 filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003140
3141 IMAGE_FSTYPES = "ext3 tar.bz2"
3142
3143 For the complete list of supported image formats from which you can
3144 choose, see :term:`IMAGE_TYPES`.
3145
3146 .. note::
3147
3148 - If an image recipe uses the "inherit image" line and you are
Andrew Geissler09036742021-06-25 14:25:14 -05003149 setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
Andrew Geissler5f350902021-07-23 13:09:54 -04003150 :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003151
3152 - Due to the way the OpenEmbedded build system processes this
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003153 variable, you cannot update its contents by using ``:append``
3154 or ``:prepend``. You must use the ``+=`` operator to add one or
Andrew Geissler09036742021-06-25 14:25:14 -05003155 more options to the :term:`IMAGE_FSTYPES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003156
Andrew Geisslerf0343792020-11-18 10:42:21 -06003157 :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003158 Used by recipes to specify the packages to install into an image
3159 through the :ref:`image <ref-classes-image>` class. Use the
Andrew Geissler09036742021-06-25 14:25:14 -05003160 :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003161
Andrew Geissler09036742021-06-25 14:25:14 -05003162 Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003163 install into an image through :ref:`ref-classes-image`. Additionally,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003164 there are "helper" classes such as the
3165 :ref:`core-image <ref-classes-core-image>` class which can
Andrew Geissler09036742021-06-25 14:25:14 -05003166 take lists used with :term:`IMAGE_FEATURES` and turn them into
3167 auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003168 default contents.
3169
Andrew Geisslerc926e172021-05-07 16:11:35 -05003170 When you use this variable, it is best to use it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003171
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003172 IMAGE_INSTALL:append = " package-name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003173
3174 Be sure to include the space
3175 between the quotation character and the start of the package name or
3176 names.
3177
3178 .. note::
3179
3180 - When working with a
Andrew Geissler09209ee2020-12-13 08:44:15 -06003181 :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Andrew Geissler09036742021-06-25 14:25:14 -05003182 image, do not use the :term:`IMAGE_INSTALL` variable to specify
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003183 packages for installation. Instead, use the
3184 :term:`PACKAGE_INSTALL` variable, which
Patrick Williams2194f502022-10-16 14:26:09 -05003185 allows the initial RAM filesystem (:term:`Initramfs`) recipe to use a
Andrew Geissler09036742021-06-25 14:25:14 -05003186 fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
Patrick Williams2194f502022-10-16 14:26:09 -05003187 For information on creating an :term:`Initramfs`, see the
3188 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003189 section in the Yocto Project Development Tasks Manual.
3190
Andrew Geissler09036742021-06-25 14:25:14 -05003191 - Using :term:`IMAGE_INSTALL` with the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003192 :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003193 BitBake operator within the ``/conf/local.conf`` file or from
3194 within an image recipe is not recommended. Use of this operator
3195 in these ways can cause ordering issues. Since
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003196 :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003197 value using the
3198 :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
Andrew Geissler09036742021-06-25 14:25:14 -05003199 operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003200 results in unexpected behavior when used within
3201 ``conf/local.conf``. Furthermore, the same operation from
3202 within an image recipe may or may not succeed depending on the
3203 specific situation. In both these cases, the behavior is
3204 contrary to how most users expect the ``+=`` operator to work.
3205
Andrew Geisslerf0343792020-11-18 10:42:21 -06003206 :term:`IMAGE_LINGUAS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003207 Specifies the list of locales to install into the image during the
3208 root filesystem construction process. The OpenEmbedded build system
3209 automatically splits locale files, which are used for localization,
Andrew Geissler09036742021-06-25 14:25:14 -05003210 into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003211 ensures that any locale packages that correspond to packages already
3212 selected for installation into the image are also installed. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05003213 an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003214
3215 IMAGE_LINGUAS = "pt-br de-de"
3216
3217 In this example, the build system ensures any Brazilian Portuguese
3218 and German locale files that correspond to packages in the image are
3219 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3220 ``*-locale-pt`` and ``*-locale-de``, since some software packages
3221 only provide locale files by language and not by country-specific
3222 language).
3223
3224 See the :term:`GLIBC_GENERATE_LOCALES`
3225 variable for information on generating GLIBC locales.
3226
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003227
3228 :term:`IMAGE_LINK_NAME`
3229 The name of the output image symlink (which does not include
3230 the version part as :term:`IMAGE_NAME` does). The default value
3231 is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003232 variables::
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003233
3234 IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3235
3236
Andrew Geisslerf0343792020-11-18 10:42:21 -06003237 :term:`IMAGE_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003238 The manifest file for the image. This file lists all the installed
3239 packages that make up the image. The file contains package
Andrew Geisslerc926e172021-05-07 16:11:35 -05003240 information on a line-per-package basis as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003241
3242 packagename packagearch version
3243
Andrew Geissler09036742021-06-25 14:25:14 -05003244 The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
Andrew Geisslerc926e172021-05-07 16:11:35 -05003245 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003246
Andrew Geissler09036742021-06-25 14:25:14 -05003247 IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003248
3249 The location is
Andrew Geissler09036742021-06-25 14:25:14 -05003250 derived using the :term:`IMGDEPLOYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003251 and :term:`IMAGE_NAME` variables. You can find
Andrew Geissler09209ee2020-12-13 08:44:15 -06003252 information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003253 section in the Yocto Project Overview and Concepts Manual.
3254
Andrew Geisslerf0343792020-11-18 10:42:21 -06003255 :term:`IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003256 The name of the output image files minus the extension. This variable
3257 is derived using the :term:`IMAGE_BASENAME`,
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003258 :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003259 variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003260
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003261 IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3262
3263 :term:`IMAGE_NAME_SUFFIX`
Andrew Geissler615f2f12022-07-15 14:00:58 -05003264 Suffix used for the image output filename --- defaults to ``".rootfs"``
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003265 to distinguish the image file from other files created during image
3266 building; however if this suffix is redundant or not desired you can
3267 clear the value of this variable (set the value to ""). For example,
Patrick Williams2194f502022-10-16 14:26:09 -05003268 this is typically cleared in :term:`Initramfs` image recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003269
Andrew Geisslerf0343792020-11-18 10:42:21 -06003270 :term:`IMAGE_OVERHEAD_FACTOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003271 Defines a multiplier that the build system applies to the initial
3272 image size for cases when the multiplier times the returned disk
3273 usage value for the image is greater than the sum of
Andrew Geissler09036742021-06-25 14:25:14 -05003274 :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003275 the multiplier applied to the initial image size creates free disk
3276 space in the image as overhead. By default, the build process uses a
3277 multiplier of 1.3 for this variable. This default value results in
3278 30% free disk space added to the image when this method is used to
3279 determine the final generated image size. You should be aware that
3280 post install scripts and the package management system uses disk
3281 space inside this overhead area. Consequently, the multiplier does
3282 not produce an image with all the theoretical free disk space. See
Andrew Geissler09036742021-06-25 14:25:14 -05003283 :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003284 determines the overall image size.
3285
3286 The default 30% free disk space typically gives the image enough room
3287 to boot and allows for basic post installs while still leaving a
3288 small amount of free disk space. If 30% free space is inadequate, you
3289 can increase the default value. For example, the following setting
Andrew Geisslerc926e172021-05-07 16:11:35 -05003290 gives you 50% free space added to the image::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003291
3292 IMAGE_OVERHEAD_FACTOR = "1.5"
3293
3294 Alternatively, you can ensure a specific amount of free disk space is
Andrew Geissler09036742021-06-25 14:25:14 -05003295 added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003296 variable.
3297
Andrew Geisslerf0343792020-11-18 10:42:21 -06003298 :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003299 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3300 OpenEmbedded build system. The variable is defined appropriately by
3301 the :ref:`package_deb <ref-classes-package_deb>`,
3302 :ref:`package_rpm <ref-classes-package_rpm>`,
3303 :ref:`package_ipk <ref-classes-package_ipk>`, or
3304 :ref:`package_tar <ref-classes-package_tar>` class.
3305
3306 .. note::
3307
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003308 The ``package_tar`` class is broken and is not supported. It is
3309 recommended that you do not use it.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003310
3311 The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
Andrew Geissler09036742021-06-25 14:25:14 -05003312 :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003313 for packaging up images and SDKs.
3314
Andrew Geissler09036742021-06-25 14:25:14 -05003315 You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003316 variable is set indirectly through the appropriate
3317 :ref:`package_* <ref-classes-package>` class using the
3318 :term:`PACKAGE_CLASSES` variable. The
3319 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3320 or IPK) that appears with the variable
3321
3322 .. note::
3323
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003324 Files using the ``.tar`` format are never used as a substitute
3325 packaging format for DEB, RPM, and IPK formatted files for your image
3326 or SDK.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003327
Andrew Geisslerf0343792020-11-18 10:42:21 -06003328 :term:`IMAGE_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003329 Specifies a list of functions to call once the OpenEmbedded build
3330 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003331 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003332
3333 IMAGE_POSTPROCESS_COMMAND += "function; ... "
3334
3335 If you need to pass the root filesystem path to a command within the
3336 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3337 directory that becomes the root filesystem image. See the
3338 :term:`IMAGE_ROOTFS` variable for more
3339 information.
3340
Andrew Geisslerf0343792020-11-18 10:42:21 -06003341 :term:`IMAGE_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003342 Specifies a list of functions to call before the OpenEmbedded build
3343 system creates the final image output files. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05003344 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003345
3346 IMAGE_PREPROCESS_COMMAND += "function; ... "
3347
3348 If you need to pass the root filesystem path to a command within the
3349 function, you can use ``${IMAGE_ROOTFS}``, which points to the
3350 directory that becomes the root filesystem image. See the
3351 :term:`IMAGE_ROOTFS` variable for more
3352 information.
3353
Andrew Geisslerf0343792020-11-18 10:42:21 -06003354 :term:`IMAGE_ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003355 The location of the root filesystem while it is under construction
3356 (i.e. during the :ref:`ref-tasks-rootfs` task). This
3357 variable is not configurable. Do not change it.
3358
Andrew Geisslerf0343792020-11-18 10:42:21 -06003359 :term:`IMAGE_ROOTFS_ALIGNMENT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003360 Specifies the alignment for the output image file in Kbytes. If the
3361 size of the image is not a multiple of this value, then the size is
3362 rounded up to the nearest multiple of the value. The default value is
3363 "1". See :term:`IMAGE_ROOTFS_SIZE` for
3364 additional information.
3365
Andrew Geisslerf0343792020-11-18 10:42:21 -06003366 :term:`IMAGE_ROOTFS_EXTRA_SPACE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003367 Defines additional free disk space created in the image in Kbytes. By
3368 default, this variable is set to "0". This free disk space is added
3369 to the image after the build system determines the image size as
Andrew Geissler09036742021-06-25 14:25:14 -05003370 described in :term:`IMAGE_ROOTFS_SIZE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003371
3372 This variable is particularly useful when you want to ensure that a
3373 specific amount of free disk space is available on a device after an
3374 image is installed and running. For example, to be sure 5 Gbytes of
Andrew Geisslerc926e172021-05-07 16:11:35 -05003375 free disk space is available, set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003376
3377 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3378
3379 For example, the Yocto Project Build Appliance specifically requests
Andrew Geisslerc926e172021-05-07 16:11:35 -05003380 40 Gbytes of extra space with the line::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003381
3382 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3383
Andrew Geisslerf0343792020-11-18 10:42:21 -06003384 :term:`IMAGE_ROOTFS_SIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003385 Defines the size in Kbytes for the generated image. The OpenEmbedded
3386 build system determines the final size for the generated image using
3387 an algorithm that takes into account the initial disk space used for
3388 the generated image, a requested size for the image, and requested
3389 additional free disk space to be added to the image. Programatically,
3390 the build system determines the final size of the generated image as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003391 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003392
3393 if (image-du * overhead) < rootfs-size:
3394 internal-rootfs-size = rootfs-size + xspace
3395 else:
3396 internal-rootfs-size = (image-du * overhead) + xspace
3397 where:
3398 image-du = Returned value of the du command on the image.
3399 overhead = IMAGE_OVERHEAD_FACTOR
3400 rootfs-size = IMAGE_ROOTFS_SIZE
3401 internal-rootfs-size = Initial root filesystem size before any modifications.
3402 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3403
3404 See the :term:`IMAGE_OVERHEAD_FACTOR`
3405 and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3406 variables for related information.
3407
Andrew Geisslerf0343792020-11-18 10:42:21 -06003408 :term:`IMAGE_TYPEDEP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003409 Specifies a dependency from one image type on another. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05003410 example from the :ref:`image-live <ref-classes-image-live>` class::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003411
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003412 IMAGE_TYPEDEP:live = "ext3"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003413
3414 In the previous example, the variable ensures that when "live" is
3415 listed with the :term:`IMAGE_FSTYPES` variable,
3416 the OpenEmbedded build system produces an ``ext3`` image first since
3417 one of the components of the live image is an ``ext3`` formatted
3418 partition containing the root filesystem.
3419
Andrew Geisslerf0343792020-11-18 10:42:21 -06003420 :term:`IMAGE_TYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003421 Specifies the complete list of supported image types by default:
3422
3423 - btrfs
3424 - container
3425 - cpio
3426 - cpio.gz
3427 - cpio.lz4
3428 - cpio.lzma
3429 - cpio.xz
3430 - cramfs
Andrew Geissler09036742021-06-25 14:25:14 -05003431 - erofs
3432 - erofs-lz4
3433 - erofs-lz4hc
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003434 - ext2
3435 - ext2.bz2
3436 - ext2.gz
3437 - ext2.lzma
3438 - ext3
3439 - ext3.gz
3440 - ext4
3441 - ext4.gz
3442 - f2fs
3443 - hddimg
3444 - iso
3445 - jffs2
3446 - jffs2.sum
3447 - multiubi
3448 - squashfs
3449 - squashfs-lz4
3450 - squashfs-lzo
3451 - squashfs-xz
3452 - tar
3453 - tar.bz2
3454 - tar.gz
3455 - tar.lz4
3456 - tar.xz
3457 - tar.zst
3458 - ubi
3459 - ubifs
3460 - wic
3461 - wic.bz2
3462 - wic.gz
3463 - wic.lzma
3464
3465 For more information about these types of images, see
3466 ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3467
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003468 :term:`IMAGE_VERSION_SUFFIX`
3469 Version suffix that is part of the default :term:`IMAGE_NAME` and
3470 :term:`KERNEL_ARTIFACT_NAME` values.
3471 Defaults to ``"-${DATETIME}"``, however you could set this to a
3472 version string that comes from your external build environment if
3473 desired, and this suffix would then be used consistently across
3474 the build artifacts.
3475
Andrew Geissler09036742021-06-25 14:25:14 -05003476 :term:`IMGDEPLOYDIR`
3477 When inheriting the :ref:`image <ref-classes-image>` class directly or
3478 through the :ref:`core-image <ref-classes-core-image>` class, the
Andrew Geissler5f350902021-07-23 13:09:54 -04003479 :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
Andrew Geissler09036742021-06-25 14:25:14 -05003480 that is set in the ``image`` class as follows::
3481
3482 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3483
3484 Recipes inheriting the ``image`` class should copy files to be
Andrew Geissler5f350902021-07-23 13:09:54 -04003485 deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
Andrew Geissler09036742021-06-25 14:25:14 -05003486 copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3487
Andrew Geisslerf0343792020-11-18 10:42:21 -06003488 :term:`INC_PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003489 Helps define the recipe revision for recipes that share a common
3490 ``include`` file. You can think of this variable as part of the
3491 recipe revision as set from within an include file.
3492
3493 Suppose, for example, you have a set of recipes that are used across
3494 several projects. And, within each of those recipes the revision (its
3495 :term:`PR` value) is set accordingly. In this case, when
3496 the revision of those recipes changes, the burden is on you to find
3497 all those recipes and be sure that they get changed to reflect the
3498 updated version of the recipe. In this scenario, it can get
3499 complicated when recipes that are used in many places and provide
3500 common functionality are upgraded to a new revision.
3501
3502 A more efficient way of dealing with this situation is to set the
Andrew Geissler09036742021-06-25 14:25:14 -05003503 :term:`INC_PR` variable inside the ``include`` files that the recipes
3504 share and then expand the :term:`INC_PR` variable within the recipes to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003505 help define the recipe revision.
3506
3507 The following provides an example that shows how to use the
Andrew Geissler09036742021-06-25 14:25:14 -05003508 :term:`INC_PR` variable given a common ``include`` file that defines the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003509 variable. Once the variable is defined in the ``include`` file, you
Andrew Geissler09036742021-06-25 14:25:14 -05003510 can use the variable to set the :term:`PR` values in each recipe. You
3511 will notice that when you set a recipe's :term:`PR` you can provide more
3512 granular revisioning by appending values to the :term:`INC_PR` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003513
3514 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3515 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3516 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3517 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3518
3519 The
3520 first line of the example establishes the baseline revision to be
3521 used for all recipes that use the ``include`` file. The remaining
3522 lines in the example are from individual recipes and show how the
Andrew Geissler09036742021-06-25 14:25:14 -05003523 :term:`PR` value is set.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003524
Andrew Geisslerf0343792020-11-18 10:42:21 -06003525 :term:`INCOMPATIBLE_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003526 Specifies a space-separated list of license names (as they would
3527 appear in :term:`LICENSE`) that should be excluded
3528 from the build. Recipes that provide no alternatives to listed
3529 incompatible licenses are not built. Packages that are individually
3530 licensed with the specified incompatible licenses will be deleted.
3531
Patrick Williams03907ee2022-05-01 06:28:52 -05003532 There is some support for wildcards in this variable's value,
3533 however it is restricted to specific licenses. Currently only
3534 these wildcards are allowed and expand as follows:
3535
3536 - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3537 - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3538 - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3539
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003540 .. note::
3541
3542 This functionality is only regularly tested using the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05003543 setting::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003544
Andrew Geissler9aee5002022-03-30 16:27:02 +00003545 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003546
3547
3548 Although you can use other settings, you might be required to
3549 remove dependencies on or provide alternatives to components that
3550 are required to produce a functional system image.
3551
Andrew Geissler615f2f12022-07-15 14:00:58 -05003552 :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
3553 Specifies a space-separated list of package and license pairs that
3554 are allowed to be used even if the license is specified in
3555 :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
3556 separated using a colon. Example::
3557
3558 INCOMPATIBLE_LICENSE_EXCEPTIONS = "gdbserver:GPL-3.0-only gdbserver:LGPL-3.0-only"
3559
Andrew Geisslerf0343792020-11-18 10:42:21 -06003560 :term:`INHERIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003561 Causes the named class or classes to be inherited globally. Anonymous
3562 functions in the class or classes are not executed for the base
3563 configuration and in each individual recipe. The OpenEmbedded build
Andrew Geissler09036742021-06-25 14:25:14 -05003564 system ignores changes to :term:`INHERIT` in individual recipes.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003565
Andrew Geissler09036742021-06-25 14:25:14 -05003566 For more information on :term:`INHERIT`, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003567 :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
Andrew Geisslerd5838332022-05-27 11:33:10 -05003568 section in the BitBake User Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003569
Andrew Geisslerf0343792020-11-18 10:42:21 -06003570 :term:`INHERIT_DISTRO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003571 Lists classes that will be inherited at the distribution level. It is
3572 unlikely that you want to edit this variable.
3573
3574 The default value of the variable is set as follows in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05003575 ``meta/conf/distro/defaultsetup.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003576
3577 INHERIT_DISTRO ?= "debian devshell sstate license"
3578
Andrew Geisslerf0343792020-11-18 10:42:21 -06003579 :term:`INHIBIT_DEFAULT_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003580 Prevents the default dependencies, namely the C compiler and standard
3581 C library (libc), from being added to :term:`DEPENDS`.
3582 This variable is usually used within recipes that do not require any
3583 compilation using the C compiler.
3584
3585 Set the variable to "1" to prevent the default dependencies from
3586 being added.
3587
Andrew Geisslerf0343792020-11-18 10:42:21 -06003588 :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003589 Prevents the OpenEmbedded build system from splitting out debug
3590 information during packaging. By default, the build system splits out
3591 debugging information during the
3592 :ref:`ref-tasks-package` task. For more information on
3593 how debug information is split out, see the
3594 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3595 variable.
3596
3597 To prevent the build system from splitting out debug information
Andrew Geissler09036742021-06-25 14:25:14 -05003598 during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003599 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003600
3601 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3602
Andrew Geisslerf0343792020-11-18 10:42:21 -06003603 :term:`INHIBIT_PACKAGE_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003604 If set to "1", causes the build to not strip binaries in resulting
3605 packages and prevents the ``-dbg`` package from containing the source
3606 files.
3607
3608 By default, the OpenEmbedded build system strips binaries and puts
3609 the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
Andrew Geissler09036742021-06-25 14:25:14 -05003610 Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003611 plan to debug in general.
3612
Andrew Geisslerf0343792020-11-18 10:42:21 -06003613 :term:`INHIBIT_SYSROOT_STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003614 If set to "1", causes the build to not strip binaries in the
3615 resulting sysroot.
3616
3617 By default, the OpenEmbedded build system strips binaries in the
3618 resulting sysroot. When you specifically set the
Andrew Geissler09036742021-06-25 14:25:14 -05003619 :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003620 this stripping.
3621
3622 If you want to use this variable, include the
3623 :ref:`staging <ref-classes-staging>` class. This class uses a
3624 ``sys_strip()`` function to test for the variable and acts
3625 accordingly.
3626
3627 .. note::
3628
Andrew Geissler09036742021-06-25 14:25:14 -05003629 Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003630 special circumstances. For example, suppose you are building
3631 bare-metal firmware by using an external GCC toolchain. Furthermore,
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003632 even if the toolchain's binaries are strippable, there are other files
3633 needed for the build that are not strippable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003634
Patrick Williams2194f502022-10-16 14:26:09 -05003635 :term:`Initramfs`
3636 An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed
3637 `cpio <https://en.wikipedia.org/wiki/Cpio>`__ archive which is extracted
3638 by the Linux kernel into RAM in a special `tmpfs <https://en.wikipedia.org/wiki/Tmpfs>`__
3639 instance, used as the initial root filesystem.
3640
3641 This is a replacement for the legacy init RAM disk ("initrd")
3642 technique, booting on an emulated block device in RAM, but being less
3643 efficient because of the overhead of going through a filesystem and
3644 having to duplicate accessed file contents in the file cache in RAM,
3645 as for any block device.
3646
3647 .. note:
3648
3649 As far as bootloaders are concerned, :term:`Initramfs` and "initrd"
3650 images are still copied to RAM in the same way. That's why most
3651 most bootloaders refer to :term:`Initramfs` images as "initrd"
3652 or "init RAM disk".
3653
3654 This kind of mechanism is typically used for two reasons:
3655
3656 - For booting the same kernel binary on multiple systems requiring
3657 different device drivers. The Initramfs image is then customized
3658 for each type of system, to include the specific kernel modules
3659 necessary to access the final root filesystem. This technique
3660 is used on all GNU / Linux distributions for desktops and servers.
3661
3662 - For booting faster. As the root filesystem is extracted into RAM,
3663 accessing the first user-space applications is very fast, compared
3664 to having to initialize a block device, to access multiple blocks
3665 from it, and to go through a filesystem having its own overhead.
3666 For example, this allows to display a splashscreen very early,
3667 and to later take care of mounting the final root filesystem and
3668 loading less time-critical kernel drivers.
3669
3670 This cpio archive can either be loaded to RAM by the bootloader,
3671 or be included in the kernel binary.
3672
3673 For information on creating and using an :term:`Initramfs`, see the
3674 ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`"
3675 section in the Yocto Project Development Tasks Manual.
3676
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003677 :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
Patrick Williams2194f502022-10-16 14:26:09 -05003678 Indicates the deploy directory used by :ref:`ref-tasks-bundle_initramfs` where the
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003679 :term:`INITRAMFS_IMAGE` will be fetched from.
3680 This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3681 :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
Patrick Williams2194f502022-10-16 14:26:09 -05003682 when building an :term:`Initramfs` image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003683
Andrew Geisslerf0343792020-11-18 10:42:21 -06003684 :term:`INITRAMFS_FSTYPES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003685 Defines the format for the output image of an initial RAM filesystem
Patrick Williams2194f502022-10-16 14:26:09 -05003686 (:term:`Initramfs`), which is used during boot. Supported formats are the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003687 same as those supported by the
3688 :term:`IMAGE_FSTYPES` variable.
3689
3690 The default value of this variable, which is set in the
3691 ``meta/conf/bitbake.conf`` configuration file in the
3692 :term:`Source Directory`, is "cpio.gz". The Linux kernel's
Patrick Williams2194f502022-10-16 14:26:09 -05003693 :term:`Initramfs` mechanism, as opposed to the initial RAM filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003694 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3695 an optionally compressed cpio archive.
3696
Andrew Geisslerf0343792020-11-18 10:42:21 -06003697 :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003698 Specifies the :term:`PROVIDES` name of an image
Patrick Williams2194f502022-10-16 14:26:09 -05003699 recipe that is used to build an initial RAM filesystem (:term:`Initramfs`)
Andrew Geissler09036742021-06-25 14:25:14 -05003700 image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003701 additional recipe to be built as a dependency to whatever root
3702 filesystem recipe you might be using (e.g. ``core-image-sato``). The
Patrick Williams2194f502022-10-16 14:26:09 -05003703 :term:`Initramfs` image recipe you provide should set
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003704 :term:`IMAGE_FSTYPES` to
3705 :term:`INITRAMFS_FSTYPES`.
3706
Patrick Williams2194f502022-10-16 14:26:09 -05003707 An :term:`Initramfs` image provides a temporary root filesystem used for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003708 early system initialization (e.g. loading of modules needed to locate
3709 and mount the "real" root filesystem).
3710
3711 .. note::
3712
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003713 See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3714 recipe in the :term:`Source Directory`
Patrick Williams2194f502022-10-16 14:26:09 -05003715 for an example :term:`Initramfs` recipe. To select this sample recipe as
3716 the one built to provide the :term:`Initramfs` image, set :term:`INITRAMFS_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003717 to "core-image-minimal-initramfs".
3718
3719 You can also find more information by referencing the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003720 ``meta-poky/conf/templates/default/local.conf.sample.extended``
3721 configuration file in the Source Directory, the :ref:`image
3722 <ref-classes-image>` class, and the :ref:`kernel <ref-classes-kernel>`
3723 class to see how to use the :term:`INITRAMFS_IMAGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003724
Andrew Geissler09036742021-06-25 14:25:14 -05003725 If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
Patrick Williams2194f502022-10-16 14:26:09 -05003726 :term:`Initramfs` image is built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003727
3728 For more information, you can also see the
3729 :term:`INITRAMFS_IMAGE_BUNDLE`
3730 variable, which allows the generated image to be bundled inside the
Patrick Williams2194f502022-10-16 14:26:09 -05003731 kernel image. Additionally, for information on creating an :term:`Initramfs`
3732 image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003733 in the Yocto Project Development Tasks Manual.
3734
Andrew Geisslerf0343792020-11-18 10:42:21 -06003735 :term:`INITRAMFS_IMAGE_BUNDLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003736 Controls whether or not the image recipe specified by
3737 :term:`INITRAMFS_IMAGE` is run through an
3738 extra pass
3739 (:ref:`ref-tasks-bundle_initramfs`) during
3740 kernel compilation in order to build a single binary that contains
Patrick Williams2194f502022-10-16 14:26:09 -05003741 both the kernel image and the initial RAM filesystem (:term:`Initramfs`)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003742 image. This makes use of the
3743 :term:`CONFIG_INITRAMFS_SOURCE` kernel
3744 feature.
3745
3746 .. note::
3747
Patrick Williams2194f502022-10-16 14:26:09 -05003748 Bundling the :term:`Initramfs` with the kernel conflates the code in the
3749 :term:`Initramfs` with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3750 compatible software may be part of a bundled :term:`Initramfs`.
Patrick Williams93c203f2021-10-06 16:15:23 -05003751
3752 .. note::
3753
Patrick Williams2194f502022-10-16 14:26:09 -05003754 Using an extra compilation pass to bundle the :term:`Initramfs` avoids a
3755 circular dependency between the kernel recipe and the :term:`Initramfs`
3756 recipe should the :term:`Initramfs` include kernel modules. Should that be
3757 the case, the :term:`Initramfs` recipe depends on the kernel for the
3758 kernel modules, and the kernel depends on the :term:`Initramfs` recipe
3759 since the :term:`Initramfs` is bundled inside the kernel image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003760
3761 The combined binary is deposited into the ``tmp/deploy`` directory,
3762 which is part of the :term:`Build Directory`.
3763
3764 Setting the variable to "1" in a configuration file causes the
3765 OpenEmbedded build system to generate a kernel image with the
Patrick Williams2194f502022-10-16 14:26:09 -05003766 :term:`Initramfs` specified in :term:`INITRAMFS_IMAGE` bundled within::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003767
3768 INITRAMFS_IMAGE_BUNDLE = "1"
3769
3770 By default, the
3771 :ref:`kernel <ref-classes-kernel>` class sets this variable to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05003772 null string as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003773
3774 INITRAMFS_IMAGE_BUNDLE ?= ""
3775
3776 .. note::
3777
Andrew Geissler09036742021-06-25 14:25:14 -05003778 You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
Andrew Geissler4c19ea12020-10-27 13:52:24 -05003779 configuration file. You cannot set the variable in a recipe file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003780
3781 See the
Andrew Geissler87f5cff2022-09-30 13:13:31 -05003782 :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/templates/default/local.conf.sample.extended>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003783 file for additional information. Also, for information on creating an
Patrick Williams2194f502022-10-16 14:26:09 -05003784 :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003785 in the Yocto Project Development Tasks Manual.
3786
Andrew Geisslerf0343792020-11-18 10:42:21 -06003787 :term:`INITRAMFS_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003788 The link name of the initial RAM filesystem image. This variable is
3789 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003790 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003791
3792 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3793
3794 The value of the
3795 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05003796 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003797
3798 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3799
3800 See the :term:`MACHINE` variable for additional
3801 information.
3802
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003803 :term:`INITRAMFS_MULTICONFIG`
3804 Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3805
3806 This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3807 a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3808
Patrick Williams2194f502022-10-16 14:26:09 -05003809 For more information on how to bundle an :term:`Initramfs` image from a separate
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003810 multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3811 section in the Yocto Project Development Tasks Manual.
3812
Andrew Geisslerf0343792020-11-18 10:42:21 -06003813 :term:`INITRAMFS_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003814 The base name of the initial RAM filesystem image. This variable is
3815 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05003816 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003817
3818 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3819
3820 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003821 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003822
3823 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3824
Andrew Geisslerf0343792020-11-18 10:42:21 -06003825 :term:`INITRD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003826 Indicates list of filesystem images to concatenate and use as an
3827 initial RAM disk (``initrd``).
3828
Andrew Geissler09036742021-06-25 14:25:14 -05003829 The :term:`INITRD` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003830 :ref:`image-live <ref-classes-image-live>` class.
3831
Andrew Geisslerf0343792020-11-18 10:42:21 -06003832 :term:`INITRD_IMAGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003833 When building a "live" bootable image (i.e. when
3834 :term:`IMAGE_FSTYPES` contains "live"),
Andrew Geissler09036742021-06-25 14:25:14 -05003835 :term:`INITRD_IMAGE` specifies the image recipe that should be built to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003836 provide the initial RAM disk image. The default value is
3837 "core-image-minimal-initramfs".
3838
3839 See the :ref:`image-live <ref-classes-image-live>` class for more
3840 information.
3841
Andrew Geisslerf0343792020-11-18 10:42:21 -06003842 :term:`INITSCRIPT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003843 The filename of the initialization script as installed to
3844 ``${sysconfdir}/init.d``.
3845
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003846 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003847 The variable is mandatory.
3848
Andrew Geisslerf0343792020-11-18 10:42:21 -06003849 :term:`INITSCRIPT_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003850 A list of the packages that contain initscripts. If multiple packages
3851 are specified, you need to append the package name to the other
3852 ``INITSCRIPT_*`` as an override.
3853
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003854 This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003855 The variable is optional and defaults to the :term:`PN`
3856 variable.
3857
Andrew Geisslerf0343792020-11-18 10:42:21 -06003858 :term:`INITSCRIPT_PARAMS`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003859 Specifies the options to pass to ``update-rc.d``. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003860
3861 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3862
3863 In this example, the script has a runlevel of 99, starts the script
3864 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3865
3866 The variable's default value is "defaults", which is set in the
3867 :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3868
Andrew Geissler09036742021-06-25 14:25:14 -05003869 The value in :term:`INITSCRIPT_PARAMS` is passed through to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003870 ``update-rc.d`` command. For more information on valid parameters,
3871 please see the ``update-rc.d`` manual page at
Andrew Geisslerc3d88e42020-10-02 09:45:00 -05003872 https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003873
Andrew Geisslerf0343792020-11-18 10:42:21 -06003874 :term:`INSANE_SKIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003875 Specifies the QA checks to skip for a specific package within a
3876 recipe. For example, to skip the check for symbolic link ``.so``
3877 files in the main package of a recipe, add the following to the
3878 recipe. The package name override must be used, which in this example
Andrew Geisslerc926e172021-05-07 16:11:35 -05003879 is ``${PN}``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003880
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003881 INSANE_SKIP:${PN} += "dev-so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003882
Andrew Geissler595f6302022-01-24 19:11:47 +00003883 See the ":ref:`ref-classes-insane`" section for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003884 list of the valid QA checks you can specify using this variable.
3885
Andrew Geisslerf0343792020-11-18 10:42:21 -06003886 :term:`INSTALL_TIMEZONE_FILE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003887 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
Andrew Geissler09036742021-06-25 14:25:14 -05003888 Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003889 configuration level to disable this behavior.
3890
Andrew Geisslerf0343792020-11-18 10:42:21 -06003891 :term:`IPK_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003892 When the IPK backend is in use and package management is enabled on
3893 the target, you can use this variable to set up ``opkg`` in the
3894 target image to point to package feeds on a nominated server. Once
3895 the feed is established, you can perform installations or upgrades
3896 using the package manager at runtime.
3897
Andrew Geisslerf0343792020-11-18 10:42:21 -06003898 :term:`KARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003899 Defines the kernel architecture used when assembling the
3900 configuration. Architectures supported for this release are:
3901
3902 - powerpc
3903 - i386
3904 - x86_64
3905 - arm
3906 - qemu
3907 - mips
3908
Andrew Geissler5f350902021-07-23 13:09:54 -04003909 You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003910
Andrew Geisslerf0343792020-11-18 10:42:21 -06003911 :term:`KBRANCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003912 A regular expression used by the build process to explicitly identify
3913 the kernel branch that is validated, patched, and configured during a
3914 build. You must set this variable to ensure the exact kernel branch
3915 you want is being used by the build process.
3916
3917 Values for this variable are set in the kernel's recipe file and the
3918 kernel's append file. For example, if you are using the
3919 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
Andrew Geissler09036742021-06-25 14:25:14 -05003920 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
Andrew Geisslerc926e172021-05-07 16:11:35 -05003921 is set as follows in that kernel recipe file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003922
3923 KBRANCH ?= "standard/base"
3924
3925 This variable is also used from the kernel's append file to identify
3926 the kernel branch specific to a particular machine or target
3927 hardware. Continuing with the previous kernel example, the kernel's
3928 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3929 BSP layer for a given machine. For example, the append file for the
3930 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3931 machines (``meta-yocto-bsp``) is named
3932 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05003933 Here are the related statements from that append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003934
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003935 KBRANCH:genericx86 = "standard/base"
3936 KBRANCH:genericx86-64 = "standard/base"
3937 KBRANCH:edgerouter = "standard/edgerouter"
3938 KBRANCH:beaglebone = "standard/beaglebone"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003939
Andrew Geissler09036742021-06-25 14:25:14 -05003940 The :term:`KBRANCH` statements
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003941 identify the kernel branch to use when building for each supported
3942 BSP.
3943
Andrew Geisslerf0343792020-11-18 10:42:21 -06003944 :term:`KBUILD_DEFCONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003945 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3946 class, specifies an "in-tree" kernel configuration file for use
3947 during a kernel build.
3948
3949 Typically, when using a ``defconfig`` to configure a kernel during a
3950 build, you place the file in your layer in the same manner as you
3951 would place patch files and configuration fragment files (i.e.
3952 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3953 is part of the kernel tree (i.e. "in-tree"), you can use the
Andrew Geissler09036742021-06-25 14:25:14 -05003954 :term:`KBUILD_DEFCONFIG` variable and append the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003955 :term:`KMACHINE` variable to point to the
3956 ``defconfig`` file.
3957
3958 To use the variable, set it in the append file for your kernel recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05003959 using the following form::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003960
3961 KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3962
Andrew Geissler09036742021-06-25 14:25:14 -05003963 Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
Andrew Geisslerc926e172021-05-07 16:11:35 -05003964 a ``defconfig`` file named "bcm2709_defconfig"::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003965
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003966 KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003967
Andrew Geisslerc926e172021-05-07 16:11:35 -05003968 As an alternative, you can use the following within your append file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003969
Patrick Williams0ca19cc2021-08-16 14:03:13 -05003970 KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003971
3972 For more
Andrew Geissler09036742021-06-25 14:25:14 -05003973 information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06003974 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05003975 section in the Yocto Project Linux Kernel Development Manual.
3976
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003977 :term:`KCONFIG_MODE`
3978 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3979 class, specifies the kernel configuration values to use for options
3980 not specified in the provided ``defconfig`` file. Valid options are::
3981
3982 KCONFIG_MODE = "alldefconfig"
3983 KCONFIG_MODE = "allnoconfig"
3984
3985 In ``alldefconfig`` mode the options not explicitly specified will be
3986 assigned their Kconfig default value. In ``allnoconfig`` mode the
3987 options not explicitly specified will be disabled in the kernel
3988 config.
3989
Andrew Geissler09036742021-06-25 14:25:14 -05003990 In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003991 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3992 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3993 in ``${WORKDIR}`` through a meta-layer will be handled in
3994 ``allnoconfig`` mode.
3995
3996 An "in-tree" ``defconfig`` file can be selected via the
Andrew Geissler09036742021-06-25 14:25:14 -05003997 :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
William A. Kennington IIIac69b482021-06-02 12:28:27 -07003998 be explicitly set.
3999
4000 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
4001 generated by copying the ``.config`` file from a working Linux kernel
4002 build, renaming it to ``defconfig`` and placing it into the Linux
Andrew Geissler09036742021-06-25 14:25:14 -05004003 kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004004 not need to be explicitly set.
4005
4006 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
4007 generated using the
4008 :ref:`ref-tasks-savedefconfig`
4009 task and placed into the Linux kernel ``${WORKDIR}`` through your
Andrew Geissler09036742021-06-25 14:25:14 -05004010 meta-layer. Explicitely set :term:`KCONFIG_MODE`::
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004011
4012 KCONFIG_MODE = "alldefconfig"
4013
Andrew Geisslerf0343792020-11-18 10:42:21 -06004014 :term:`KERNEL_ALT_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004015 Specifies an alternate kernel image type for creation in addition to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004016 the kernel image type specified using the :term:`KERNEL_IMAGETYPE` and
4017 :term:`KERNEL_IMAGETYPES` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004018
Andrew Geisslerf0343792020-11-18 10:42:21 -06004019 :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004020 Specifies the name of all of the build artifacts. You can change the
Andrew Geissler09036742021-06-25 14:25:14 -05004021 name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004022 variable.
4023
Andrew Geissler09036742021-06-25 14:25:14 -05004024 The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004025 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004026 following default value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004027
4028 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4029
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004030 See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
4031 and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004032
Andrew Geisslerf0343792020-11-18 10:42:21 -06004033 :term:`KERNEL_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004034 A list of classes defining kernel image types that the
4035 :ref:`kernel <ref-classes-kernel>` class should inherit. You
4036 typically append this variable to enable extended image types. An
4037 example is the "kernel-fitimage", which enables fitImage support and
4038 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
Andrew Geissler595f6302022-01-24 19:11:47 +00004039 custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004040 variable.
4041
Patrick Williams03907ee2022-05-01 06:28:52 -05004042 :term:`KERNEL_DEBUG_TIMESTAMPS`
4043 If set to "1", enables timestamping functionality during building
4044 the kernel. The default is "0" to disable this for reproducibility
4045 reasons.
4046
Andrew Geisslerf0343792020-11-18 10:42:21 -06004047 :term:`KERNEL_DEVICETREE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004048 Specifies the name of the generated Linux kernel device tree (i.e.
4049 the ``.dtb``) file.
4050
4051 .. note::
4052
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004053 There is legacy support for specifying the full path to the device
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004054 tree. However, providing just the ``.dtb`` file is preferred.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004055
4056 In order to use this variable, the
4057 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4058 be inherited.
4059
Andrew Geisslerf0343792020-11-18 10:42:21 -06004060 :term:`KERNEL_DTB_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004061 The link name of the kernel device tree binary (DTB). This variable
4062 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004063 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004064
4065 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4066
4067 The
4068 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004069 the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004070
4071 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4072
4073 See the :term:`MACHINE` variable for additional
4074 information.
4075
Andrew Geisslerf0343792020-11-18 10:42:21 -06004076 :term:`KERNEL_DTB_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004077 The base name of the kernel device tree binary (DTB). This variable
4078 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
Andrew Geisslerc926e172021-05-07 16:11:35 -05004079 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004080
4081 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4082
4083 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004084 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004085
4086 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4087
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004088 :term:`KERNEL_DTC_FLAGS`
4089 Specifies the ``dtc`` flags that are passed to the Linux kernel build
4090 system when generating the device trees (via ``DTC_FLAGS`` environment
4091 variable).
4092
4093 In order to use this variable, the
4094 :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4095 be inherited.
4096
Andrew Geisslerf0343792020-11-18 10:42:21 -06004097 :term:`KERNEL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004098 Specifies additional ``make`` command-line arguments the OpenEmbedded
4099 build system passes on when compiling the kernel.
4100
Andrew Geisslerf0343792020-11-18 10:42:21 -06004101 :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004102 Includes additional kernel metadata. In the OpenEmbedded build
4103 system, the default Board Support Packages (BSPs)
4104 :term:`Metadata` is provided through the
4105 :term:`KMACHINE` and :term:`KBRANCH`
Andrew Geissler09036742021-06-25 14:25:14 -05004106 variables. You can use the :term:`KERNEL_FEATURES` variable from within
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004107 the kernel recipe or kernel append file to further add metadata for
4108 all BSPs or specific BSPs.
4109
4110 The metadata you add through this variable includes config fragments
4111 and features descriptions, which usually includes patches as well as
Andrew Geissler09036742021-06-25 14:25:14 -05004112 config fragments. You typically override the :term:`KERNEL_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004113 variable for a specific machine. In this way, you can provide
4114 validated, but optional, sets of kernel configurations and features.
4115
4116 For example, the following example from the ``linux-yocto-rt_4.12``
4117 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4118 as well as "virtio" configurations to all QEMU machines. The last two
Andrew Geisslerc926e172021-05-07 16:11:35 -05004119 statements add specific configurations to targeted machine types::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004120
4121 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004122 KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
4123 KERNEL_FEATURES:append:qemuall = " cfg/virtio.scc"
4124 KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4125 KERNEL_FEATURES:append:qemux86-64 = " cfg/sound.scc"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004126
Andrew Geisslerf0343792020-11-18 10:42:21 -06004127 :term:`KERNEL_FIT_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004128 The link name of the kernel flattened image tree (FIT) image. This
4129 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004130 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004131
4132 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4133
4134 The value of the
4135 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004136 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004137
4138 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4139
4140 See the :term:`MACHINE` variable for additional
4141 information.
4142
Andrew Geisslerf0343792020-11-18 10:42:21 -06004143 :term:`KERNEL_FIT_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004144 The base name of the kernel flattened image tree (FIT) image. This
4145 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004146 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004147
4148 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4149
4150 The value of the :term:`KERNEL_ARTIFACT_NAME`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004151 variable, which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004152
4153 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4154
Andrew Geisslerf0343792020-11-18 10:42:21 -06004155 :term:`KERNEL_IMAGE_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004156 The link name for the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004157 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004158
4159 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4160
4161 The value of
4162 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
Andrew Geisslerc926e172021-05-07 16:11:35 -05004163 file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004164
4165 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4166
4167 See the :term:`MACHINE` variable for additional
4168 information.
4169
Andrew Geisslerf0343792020-11-18 10:42:21 -06004170 :term:`KERNEL_IMAGE_MAXSIZE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004171 Specifies the maximum size of the kernel image file in kilobytes. If
Andrew Geissler09036742021-06-25 14:25:14 -05004172 :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004173 checked against the set value during the
4174 :ref:`ref-tasks-sizecheck` task. The task fails if
4175 the kernel image file is larger than the setting.
4176
Andrew Geissler09036742021-06-25 14:25:14 -05004177 :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004178 limited amount of space in which the kernel image must be stored.
4179
4180 By default, this variable is not set, which means the size of the
4181 kernel image is not checked.
4182
Andrew Geisslerf0343792020-11-18 10:42:21 -06004183 :term:`KERNEL_IMAGE_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004184 The base name of the kernel image. This variable is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004185 ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004186
4187 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4188
4189 The value of the
4190 :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004191 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004192
4193 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4194
Andrew Geisslerf0343792020-11-18 10:42:21 -06004195 :term:`KERNEL_IMAGETYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004196 The type of kernel to build for a device, usually set by the machine
4197 configuration files and defaults to "zImage". This variable is used
4198 when building the kernel and is passed to ``make`` as the target to
4199 build.
4200
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004201 To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
4202
4203 :term:`KERNEL_IMAGETYPES`
4204 Lists additional types of kernel images to build for a device in addition
4205 to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
4206 machine configuration files.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004207
Andrew Geisslerf0343792020-11-18 10:42:21 -06004208 :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004209 Lists kernel modules that need to be auto-loaded during boot.
4210
4211 .. note::
4212
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004213 This variable replaces the deprecated :term:`module_autoload`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004214 variable.
4215
Andrew Geissler09036742021-06-25 14:25:14 -05004216 You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004217 can be recognized by the kernel recipe or by an out-of-tree kernel
4218 module recipe (e.g. a machine configuration file, a distribution
4219 configuration file, an append file for the recipe, or the recipe
4220 itself).
4221
Andrew Geisslerc926e172021-05-07 16:11:35 -05004222 Specify it as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004223
4224 KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4225
Andrew Geissler09036742021-06-25 14:25:14 -05004226 Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004227 system to populate the ``/etc/modules-load.d/modname.conf`` file with
4228 the list of modules to be auto-loaded on boot. The modules appear
4229 one-per-line in the file. Here is an example of the most common use
Andrew Geisslerc926e172021-05-07 16:11:35 -05004230 case::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004231
4232 KERNEL_MODULE_AUTOLOAD += "module_name"
4233
4234 For information on how to populate the ``modname.conf`` file with
4235 ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4236
Andrew Geisslerf0343792020-11-18 10:42:21 -06004237 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004238 Provides a list of modules for which the OpenEmbedded build system
4239 expects to find ``module_conf_``\ modname values that specify
4240 configuration for each of the modules. For information on how to
4241 provide those module configurations, see the
4242 :term:`module_conf_* <module_conf>` variable.
4243
Andrew Geisslerf0343792020-11-18 10:42:21 -06004244 :term:`KERNEL_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004245 The location of the kernel sources. This variable is set to the value
4246 of the :term:`STAGING_KERNEL_DIR` within
4247 the :ref:`module <ref-classes-module>` class. For information on
4248 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004249 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004250 section in the Yocto Project Linux Kernel Development Manual.
4251
4252 To help maximize compatibility with out-of-tree drivers used to build
4253 modules, the OpenEmbedded build system also recognizes and uses the
4254 :term:`KERNEL_SRC` variable, which is identical to
Andrew Geissler09036742021-06-25 14:25:14 -05004255 the :term:`KERNEL_PATH` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004256 used by external Makefiles to point to the kernel source directory.
4257
Andrew Geisslerf0343792020-11-18 10:42:21 -06004258 :term:`KERNEL_SRC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004259 The location of the kernel sources. This variable is set to the value
4260 of the :term:`STAGING_KERNEL_DIR` within
4261 the :ref:`module <ref-classes-module>` class. For information on
4262 how this variable is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004263 ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004264 section in the Yocto Project Linux Kernel Development Manual.
4265
4266 To help maximize compatibility with out-of-tree drivers used to build
4267 modules, the OpenEmbedded build system also recognizes and uses the
4268 :term:`KERNEL_PATH` variable, which is identical
Andrew Geissler09036742021-06-25 14:25:14 -05004269 to the :term:`KERNEL_SRC` variable. Both variables are common variables
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004270 used by external Makefiles to point to the kernel source directory.
4271
Andrew Geisslerf0343792020-11-18 10:42:21 -06004272 :term:`KERNEL_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004273 Specifies the version of the kernel as extracted from ``version.h``
4274 or ``utsrelease.h`` within the kernel sources. Effects of setting
Andrew Geissler595f6302022-01-24 19:11:47 +00004275 this variable do not take effect until the kernel has been
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004276 configured. Consequently, attempting to refer to this variable in
4277 contexts prior to configuration will not work.
4278
Andrew Geisslerf0343792020-11-18 10:42:21 -06004279 :term:`KERNELDEPMODDEPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004280 Specifies whether the data referenced through
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004281 :term:`PKGDATA_DIR` is needed or not.
Andrew Geissler09036742021-06-25 14:25:14 -05004282 :term:`KERNELDEPMODDEPEND` does not control whether or not that data
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004283 exists, but simply whether or not it is used. If you do not need to
Andrew Geissler09036742021-06-25 14:25:14 -05004284 use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
Patrick Williams2194f502022-10-16 14:26:09 -05004285 :term:`Initramfs` recipe. Setting the variable there when the data is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004286 needed avoids a potential dependency loop.
4287
Andrew Geisslerf0343792020-11-18 10:42:21 -06004288 :term:`KFEATURE_DESCRIPTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004289 Provides a short description of a configuration fragment. You use
4290 this variable in the ``.scc`` file that describes a configuration
4291 fragment file. Here is the variable used in a file named ``smp.scc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004292 to describe SMP being enabled::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004293
4294 define KFEATURE_DESCRIPTION "Enable SMP"
4295
Andrew Geisslerf0343792020-11-18 10:42:21 -06004296 :term:`KMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004297 The machine as known by the kernel. Sometimes the machine name used
4298 by the kernel does not match the machine name used by the
4299 OpenEmbedded build system. For example, the machine name that the
4300 OpenEmbedded build system understands as ``core2-32-intel-common``
4301 goes by a different name in the Linux Yocto kernel. The kernel
4302 understands that machine as ``intel-core2-32``. For cases like these,
Andrew Geissler09036742021-06-25 14:25:14 -05004303 the :term:`KMACHINE` variable maps the kernel machine name to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004304 OpenEmbedded build system machine name.
4305
4306 These mappings between different names occur in the Yocto Linux
4307 Kernel's ``meta`` branch. As an example take a look in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004308 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004309
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004310 LINUX_VERSION:core2-32-intel-common = "3.19.0"
4311 COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4312 SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4313 SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4314 KMACHINE:core2-32-intel-common = "intel-core2-32"
4315 KBRANCH:core2-32-intel-common = "standard/base"
Andrew Geisslerd5838332022-05-27 11:33:10 -05004316 KERNEL_FEATURES:append:core2-32-intel-common = " ${KERNEL_FEATURES_INTEL_COMMON}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004317
Andrew Geissler09036742021-06-25 14:25:14 -05004318 The :term:`KMACHINE` statement says
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004319 that the kernel understands the machine name as "intel-core2-32".
4320 However, the OpenEmbedded build system understands the machine as
4321 "core2-32-intel-common".
4322
Andrew Geisslerf0343792020-11-18 10:42:21 -06004323 :term:`KTYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004324 Defines the kernel type to be used in assembling the configuration.
4325 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004326 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004327 section in the
4328 Yocto Project Linux Kernel Development Manual for more information on
4329 kernel types.
4330
Andrew Geissler09036742021-06-25 14:25:14 -05004331 You define the :term:`KTYPE` variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004332 :ref:`kernel-dev/advanced:bsp descriptions`. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004333 value you use must match the value used for the
4334 :term:`LINUX_KERNEL_TYPE` value used by the
4335 kernel recipe.
4336
Andrew Geisslerf0343792020-11-18 10:42:21 -06004337 :term:`LABELS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004338 Provides a list of targets for automatic configuration.
4339
4340 See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4341 information on how this variable is used.
4342
Andrew Geisslerf0343792020-11-18 10:42:21 -06004343 :term:`LAYERDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004344 Lists the layers, separated by spaces, on which this recipe depends.
4345 Optionally, you can specify a specific layer version for a dependency
Andrew Geisslerc926e172021-05-07 16:11:35 -05004346 by adding it to the end of the layer name. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004347
4348 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4349
4350 In this previous example,
4351 version 3 of "anotherlayer" is compared against
4352 :term:`LAYERVERSION`\ ``_anotherlayer``.
4353
4354 An error is produced if any dependency is missing or the version
4355 numbers (if specified) do not match exactly. This variable is used in
4356 the ``conf/layer.conf`` file and must be suffixed with the name of
4357 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4358
Andrew Geisslerf0343792020-11-18 10:42:21 -06004359 :term:`LAYERDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004360 When used inside the ``layer.conf`` configuration file, this variable
4361 provides the path of the current layer. This variable is not
4362 available outside of ``layer.conf`` and references are expanded
4363 immediately when parsing of the file completes.
4364
Andrew Geisslerf0343792020-11-18 10:42:21 -06004365 :term:`LAYERRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004366 Lists the layers, separated by spaces, recommended for use with this
4367 layer.
4368
4369 Optionally, you can specify a specific layer version for a
4370 recommendation by adding the version to the end of the layer name.
Andrew Geisslerc926e172021-05-07 16:11:35 -05004371 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004372
4373 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4374
4375 In this previous example, version 3 of "anotherlayer" is compared
4376 against ``LAYERVERSION_anotherlayer``.
4377
4378 This variable is used in the ``conf/layer.conf`` file and must be
4379 suffixed with the name of the specific layer (e.g.
4380 ``LAYERRECOMMENDS_mylayer``).
4381
Andrew Geisslerf0343792020-11-18 10:42:21 -06004382 :term:`LAYERSERIES_COMPAT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004383 Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
Andrew Geissler09036742021-06-25 14:25:14 -05004384 a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004385 allows the layer maintainer to indicate which combinations of the
4386 layer and OE-Core can be expected to work. The variable gives the
4387 system a way to detect when a layer has not been tested with new
4388 releases of OE-Core (e.g. the layer is not maintained).
4389
4390 To specify the OE-Core versions for which a layer is compatible, use
4391 this variable in your layer's ``conf/layer.conf`` configuration file.
4392 For the list, use the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -06004393 :yocto_wiki:`Release Name </Releases>` (e.g.
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004394 &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004395 layer, use a space-separated list::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004396
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004397 LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004398
4399 .. note::
4400
Andrew Geissler09036742021-06-25 14:25:14 -05004401 Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004402 Compatible version 2 standard.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004403 The OpenEmbedded build system produces a warning if the variable
4404 is not set for any given layer.
4405
Andrew Geissler09209ee2020-12-13 08:44:15 -06004406 See the ":ref:`dev-manual/common-tasks:creating your own layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004407 section in the Yocto Project Development Tasks Manual.
4408
Andrew Geisslerf0343792020-11-18 10:42:21 -06004409 :term:`LAYERVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004410 Optionally specifies the version of a layer as a single number. You
4411 can use this within :term:`LAYERDEPENDS` for
4412 another layer in order to depend on a specific version of the layer.
4413 This variable is used in the ``conf/layer.conf`` file and must be
4414 suffixed with the name of the specific layer (e.g.
4415 ``LAYERVERSION_mylayer``).
4416
Andrew Geisslerf0343792020-11-18 10:42:21 -06004417 :term:`LD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004418 The minimal command and arguments used to run the linker.
4419
Andrew Geisslerf0343792020-11-18 10:42:21 -06004420 :term:`LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004421 Specifies the flags to pass to the linker. This variable is exported
4422 to an environment variable and thus made visible to the software
4423 being built during the compilation step.
4424
Andrew Geissler09036742021-06-25 14:25:14 -05004425 Default initialization for :term:`LDFLAGS` varies depending on what is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004426 being built:
4427
4428 - :term:`TARGET_LDFLAGS` when building for the
4429 target
4430
4431 - :term:`BUILD_LDFLAGS` when building for the
4432 build host (i.e. ``-native``)
4433
4434 - :term:`BUILDSDK_LDFLAGS` when building for
4435 an SDK (i.e. ``nativesdk-``)
4436
Andrew Geisslerf0343792020-11-18 10:42:21 -06004437 :term:`LEAD_SONAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004438 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4439 that the :ref:`debian <ref-classes-debian>` class applies its
4440 naming policy to given a recipe that packages multiple libraries.
4441
Andrew Geissler595f6302022-01-24 19:11:47 +00004442 This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004443
Andrew Geisslerf0343792020-11-18 10:42:21 -06004444 :term:`LIC_FILES_CHKSUM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004445 Checksums of the license text in the recipe source code.
4446
4447 This variable tracks changes in license text of the source code
4448 files. If the license text is changed, it will trigger a build
4449 failure, which gives the developer an opportunity to review any
4450 license change.
4451
4452 This variable must be defined for all recipes (unless
4453 :term:`LICENSE` is set to "CLOSED").
4454
Andrew Geissler09209ee2020-12-13 08:44:15 -06004455 For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004456 section in the Yocto Project Development Tasks Manual.
4457
Andrew Geisslerf0343792020-11-18 10:42:21 -06004458 :term:`LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004459 The list of source licenses for the recipe. Follow these rules:
4460
4461 - Do not use spaces within individual license names.
4462
4463 - Separate license names using \| (pipe) when there is a choice
4464 between licenses.
4465
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004466 - Separate license names using & (ampersand) when there are
4467 multiple licenses for different parts of the source.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004468
4469 - You can use spaces between license names.
4470
4471 - For standard licenses, use the names of the files in
4472 ``meta/files/common-licenses/`` or the
4473 :term:`SPDXLICENSEMAP` flag names defined in
4474 ``meta/conf/licenses.conf``.
4475
Andrew Geisslerc926e172021-05-07 16:11:35 -05004476 Here are some examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004477
Andrew Geissler9aee5002022-03-30 16:27:02 +00004478 LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4479 LICENSE = "MPL-1.0 & LGPL-2.1-only"
4480 LICENSE = "GPL-2.0-or-later"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004481
4482 The first example is from the
4483 recipes for Qt, which the user may choose to distribute under either
4484 the LGPL version 2.1 or GPL version 3. The second example is from
4485 Cairo where two licenses cover different parts of the source code.
4486 The final example is from ``sysstat``, which presents a single
4487 license.
4488
4489 You can also specify licenses on a per-package basis to handle
4490 situations where components of the output have different licenses.
4491 For example, a piece of software whose code is licensed under GPLv2
4492 but has accompanying documentation licensed under the GNU Free
Andrew Geisslerc926e172021-05-07 16:11:35 -05004493 Documentation License 1.2 could be specified as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004494
Andrew Geissler9aee5002022-03-30 16:27:02 +00004495 LICENSE = "GFDL-1.2 & GPL-2.0-only"
4496 LICENSE:${PN} = "GPL-2.0.only"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004497 LICENSE:${PN}-doc = "GFDL-1.2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004498
Andrew Geisslerf0343792020-11-18 10:42:21 -06004499 :term:`LICENSE_CREATE_PACKAGE`
Andrew Geissler09036742021-06-25 14:25:14 -05004500 Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004501 build system to create an extra package (i.e.
4502 ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4503 those packages to the
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004504 :term:`RRECOMMENDS`\ ``:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004505
4506 The ``${PN}-lic`` package installs a directory in
4507 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4508 name, and installs files in that directory that contain license and
4509 copyright information (i.e. copies of the appropriate license files
4510 from ``meta/common-licenses`` that match the licenses specified in
4511 the :term:`LICENSE` variable of the recipe metadata
4512 and copies of files marked in
4513 :term:`LIC_FILES_CHKSUM` as containing
4514 license text).
4515
4516 For related information on providing license text, see the
4517 :term:`COPY_LIC_DIRS` variable, the
4518 :term:`COPY_LIC_MANIFEST` variable, and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004519 ":ref:`dev-manual/common-tasks:providing license text`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004520 section in the Yocto Project Development Tasks Manual.
4521
Andrew Geisslerf0343792020-11-18 10:42:21 -06004522 :term:`LICENSE_FLAGS`
Andrew Geissler595f6302022-01-24 19:11:47 +00004523 Specifies additional flags for a recipe you must allow through
Andrew Geissler9aee5002022-03-30 16:27:02 +00004524 :term:`LICENSE_FLAGS_ACCEPTED` in
Andrew Geissler595f6302022-01-24 19:11:47 +00004525 order for the recipe to be built. When providing multiple flags,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004526 separate them with spaces.
4527
4528 This value is independent of :term:`LICENSE` and is
4529 typically used to mark recipes that might require additional licenses
4530 in order to be used in a commercial product. For more information,
4531 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004532 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004533 section in the Yocto Project Development Tasks Manual.
4534
Andrew Geissler9aee5002022-03-30 16:27:02 +00004535 :term:`LICENSE_FLAGS_ACCEPTED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004536 Lists license flags that when specified in
4537 :term:`LICENSE_FLAGS` within a recipe should not
Andrew Geissler595f6302022-01-24 19:11:47 +00004538 prevent that recipe from being built. For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06004539 ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004540 section in the Yocto Project Development Tasks Manual.
4541
Andrew Geisslerf0343792020-11-18 10:42:21 -06004542 :term:`LICENSE_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004543 Path to additional licenses used during the build. By default, the
Andrew Geissler09036742021-06-25 14:25:14 -05004544 OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004545 directory that holds common license text used during the build. The
Andrew Geissler09036742021-06-25 14:25:14 -05004546 :term:`LICENSE_PATH` variable allows you to extend that location to other
Andrew Geisslerc926e172021-05-07 16:11:35 -05004547 areas that have additional licenses::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004548
4549 LICENSE_PATH += "path-to-additional-common-licenses"
4550
Andrew Geisslerf0343792020-11-18 10:42:21 -06004551 :term:`LINUX_KERNEL_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004552 Defines the kernel type to be used in assembling the configuration.
4553 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
Andrew Geissler09209ee2020-12-13 08:44:15 -06004554 kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004555 section in the
4556 Yocto Project Linux Kernel Development Manual for more information on
4557 kernel types.
4558
Andrew Geissler09036742021-06-25 14:25:14 -05004559 If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004560 "standard". Together with :term:`KMACHINE`, the
Andrew Geissler09036742021-06-25 14:25:14 -05004561 :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004562 the kernel tools to find the appropriate description within the
4563 kernel :term:`Metadata` with which to build out the sources
4564 and configuration.
4565
Andrew Geisslerf0343792020-11-18 10:42:21 -06004566 :term:`LINUX_VERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004567 The Linux version from ``kernel.org`` on which the Linux kernel image
4568 being built using the OpenEmbedded build system is based. You define
4569 this variable in the kernel recipe. For example, the
4570 ``linux-yocto-3.4.bb`` kernel recipe found in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004571 ``meta/recipes-kernel/linux`` defines the variables as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004572
4573 LINUX_VERSION ?= "3.4.24"
4574
Andrew Geissler09036742021-06-25 14:25:14 -05004575 The :term:`LINUX_VERSION` variable is used to define :term:`PV`
Andrew Geisslerc926e172021-05-07 16:11:35 -05004576 for the recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004577
4578 PV = "${LINUX_VERSION}+git${SRCPV}"
4579
Andrew Geisslerf0343792020-11-18 10:42:21 -06004580 :term:`LINUX_VERSION_EXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004581 A string extension compiled into the version string of the Linux
4582 kernel built with the OpenEmbedded build system. You define this
4583 variable in the kernel recipe. For example, the linux-yocto kernel
Andrew Geisslerc926e172021-05-07 16:11:35 -05004584 recipes all define the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004585
4586 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4587
4588 Defining this variable essentially sets the Linux kernel
4589 configuration item ``CONFIG_LOCALVERSION``, which is visible through
4590 the ``uname`` command. Here is an example that shows the extension
Andrew Geisslerc926e172021-05-07 16:11:35 -05004591 assuming it was set as previously shown::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004592
4593 $ uname -r
4594 3.7.0-rc8-custom
4595
Andrew Geisslerf0343792020-11-18 10:42:21 -06004596 :term:`LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004597 Specifies the directory to which the OpenEmbedded build system writes
4598 overall log files. The default directory is ``${TMPDIR}/log``.
4599
4600 For the directory containing logs specific to each task, see the
4601 :term:`T` variable.
4602
Andrew Geisslerf0343792020-11-18 10:42:21 -06004603 :term:`MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004604 Specifies the target device for which the image is built. You define
Andrew Geissler09036742021-06-25 14:25:14 -05004605 :term:`MACHINE` in the ``local.conf`` file found in the
4606 :term:`Build Directory`. By default, :term:`MACHINE` is set to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004607 "qemux86", which is an x86-based architecture machine to be emulated
Andrew Geisslerc926e172021-05-07 16:11:35 -05004608 using QEMU::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004609
4610 MACHINE ?= "qemux86"
4611
4612 The variable corresponds to a machine configuration file of the same
4613 name, through which machine-specific configurations are set. Thus,
Andrew Geissler09036742021-06-25 14:25:14 -05004614 when :term:`MACHINE` is set to "qemux86", the corresponding
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004615 ``qemux86.conf`` machine configuration file can be found in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004616 the :term:`Source Directory` in
4617 ``meta/conf/machine``.
4618
4619 The list of machines supported by the Yocto Project as shipped
Andrew Geisslerc926e172021-05-07 16:11:35 -05004620 include the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004621
4622 MACHINE ?= "qemuarm"
4623 MACHINE ?= "qemuarm64"
4624 MACHINE ?= "qemumips"
4625 MACHINE ?= "qemumips64"
4626 MACHINE ?= "qemuppc"
4627 MACHINE ?= "qemux86"
4628 MACHINE ?= "qemux86-64"
4629 MACHINE ?= "genericx86"
4630 MACHINE ?= "genericx86-64"
4631 MACHINE ?= "beaglebone"
4632 MACHINE ?= "edgerouter"
4633
4634 The last five are Yocto Project reference hardware
4635 boards, which are provided in the ``meta-yocto-bsp`` layer.
4636
4637 .. note::
4638
4639 Adding additional Board Support Package (BSP) layers to your
Andrew Geissler09036742021-06-25 14:25:14 -05004640 configuration adds new possible settings for :term:`MACHINE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004641
Andrew Geisslerf0343792020-11-18 10:42:21 -06004642 :term:`MACHINE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004643 Specifies the name of the machine-specific architecture. This
4644 variable is set automatically from :term:`MACHINE` or
4645 :term:`TUNE_PKGARCH`. You should not hand-edit
Andrew Geissler09036742021-06-25 14:25:14 -05004646 the :term:`MACHINE_ARCH` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004647
Andrew Geisslerf0343792020-11-18 10:42:21 -06004648 :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004649 A list of required machine-specific packages to install as part of
4650 the image being built. The build process depends on these packages
4651 being present. Furthermore, because this is a "machine-essential"
4652 variable, the list of packages are essential for the machine to boot.
4653 The impact of this variable affects images based on
4654 ``packagegroup-core-boot``, including the ``core-image-minimal``
4655 image.
4656
4657 This variable is similar to the
Andrew Geissler09036742021-06-25 14:25:14 -05004658 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004659 that the image being built has a build dependency on the variable's
4660 list of packages. In other words, the image will not build if a file
4661 in this list is not found.
4662
4663 As an example, suppose the machine for which you are building
4664 requires ``example-init`` to be run during boot to initialize the
4665 hardware. In this case, you would use the following in the machine's
Andrew Geisslerc926e172021-05-07 16:11:35 -05004666 ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004667
4668 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4669
Andrew Geisslerf0343792020-11-18 10:42:21 -06004670 :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004671 A list of recommended machine-specific packages to install as part of
4672 the image being built. The build process does not depend on these
4673 packages being present. However, because this is a
4674 "machine-essential" variable, the list of packages are essential for
4675 the machine to boot. The impact of this variable affects images based
4676 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4677 image.
4678
Andrew Geissler09036742021-06-25 14:25:14 -05004679 This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004680 variable with the exception that the image being built does not have
4681 a build dependency on the variable's list of packages. In other
4682 words, the image will still build if a package in this list is not
4683 found. Typically, this variable is used to handle essential kernel
4684 modules, whose functionality may be selected to be built into the
4685 kernel rather than as a module, in which case a package will not be
4686 produced.
4687
4688 Consider an example where you have a custom kernel where a specific
4689 touchscreen driver is required for the machine to be usable. However,
4690 the driver can be built as a module or into the kernel depending on
4691 the kernel configuration. If the driver is built as a module, you
4692 want it to be installed. But, when the driver is built into the
4693 kernel, you still want the build to succeed. This variable sets up a
4694 "recommends" relationship so that in the latter case, the build will
4695 not fail due to the missing package. To accomplish this, assuming the
4696 package for the module was called ``kernel-module-ab123``, you would
Andrew Geisslerc926e172021-05-07 16:11:35 -05004697 use the following in the machine's ``.conf`` configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004698
4699 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4700
4701 .. note::
4702
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004703 In this example, the ``kernel-module-ab123`` recipe needs to
4704 explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4705 does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4706 satisfy the dependency.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004707
4708 Some examples of these machine essentials are flash, screen,
4709 keyboard, mouse, or touchscreen drivers (depending on the machine).
4710
Andrew Geisslerf0343792020-11-18 10:42:21 -06004711 :term:`MACHINE_EXTRA_RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004712 A list of machine-specific packages to install as part of the image
4713 being built that are not essential for the machine to boot. However,
4714 the build process for more fully-featured images depends on the
4715 packages being present.
4716
4717 This variable affects all images based on ``packagegroup-base``,
4718 which does not include the ``core-image-minimal`` or
4719 ``core-image-full-cmdline`` images.
4720
Andrew Geissler09036742021-06-25 14:25:14 -05004721 The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004722 with the exception that the image being built has a build dependency
4723 on the variable's list of packages. In other words, the image will
4724 not build if a file in this list is not found.
4725
4726 An example is a machine that has WiFi capability but is not essential
4727 for the machine to boot the image. However, if you are building a
4728 more fully-featured image, you want to enable the WiFi. The package
4729 containing the firmware for the WiFi hardware is always expected to
4730 exist, so it is acceptable for the build process to depend upon
4731 finding the package. In this case, assuming the package for the
4732 firmware was called ``wifidriver-firmware``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004733 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004734
4735 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4736
Andrew Geisslerf0343792020-11-18 10:42:21 -06004737 :term:`MACHINE_EXTRA_RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004738 A list of machine-specific packages to install as part of the image
4739 being built that are not essential for booting the machine. The image
4740 being built has no build dependency on this list of packages.
4741
4742 This variable affects only images based on ``packagegroup-base``,
4743 which does not include the ``core-image-minimal`` or
4744 ``core-image-full-cmdline`` images.
4745
Andrew Geissler09036742021-06-25 14:25:14 -05004746 This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004747 with the exception that the image being built does not have a build
4748 dependency on the variable's list of packages. In other words, the
4749 image will build if a file in this list is not found.
4750
4751 An example is a machine that has WiFi capability but is not essential
4752 For the machine to boot the image. However, if you are building a
4753 more fully-featured image, you want to enable WiFi. In this case, the
4754 package containing the WiFi kernel module will not be produced if the
4755 WiFi driver is built into the kernel, in which case you still want
4756 the build to succeed instead of failing as a result of the package
4757 not being found. To accomplish this, assuming the package for the
4758 module was called ``kernel-module-examplewifi``, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004759 following in the ``.conf`` file for the machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004760
4761 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4762
Andrew Geisslerf0343792020-11-18 10:42:21 -06004763 :term:`MACHINE_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004764 Specifies the list of hardware features the
4765 :term:`MACHINE` is capable of supporting. For related
4766 information on enabling features, see the
4767 :term:`DISTRO_FEATURES`,
4768 :term:`COMBINED_FEATURES`, and
4769 :term:`IMAGE_FEATURES` variables.
4770
4771 For a list of hardware features supported by the Yocto Project as
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004772 shipped, see the ":ref:`ref-features-machine`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004773
Andrew Geisslerf0343792020-11-18 10:42:21 -06004774 :term:`MACHINE_FEATURES_BACKFILL`
Andrew Geissler09036742021-06-25 14:25:14 -05004775 Features to be added to :term:`MACHINE_FEATURES` if not also present in
4776 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004777
4778 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4779 not intended to be user-configurable. It is best to just reference
4780 the variable to see which machine features are being backfilled for
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004781 all machine configurations. See the ":ref:`ref-features-backfill`"
4782 section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004783
Andrew Geisslerf0343792020-11-18 10:42:21 -06004784 :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
Andrew Geissler09036742021-06-25 14:25:14 -05004785 Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4786 backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004787 the ":ref:`ref-features-backfill`" section for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004788
Andrew Geisslerf0343792020-11-18 10:42:21 -06004789 :term:`MACHINEOVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004790 A colon-separated list of overrides that apply to the current
4791 machine. By default, this list includes the value of
4792 :term:`MACHINE`.
4793
Andrew Geissler09036742021-06-25 14:25:14 -05004794 You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004795 should apply to a machine. For example, all machines emulated in QEMU
4796 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4797 ``meta/conf/machine/include/qemu.inc`` that prepends the following
Andrew Geissler09036742021-06-25 14:25:14 -05004798 override to :term:`MACHINEOVERRIDES`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004799
4800 MACHINEOVERRIDES =. "qemuall:"
4801
4802 This
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004803 override allows variables to be overridden for all machines emulated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004804 in QEMU, like in the following example from the ``connman-conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05004805 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004806
Patrick Williams0ca19cc2021-08-16 14:03:13 -05004807 SRC_URI:append:qemuall = " file://wired.config \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004808 file://wired-setup \
4809 "
4810
4811 The underlying mechanism behind
Andrew Geissler09036742021-06-25 14:25:14 -05004812 :term:`MACHINEOVERRIDES` is simply that it is included in the default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004813 value of :term:`OVERRIDES`.
4814
Andrew Geisslerf0343792020-11-18 10:42:21 -06004815 :term:`MAINTAINER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004816 The email address of the distribution maintainer.
4817
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05004818 :term:`METADATA_BRANCH`
4819 The branch currently checked out for the OpenEmbedded-Core layer (path
4820 determined by :term:`COREBASE`).
4821
4822 :term:`METADATA_REVISION`
4823 The revision currently checked out for the OpenEmbedded-Core layer (path
4824 determined by :term:`COREBASE`).
4825
Andrew Geisslerf0343792020-11-18 10:42:21 -06004826 :term:`MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004827 Specifies additional paths from which the OpenEmbedded build system
4828 gets source code. When the build system searches for source code, it
4829 first tries the local download directory. If that location fails, the
4830 build system tries locations defined by
4831 :term:`PREMIRRORS`, the upstream source, and then
Andrew Geissler09036742021-06-25 14:25:14 -05004832 locations specified by :term:`MIRRORS` in that order.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004833
4834 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05004835 the default value for :term:`MIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004836 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4837
Andrew Geisslerf0343792020-11-18 10:42:21 -06004838 :term:`MLPREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004839 Specifies a prefix has been added to :term:`PN` to create a
4840 special version of a recipe or package (i.e. a Multilib version). The
4841 variable is used in places where the prefix needs to be added to or
4842 removed from a the name (e.g. the :term:`BPN` variable).
Andrew Geissler09036742021-06-25 14:25:14 -05004843 :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004844
4845 .. note::
4846
Andrew Geissler09036742021-06-25 14:25:14 -05004847 The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
Andrew Geissler4c19ea12020-10-27 13:52:24 -05004848 historical and comes from a time when ``nativesdk`` was a suffix
4849 rather than a prefix on the recipe name. When ``nativesdk`` was turned
Andrew Geissler09036742021-06-25 14:25:14 -05004850 into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004851
Andrew Geissler09036742021-06-25 14:25:14 -05004852 To help understand when :term:`MLPREFIX` might be needed, consider when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004853 :term:`BBCLASSEXTEND` is used to provide a
4854 ``nativesdk`` version of a recipe in addition to the target version.
4855 If that recipe declares build-time dependencies on tasks in other
4856 recipes by using :term:`DEPENDS`, then a dependency on
4857 "foo" will automatically get rewritten to a dependency on
4858 "nativesdk-foo". However, dependencies like the following will not
Andrew Geisslerc926e172021-05-07 16:11:35 -05004859 get rewritten automatically::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004860
4861 do_foo[depends] += "recipe:do_foo"
4862
4863 If you want such a dependency to also get transformed, you can do the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004864 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004865
4866 do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4867
Andrew Geissler09036742021-06-25 14:25:14 -05004868 :term:`module_autoload`
4869 This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
Andrew Geissler5f350902021-07-23 13:09:54 -04004870 variable. You should replace all occurrences of :term:`module_autoload`
Andrew Geissler09036742021-06-25 14:25:14 -05004871 with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004872
4873 module_autoload_rfcomm = "rfcomm"
4874
Andrew Geisslerc926e172021-05-07 16:11:35 -05004875 should now be replaced with::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004876
4877 KERNEL_MODULE_AUTOLOAD += "rfcomm"
4878
4879 See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4880
Andrew Geissler09036742021-06-25 14:25:14 -05004881 :term:`module_conf`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004882 Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004883 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4884 file.
4885
4886 You can use this variable anywhere that it can be recognized by the
4887 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4888 configuration file, a distribution configuration file, an append file
4889 for the recipe, or the recipe itself). If you use this variable, you
4890 must also be sure to list the module name in the
Andrew Geissler595f6302022-01-24 19:11:47 +00004891 :term:`KERNEL_MODULE_PROBECONF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004892 variable.
4893
Andrew Geisslerc926e172021-05-07 16:11:35 -05004894 Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004895
4896 module_conf_module_name = "modprobe.d-syntax"
4897
4898 You must use the kernel module name override.
4899
4900 Run ``man modprobe.d`` in the shell to find out more information on
Andrew Geissler5f350902021-07-23 13:09:54 -04004901 the exact syntax you want to provide with :term:`module_conf`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004902
Andrew Geissler5f350902021-07-23 13:09:54 -04004903 Including :term:`module_conf` causes the OpenEmbedded build system to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004904 populate the ``/etc/modprobe.d/modname.conf`` file with
4905 ``modprobe.d`` syntax lines. Here is an example that adds the options
Andrew Geisslerc926e172021-05-07 16:11:35 -05004906 ``arg1`` and ``arg2`` to a module named ``mymodule``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004907
4908 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4909
4910 For information on how to specify kernel modules to auto-load on
4911 boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4912
Andrew Geisslerf0343792020-11-18 10:42:21 -06004913 :term:`MODULE_TARBALL_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004914 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4915 "0" to disable creation of this file, which contains all of the
4916 kernel modules resulting from a kernel build.
4917
Andrew Geisslerf0343792020-11-18 10:42:21 -06004918 :term:`MODULE_TARBALL_LINK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004919 The link name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004920 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004921
4922 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4923
4924 The value
4925 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05004926 same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004927
4928 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4929
4930 See the :term:`MACHINE` variable for additional information.
4931
Andrew Geisslerf0343792020-11-18 10:42:21 -06004932 :term:`MODULE_TARBALL_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004933 The base name of the kernel module tarball. This variable is set in
Andrew Geisslerc926e172021-05-07 16:11:35 -05004934 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004935
4936 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4937
4938 The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
Andrew Geisslerc926e172021-05-07 16:11:35 -05004939 which is set in the same file, has the following value::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004940
4941 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4942
Andrew Geisslerf0343792020-11-18 10:42:21 -06004943 :term:`MULTIMACH_TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004944 Uniquely identifies the type of the target system for which packages
4945 are being built. This variable allows output for different types of
4946 target systems to be put into different subdirectories of the same
4947 output directory.
4948
Andrew Geisslerc926e172021-05-07 16:11:35 -05004949 The default value of this variable is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004950
4951 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4952
4953 Some classes (e.g.
4954 :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
Andrew Geissler09036742021-06-25 14:25:14 -05004955 :term:`MULTIMACH_TARGET_SYS` value.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004956
4957 See the :term:`STAMP` variable for an example. See the
4958 :term:`STAGING_DIR_TARGET` variable for more information.
4959
Andrew Geisslerf0343792020-11-18 10:42:21 -06004960 :term:`NATIVELSBSTRING`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004961 A string identifying the host distribution. Strings consist of the
4962 host distributor ID followed by the release, as reported by the
4963 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4964 example, when running a build on Ubuntu 12.10, the value is
4965 "Ubuntu-12.10". If this information is unable to be determined, the
4966 value resolves to "Unknown".
4967
4968 This variable is used by default to isolate native shared state
4969 packages for different distributions (e.g. to avoid problems with
4970 ``glibc`` version incompatibilities). Additionally, the variable is
4971 checked against
4972 :term:`SANITY_TESTED_DISTROS` if that
4973 variable is set.
4974
Andrew Geisslerf0343792020-11-18 10:42:21 -06004975 :term:`NM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004976 The minimal command and arguments to run ``nm``.
4977
Andrew Geisslerf0343792020-11-18 10:42:21 -06004978 :term:`NO_GENERIC_LICENSE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004979 Avoids QA errors when you use a non-common, non-CLOSED license in a
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004980 recipe. There are packages, such as the linux-firmware package, with many
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004981 licenses that are not in any way common. Also, new licenses are added
4982 occasionally to avoid introducing a lot of common license files,
4983 which are only applicable to a specific package.
Andrew Geissler09036742021-06-25 14:25:14 -05004984 :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004985 not exist in common licenses.
4986
Andrew Geissler09036742021-06-25 14:25:14 -05004987 The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
Andrew Geisslerc926e172021-05-07 16:11:35 -05004988 recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004989
4990 NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4991
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004992 Here is an example that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004993 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
Andrew Geisslerc926e172021-05-07 16:11:35 -05004994 source::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004995
4996 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4997
Andrew Geisslerf0343792020-11-18 10:42:21 -06004998 :term:`NO_RECOMMENDATIONS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004999 Prevents installation of all "recommended-only" packages.
5000 Recommended-only packages are packages installed only through the
5001 :term:`RRECOMMENDS` variable). Setting the
Andrew Geissler09036742021-06-25 14:25:14 -05005002 :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005003
5004 NO_RECOMMENDATIONS = "1"
5005
5006 You can set this variable globally in your ``local.conf`` file or you
5007 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005008 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005009
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005010 NO_RECOMMENDATIONS:pn-target_image = "1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005011
5012 It is important to realize that if you choose to not install packages
5013 using this variable and some other packages are dependent on them
5014 (i.e. listed in a recipe's :term:`RDEPENDS`
5015 variable), the OpenEmbedded build system ignores your request and
5016 will install the packages to avoid dependency errors.
5017
5018 .. note::
5019
5020 Some recommended packages might be required for certain system
5021 functionality, such as kernel modules. It is up to you to add
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005022 packages with the :term:`IMAGE_INSTALL` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005023
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005024 This variable is only supported when using the IPK and RPM
5025 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005026
5027 See the :term:`BAD_RECOMMENDATIONS` and
5028 the :term:`PACKAGE_EXCLUDE` variables for
5029 related information.
5030
Andrew Geisslerf0343792020-11-18 10:42:21 -06005031 :term:`NOAUTOPACKAGEDEBUG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005032 Disables auto package from splitting ``.debug`` files. If a recipe
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005033 requires ``FILES:${PN}-dbg`` to be set manually, the
Andrew Geissler09036742021-06-25 14:25:14 -05005034 :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005035 content of the debug package. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005036
5037 NOAUTOPACKAGEDEBUG = "1"
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005038 FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5039 FILES:${PN}-dbg = "/usr/src/debug/"
5040 FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005041
Andrew Geissler09036742021-06-25 14:25:14 -05005042 :term:`NON_MULTILIB_RECIPES`
5043 A list of recipes that should not be built for multilib. OE-Core's
5044 ``multilib.conf`` file defines a reasonable starting point for this
5045 list with::
5046
5047 NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5048
Andrew Geisslerf0343792020-11-18 10:42:21 -06005049 :term:`OBJCOPY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005050 The minimal command and arguments to run ``objcopy``.
5051
Andrew Geisslerf0343792020-11-18 10:42:21 -06005052 :term:`OBJDUMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005053 The minimal command and arguments to run ``objdump``.
5054
Andrew Geisslerf0343792020-11-18 10:42:21 -06005055 :term:`OE_BINCONFIG_EXTRA_MANGLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005056 When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
5057 this variable specifies additional arguments passed to the "sed"
5058 command. The sed command alters any paths in configuration scripts
5059 that have been set up during compilation. Inheriting this class
5060 results in all paths in these scripts being changed to point into the
5061 ``sysroots/`` directory so that all builds that use the script will
5062 use the correct directories for the cross compiling layout.
5063
5064 See the ``meta/classes/binconfig.bbclass`` in the
5065 :term:`Source Directory` for details on how this class
Andrew Geissler595f6302022-01-24 19:11:47 +00005066 applies these additional sed command arguments.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005067
Andrew Geisslerf0343792020-11-18 10:42:21 -06005068 :term:`OE_IMPORTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005069 An internal variable used to tell the OpenEmbedded build system what
5070 Python modules to import for every Python function run by the system.
5071
5072 .. note::
5073
5074 Do not set this variable. It is for internal use only.
5075
Andrew Geisslerf0343792020-11-18 10:42:21 -06005076 :term:`OE_INIT_ENV_SCRIPT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005077 The name of the build environment setup script for the purposes of
5078 setting up the environment within the extensible SDK. The default
5079 value is "oe-init-build-env".
5080
5081 If you use a custom script to set up your build environment, set the
Andrew Geissler09036742021-06-25 14:25:14 -05005082 :term:`OE_INIT_ENV_SCRIPT` variable to its name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005083
Andrew Geisslerf0343792020-11-18 10:42:21 -06005084 :term:`OE_TERMINAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005085 Controls how the OpenEmbedded build system spawns interactive
5086 terminals on the host development system (e.g. using the BitBake
5087 command with the ``-c devshell`` command-line option). For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005088 information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005089 the Yocto Project Development Tasks Manual.
5090
Andrew Geissler5f350902021-07-23 13:09:54 -04005091 You can use the following values for the :term:`OE_TERMINAL` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005092
5093 - auto
5094 - gnome
5095 - xfce
5096 - rxvt
5097 - screen
5098 - konsole
5099 - none
5100
Andrew Geisslerf0343792020-11-18 10:42:21 -06005101 :term:`OEROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005102 The directory from which the top-level build environment setup script
5103 is sourced. The Yocto Project provides a top-level build environment
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005104 setup script: :ref:`structure-core-script`. When you run this
Andrew Geissler09036742021-06-25 14:25:14 -05005105 script, the :term:`OEROOT` variable resolves to the directory that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005106 contains the script.
5107
5108 For additional information on how this variable is used, see the
5109 initialization script.
5110
Andrew Geisslerf0343792020-11-18 10:42:21 -06005111 :term:`OLDEST_KERNEL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005112 Declares the oldest version of the Linux kernel that the produced
5113 binaries must support. This variable is passed into the build of the
5114 Embedded GNU C Library (``glibc``).
5115
5116 The default for this variable comes from the
5117 ``meta/conf/bitbake.conf`` configuration file. You can override this
5118 default by setting the variable in a custom distribution
5119 configuration file.
5120
Andrew Geisslerf0343792020-11-18 10:42:21 -06005121 :term:`OVERRIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005122 A colon-separated list of overrides that currently apply. Overrides
5123 are a BitBake mechanism that allows variables to be selectively
5124 overridden at the end of parsing. The set of overrides in
Andrew Geissler09036742021-06-25 14:25:14 -05005125 :term:`OVERRIDES` represents the "state" during building, which includes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005126 the current recipe being built, the machine for which it is being
5127 built, and so forth.
5128
5129 As an example, if the string "an-override" appears as an element in
Andrew Geissler09036742021-06-25 14:25:14 -05005130 the colon-separated list in :term:`OVERRIDES`, then the following
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005131 assignment will override ``FOO`` with the value "overridden" at the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005132 end of parsing::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005133
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005134 FOO:an-override = "overridden"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005135
5136 See the
5137 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5138 section in the BitBake User Manual for more information on the
5139 overrides mechanism.
5140
Andrew Geissler09036742021-06-25 14:25:14 -05005141 The default value of :term:`OVERRIDES` includes the values of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005142 :term:`CLASSOVERRIDE`,
5143 :term:`MACHINEOVERRIDES`, and
5144 :term:`DISTROOVERRIDES` variables. Another
5145 important override included by default is ``pn-${PN}``. This override
5146 allows variables to be set for a single recipe within configuration
Andrew Geisslerc926e172021-05-07 16:11:35 -05005147 (``.conf``) files. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005148
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005149 FOO:pn-myrecipe = "myrecipe-specific value"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005150
5151 .. note::
5152
Andrew Geissler09036742021-06-25 14:25:14 -05005153 An easy way to see what overrides apply is to search for :term:`OVERRIDES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005154 in the output of the ``bitbake -e`` command. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005155 ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005156 Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005157
Andrew Geisslerf0343792020-11-18 10:42:21 -06005158 :term:`P`
Andrew Geissler09036742021-06-25 14:25:14 -05005159 The recipe name and version. :term:`P` is comprised of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005160
5161 ${PN}-${PV}
5162
Andrew Geisslerf0343792020-11-18 10:42:21 -06005163 :term:`PACKAGE_ADD_METADATA`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005164 This variable defines additional metadata to add to packages.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005165
5166 You may find you need to inject additional metadata into packages.
5167 This variable allows you to do that by setting the injected data as
5168 the value. Multiple fields can be added by splitting the content with
5169 the literal separator "\n".
5170
5171 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5172 to do package type specific settings. It can also be made package
5173 specific by using the package name as a suffix.
5174
5175 You can find out more about applying this variable in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005176 ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005177 section in the Yocto Project Development Tasks Manual.
5178
Andrew Geisslerf0343792020-11-18 10:42:21 -06005179 :term:`PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005180 The architecture of the resulting package or packages.
5181
5182 By default, the value of this variable is set to
5183 :term:`TUNE_PKGARCH` when building for the
5184 target, :term:`BUILD_ARCH` when building for the
5185 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5186 SDK.
5187
5188 .. note::
5189
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005190 See :term:`SDK_ARCH` for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005191
5192 However, if your recipe's output packages are built specific to the
5193 target machine rather than generally for the architecture of the
Andrew Geissler09036742021-06-25 14:25:14 -05005194 machine, you should set :term:`PACKAGE_ARCH` to the value of
Andrew Geisslerc926e172021-05-07 16:11:35 -05005195 :term:`MACHINE_ARCH` in the recipe as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005196
5197 PACKAGE_ARCH = "${MACHINE_ARCH}"
5198
Andrew Geisslerf0343792020-11-18 10:42:21 -06005199 :term:`PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005200 Specifies a list of architectures compatible with the target machine.
5201 This variable is set automatically and should not normally be
5202 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05005203 of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005204 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5205
Andrew Geisslerf0343792020-11-18 10:42:21 -06005206 :term:`PACKAGE_BEFORE_PN`
Andrew Geissler09036742021-06-25 14:25:14 -05005207 Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005208 that those added packages can pick up files that would normally be
5209 included in the default package.
5210
Andrew Geisslerf0343792020-11-18 10:42:21 -06005211 :term:`PACKAGE_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005212 This variable, which is set in the ``local.conf`` configuration file
5213 found in the ``conf`` folder of the
5214 :term:`Build Directory`, specifies the package manager the
5215 OpenEmbedded build system uses when packaging data.
5216
5217 You can provide one or more of the following arguments for the
5218 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5219 package_tar"
5220
5221 .. note::
5222
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005223 While it is a legal option, the ``package_tar``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005224 class has limited functionality due to no support for package
5225 dependencies by that backend. Therefore, it is recommended that
5226 you do not use it.
5227
5228 The build system uses only the first argument in the list as the
5229 package manager when creating your image or SDK. However, packages
5230 will be created using any additional packaging classes you specify.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005231 For example, if you use the following in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005232
5233 PACKAGE_CLASSES ?= "package_ipk"
5234
5235 The OpenEmbedded build system uses
5236 the IPK package manager to create your image or SDK.
5237
5238 For information on packaging and build performance effects as a
5239 result of the package manager in use, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00005240 ":ref:`ref-classes-package`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005241
Andrew Geisslerf0343792020-11-18 10:42:21 -06005242 :term:`PACKAGE_DEBUG_SPLIT_STYLE`
Patrick Williams93c203f2021-10-06 16:15:23 -05005243 Determines how to split up and package debug and source information
5244 when creating debugging packages to be used with the GNU Project
5245 Debugger (GDB). In general, based on the value of this variable,
5246 you can combine the source and debug info in a single package,
5247 you can break out the source into a separate package that can be
5248 installed independently, or you can choose to not have the source
5249 packaged at all.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005250
Patrick Williams93c203f2021-10-06 16:15:23 -05005251 The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005252
Patrick Williams93c203f2021-10-06 16:15:23 -05005253 - "``.debug``": All debugging and source info is placed in a single
5254 ``*-dbg`` package; debug symbol files are placed next to the
5255 binary in a ``.debug`` directory so that, if a binary is installed
5256 into ``/bin``, the corresponding debug symbol file is installed
5257 in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5258 package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005259
Patrick Williams93c203f2021-10-06 16:15:23 -05005260 - "``debug-file-directory``": As above, all debugging and source info
5261 is placed in a single ``*-dbg`` package; debug symbol files are
5262 placed entirely under the directory ``/usr/lib/debug`` and separated
5263 by the path from where the binary is installed, so that if a binary
5264 is installed in ``/bin``, the corresponding debug symbols are installed
5265 in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5266 in the same package under ``/usr/src/debug``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005267
Patrick Williams93c203f2021-10-06 16:15:23 -05005268 - "``debug-with-srcpkg``": Debugging info is placed in the standard
5269 ``*-dbg`` package as with the ``.debug`` value, while source is
5270 placed in a separate ``*-src`` package, which can be installed
5271 independently. This is the default setting for this variable,
5272 as defined in Poky's ``bitbake.conf`` file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005273
Patrick Williams93c203f2021-10-06 16:15:23 -05005274 - "``debug-without-src``": The same behavior as with the ``.debug``
5275 setting, but no source is packaged at all.
5276
5277 .. note::
5278
5279 Much of the above package splitting can be overridden via
5280 use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005281
5282 You can find out more about debugging using GDB by reading the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005283 ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005284 in the Yocto Project Development Tasks Manual.
5285
Andrew Geisslerf0343792020-11-18 10:42:21 -06005286 :term:`PACKAGE_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005287 Lists packages that should not be installed into an image. For
Andrew Geisslerc926e172021-05-07 16:11:35 -05005288 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005289
5290 PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5291
5292 You can set this variable globally in your ``local.conf`` file or you
5293 can attach it to a specific image recipe by using the recipe name
Andrew Geisslerc926e172021-05-07 16:11:35 -05005294 override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005295
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005296 PACKAGE_EXCLUDE:pn-target_image = "package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005297
5298 If you choose to not install a package using this variable and some
5299 other package is dependent on it (i.e. listed in a recipe's
5300 :term:`RDEPENDS` variable), the OpenEmbedded build
5301 system generates a fatal installation error. Because the build system
5302 halts the process with a fatal error, you can use the variable with
5303 an iterative development process to remove specific components from a
5304 system.
5305
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005306 This variable is supported only when using the IPK and RPM
5307 packaging backends. DEB is not supported.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005308
5309 See the :term:`NO_RECOMMENDATIONS` and the
5310 :term:`BAD_RECOMMENDATIONS` variables for
5311 related information.
5312
Andrew Geissler9aee5002022-03-30 16:27:02 +00005313 :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5314 Prevents specific packages from being installed when you are
5315 installing complementary packages.
5316
5317 You might find that you want to prevent installing certain packages
5318 when you are installing complementary packages. For example, if you
5319 are using :term:`IMAGE_FEATURES` to install
5320 ``dev-pkgs``, you might not want to install all packages from a
5321 particular multilib. If you find yourself in this situation, you can
5322 use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5323 expressions to match the packages you want to exclude.
5324
Andrew Geisslerf0343792020-11-18 10:42:21 -06005325 :term:`PACKAGE_EXTRA_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005326 Specifies the list of architectures compatible with the device CPU.
5327 This variable is useful when you build for several different devices
5328 that use miscellaneous processors such as XScale and ARM926-EJS.
5329
Andrew Geisslerf0343792020-11-18 10:42:21 -06005330 :term:`PACKAGE_FEED_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005331 Optionally specifies the package architectures used as part of the
5332 package feed URIs during the build. When used, the
Andrew Geissler09036742021-06-25 14:25:14 -05005333 :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005334 URI, which is constructed using the
5335 :term:`PACKAGE_FEED_URIS` and
5336 :term:`PACKAGE_FEED_BASE_PATHS`
5337 variables.
5338
5339 .. note::
5340
Andrew Geissler09036742021-06-25 14:25:14 -05005341 You can use the :term:`PACKAGE_FEED_ARCHS`
Andrew Geissler595f6302022-01-24 19:11:47 +00005342 variable to allow specific package architectures. If you do
5343 not need to allow specific architectures, which is a common
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005344 case, you can omit this variable. Omitting the variable results in
5345 all available architectures for the current machine being included
5346 into remote package feeds.
5347
Andrew Geissler09036742021-06-25 14:25:14 -05005348 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5349 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005350 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005351
5352 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5353 https://example.com/packagerepos/updates"
5354 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5355 PACKAGE_FEED_ARCHS = "all core2-64"
5356
5357 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005358
5359 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005360
5361 https://example.com/packagerepos/release/rpm/all
5362 https://example.com/packagerepos/release/rpm/core2-64
5363 https://example.com/packagerepos/release/rpm-dev/all
5364 https://example.com/packagerepos/release/rpm-dev/core2-64
5365 https://example.com/packagerepos/updates/rpm/all
5366 https://example.com/packagerepos/updates/rpm/core2-64
5367 https://example.com/packagerepos/updates/rpm-dev/all
5368 https://example.com/packagerepos/updates/rpm-dev/core2-64
5369
Andrew Geisslerf0343792020-11-18 10:42:21 -06005370 :term:`PACKAGE_FEED_BASE_PATHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005371 Specifies the base path used when constructing package feed URIs. The
Andrew Geissler09036742021-06-25 14:25:14 -05005372 :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005373 package feed URI used by the OpenEmbedded build system. The base path
5374 lies between the :term:`PACKAGE_FEED_URIS`
5375 and :term:`PACKAGE_FEED_ARCHS` variables.
5376
Andrew Geissler09036742021-06-25 14:25:14 -05005377 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5378 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005379 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005380
5381 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5382 https://example.com/packagerepos/updates"
5383 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5384 PACKAGE_FEED_ARCHS = "all core2-64"
5385
5386 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005387
5388 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005389
5390 https://example.com/packagerepos/release/rpm/all
5391 https://example.com/packagerepos/release/rpm/core2-64
5392 https://example.com/packagerepos/release/rpm-dev/all
5393 https://example.com/packagerepos/release/rpm-dev/core2-64
5394 https://example.com/packagerepos/updates/rpm/all
5395 https://example.com/packagerepos/updates/rpm/core2-64
5396 https://example.com/packagerepos/updates/rpm-dev/all
5397 https://example.com/packagerepos/updates/rpm-dev/core2-64
5398
Andrew Geisslerf0343792020-11-18 10:42:21 -06005399 :term:`PACKAGE_FEED_URIS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005400 Specifies the front portion of the package feed URI used by the
5401 OpenEmbedded build system. Each final package feed URI is comprised
Andrew Geissler09036742021-06-25 14:25:14 -05005402 of :term:`PACKAGE_FEED_URIS`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005403 :term:`PACKAGE_FEED_BASE_PATHS`, and
5404 :term:`PACKAGE_FEED_ARCHS` variables.
5405
Andrew Geissler09036742021-06-25 14:25:14 -05005406 Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5407 :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005408 defined in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005409
5410 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5411 https://example.com/packagerepos/updates"
5412 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5413 PACKAGE_FEED_ARCHS = "all core2-64"
5414
5415 Given these settings, the resulting package feeds are as follows:
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005416
5417 .. code-block:: none
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005418
5419 https://example.com/packagerepos/release/rpm/all
5420 https://example.com/packagerepos/release/rpm/core2-64
5421 https://example.com/packagerepos/release/rpm-dev/all
5422 https://example.com/packagerepos/release/rpm-dev/core2-64
5423 https://example.com/packagerepos/updates/rpm/all
5424 https://example.com/packagerepos/updates/rpm/core2-64
5425 https://example.com/packagerepos/updates/rpm-dev/all
5426 https://example.com/packagerepos/updates/rpm-dev/core2-64
5427
Andrew Geisslerf0343792020-11-18 10:42:21 -06005428 :term:`PACKAGE_INSTALL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005429 The final list of packages passed to the package manager for
5430 installation into the image.
5431
5432 Because the package manager controls actual installation of all
Andrew Geissler09036742021-06-25 14:25:14 -05005433 packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005434 not the final list of packages that are actually installed. This
5435 variable is internal to the image construction code. Consequently, in
5436 general, you should use the
5437 :term:`IMAGE_INSTALL` variable to specify
5438 packages for installation. The exception to this is when working with
Andrew Geissler09209ee2020-12-13 08:44:15 -06005439 the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
Patrick Williams2194f502022-10-16 14:26:09 -05005440 image. When working with an initial RAM filesystem (:term:`Initramfs`) image,
Andrew Geissler09036742021-06-25 14:25:14 -05005441 use the :term:`PACKAGE_INSTALL` variable. For information on creating an
Patrick Williams2194f502022-10-16 14:26:09 -05005442 :term:`Initramfs`, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (Initramfs) image`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005443 in the Yocto Project Development Tasks Manual.
5444
Andrew Geisslerf0343792020-11-18 10:42:21 -06005445 :term:`PACKAGE_INSTALL_ATTEMPTONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005446 Specifies a list of packages the OpenEmbedded build system attempts
5447 to install when creating an image. If a listed package fails to
5448 install, the build system does not generate an error. This variable
5449 is generally not user-defined.
5450
Andrew Geisslerf0343792020-11-18 10:42:21 -06005451 :term:`PACKAGE_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005452 Specifies a list of functions run to pre-process the
5453 :term:`PKGD` directory prior to splitting the files out
5454 to individual packages.
5455
Andrew Geisslerf0343792020-11-18 10:42:21 -06005456 :term:`PACKAGE_WRITE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005457 Specifies a list of dependencies for post-installation and
5458 pre-installation scripts on native/cross tools. If your
Andrew Geissler595f6302022-01-24 19:11:47 +00005459 post-installation or pre-installation script can execute at root filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005460 creation time rather than on the target but depends on a native tool
5461 in order to execute, you need to list the tools in
Andrew Geissler09036742021-06-25 14:25:14 -05005462 :term:`PACKAGE_WRITE_DEPS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005463
5464 For information on running post-installation scripts, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005465 ":ref:`dev-manual/common-tasks:post-installation scripts`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005466 section in the Yocto Project Development Tasks Manual.
5467
Andrew Geisslerf0343792020-11-18 10:42:21 -06005468 :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005469 This variable provides a means of enabling or disabling features of a
Andrew Geissler09036742021-06-25 14:25:14 -05005470 recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005471 recipes when you specify features and then arguments that define
5472 feature behaviors. Here is the basic block structure (broken over
Andrew Geisslerc926e172021-05-07 16:11:35 -05005473 multiple lines for readability)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005474
5475 PACKAGECONFIG ??= "f1 f2 f3 ..."
5476 PACKAGECONFIG[f1] = "\
5477 --with-f1, \
5478 --without-f1, \
5479 build-deps-for-f1, \
5480 runtime-deps-for-f1, \
5481 runtime-recommends-for-f1, \
5482 packageconfig-conflicts-for-f1"
5483 PACKAGECONFIG[f2] = "\
5484 ... and so on and so on ...
5485
Andrew Geissler5f350902021-07-23 13:09:54 -04005486 The :term:`PACKAGECONFIG` variable itself specifies a space-separated
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005487 list of the features to enable. Following the features, you can
5488 determine the behavior of each feature by providing up to six
5489 order-dependent arguments, which are separated by commas. You can
5490 omit any argument you like but must retain the separating commas. The
5491 order is important and specifies the following:
5492
5493 1. Extra arguments that should be added to the configure script
5494 argument list (:term:`EXTRA_OECONF` or
5495 :term:`PACKAGECONFIG_CONFARGS`) if
5496 the feature is enabled.
5497
Andrew Geissler09036742021-06-25 14:25:14 -05005498 2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5499 :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005500
5501 3. Additional build dependencies (:term:`DEPENDS`)
5502 that should be added if the feature is enabled.
5503
5504 4. Additional runtime dependencies (:term:`RDEPENDS`)
5505 that should be added if the feature is enabled.
5506
5507 5. Additional runtime recommendations
5508 (:term:`RRECOMMENDS`) that should be added if
5509 the feature is enabled.
5510
Andrew Geissler09036742021-06-25 14:25:14 -05005511 6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005512 settings for this feature.
5513
Andrew Geissler09036742021-06-25 14:25:14 -05005514 Consider the following :term:`PACKAGECONFIG` block taken from the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005515 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5516 three arguments that determine the feature's behavior.
5517 ::
5518
5519 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5520
5521 The
5522 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5523 enabled. In this case, ``--with-gtk3`` is added to the configure
Andrew Geissler09036742021-06-25 14:25:14 -05005524 script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005525 other hand, if the feature is disabled say through a ``.bbappend``
5526 file in another layer, then the second argument ``--without-gtk3`` is
5527 added to the configure script instead.
5528
Andrew Geissler09036742021-06-25 14:25:14 -05005529 The basic :term:`PACKAGECONFIG` structure previously described holds true
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005530 regardless of whether you are creating a block or changing a block.
5531 When creating a block, use the structure inside your recipe.
5532
Andrew Geissler09036742021-06-25 14:25:14 -05005533 If you want to change an existing :term:`PACKAGECONFIG` block, you can do
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005534 so one of two ways:
5535
5536 - *Append file:* Create an append file named
Andrew Geisslereff27472021-10-29 15:35:00 -05005537 ``recipename.bbappend`` in your layer and override the value of
Andrew Geissler09036742021-06-25 14:25:14 -05005538 :term:`PACKAGECONFIG`. You can either completely override the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005539 variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005540
5541 PACKAGECONFIG = "f4 f5"
5542
Andrew Geisslerc926e172021-05-07 16:11:35 -05005543 Or, you can just append the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005544
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005545 PACKAGECONFIG:append = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005546
5547 - *Configuration file:* This method is identical to changing the
5548 block through an append file except you edit your ``local.conf``
5549 or ``mydistro.conf`` file. As with append files previously
Andrew Geisslerc926e172021-05-07 16:11:35 -05005550 described, you can either completely override the variable::
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005551
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005552 PACKAGECONFIG:pn-recipename = "f4 f5"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005553
Andrew Geisslerc926e172021-05-07 16:11:35 -05005554 Or, you can just amend the variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005555
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005556 PACKAGECONFIG:append:pn-recipename = " f4"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005557
Andrew Geisslerf0343792020-11-18 10:42:21 -06005558 :term:`PACKAGECONFIG_CONFARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005559 A space-separated list of configuration options generated from the
5560 :term:`PACKAGECONFIG` setting.
5561
5562 Classes such as :ref:`autotools <ref-classes-autotools>` and
Andrew Geissler09036742021-06-25 14:25:14 -05005563 :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5564 pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5565 respectively. If you are using :term:`PACKAGECONFIG` but not a class that
Patrick Williams2194f502022-10-16 14:26:09 -05005566 handles the :ref:`ref-tasks-configure` task, then you need to use
Andrew Geissler09036742021-06-25 14:25:14 -05005567 :term:`PACKAGECONFIG_CONFARGS` appropriately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005568
Andrew Geisslerf0343792020-11-18 10:42:21 -06005569 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005570 For recipes inheriting the
5571 :ref:`packagegroup <ref-classes-packagegroup>` class, setting
Andrew Geissler09036742021-06-25 14:25:14 -05005572 :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005573 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5574 should not be automatically created by the ``packagegroup`` recipe,
5575 which is the default behavior.
5576
Andrew Geisslerf0343792020-11-18 10:42:21 -06005577 :term:`PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005578 The list of packages the recipe creates. The default value is the
Andrew Geisslerc926e172021-05-07 16:11:35 -05005579 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005580
Andrew Geissler5199d832021-09-24 16:47:35 -05005581 ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005582
5583 During packaging, the :ref:`ref-tasks-package` task
Andrew Geissler09036742021-06-25 14:25:14 -05005584 goes through :term:`PACKAGES` and uses the :term:`FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005585 variable corresponding to each package to assign files to the
Andrew Geissler09036742021-06-25 14:25:14 -05005586 package. If a file matches the :term:`FILES` variable for more than one
5587 package in :term:`PACKAGES`, it will be assigned to the earliest
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005588 (leftmost) package.
5589
5590 Packages in the variable's list that are empty (i.e. where none of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005591 the patterns in ``FILES:``\ pkg match any files installed by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005592 :ref:`ref-tasks-install` task) are not generated,
5593 unless generation is forced through the
5594 :term:`ALLOW_EMPTY` variable.
5595
Andrew Geisslerf0343792020-11-18 10:42:21 -06005596 :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005597 A promise that your recipe satisfies runtime dependencies for
5598 optional modules that are found in other recipes.
Andrew Geissler09036742021-06-25 14:25:14 -05005599 :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005600 only states that they should be satisfied. For example, if a hard,
5601 runtime dependency (:term:`RDEPENDS`) of another
Andrew Geissler09036742021-06-25 14:25:14 -05005602 package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005603 variable, but a package with the module name is never actually
5604 produced, then the other package will be broken. Thus, if you attempt
5605 to include that package in an image, you will get a dependency
5606 failure from the packaging system during the
5607 :ref:`ref-tasks-rootfs` task.
5608
5609 Typically, if there is a chance that such a situation can occur and
5610 the package that is not created is valid without the dependency being
5611 satisfied, then you should use :term:`RRECOMMENDS`
Andrew Geissler09036742021-06-25 14:25:14 -05005612 (a soft runtime dependency) instead of :term:`RDEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005613
Andrew Geissler09036742021-06-25 14:25:14 -05005614 For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005615 you are splitting packages, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005616 ":ref:`dev-manual/common-tasks:handling optional module packaging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005617 section in the Yocto Project Development Tasks Manual.
5618
Andrew Geisslerf0343792020-11-18 10:42:21 -06005619 :term:`PACKAGESPLITFUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005620 Specifies a list of functions run to perform additional splitting of
5621 files into individual packages. Recipes can either prepend to this
5622 variable or prepend to the ``populate_packages`` function in order to
5623 perform additional package splitting. In either case, the function
5624 should set :term:`PACKAGES`,
5625 :term:`FILES`, :term:`RDEPENDS` and
5626 other packaging variables appropriately in order to perform the
5627 desired splitting.
5628
Andrew Geisslerf0343792020-11-18 10:42:21 -06005629 :term:`PARALLEL_MAKE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005630 Extra options passed to the ``make`` command during the
5631 :ref:`ref-tasks-compile` task in order to specify
5632 parallel compilation on the local build host. This variable is
5633 usually in the form "-j x", where x represents the maximum number of
5634 parallel threads ``make`` can run.
5635
5636 .. note::
5637
Andrew Geissler09036742021-06-25 14:25:14 -05005638 In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005639 called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5640 this is to use the ``oe_runmake`` function.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005641
5642 By default, the OpenEmbedded build system automatically sets this
5643 variable to be equal to the number of cores the build system uses.
5644
5645 .. note::
5646
5647 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05005648 the :ref:`ref-tasks-compile` task that result in race conditions, you can clear
Andrew Geissler09036742021-06-25 14:25:14 -05005649 the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005650 information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005651 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005652 section in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005653
5654 For single socket systems (i.e. one CPU), you should not have to
5655 override this variable to gain optimal parallelism during builds.
5656 However, if you have very large systems that employ multiple physical
Andrew Geissler09036742021-06-25 14:25:14 -05005657 CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005658 not set higher than "-j 20".
5659
5660 For more information on speeding up builds, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005661 ":ref:`dev-manual/common-tasks:speeding up a build`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005662 section in the Yocto Project Development Tasks Manual.
5663
Andrew Geisslerf0343792020-11-18 10:42:21 -06005664 :term:`PARALLEL_MAKEINST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005665 Extra options passed to the ``make install`` command during the
5666 :ref:`ref-tasks-install` task in order to specify
5667 parallel installation. This variable defaults to the value of
5668 :term:`PARALLEL_MAKE`.
5669
5670 .. note::
5671
Andrew Geissler09036742021-06-25 14:25:14 -05005672 In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005673 be called with
5674 ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5675 way to ensure this is to use the ``oe_runmake`` function.
5676
5677 If the software being built experiences dependency issues during
Patrick Williams2194f502022-10-16 14:26:09 -05005678 the :ref:`ref-tasks-install` task that result in race conditions, you can
Andrew Geissler09036742021-06-25 14:25:14 -05005679 clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005680 workaround. For information on addressing race conditions, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005681 ":ref:`dev-manual/common-tasks:debugging parallel make races`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005682 section in the Yocto Project Development Tasks Manual.
5683
Andrew Geisslerf0343792020-11-18 10:42:21 -06005684 :term:`PATCHRESOLVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005685 Determines the action to take when a patch fails. You can set this
5686 variable to one of two values: "noop" and "user".
5687
5688 The default value of "noop" causes the build to simply fail when the
5689 OpenEmbedded build system cannot successfully apply a patch. Setting
5690 the value to "user" causes the build system to launch a shell and
5691 places you in the right location so that you can manually resolve the
5692 conflicts.
5693
5694 Set this variable in your ``local.conf`` file.
5695
Andrew Geisslerf0343792020-11-18 10:42:21 -06005696 :term:`PATCHTOOL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005697 Specifies the utility used to apply patches for a recipe during the
5698 :ref:`ref-tasks-patch` task. You can specify one of
5699 three utilities: "patch", "quilt", or "git". The default utility used
5700 is "quilt" except for the quilt-native recipe itself. Because the
5701 quilt tool is not available at the time quilt-native is being
5702 patched, it uses "patch".
5703
5704 If you wish to use an alternative patching tool, set the variable in
Andrew Geisslerc926e172021-05-07 16:11:35 -05005705 the recipe using one of the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005706
5707 PATCHTOOL = "patch"
5708 PATCHTOOL = "quilt"
5709 PATCHTOOL = "git"
5710
Andrew Geisslerf0343792020-11-18 10:42:21 -06005711 :term:`PE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005712 The epoch of the recipe. By default, this variable is unset. The
5713 variable is used to make upgrades possible when the versioning scheme
5714 changes in some backwards incompatible way.
5715
Andrew Geissler09036742021-06-25 14:25:14 -05005716 :term:`PE` is the default value of the :term:`PKGE` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005717
Andrew Geissler9aee5002022-03-30 16:27:02 +00005718 :term:`PEP517_WHEEL_PATH`
5719 When used by recipes that inherit the
5720 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5721 denotes the path to ``dist/`` (short for distribution) where the
5722 binary archive ``wheel`` is built.
5723
Andrew Geisslerf0343792020-11-18 10:42:21 -06005724 :term:`PF`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005725 Specifies the recipe or package name and includes all version and
5726 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5727 ``bash-4.2-r1/``). This variable is comprised of the following:
5728 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5729
Andrew Geisslerf0343792020-11-18 10:42:21 -06005730 :term:`PIXBUF_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005731 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5732 class, this variable identifies packages that contain the pixbuf
5733 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5734 class assumes that the loaders are in the recipe's main package (i.e.
5735 ``${``\ :term:`PN`\ ``}``). Use this variable if the
5736 loaders you need are in a package other than that main package.
5737
Andrew Geisslerf0343792020-11-18 10:42:21 -06005738 :term:`PKG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005739 The name of the resulting package created by the OpenEmbedded build
5740 system.
5741
5742 .. note::
5743
Andrew Geissler09036742021-06-25 14:25:14 -05005744 When using the :term:`PKG` variable, you must use a package name override.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005745
5746 For example, when the :ref:`debian <ref-classes-debian>` class
5747 renames the output package, it does so by setting
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005748 ``PKG:packagename``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005749
Andrew Geisslerf0343792020-11-18 10:42:21 -06005750 :term:`PKG_CONFIG_PATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005751 The path to ``pkg-config`` files for the current build context.
5752 ``pkg-config`` reads this variable from the environment.
5753
Andrew Geisslerf0343792020-11-18 10:42:21 -06005754 :term:`PKGD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005755 Points to the destination directory for files to be packaged before
5756 they are split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005757 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005758
5759 ${WORKDIR}/package
5760
5761 Do not change this default.
5762
Andrew Geisslerf0343792020-11-18 10:42:21 -06005763 :term:`PKGDATA_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005764 Points to a shared, global-state directory that holds data generated
5765 during the packaging process. During the packaging process, the
5766 :ref:`ref-tasks-packagedata` task packages data
5767 for each recipe and installs it into this temporary, shared area.
5768 This directory defaults to the following, which you should not
Andrew Geisslerc926e172021-05-07 16:11:35 -05005769 change::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005770
5771 ${STAGING_DIR_HOST}/pkgdata
5772
5773 For examples of how this data is used, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005774 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005775 section in the Yocto Project Overview and Concepts Manual and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005776 ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005777 section in the Yocto Project Development Tasks Manual. For more
5778 information on the shared, global-state directory, see
5779 :term:`STAGING_DIR_HOST`.
5780
Andrew Geisslerf0343792020-11-18 10:42:21 -06005781 :term:`PKGDEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005782 Points to the parent directory for files to be packaged after they
5783 have been split into individual packages. This directory defaults to
Andrew Geisslerc926e172021-05-07 16:11:35 -05005784 the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005785
5786 ${WORKDIR}/packages-split
5787
5788 Under this directory, the build system creates directories for each
5789 package specified in :term:`PACKAGES`. Do not change
5790 this default.
5791
Andrew Geisslerf0343792020-11-18 10:42:21 -06005792 :term:`PKGDESTWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005793 Points to a temporary work area where the
5794 :ref:`ref-tasks-package` task saves package metadata.
Andrew Geissler09036742021-06-25 14:25:14 -05005795 The :term:`PKGDESTWORK` location defaults to the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005796
5797 ${WORKDIR}/pkgdata
5798
5799 Do not change this default.
5800
5801 The :ref:`ref-tasks-packagedata` task copies the
Andrew Geissler09036742021-06-25 14:25:14 -05005802 package metadata from :term:`PKGDESTWORK` to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005803 :term:`PKGDATA_DIR` to make it available globally.
5804
Andrew Geisslerf0343792020-11-18 10:42:21 -06005805 :term:`PKGE`
Andrew Geissler09036742021-06-25 14:25:14 -05005806 The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005807 is set to :term:`PE`.
5808
Andrew Geisslerf0343792020-11-18 10:42:21 -06005809 :term:`PKGR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005810 The revision of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005811 :term:`PKGR` is set to :term:`PR`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005812
Andrew Geisslerf0343792020-11-18 10:42:21 -06005813 :term:`PKGV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005814 The version of the package(s) built by the recipe. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05005815 :term:`PKGV` is set to :term:`PV`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005816
Andrew Geisslerf0343792020-11-18 10:42:21 -06005817 :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005818 This variable can have two separate functions depending on the
5819 context: a recipe name or a resulting package name.
5820
Andrew Geissler09036742021-06-25 14:25:14 -05005821 :term:`PN` refers to a recipe name in the context of a file used by the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005822 OpenEmbedded build system as input to create a package. The name is
5823 normally extracted from the recipe file name. For example, if the
Andrew Geissler09036742021-06-25 14:25:14 -05005824 recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005825 will be "expat".
5826
5827 The variable refers to a package name in the context of a file
5828 created or produced by the OpenEmbedded build system.
5829
Andrew Geissler09036742021-06-25 14:25:14 -05005830 If applicable, the :term:`PN` variable also contains any special suffix
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005831 or prefix. For example, using ``bash`` to build packages for the
Andrew Geissler5f350902021-07-23 13:09:54 -04005832 native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
Andrew Geissler09036742021-06-25 14:25:14 -05005833 packages for the target and for Multilib, :term:`PN` would be ``bash``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005834 and ``lib64-bash``, respectively.
5835
Andrew Geisslerf0343792020-11-18 10:42:21 -06005836 :term:`POPULATE_SDK_POST_HOST_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005837 Specifies a list of functions to call once the OpenEmbedded build
5838 system has created the host part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005839 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005840
5841 POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5842
5843 If you need to pass the SDK path to a command within a function, you
5844 can use ``${SDK_DIR}``, which points to the parent directory used by
5845 the OpenEmbedded build system when creating SDK output. See the
5846 :term:`SDK_DIR` variable for more information.
5847
Andrew Geisslerf0343792020-11-18 10:42:21 -06005848 :term:`POPULATE_SDK_POST_TARGET_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005849 Specifies a list of functions to call once the OpenEmbedded build
5850 system has created the target part of the SDK. You can specify
Andrew Geisslerc926e172021-05-07 16:11:35 -05005851 functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005852
5853 POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5854
5855 If you need to pass the SDK path to a command within a function, you
5856 can use ``${SDK_DIR}``, which points to the parent directory used by
5857 the OpenEmbedded build system when creating SDK output. See the
5858 :term:`SDK_DIR` variable for more information.
5859
Andrew Geisslerf0343792020-11-18 10:42:21 -06005860 :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005861 The revision of the recipe. The default value for this variable is
5862 "r0". Subsequent revisions of the recipe conventionally have the
5863 values "r1", "r2", and so forth. When :term:`PV` increases,
Andrew Geissler09036742021-06-25 14:25:14 -05005864 :term:`PR` is conventionally reset to "r0".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005865
5866 .. note::
5867
Andrew Geissler09036742021-06-25 14:25:14 -05005868 The OpenEmbedded build system does not need the aid of :term:`PR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005869 to know when to rebuild a recipe. The build system uses the task
Andrew Geissler09209ee2020-12-13 08:44:15 -06005870 :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005871 :ref:`stamp <structure-build-tmp-stamps>` and
Andrew Geissler09209ee2020-12-13 08:44:15 -06005872 :ref:`overview-manual/concepts:shared state cache`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005873 mechanisms.
5874
Andrew Geissler09036742021-06-25 14:25:14 -05005875 The :term:`PR` variable primarily becomes significant when a package
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005876 manager dynamically installs packages on an already built image. In
Andrew Geissler09036742021-06-25 14:25:14 -05005877 this case, :term:`PR`, which is the default value of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005878 :term:`PKGR`, helps the package manager distinguish which
5879 package is the most recent one in cases where many packages have the
Andrew Geissler09036742021-06-25 14:25:14 -05005880 same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5881 the same :term:`PV` usually means that the packages all install the same
5882 upstream version, but with later (:term:`PR`) version packages including
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005883 packaging fixes.
5884
5885 .. note::
5886
Andrew Geissler09036742021-06-25 14:25:14 -05005887 :term:`PR` does not need to be increased for changes that do not change the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005888 package contents or metadata.
5889
Andrew Geissler5f350902021-07-23 13:09:54 -04005890 Because manually managing :term:`PR` can be cumbersome and error-prone,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005891 an automated solution exists. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06005892 ":ref:`dev-manual/common-tasks:working with a pr service`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005893 in the Yocto Project Development Tasks Manual for more information.
5894
Andrew Geisslerf0343792020-11-18 10:42:21 -06005895 :term:`PREFERRED_PROVIDER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005896 If multiple recipes provide the same item, this variable determines
5897 which recipe is preferred and thus provides the item (i.e. the
5898 preferred provider). You should always suffix this variable with the
5899 name of the provided item. And, you should define the variable using
5900 the preferred recipe's name (:term:`PN`). Here is a common
Andrew Geisslerc926e172021-05-07 16:11:35 -05005901 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005902
5903 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5904
5905 In the previous example, multiple recipes are providing "virtual/kernel".
Andrew Geissler09036742021-06-25 14:25:14 -05005906 The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005907 the recipe you prefer to provide "virtual/kernel".
5908
Andrew Geisslerc926e172021-05-07 16:11:35 -05005909 Following are more examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005910
5911 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5912 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5913
5914 For more
Andrew Geissler09209ee2020-12-13 08:44:15 -06005915 information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005916 section in the Yocto Project Development Tasks Manual.
5917
5918 .. note::
5919
Andrew Geissler09036742021-06-25 14:25:14 -05005920 If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005921 recipe that :term:`PROVIDES` that item but is not selected (defined)
Andrew Geissler09036742021-06-25 14:25:14 -05005922 by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
Andrew Geissler4c19ea12020-10-27 13:52:24 -05005923 desirable since this mechanism is designed to select between mutually
5924 exclusive alternative providers.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005925
Andrew Geisslerf0343792020-11-18 10:42:21 -06005926 :term:`PREFERRED_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005927 If there are multiple versions of a recipe available, this variable
5928 determines which version should be given preference. You must always
5929 suffix the variable with the :term:`PN` you want to select (`python` in
5930 the first example below), and you should specify the :term:`PV`
5931 accordingly (`3.4.0` in the example).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005932
Andrew Geissler09036742021-06-25 14:25:14 -05005933 The :term:`PREFERRED_VERSION` variable supports limited wildcard use
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005934 through the "``%``" character. You can use the character to match any
5935 number of characters, which can be useful when specifying versions
5936 that contain long revision numbers that potentially change. Here are
Andrew Geisslerc926e172021-05-07 16:11:35 -05005937 two examples::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005938
5939 PREFERRED_VERSION_python = "3.4.0"
5940 PREFERRED_VERSION_linux-yocto = "5.0%"
5941
5942 .. note::
5943
5944 The use of the "%" character is limited in that it only works at the end of the
5945 string. You cannot use the wildcard character in any other
5946 location of the string.
5947
5948 The specified version is matched against :term:`PV`, which
5949 does not necessarily match the version part of the recipe's filename.
5950 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
Andrew Geisslerc926e172021-05-07 16:11:35 -05005951 where ``foo_git.bb`` contains the following assignment::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005952
5953 PV = "1.1+git${SRCPV}"
5954
5955 In this case, the correct way to select
Andrew Geisslerc926e172021-05-07 16:11:35 -05005956 ``foo_git.bb`` is by using an assignment such as the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005957
5958 PREFERRED_VERSION_foo = "1.1+git%"
5959
5960 Compare that previous example
Andrew Geisslerc926e172021-05-07 16:11:35 -05005961 against the following incorrect example, which does not work::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005962
5963 PREFERRED_VERSION_foo = "git"
5964
Andrew Geissler09036742021-06-25 14:25:14 -05005965 Sometimes the :term:`PREFERRED_VERSION` variable can be set by
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005966 configuration files in a way that is hard to change. You can use
5967 :term:`OVERRIDES` to set a machine-specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05005968 override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005969
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005970 PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005971
5972 Although not recommended, worst case, you can also use the
5973 "forcevariable" override, which is the strongest override possible.
Andrew Geisslerc926e172021-05-07 16:11:35 -05005974 Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005975
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005976 PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005977
5978 .. note::
5979
Patrick Williams0ca19cc2021-08-16 14:03:13 -05005980 The ``:forcevariable`` override is not handled specially. This override
Andrew Geissler09036742021-06-25 14:25:14 -05005981 only works because the default value of :term:`OVERRIDES` includes "forcevariable".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005982
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05005983 If a recipe with the specified version is not available, a warning
5984 message will be shown. See :term:`REQUIRED_VERSION` if you want this
5985 to be an error instead.
5986
Andrew Geisslerf0343792020-11-18 10:42:21 -06005987 :term:`PREMIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005988 Specifies additional paths from which the OpenEmbedded build system
5989 gets source code. When the build system searches for source code, it
5990 first tries the local download directory. If that location fails, the
Andrew Geissler09036742021-06-25 14:25:14 -05005991 build system tries locations defined by :term:`PREMIRRORS`, the upstream
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005992 source, and then locations specified by
5993 :term:`MIRRORS` in that order.
5994
5995 Assuming your distribution (:term:`DISTRO`) is "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05005996 the default value for :term:`PREMIRRORS` is defined in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05005997 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5998
5999 Typically, you could add a specific server for the build system to
6000 attempt before any others by adding something like the following to
6001 the ``local.conf`` configuration file in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006002 :term:`Build Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006003
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006004 PREMIRRORS:prepend = "\
Andrew Geissler595f6302022-01-24 19:11:47 +00006005 git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6006 ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6007 http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
6008 https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006009
6010 These changes cause the
6011 build system to intercept Git, FTP, HTTP, and HTTPS requests and
6012 direct them to the ``http://`` sources mirror. You can use
6013 ``file://`` URLs to point to local directories or network shares as
6014 well.
6015
Andrew Geisslerf0343792020-11-18 10:42:21 -06006016 :term:`PRIORITY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006017 Indicates the importance of a package.
6018
Andrew Geissler09036742021-06-25 14:25:14 -05006019 :term:`PRIORITY` is considered to be part of the distribution policy
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006020 because the importance of any given recipe depends on the purpose for
Andrew Geissler09036742021-06-25 14:25:14 -05006021 which the distribution is being produced. Thus, :term:`PRIORITY` is not
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006022 normally set within recipes.
6023
Andrew Geissler09036742021-06-25 14:25:14 -05006024 You can set :term:`PRIORITY` to "required", "standard", "extra", and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006025 "optional", which is the default.
6026
Andrew Geisslerf0343792020-11-18 10:42:21 -06006027 :term:`PRIVATE_LIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006028 Specifies libraries installed within a recipe that should be ignored
6029 by the OpenEmbedded build system's shared library resolver. This
6030 variable is typically used when software being built by a recipe has
6031 its own private versions of a library normally provided by another
6032 recipe. In this case, you would not want the package containing the
6033 private libraries to be set as a dependency on other unrelated
6034 packages that should instead depend on the package providing the
6035 standard version of the library.
6036
6037 Libraries specified in this variable should be specified by their
Andrew Geisslerc926e172021-05-07 16:11:35 -05006038 file name. For example, from the Firefox recipe in meta-browser::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006039
6040 PRIVATE_LIBS = "libmozjs.so \
6041 libxpcom.so \
6042 libnspr4.so \
6043 libxul.so \
6044 libmozalloc.so \
6045 libplc4.so \
6046 libplds4.so"
6047
6048 For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006049 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006050 section in the Yocto Project Overview and Concepts Manual.
6051
Andrew Geisslerf0343792020-11-18 10:42:21 -06006052 :term:`PROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006053 A list of aliases by which a particular recipe can be known. By
Andrew Geissler09036742021-06-25 14:25:14 -05006054 default, a recipe's own :term:`PN` is implicitly already in its
6055 :term:`PROVIDES` list and therefore does not need to mention that it
6056 provides itself. If a recipe uses :term:`PROVIDES`, the additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006057 aliases are synonyms for the recipe and can be useful for satisfying
6058 dependencies of other recipes during the build as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006059 :term:`DEPENDS`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006060
Andrew Geissler09036742021-06-25 14:25:14 -05006061 Consider the following example :term:`PROVIDES` statement from the recipe
Andrew Geisslerc926e172021-05-07 16:11:35 -05006062 file ``eudev_3.2.9.bb``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006063
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006064 PROVIDES += "udev"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006065
Andrew Geissler09036742021-06-25 14:25:14 -05006066 The :term:`PROVIDES` statement
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006067 results in the "eudev" recipe also being available as simply "udev".
6068
6069 .. note::
6070
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006071 A recipe's own recipe name (:term:`PN`) is always implicitly prepended
6072 to `PROVIDES`, so while using "+=" in the above example may not be
6073 strictly necessary it is recommended to avoid confusion.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006074
6075 In addition to providing recipes under alternate names, the
Andrew Geissler09036742021-06-25 14:25:14 -05006076 :term:`PROVIDES` mechanism is also used to implement virtual targets. A
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006077 virtual target is a name that corresponds to some particular
6078 functionality (e.g. a Linux kernel). Recipes that provide the
Andrew Geissler09036742021-06-25 14:25:14 -05006079 functionality in question list the virtual target in :term:`PROVIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006080 Recipes that depend on the functionality in question can include the
Andrew Geissler09036742021-06-25 14:25:14 -05006081 virtual target in :term:`DEPENDS` to leave the choice of provider open.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006082
6083 Conventionally, virtual targets have names on the form
6084 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6085 of the name and has no syntactical significance.
6086
6087 The :term:`PREFERRED_PROVIDER` variable is
6088 used to select which particular recipe provides a virtual target.
6089
6090 .. note::
6091
6092 A corresponding mechanism for virtual runtime dependencies
6093 (packages) exists. However, the mechanism does not depend on any
6094 special functionality beyond ordinary variable assignments. For
6095 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6096 the component that manages the ``/dev`` directory.
6097
6098 Setting the "preferred provider" for runtime dependencies is as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006099 simple as using the following assignment in a configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006100
6101 VIRTUAL-RUNTIME_dev_manager = "udev"
6102
6103
Andrew Geisslerf0343792020-11-18 10:42:21 -06006104 :term:`PRSERV_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006105 The network based :term:`PR` service host and port.
6106
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006107 The ``conf/templates/default/local.conf.sample.extended`` configuration
6108 file in the :term:`Source Directory` shows how the :term:`PRSERV_HOST`
6109 variable is set::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006110
6111 PRSERV_HOST = "localhost:0"
6112
6113 You must
6114 set the variable if you want to automatically start a local :ref:`PR
Andrew Geissler09209ee2020-12-13 08:44:15 -06006115 service <dev-manual/common-tasks:working with a pr service>`. You can
Andrew Geissler09036742021-06-25 14:25:14 -05006116 set :term:`PRSERV_HOST` to other values to use a remote PR service.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006117
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006118
6119 :term:`PSEUDO_IGNORE_PATHS`
6120 A comma-separated (without spaces) list of path prefixes that should be ignored
6121 by pseudo when monitoring and recording file operations, in order to avoid
6122 problems with files being written to outside of the pseudo context and
6123 reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6124 and can include partial directory (or file) names.
6125
6126
Andrew Geisslerf0343792020-11-18 10:42:21 -06006127 :term:`PTEST_ENABLED`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006128 Specifies whether or not :ref:`Package
Andrew Geissler09209ee2020-12-13 08:44:15 -06006129 Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006130 functionality is enabled when building a recipe. You should not set
6131 this variable directly. Enabling and disabling building Package Tests
6132 at build time should be done by adding "ptest" to (or removing it
6133 from) :term:`DISTRO_FEATURES`.
6134
Andrew Geisslerf0343792020-11-18 10:42:21 -06006135 :term:`PV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006136 The version of the recipe. The version is normally extracted from the
6137 recipe filename. For example, if the recipe is named
Andrew Geissler09036742021-06-25 14:25:14 -05006138 ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6139 :term:`PV` is generally not overridden within a recipe unless it is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006140 building an unstable (i.e. development) version from a source code
6141 repository (e.g. Git or Subversion).
6142
Andrew Geissler09036742021-06-25 14:25:14 -05006143 :term:`PV` is the default value of the :term:`PKGV` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006144
Andrew Geisslerf0343792020-11-18 10:42:21 -06006145 :term:`PYTHON_ABI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006146 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006147 :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006148 Application Binary Interface (ABI) currently in use for Python. By
6149 default, the ABI is "m". You do not have to set this variable as the
6150 OpenEmbedded build system sets it for you.
6151
6152 The OpenEmbedded build system uses the ABI to construct directory
6153 names used when installing the Python headers and libraries in
6154 sysroot (e.g. ``.../python3.3m/...``).
6155
Andrew Geisslerf0343792020-11-18 10:42:21 -06006156 :term:`PYTHON_PN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006157 When used by recipes that inherit the
Andrew Geissler9aee5002022-03-30 16:27:02 +00006158 :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
Andrew Geissler09036742021-06-25 14:25:14 -05006159 major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006160 be "python3". You do not have to set this variable as the
6161 OpenEmbedded build system automatically sets it for you.
6162
6163 The variable allows recipes to use common infrastructure such as the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006164 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006165
6166 DEPENDS += "${PYTHON_PN}-native"
6167
6168 In the previous example,
Andrew Geissler09036742021-06-25 14:25:14 -05006169 the version of the dependency is :term:`PYTHON_PN`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006170
Patrick Williams03907ee2022-05-01 06:28:52 -05006171 :term:`QA_EMPTY_DIRS`
6172 Specifies a list of directories that are expected to be empty when
6173 packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6174 :term:`WARN_QA` these will be checked and an error or warning
6175 (respectively) will be produced.
6176
6177 The default :term:`QA_EMPTY_DIRS` value is set in
6178 :ref:`insane.bbclass <ref-classes-insane>`.
6179
6180 :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6181 Specifies a recommendation for why a directory must be empty,
6182 which will be included in the error message if a specific directory
6183 is found to contain files. Must be overridden with the directory
6184 path to match on.
6185
6186 If no recommendation is specified for a directory, then the default
6187 "but it is expected to be empty" will be used.
6188
6189 An example message shows if files were present in '/dev'::
6190
6191 QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6192
Andrew Geisslerf0343792020-11-18 10:42:21 -06006193 :term:`RANLIB`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006194 The minimal command and arguments to run ``ranlib``.
6195
Andrew Geisslerf0343792020-11-18 10:42:21 -06006196 :term:`RCONFLICTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006197 The list of packages that conflict with packages. Note that packages
6198 will not be installed if conflicting packages are not first removed.
6199
6200 Like all package-controlling variables, you must always use them in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006201 conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006202
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006203 RCONFLICTS:${PN} = "another_conflicting_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006204
6205 BitBake, which the OpenEmbedded build system uses, supports
6206 specifying versioned dependencies. Although the syntax varies
6207 depending on the packaging format, BitBake hides these differences
6208 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006209 :term:`RCONFLICTS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006210
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006211 RCONFLICTS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006212
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006213 For ``operator``, you can specify the following:
6214
6215 - =
6216 - <
6217 - >
6218 - <=
6219 - >=
6220
6221 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006222 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006223
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006224 RCONFLICTS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006225
Andrew Geisslerf0343792020-11-18 10:42:21 -06006226 :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006227 Lists runtime dependencies of a package. These dependencies are other
6228 packages that must be installed in order for the package to function
6229 correctly. As an example, the following assignment declares that the
6230 package ``foo`` needs the packages ``bar`` and ``baz`` to be
Andrew Geisslerc926e172021-05-07 16:11:35 -05006231 installed::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006232
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006233 RDEPENDS:foo = "bar baz"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006234
6235 The most common types of package
6236 runtime dependencies are automatically detected and added. Therefore,
Andrew Geissler09036742021-06-25 14:25:14 -05006237 most recipes do not need to set :term:`RDEPENDS`. For more information,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006238 see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006239 ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006240 section in the Yocto Project Overview and Concepts Manual.
6241
Andrew Geissler09036742021-06-25 14:25:14 -05006242 The practical effect of the above :term:`RDEPENDS` assignment is that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006243 ``bar`` and ``baz`` will be declared as dependencies inside the
6244 package ``foo`` when it is written out by one of the
Patrick Williams2194f502022-10-16 14:26:09 -05006245 :ref:`do_package_write_* <ref-tasks-package_write_deb>` tasks.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006246 Exactly how this is done depends on which package format is used,
6247 which is determined by
6248 :term:`PACKAGE_CLASSES`. When the
6249 corresponding package manager installs the package, it will know to
6250 also install the packages on which it depends.
6251
6252 To ensure that the packages ``bar`` and ``baz`` get built, the
Andrew Geissler09036742021-06-25 14:25:14 -05006253 previous :term:`RDEPENDS` assignment also causes a task dependency to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006254 added. This dependency is from the recipe's
6255 :ref:`ref-tasks-build` (not to be confused with
6256 :ref:`ref-tasks-compile`) task to the
Patrick Williams2194f502022-10-16 14:26:09 -05006257 :ref:`do_package_write_* <ref-tasks-package_write_deb>` task of the recipes that build ``bar`` and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006258 ``baz``.
6259
Andrew Geissler09036742021-06-25 14:25:14 -05006260 The names of the packages you list within :term:`RDEPENDS` must be the
Andrew Geissler615f2f12022-07-15 14:00:58 -05006261 names of other packages --- they cannot be recipe names. Although
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006262 package names and recipe names usually match, the important point
Andrew Geissler09036742021-06-25 14:25:14 -05006263 here is that you are providing package names within the :term:`RDEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006264 variable. For an example of the default list of packages created from
6265 a recipe, see the :term:`PACKAGES` variable.
6266
Andrew Geissler09036742021-06-25 14:25:14 -05006267 Because the :term:`RDEPENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006268 you should always use the variable in a form with an attached package
6269 name (remember that a single recipe can build multiple packages). For
6270 example, suppose you are building a development package that depends
6271 on the ``perl`` package. In this case, you would use the following
Andrew Geissler09036742021-06-25 14:25:14 -05006272 :term:`RDEPENDS` statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006273
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006274 RDEPENDS:${PN}-dev += "perl"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006275
6276 In the example,
6277 the development package depends on the ``perl`` package. Thus, the
Andrew Geissler5f350902021-07-23 13:09:54 -04006278 :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006279 the variable.
6280
6281 .. note::
6282
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006283 ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006284 by default. This default is set in the BitBake configuration file
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006285 (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006286 ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006287 rather than the "=" operator.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006288
Andrew Geissler09036742021-06-25 14:25:14 -05006289 The package names you use with :term:`RDEPENDS` must appear as they would
6290 in the :term:`PACKAGES` variable. The :term:`PKG` variable
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006291 allows a different name to be used for the final package (e.g. the
6292 :ref:`debian <ref-classes-debian>` class uses this to rename
6293 packages), but this final package name cannot be used with
Andrew Geissler09036742021-06-25 14:25:14 -05006294 :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006295 independent of the package format used.
6296
6297 BitBake, which the OpenEmbedded build system uses, supports
6298 specifying versioned dependencies. Although the syntax varies
6299 depending on the packaging format, BitBake hides these differences
6300 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006301 :term:`RDEPENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006302
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006303 RDEPENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006304
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006305 For ``operator``, you can specify the following:
6306
6307 - =
6308 - <
6309 - >
6310 - <=
6311 - >=
6312
6313 For version, provide the version number.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006314
6315 .. note::
6316
Andrew Geissler09036742021-06-25 14:25:14 -05006317 You can use :term:`EXTENDPKGV` to provide a full package version
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006318 specification.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006319
6320 For example, the following sets up a dependency on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006321 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006322
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006323 RDEPENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006324
6325 For information on build-time dependencies, see the
6326 :term:`DEPENDS` variable. You can also see the
Patrick Williams213cb262021-08-07 19:21:33 -05006327 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6328 ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006329 BitBake User Manual for additional information on tasks and
6330 dependencies.
6331
Andrew Geissler5199d832021-09-24 16:47:35 -05006332 :term:`RECIPE_NO_UPDATE_REASON`
6333 If a recipe should not be replaced by a more recent upstream version,
6334 putting the reason why in this variable in a recipe allows
6335 ``devtool check-upgrade-status`` command to display it, as explained
6336 in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6337 section.
6338
Andrew Geisslerf0343792020-11-18 10:42:21 -06006339 :term:`REQUIRED_DISTRO_FEATURES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006340 When inheriting the
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006341 :ref:`features_check <ref-classes-features_check>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006342 class, this variable identifies distribution features that must exist
6343 in the current configuration in order for the OpenEmbedded build
6344 system to build the recipe. In other words, if the
Andrew Geissler09036742021-06-25 14:25:14 -05006345 :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6346 appear in :term:`DISTRO_FEATURES` within the current configuration, then
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006347 the recipe will be skipped, and if the build system attempts to build
6348 the recipe then an error will be triggered.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006349
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006350 :term:`REQUIRED_VERSION`
6351 If there are multiple versions of a recipe available, this variable
6352 determines which version should be given preference.
6353 :term:`REQUIRED_VERSION` works in exactly the same manner as
6354 :term:`PREFERRED_VERSION`, except that if the specified version is not
6355 available then an error message is shown and the build fails
6356 immediately.
6357
6358 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6359 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6360
Andrew Geisslerf0343792020-11-18 10:42:21 -06006361 :term:`RM_WORK_EXCLUDE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006362 With ``rm_work`` enabled, this variable specifies a list of recipes
6363 whose work directories should not be removed. See the
Andrew Geissler595f6302022-01-24 19:11:47 +00006364 ":ref:`ref-classes-rm-work`" section for more
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006365 details.
6366
Andrew Geisslerf0343792020-11-18 10:42:21 -06006367 :term:`ROOT_HOME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006368 Defines the root home directory. By default, this directory is set as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006369 follows in the BitBake configuration file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006370
6371 ROOT_HOME ??= "/home/root"
6372
6373 .. note::
6374
6375 This default value is likely used because some embedded solutions
6376 prefer to have a read-only root filesystem and prefer to keep
6377 writeable data in one place.
6378
6379 You can override the default by setting the variable in any layer or
6380 in the ``local.conf`` file. Because the default is set using a "weak"
6381 assignment (i.e. "??="), you can use either of the following forms to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006382 define your override::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006383
6384 ROOT_HOME = "/root"
6385 ROOT_HOME ?= "/root"
6386
6387 These
6388 override examples use ``/root``, which is probably the most commonly
6389 used override.
6390
Andrew Geisslerf0343792020-11-18 10:42:21 -06006391 :term:`ROOTFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006392 Indicates a filesystem image to include as the root filesystem.
6393
Andrew Geissler09036742021-06-25 14:25:14 -05006394 The :term:`ROOTFS` variable is an optional variable used with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006395 :ref:`image-live <ref-classes-image-live>` class.
6396
Andrew Geisslerf0343792020-11-18 10:42:21 -06006397 :term:`ROOTFS_POSTINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006398 Specifies a list of functions to call after the OpenEmbedded build
6399 system has installed packages. You can specify functions separated by
Andrew Geisslerc926e172021-05-07 16:11:35 -05006400 semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006401
6402 ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6403
6404 If you need to pass the root filesystem path to a command within a
6405 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6406 directory that becomes the root filesystem image. See the
6407 :term:`IMAGE_ROOTFS` variable for more
6408 information.
6409
Andrew Geisslerf0343792020-11-18 10:42:21 -06006410 :term:`ROOTFS_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006411 Specifies a list of functions to call once the OpenEmbedded build
6412 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006413 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006414
6415 ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6416
6417 If you need to pass the root filesystem path to a command within a
6418 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6419 directory that becomes the root filesystem image. See the
6420 :term:`IMAGE_ROOTFS` variable for more
6421 information.
6422
Andrew Geisslerf0343792020-11-18 10:42:21 -06006423 :term:`ROOTFS_POSTUNINSTALL_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006424 Specifies a list of functions to call after the OpenEmbedded build
6425 system has removed unnecessary packages. When runtime package
6426 management is disabled in the image, several packages are removed
6427 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
Andrew Geisslerc926e172021-05-07 16:11:35 -05006428 You can specify functions separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006429
6430 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6431
6432 If you need to pass the root filesystem path to a command within a
6433 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6434 directory that becomes the root filesystem image. See the
6435 :term:`IMAGE_ROOTFS` variable for more
6436 information.
6437
Andrew Geisslerf0343792020-11-18 10:42:21 -06006438 :term:`ROOTFS_PREPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006439 Specifies a list of functions to call before the OpenEmbedded build
6440 system has created the root filesystem. You can specify functions
Andrew Geisslerc926e172021-05-07 16:11:35 -05006441 separated by semicolons::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006442
6443 ROOTFS_PREPROCESS_COMMAND += "function; ... "
6444
6445 If you need to pass the root filesystem path to a command within a
6446 function, you can use ``${IMAGE_ROOTFS}``, which points to the
6447 directory that becomes the root filesystem image. See the
6448 :term:`IMAGE_ROOTFS` variable for more
6449 information.
6450
Andrew Geisslerf0343792020-11-18 10:42:21 -06006451 :term:`RPROVIDES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006452 A list of package name aliases that a package also provides. These
6453 aliases are useful for satisfying runtime dependencies of other
6454 packages both during the build and on the target (as specified by
Andrew Geissler09036742021-06-25 14:25:14 -05006455 :term:`RDEPENDS`).
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006456
6457 .. note::
6458
Andrew Geissler09036742021-06-25 14:25:14 -05006459 A package's own name is implicitly already in its :term:`RPROVIDES` list.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006460
6461 As with all package-controlling variables, you must always use the
6462 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006463 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006464
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006465 RPROVIDES:${PN} = "widget-abi-2"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006466
Andrew Geisslerf0343792020-11-18 10:42:21 -06006467 :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006468 A list of packages that extends the usability of a package being
6469 built. The package being built does not depend on this list of
6470 packages in order to successfully build, but rather uses them for
6471 extended usability. To specify runtime dependencies for packages, see
Andrew Geissler09036742021-06-25 14:25:14 -05006472 the :term:`RDEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006473
Andrew Geissler09036742021-06-25 14:25:14 -05006474 The package manager will automatically install the :term:`RRECOMMENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006475 list of packages when installing the built package. However, you can
6476 prevent listed packages from being installed by using the
6477 :term:`BAD_RECOMMENDATIONS`,
6478 :term:`NO_RECOMMENDATIONS`, and
6479 :term:`PACKAGE_EXCLUDE` variables.
6480
Andrew Geissler09036742021-06-25 14:25:14 -05006481 Packages specified in :term:`RRECOMMENDS` need not actually be produced.
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006482 However, there must be a recipe providing each package, either
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006483 through the :term:`PACKAGES` or
6484 :term:`PACKAGES_DYNAMIC` variables or the
6485 :term:`RPROVIDES` variable, or an error will occur
6486 during the build. If such a recipe does exist and the package is not
6487 produced, the build continues without error.
6488
Andrew Geissler09036742021-06-25 14:25:14 -05006489 Because the :term:`RRECOMMENDS` variable applies to packages being built,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006490 you should always attach an override to the variable to specify the
6491 particular package whose usability is being extended. For example,
6492 suppose you are building a development package that is extended to
6493 support wireless functionality. In this case, you would use the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006494 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006495
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006496 RRECOMMENDS:${PN}-dev += "wireless_package_name"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006497
6498 In the
6499 example, the package name (``${PN}-dev``) must appear as it would in
Andrew Geissler09036742021-06-25 14:25:14 -05006500 the :term:`PACKAGES` namespace before any renaming of the output package
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006501 by classes such as :ref:`ref-classes-debian`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006502
6503 BitBake, which the OpenEmbedded build system uses, supports
6504 specifying versioned recommends. Although the syntax varies depending
6505 on the packaging format, BitBake hides these differences from you.
6506 Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006507 :term:`RRECOMMENDS` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006508
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006509 RRECOMMENDS:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006510
6511 For ``operator``, you can specify the following:
6512
6513 - =
6514 - <
6515 - >
6516 - <=
6517 - >=
6518
6519 For example, the following sets up a recommend on version 1.2 or
Andrew Geisslerc926e172021-05-07 16:11:35 -05006520 greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006521
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006522 RRECOMMENDS:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006523
Andrew Geisslerf0343792020-11-18 10:42:21 -06006524 :term:`RREPLACES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006525 A list of packages replaced by a package. The package manager uses
6526 this variable to determine which package should be installed to
6527 replace other package(s) during an upgrade. In order to also have the
6528 other package(s) removed at the same time, you must add the name of
Andrew Geissler09036742021-06-25 14:25:14 -05006529 the other package to the :term:`RCONFLICTS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006530
6531 As with all package-controlling variables, you must use this variable
Andrew Geisslerc926e172021-05-07 16:11:35 -05006532 in conjunction with a package name override. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006533
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006534 RREPLACES:${PN} = "other_package_being_replaced"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006535
6536 BitBake, which the OpenEmbedded build system uses, supports
6537 specifying versioned replacements. Although the syntax varies
6538 depending on the packaging format, BitBake hides these differences
6539 from you. Here is the general syntax to specify versions with the
Andrew Geissler09036742021-06-25 14:25:14 -05006540 :term:`RREPLACES` variable::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006541
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006542 RREPLACES:${PN} = "package (operator version)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006543
6544 For ``operator``, you can specify the following:
6545
6546 - =
6547 - <
6548 - >
6549 - <=
6550 - >=
6551
6552 For example, the following sets up a replacement using version 1.2
Andrew Geisslerc926e172021-05-07 16:11:35 -05006553 or greater of the package ``foo``::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006554
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006555 RREPLACES:${PN} = "foo (>= 1.2)"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006556
Andrew Geisslerf0343792020-11-18 10:42:21 -06006557 :term:`RSUGGESTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006558 A list of additional packages that you can suggest for installation
6559 by the package manager at the time a package is installed. Not all
6560 package managers support this functionality.
6561
6562 As with all package-controlling variables, you must always use this
6563 variable in conjunction with a package name override. Here is an
Andrew Geisslerc926e172021-05-07 16:11:35 -05006564 example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006565
Patrick Williams0ca19cc2021-08-16 14:03:13 -05006566 RSUGGESTS:${PN} = "useful_package another_package"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006567
Andrew Geisslerf0343792020-11-18 10:42:21 -06006568 :term:`S`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006569 The location in the :term:`Build Directory` where
6570 unpacked recipe source code resides. By default, this directory is
6571 ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6572 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6573 version. If the source tarball extracts the code to a directory named
6574 anything other than ``${BPN}-${PV}``, or if the source code is
6575 fetched from an SCM such as Git or Subversion, then you must set
Andrew Geissler09036742021-06-25 14:25:14 -05006576 :term:`S` in the recipe so that the OpenEmbedded build system knows where
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006577 to find the unpacked source.
6578
6579 As an example, assume a :term:`Source Directory`
6580 top-level folder named ``poky`` and a default Build Directory at
6581 ``poky/build``. In this case, the work directory the build system
Andrew Geisslerc926e172021-05-07 16:11:35 -05006582 uses to keep the unpacked recipe for ``db`` is the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006583
6584 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6585
6586 The unpacked source code resides in the ``db-5.1.19`` folder.
6587
6588 This next example assumes a Git repository. By default, Git
6589 repositories are cloned to ``${WORKDIR}/git`` during
6590 :ref:`ref-tasks-fetch`. Since this path is different
Andrew Geissler09036742021-06-25 14:25:14 -05006591 from the default value of :term:`S`, you must set it specifically so the
Andrew Geisslerc926e172021-05-07 16:11:35 -05006592 source can be located::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006593
Andrew Geissler9aee5002022-03-30 16:27:02 +00006594 SRC_URI = "git://path/to/repo.git;branch=main"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006595 S = "${WORKDIR}/git"
6596
Andrew Geisslerf0343792020-11-18 10:42:21 -06006597 :term:`SANITY_REQUIRED_UTILITIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006598 Specifies a list of command-line utilities that should be checked for
6599 during the initial sanity checking process when running BitBake. If
6600 any of the utilities are not installed on the build host, then
6601 BitBake immediately exits with an error.
6602
Andrew Geisslerf0343792020-11-18 10:42:21 -06006603 :term:`SANITY_TESTED_DISTROS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006604 A list of the host distribution identifiers that the build system has
6605 been tested against. Identifiers consist of the host distributor ID
6606 followed by the release, as reported by the ``lsb_release`` tool or
6607 as read from ``/etc/lsb-release``. Separate the list items with
Andrew Geissler09036742021-06-25 14:25:14 -05006608 explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006609 not empty and the current value of
6610 :term:`NATIVELSBSTRING` does not appear in the
6611 list, then the build system reports a warning that indicates the
6612 current host distribution has not been tested as a build host.
6613
Andrew Geisslerf0343792020-11-18 10:42:21 -06006614 :term:`SDK_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006615 The target architecture for the SDK. Typically, you do not directly
6616 set this variable. Instead, use :term:`SDKMACHINE`.
6617
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006618 :term:`SDK_CUSTOM_TEMPLATECONF`
Andrew Geissler09036742021-06-25 14:25:14 -05006619 When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
Andrew Geissler87f5cff2022-09-30 13:13:31 -05006620 "1" and a ``conf/templateconf.cfg`` file exists in the build directory
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006621 (:term:`TOPDIR`) then this will be copied into the SDK.
6622
Andrew Geisslerf0343792020-11-18 10:42:21 -06006623 :term:`SDK_DEPLOY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006624 The directory set up and used by the
6625 :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6626 the SDK is deployed. The ``populate_sdk_base`` class defines
Andrew Geissler09036742021-06-25 14:25:14 -05006627 :term:`SDK_DEPLOY` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006628
6629 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6630
Andrew Geisslerf0343792020-11-18 10:42:21 -06006631 :term:`SDK_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006632 The parent directory used by the OpenEmbedded build system when
6633 creating SDK output. The
6634 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
Andrew Geisslerc926e172021-05-07 16:11:35 -05006635 the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006636
6637 SDK_DIR = "${WORKDIR}/sdk"
6638
6639 .. note::
6640
Andrew Geissler09036742021-06-25 14:25:14 -05006641 The :term:`SDK_DIR` directory is a temporary directory as it is part of
6642 :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006643
Andrew Geisslerf0343792020-11-18 10:42:21 -06006644 :term:`SDK_EXT_TYPE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006645 Controls whether or not shared state artifacts are copied into the
6646 extensible SDK. The default value of "full" copies all of the
6647 required shared state artifacts into the extensible SDK. The value
6648 "minimal" leaves these artifacts out of the SDK.
6649
6650 .. note::
6651
6652 If you set the variable to "minimal", you need to ensure
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006653 :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6654 artifacts to be fetched as needed.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006655
Andrew Geisslerf0343792020-11-18 10:42:21 -06006656 :term:`SDK_HOST_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006657 The manifest file for the host part of the SDK. This file lists all
6658 the installed packages that make up the host part of the SDK. The
6659 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006660 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006661
6662 packagename packagearch version
6663
6664 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006665 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006666
6667 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6668
6669 The location is derived using the :term:`SDK_DEPLOY` and
6670 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6671
Andrew Geisslerf0343792020-11-18 10:42:21 -06006672 :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006673 When set to "1", specifies to include the packagedata for all recipes
6674 in the "world" target in the extensible SDK. Including this data
6675 allows the ``devtool search`` command to find these recipes in search
6676 results, as well as allows the ``devtool add`` command to map
6677 dependencies more effectively.
6678
6679 .. note::
6680
Andrew Geissler09036742021-06-25 14:25:14 -05006681 Enabling the :term:`SDK_INCLUDE_PKGDATA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006682 variable significantly increases build time because all of world
6683 needs to be built. Enabling the variable also slightly increases
6684 the size of the extensible SDK.
6685
Andrew Geisslerf0343792020-11-18 10:42:21 -06006686 :term:`SDK_INCLUDE_TOOLCHAIN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006687 When set to "1", specifies to include the toolchain in the extensible
6688 SDK. Including the toolchain is useful particularly when
6689 :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6690 the SDK reasonably small but you still want to provide a usable
6691 toolchain. For example, suppose you want to use the toolchain from an
6692 IDE or from other tools and you do not want to perform additional
6693 steps to install the toolchain.
6694
Andrew Geissler09036742021-06-25 14:25:14 -05006695 The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6696 :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6697 :term:`SDK_EXT_TYPE` is set to "full".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006698
Andrew Geisslerf0343792020-11-18 10:42:21 -06006699 :term:`SDK_NAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006700 The base name for SDK output files. The name is derived from the
6701 :term:`DISTRO`, :term:`TCLIBC`,
6702 :term:`SDK_ARCH`,
6703 :term:`IMAGE_BASENAME`, and
Andrew Geisslerc926e172021-05-07 16:11:35 -05006704 :term:`TUNE_PKGARCH` variables::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006705
6706 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6707
Andrew Geisslerf0343792020-11-18 10:42:21 -06006708 :term:`SDK_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006709 Specifies the operating system for which the SDK will be built. The
6710 default value is the value of :term:`BUILD_OS`.
6711
Andrew Geisslerf0343792020-11-18 10:42:21 -06006712 :term:`SDK_OUTPUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006713 The location used by the OpenEmbedded build system when creating SDK
6714 output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
Andrew Geisslerc926e172021-05-07 16:11:35 -05006715 class defines the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006716
6717 SDK_DIR = "${WORKDIR}/sdk"
6718 SDK_OUTPUT = "${SDK_DIR}/image"
6719 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6720
6721 .. note::
6722
Andrew Geissler09036742021-06-25 14:25:14 -05006723 The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006724 :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6725 :term:`SDK_DEPLOY`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006726
Andrew Geisslerf0343792020-11-18 10:42:21 -06006727 :term:`SDK_PACKAGE_ARCHS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006728 Specifies a list of architectures compatible with the SDK machine.
6729 This variable is set automatically and should not normally be
6730 hand-edited. Entries are separated using spaces and listed in order
Andrew Geissler09036742021-06-25 14:25:14 -05006731 of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006732 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6733
Andrew Geisslerf0343792020-11-18 10:42:21 -06006734 :term:`SDK_POSTPROCESS_COMMAND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006735 Specifies a list of functions to call once the OpenEmbedded build
6736 system creates the SDK. You can specify functions separated by
6737 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6738
6739 If you need to pass an SDK path to a command within a function, you
6740 can use ``${SDK_DIR}``, which points to the parent directory used by
6741 the OpenEmbedded build system when creating SDK output. See the
6742 :term:`SDK_DIR` variable for more information.
6743
Andrew Geisslerf0343792020-11-18 10:42:21 -06006744 :term:`SDK_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006745 The toolchain binary prefix used for ``nativesdk`` recipes. The
Andrew Geissler09036742021-06-25 14:25:14 -05006746 OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006747 :term:`TARGET_PREFIX` when building
6748 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6749
Andrew Geisslerf0343792020-11-18 10:42:21 -06006750 :term:`SDK_RECRDEP_TASKS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006751 A list of shared state tasks added to the extensible SDK. By default,
6752 the following tasks are added:
6753
Patrick Williams2194f502022-10-16 14:26:09 -05006754 - :ref:`ref-tasks-populate_lic`
6755 - :ref:`ref-tasks-package_qa`
6756 - :ref:`ref-tasks-populate_sysroot`
6757 - :ref:`ref-tasks-deploy`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006758
6759 Despite the default value of "" for the
Andrew Geissler09036742021-06-25 14:25:14 -05006760 :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006761 to the SDK. To specify tasks beyond these four, you need to use the
Andrew Geissler09036742021-06-25 14:25:14 -05006762 :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006763 tasks that are needed in order to build
6764 :term:`SDK_TARGETS`).
6765
Andrew Geisslerf0343792020-11-18 10:42:21 -06006766 :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006767 Specifies the system, including the architecture and the operating
6768 system, for which the SDK will be built.
6769
6770 The OpenEmbedded build system automatically sets this variable based
6771 on :term:`SDK_ARCH`,
6772 :term:`SDK_VENDOR`, and
Andrew Geissler09036742021-06-25 14:25:14 -05006773 :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006774 variable yourself.
6775
Andrew Geisslerf0343792020-11-18 10:42:21 -06006776 :term:`SDK_TARGET_MANIFEST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006777 The manifest file for the target part of the SDK. This file lists all
6778 the installed packages that make up the target part of the SDK. The
6779 file contains package information on a line-per-package basis as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006780 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006781
6782 packagename packagearch version
6783
6784 The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
Andrew Geisslerc926e172021-05-07 16:11:35 -05006785 defines the manifest file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006786
6787 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6788
6789 The location is derived using the :term:`SDK_DEPLOY` and
6790 :term:`TOOLCHAIN_OUTPUTNAME` variables.
6791
Andrew Geisslerf0343792020-11-18 10:42:21 -06006792 :term:`SDK_TARGETS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006793 A list of targets to install from shared state as part of the
6794 standard or extensible SDK installation. The default value is "${PN}"
6795 (i.e. the image from which the SDK is built).
6796
Andrew Geissler09036742021-06-25 14:25:14 -05006797 The :term:`SDK_TARGETS` variable is an internal variable and typically
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006798 would not be changed.
6799
Andrew Geisslerf0343792020-11-18 10:42:21 -06006800 :term:`SDK_TITLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006801 The title to be printed when running the SDK installer. By default,
6802 this title is based on the :term:`DISTRO_NAME` or
6803 :term:`DISTRO` variable and is set in the
6804 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006805 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006806
6807 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6808
6809 For the default distribution "poky",
Andrew Geissler09036742021-06-25 14:25:14 -05006810 :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006811
6812 For information on how to change this default title, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006813 ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006814 section in the Yocto Project Application Development and the
6815 Extensible Software Development Kit (eSDK) manual.
6816
Andrew Geisslerf0343792020-11-18 10:42:21 -06006817 :term:`SDK_UPDATE_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006818 An optional URL for an update server for the extensible SDK. If set,
6819 the value is used as the default update server when running
6820 ``devtool sdk-update`` within the extensible SDK.
6821
Andrew Geisslerf0343792020-11-18 10:42:21 -06006822 :term:`SDK_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006823 Specifies the name of the SDK vendor.
6824
Andrew Geisslerf0343792020-11-18 10:42:21 -06006825 :term:`SDK_VERSION`
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006826 Specifies the version of the SDK. The Poky distribution configuration file
6827 (``/meta-poky/conf/distro/poky.conf``) sets the default
Andrew Geissler09036742021-06-25 14:25:14 -05006828 :term:`SDK_VERSION` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006829
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006830 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006831
6832 For additional information, see the
6833 :term:`DISTRO_VERSION` and
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05006834 :term:`METADATA_REVISION` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006835
Andrew Geisslerf0343792020-11-18 10:42:21 -06006836 :term:`SDKEXTPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006837 The default installation directory for the Extensible SDK. By
6838 default, this directory is based on the :term:`DISTRO`
6839 variable and is set in the
6840 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
Andrew Geisslerc926e172021-05-07 16:11:35 -05006841 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006842
6843 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6844
6845 For the
Andrew Geissler09036742021-06-25 14:25:14 -05006846 default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006847
6848 For information on how to change this default directory, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06006849 ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006850 section in the Yocto Project Application Development and the
6851 Extensible Software Development Kit (eSDK) manual.
6852
Andrew Geisslerf0343792020-11-18 10:42:21 -06006853 :term:`SDKIMAGE_FEATURES`
Andrew Geissler09036742021-06-25 14:25:14 -05006854 Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
Andrew Geisslerc926e172021-05-07 16:11:35 -05006855 the SDK generated from an image using the following command::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006856
6857 $ bitbake -c populate_sdk imagename
6858
Andrew Geisslerf0343792020-11-18 10:42:21 -06006859 :term:`SDKMACHINE`
Andrew Geissler595f6302022-01-24 19:11:47 +00006860 The machine for which the SDK is built. In other words, the SDK is built
6861 such that it runs on the target you specify with the :term:`SDKMACHINE`
6862 value. The value points to a corresponding ``.conf`` file under
6863 ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6864 ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6865 :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006866
Andrew Geissler595f6302022-01-24 19:11:47 +00006867 The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6868 architecture of the build machine.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006869
6870 .. note::
6871
Andrew Geissler09036742021-06-25 14:25:14 -05006872 You cannot set the :term:`SDKMACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006873 variable in your distribution configuration file. If you do, the
Andrew Geissler595f6302022-01-24 19:11:47 +00006874 configuration will not take effect.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006875
Andrew Geisslerf0343792020-11-18 10:42:21 -06006876 :term:`SDKPATH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006877 Defines the path offered to the user for installation of the SDK that
6878 is generated by the OpenEmbedded build system. The path appears as
6879 the default location for installing the SDK when you run the SDK's
6880 installation script. You can override the offered path when you run
6881 the script.
6882
Andrew Geisslerf0343792020-11-18 10:42:21 -06006883 :term:`SDKTARGETSYSROOT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006884 The full path to the sysroot used for cross-compilation within an SDK
6885 as it will be when installed into the default
6886 :term:`SDKPATH`.
6887
Andrew Geisslerf0343792020-11-18 10:42:21 -06006888 :term:`SECTION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006889 The section in which packages should be categorized. Package
6890 management utilities can make use of this variable.
6891
Andrew Geisslerf0343792020-11-18 10:42:21 -06006892 :term:`SELECTED_OPTIMIZATION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006893 Specifies the optimization flags passed to the C compiler when
6894 building for the target. The flags are passed through the default
6895 value of the :term:`TARGET_CFLAGS` variable.
6896
Andrew Geissler09036742021-06-25 14:25:14 -05006897 The :term:`SELECTED_OPTIMIZATION` variable takes the value of
William A. Kennington IIIac69b482021-06-02 12:28:27 -07006898 :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6899 case the value of :term:`DEBUG_OPTIMIZATION` is used.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006900
Andrew Geisslerf0343792020-11-18 10:42:21 -06006901 :term:`SERIAL_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006902 Defines a serial console (TTY) to enable using
6903 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6904 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006905 separated by a space. You cannot specify more than one TTY device::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006906
6907 SERIAL_CONSOLE = "115200 ttyS0"
6908
6909 .. note::
6910
Andrew Geissler09036742021-06-25 14:25:14 -05006911 The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05006912 :term:`SERIAL_CONSOLES` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006913
Andrew Geisslerf0343792020-11-18 10:42:21 -06006914 :term:`SERIAL_CONSOLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006915 Defines a serial console (TTY) to enable using
6916 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6917 value that specifies the baud rate followed by the TTY device name
Andrew Geisslerc926e172021-05-07 16:11:35 -05006918 separated by a semicolon. Use spaces to separate multiple devices::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006919
6920 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6921
Andrew Geisslerf0343792020-11-18 10:42:21 -06006922 :term:`SERIAL_CONSOLES_CHECK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006923 Specifies serial consoles, which must be listed in
6924 :term:`SERIAL_CONSOLES`, to check against
6925 ``/proc/console`` before enabling them using getty. This variable
6926 allows aliasing in the format: <device>:<alias>. If a device was
6927 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
Andrew Geisslerc926e172021-05-07 16:11:35 -05006928 ``/proc/console``, you would do the following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006929
6930 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6931
6932 This variable is currently only supported with SysVinit (i.e. not
Andrew Geisslerc926e172021-05-07 16:11:35 -05006933 with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6934 ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6935 incompatible with customizations such as the following::
6936
6937 EXTRA_IMAGE_FEATURES += "read-only-rootfs"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006938
Andrew Geissler595f6302022-01-24 19:11:47 +00006939 :term:`SETUPTOOLS_BUILD_ARGS`
6940 When used by recipes that inherit the
6941 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6942 be used to specify additional arguments to be passed to ``setup.py build``
6943 in the ``setuptools3_do_compile()`` task.
6944
6945 :term:`SETUPTOOLS_INSTALL_ARGS`
6946 When used by recipes that inherit the
6947 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6948 be used to specify additional arguments to be passed to ``setup.py install``
6949 in the ``setuptools3_do_install()`` task.
6950
6951 :term:`SETUPTOOLS_SETUP_PATH`
6952 When used by recipes that inherit the
6953 :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6954 be used to specify the directory in which the ``setup.py`` file is
6955 located if it is not at the root of the source tree (as specified by
6956 :term:`S`). For example, in a recipe where the sources are fetched from
6957 a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6958 subdirectory, you would have this::
6959
6960 S = "${WORKDIR}/git"
6961 SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6962
Andrew Geisslerf0343792020-11-18 10:42:21 -06006963 :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006964 A list of recipe dependencies that should not be used to determine
6965 signatures of tasks from one recipe when they depend on tasks from
Andrew Geisslerc926e172021-05-07 16:11:35 -05006966 another recipe. For example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006967
6968 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6969
6970 In the previous example, ``intone`` depends on ``mplayer2``.
6971
6972 You can use the special token ``"*"`` on the left-hand side of the
6973 dependency to match all recipes except the one on the right-hand
Andrew Geisslerc926e172021-05-07 16:11:35 -05006974 side. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006975
6976 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6977
6978 In the previous example, all recipes except ``quilt-native`` ignore
6979 task signatures from the ``quilt-native`` recipe when determining
6980 their task signatures.
6981
6982 Use of this variable is one mechanism to remove dependencies that
6983 affect task signatures and thus force rebuilds when a recipe changes.
6984
6985 .. note::
6986
6987 If you add an inappropriate dependency for a recipe relationship,
6988 the software might break during runtime if the interface of the
6989 second recipe was changed after the first recipe had been built.
6990
Andrew Geisslerf0343792020-11-18 10:42:21 -06006991 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05006992 A list of recipes that are completely stable and will never change.
6993 The ABI for the recipes in the list are presented by output from the
6994 tasks run to build the recipe. Use of this variable is one way to
6995 remove dependencies from one recipe on another that affect task
6996 signatures and thus force rebuilds when the recipe changes.
6997
6998 .. note::
6999
7000 If you add an inappropriate variable to this list, the software
7001 might break at runtime if the interface of the recipe was changed
7002 after the other had been built.
7003
Andrew Geisslerf0343792020-11-18 10:42:21 -06007004 :term:`SITEINFO_BITS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007005 Specifies the number of bits for the target system CPU. The value
7006 should be either "32" or "64".
7007
Andrew Geisslerf0343792020-11-18 10:42:21 -06007008 :term:`SITEINFO_ENDIANNESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007009 Specifies the endian byte order of the target system. The value
7010 should be either "le" for little-endian or "be" for big-endian.
7011
Andrew Geisslerf0343792020-11-18 10:42:21 -06007012 :term:`SKIP_FILEDEPS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007013 Enables removal of all files from the "Provides" section of an RPM
7014 package. Removal of these files is required for packages containing
7015 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
7016
7017 To enable file removal, set the variable to "1" in your
7018 ``conf/local.conf`` configuration file in your:
7019 :term:`Build Directory`.
7020 ::
7021
7022 SKIP_FILEDEPS = "1"
7023
Andrew Geissler9aee5002022-03-30 16:27:02 +00007024 :term:`SKIP_RECIPE`
7025 Used to prevent the OpenEmbedded build system from building a given
7026 recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7027 and provide a reason, which will be reported when attempting to
7028 build the recipe.
7029
7030 To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7031 variable in your ``local.conf`` file or distribution configuration.
7032 Here is an example which prevents ``myrecipe`` from being built::
7033
7034 SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7035
Andrew Geisslerf0343792020-11-18 10:42:21 -06007036 :term:`SOC_FAMILY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007037 Groups together machines based upon the same family of SOC (System On
7038 Chip). You typically set this variable in a common ``.inc`` file that
7039 you include in the configuration files of all the machines.
7040
7041 .. note::
7042
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007043 You must include ``conf/machine/include/soc-family.inc`` for this
7044 variable to appear in :term:`MACHINEOVERRIDES`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007045
Andrew Geisslerf0343792020-11-18 10:42:21 -06007046 :term:`SOLIBS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007047 Defines the suffix for shared libraries used on the target platform.
7048 By default, this suffix is ".so.*" for all Linux-based systems and is
7049 defined in the ``meta/conf/bitbake.conf`` configuration file.
7050
7051 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007052 ``FILES:${PN}``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007053
Andrew Geisslerf0343792020-11-18 10:42:21 -06007054 :term:`SOLIBSDEV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007055 Defines the suffix for the development symbolic link (symlink) for
7056 shared libraries on the target platform. By default, this suffix is
7057 ".so" for Linux-based systems and is defined in the
7058 ``meta/conf/bitbake.conf`` configuration file.
7059
7060 You will see this variable referenced in the default values of
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007061 ``FILES:${PN}-dev``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007062
Andrew Geisslereff27472021-10-29 15:35:00 -05007063 :term:`SOURCE_DATE_EPOCH`
7064 This defines a date expressed in number of seconds since
7065 the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7066 multiple build systems to force a timestamp in built binaries.
7067 Many upstream projects already support this variable.
7068
7069 You will find more details in the `official specifications
7070 <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7071
7072 A value for each recipe is computed from the sources by
7073 :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7074
7075 If a recipe wishes to override the default behavior, it should set its
7076 own :term:`SOURCE_DATE_EPOCH` value::
7077
7078 SOURCE_DATE_EPOCH = "1613559011"
7079
Andrew Geisslerf0343792020-11-18 10:42:21 -06007080 :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007081 When you are fetching files to create a mirror of sources (i.e.
Andrew Geissler09036742021-06-25 14:25:14 -05007082 creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007083 your ``local.conf`` configuration file ensures the source for all
7084 recipes are fetched regardless of whether or not a recipe is
7085 compatible with the configuration. A recipe is considered
7086 incompatible with the currently configured machine when either or
7087 both the :term:`COMPATIBLE_MACHINE`
7088 variable and :term:`COMPATIBLE_HOST` variables
7089 specify compatibility with a machine other than that of the current
7090 machine or host.
7091
7092 .. note::
7093
Andrew Geissler09036742021-06-25 14:25:14 -05007094 Do not set the :term:`SOURCE_MIRROR_FETCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007095 variable unless you are creating a source mirror. In other words,
7096 do not set the variable during a normal build.
7097
Andrew Geisslerf0343792020-11-18 10:42:21 -06007098 :term:`SOURCE_MIRROR_URL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007099 Defines your own :term:`PREMIRRORS` from which to
7100 first fetch source before attempting to fetch from the upstream
7101 specified in :term:`SRC_URI`.
7102
7103 To use this variable, you must globally inherit the
7104 :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
Andrew Geisslerc926e172021-05-07 16:11:35 -05007105 the URL to your mirrors. Here is the general syntax::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007106
7107 INHERIT += "own-mirrors"
7108 SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7109
7110 .. note::
7111
Andrew Geissler09036742021-06-25 14:25:14 -05007112 You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007113
Andrew Geisslerf0343792020-11-18 10:42:21 -06007114 :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007115 Maps commonly used license names to their SPDX counterparts found in
Andrew Geissler09036742021-06-25 14:25:14 -05007116 ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007117 mappings, see the ``meta/conf/licenses.conf`` file.
7118
7119 For additional information, see the :term:`LICENSE`
7120 variable.
7121
Andrew Geisslerf0343792020-11-18 10:42:21 -06007122 :term:`SPECIAL_PKGSUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007123 A list of prefixes for :term:`PN` used by the OpenEmbedded
7124 build system to create variants of recipes or packages. The list
7125 specifies the prefixes to strip off during certain circumstances such
7126 as the generation of the :term:`BPN` variable.
7127
Andrew Geisslerf0343792020-11-18 10:42:21 -06007128 :term:`SPL_BINARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007129 The file type for the Secondary Program Loader (SPL). Some devices
7130 use an SPL from which to boot (e.g. the BeagleBone development
7131 board). For such cases, you can declare the file type of the SPL
7132 binary in the ``u-boot.inc`` include file, which is used in the
7133 U-Boot recipe.
7134
7135 The SPL file type is set to "null" by default in the ``u-boot.inc``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007136 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007137
7138 # Some versions of u-boot build an SPL (Second Program Loader) image that
7139 # should be packaged along with the u-boot binary as well as placed in the
7140 # deploy directory. For those versions they can set the following variables
7141 # to allow packaging the SPL.
7142 SPL_BINARY ?= ""
7143 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7144 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7145 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7146
Andrew Geissler09036742021-06-25 14:25:14 -05007147 The :term:`SPL_BINARY` variable helps form
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007148 various ``SPL_*`` variables used by the OpenEmbedded build system.
7149
7150 See the BeagleBone machine configuration example in the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007151 ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007152 section in the Yocto Project Board Support Package Developer's Guide
7153 for additional information.
7154
Andrew Geisslerf0343792020-11-18 10:42:21 -06007155 :term:`SRC_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007156
Andrew Geissler595f6302022-01-24 19:11:47 +00007157 See the BitBake manual for the initial description for this variable:
7158 :term:`bitbake:SRC_URI`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007159
Andrew Geissler595f6302022-01-24 19:11:47 +00007160 The following features are added by OpenEmbedded and the Yocto Project.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007161
Andrew Geissler595f6302022-01-24 19:11:47 +00007162 There are standard and recipe-specific options. Here are standard ones:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007163
Andrew Geissler615f2f12022-07-15 14:00:58 -05007164 - ``apply`` --- whether to apply the patch or not. The default
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007165 action is to apply the patch.
7166
Andrew Geissler615f2f12022-07-15 14:00:58 -05007167 - ``striplevel`` --- which striplevel to use when applying the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007168 patch. The default level is 1.
7169
Andrew Geissler615f2f12022-07-15 14:00:58 -05007170 - ``patchdir`` --- specifies the directory in which the patch should
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007171 be applied. The default is ``${``\ :term:`S`\ ``}``.
7172
7173 Here are options specific to recipes building code from a revision
7174 control system:
7175
Andrew Geissler615f2f12022-07-15 14:00:58 -05007176 - ``mindate`` --- apply the patch only if
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007177 :term:`SRCDATE` is equal to or greater than
7178 ``mindate``.
7179
Andrew Geissler615f2f12022-07-15 14:00:58 -05007180 - ``maxdate`` --- apply the patch only if :term:`SRCDATE` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007181 than ``maxdate``.
7182
Andrew Geissler615f2f12022-07-15 14:00:58 -05007183 - ``minrev`` --- apply the patch only if :term:`SRCREV` is equal to or
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007184 greater than ``minrev``.
7185
Andrew Geissler615f2f12022-07-15 14:00:58 -05007186 - ``maxrev`` --- apply the patch only if :term:`SRCREV` is not later
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007187 than ``maxrev``.
7188
Andrew Geissler615f2f12022-07-15 14:00:58 -05007189 - ``rev`` --- apply the patch only if :term:`SRCREV` is equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007190 ``rev``.
7191
Andrew Geissler615f2f12022-07-15 14:00:58 -05007192 - ``notrev`` --- apply the patch only if :term:`SRCREV` is not equal to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007193 ``rev``.
7194
Andrew Geissler595f6302022-01-24 19:11:47 +00007195 .. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007196
Andrew Geissler595f6302022-01-24 19:11:47 +00007197 If you want the build system to pick up files specified through
7198 a :term:`SRC_URI` statement from your append file, you need to be
7199 sure to extend the :term:`FILESPATH` variable by also using the
7200 :term:`FILESEXTRAPATHS` variable from within your append file.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007201
Andrew Geisslerf0343792020-11-18 10:42:21 -06007202 :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007203 By default, the OpenEmbedded build system automatically detects
Andrew Geissler5f350902021-07-23 13:09:54 -04007204 whether :term:`SRC_URI` contains files that are machine-specific. If so,
Andrew Geissler09036742021-06-25 14:25:14 -05007205 the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007206 variable to "0" disables this behavior.
7207
Andrew Geisslerf0343792020-11-18 10:42:21 -06007208 :term:`SRCDATE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007209 The date of the source code used to build the package. This variable
7210 applies only if the source was fetched from a Source Code Manager
7211 (SCM).
7212
Andrew Geisslerf0343792020-11-18 10:42:21 -06007213 :term:`SRCPV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007214 Returns the version string of the current package. This string is
7215 used to help define the value of :term:`PV`.
7216
Andrew Geissler09036742021-06-25 14:25:14 -05007217 The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007218 configuration file in the :term:`Source Directory` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007219 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007220
7221 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7222
Andrew Geissler09036742021-06-25 14:25:14 -05007223 Recipes that need to define :term:`PV` do so with the help of the
7224 :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007225 located in ``meta/recipes-connectivity`` in the Source Directory
Andrew Geissler09036742021-06-25 14:25:14 -05007226 defines :term:`PV` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007227
7228 PV = "0.12-git${SRCPV}"
7229
Andrew Geisslerf0343792020-11-18 10:42:21 -06007230 :term:`SRCREV`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007231 The revision of the source code used to build the package. This
7232 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7233 that if you want to build a fixed revision and you want to avoid
7234 performing a query on the remote repository every time BitBake parses
Andrew Geissler09036742021-06-25 14:25:14 -05007235 your recipe, you should specify a :term:`SRCREV` that is a full revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007236 identifier and not just a tag.
7237
7238 .. note::
7239
7240 For information on limitations when inheriting the latest revision
Andrew Geissler09036742021-06-25 14:25:14 -05007241 of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007242 description and the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007243 ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007244 section, which is in the Yocto Project Development Tasks Manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007245
Andrew Geissler09036742021-06-25 14:25:14 -05007246 :term:`SRCTREECOVEREDTASKS`
7247 A list of tasks that are typically not relevant (and therefore skipped)
7248 when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7249 class. The default value as set in that class file is the set of tasks
7250 that are rarely needed when using external source::
7251
7252 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7253
7254 The notable exception is when processing external kernel source as
7255 defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7256 class file (formatted for aesthetics)::
7257
7258 SRCTREECOVEREDTASKS += "\
7259 do_validate_branches \
7260 do_kernel_configcheck \
7261 do_kernel_checkout \
7262 do_fetch \
7263 do_unpack \
7264 do_patch \
7265 "
7266
7267 See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7268 variables for more information.
7269
Andrew Geisslerf0343792020-11-18 10:42:21 -06007270 :term:`SSTATE_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007271 The directory for the shared state cache.
7272
Andrew Geissler615f2f12022-07-15 14:00:58 -05007273 :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7274 This variable allows to specify indirect dependencies to exclude
7275 from sysroots, for example to avoid the situations when a dependency on
7276 any ``-native`` recipe will pull in all dependencies of that recipe
7277 in the recipe sysroot. This behaviour might not always be wanted,
7278 for example when that ``-native`` recipe depends on build tools
7279 that are not relevant for the current recipe.
7280
7281 This way, irrelevant dependencies are ignored, which could have
7282 prevented the reuse of prebuilt artifacts stored in the Shared
7283 State Cache.
7284
7285 ``SSTATE_EXCLUDEDEPS_SYSROOT`` is evaluated as two regular
7286 expressions of recipe and dependency to ignore. An example
7287 is the rule in :oe_git:`meta/conf/layer.conf </meta/conf/layer.conf>`::
7288
7289 # Nothing needs to depend on libc-initial
7290 # base-passwd/shadow-sysroot don't need their dependencies
7291 SSTATE_EXCLUDEDEPS_SYSROOT += "\
7292 .*->.*-initial.* \
7293 .*(base-passwd|shadow-sysroot)->.* \
7294 "
7295
7296 The ``->`` substring represents the dependency between
7297 the two regular expressions.
7298
Andrew Geisslerf0343792020-11-18 10:42:21 -06007299 :term:`SSTATE_MIRROR_ALLOW_NETWORK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007300 If set to "1", allows fetches from mirrors that are specified in
7301 :term:`SSTATE_MIRRORS` to work even when
Andrew Geissler09036742021-06-25 14:25:14 -05007302 fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7303 "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7304 you have set :term:`SSTATE_MIRRORS` to point to an internal server for
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007305 your shared state cache, but you want to disable any other fetching
7306 from the network.
7307
Andrew Geisslerf0343792020-11-18 10:42:21 -06007308 :term:`SSTATE_MIRRORS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007309 Configures the OpenEmbedded build system to search other mirror
7310 locations for prebuilt cache data objects before building out the
7311 data. This variable works like fetcher :term:`MIRRORS`
7312 and :term:`PREMIRRORS` and points to the cache
7313 locations to check for the shared state (sstate) objects.
7314
7315 You can specify a filesystem directory or a remote URL such as HTTP
7316 or FTP. The locations you specify need to contain the shared state
7317 cache (sstate-cache) results from previous builds. The sstate-cache
7318 you point to can also be from builds on other machines.
7319
7320 When pointing to sstate build artifacts on another machine that uses
7321 a different GCC version for native builds, you must configure
Andrew Geissler09036742021-06-25 14:25:14 -05007322 :term:`SSTATE_MIRRORS` with a regular expression that maps local search
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007323 paths to server paths. The paths need to take into account
7324 :term:`NATIVELSBSTRING` set by the
7325 :ref:`uninative <ref-classes-uninative>` class. For example, the
7326 following maps the local search path ``universal-4.9`` to the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007327 server-provided path server_url_sstate_path::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007328
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007329 SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007330
7331 If a mirror uses the same structure as
7332 :term:`SSTATE_DIR`, you need to add "PATH" at the
7333 end as shown in the examples below. The build system substitutes the
7334 correct path within the directory structure.
7335 ::
7336
7337 SSTATE_MIRRORS ?= "\
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007338 file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007339 file://.* file:///some-local-dir/sstate/PATH"
7340
Andrew Geisslerf0343792020-11-18 10:42:21 -06007341 :term:`SSTATE_SCAN_FILES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007342 Controls the list of files the OpenEmbedded build system scans for
7343 hardcoded installation paths. The variable uses a space-separated
7344 list of filenames (not paths) with standard wildcard characters
7345 allowed.
7346
7347 During a build, the OpenEmbedded build system creates a shared state
7348 (sstate) object during the first stage of preparing the sysroots.
7349 That object is scanned for hardcoded paths for original installation
7350 locations. The list of files that are scanned for paths is controlled
Andrew Geissler09036742021-06-25 14:25:14 -05007351 by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7352 they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007353 than the variable being comprehensively set. The
7354 :ref:`sstate <ref-classes-sstate>` class specifies the default list
7355 of files.
7356
7357 For details on the process, see the
7358 :ref:`staging <ref-classes-staging>` class.
7359
Andrew Geisslerf0343792020-11-18 10:42:21 -06007360 :term:`STAGING_BASE_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007361 Specifies the path to the ``/lib`` subdirectory of the sysroot
7362 directory for the build host.
7363
Andrew Geisslerf0343792020-11-18 10:42:21 -06007364 :term:`STAGING_BASELIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007365 Specifies the path to the ``/lib`` subdirectory of the sysroot
7366 directory for the target for which the current recipe is being built
7367 (:term:`STAGING_DIR_HOST`).
7368
Andrew Geisslerf0343792020-11-18 10:42:21 -06007369 :term:`STAGING_BINDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007370 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7371 directory for the target for which the current recipe is being built
7372 (:term:`STAGING_DIR_HOST`).
7373
Andrew Geisslerf0343792020-11-18 10:42:21 -06007374 :term:`STAGING_BINDIR_CROSS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007375 Specifies the path to the directory containing binary configuration
7376 scripts. These scripts provide configuration information for other
7377 software that wants to make use of libraries or include files
7378 provided by the software associated with the script.
7379
7380 .. note::
7381
7382 This style of build configuration has been largely replaced by
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007383 ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7384 library to which you are linking, it is recommended you use
7385 ``pkg-config`` instead of a provided configuration script.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007386
Andrew Geisslerf0343792020-11-18 10:42:21 -06007387 :term:`STAGING_BINDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007388 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7389 directory for the build host.
7390
Andrew Geisslerf0343792020-11-18 10:42:21 -06007391 :term:`STAGING_DATADIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007392 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7393 directory for the target for which the current recipe is being built
7394 (:term:`STAGING_DIR_HOST`).
7395
Andrew Geisslerf0343792020-11-18 10:42:21 -06007396 :term:`STAGING_DATADIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007397 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7398 directory for the build host.
7399
Andrew Geisslerf0343792020-11-18 10:42:21 -06007400 :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007401 Helps construct the ``recipe-sysroots`` directory, which is used
7402 during packaging.
7403
7404 For information on how staging for recipe-specific sysroots occurs,
7405 see the :ref:`ref-tasks-populate_sysroot`
Andrew Geissler09209ee2020-12-13 08:44:15 -06007406 task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007407 section in the Yocto Project Development Tasks Manual, the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007408 ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007409 section in the Yocto Project Overview and Concepts Manual, and the
7410 :term:`SYSROOT_DIRS` variable.
7411
7412 .. note::
7413
Andrew Geissler09036742021-06-25 14:25:14 -05007414 Recipes should never write files directly under the :term:`STAGING_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007415 directory because the OpenEmbedded build system manages the
7416 directory automatically. Instead, files should be installed to
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007417 ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007418 task and then the OpenEmbedded build system will stage a subset of
7419 those files into the sysroot.
7420
Andrew Geisslerf0343792020-11-18 10:42:21 -06007421 :term:`STAGING_DIR_HOST`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007422 Specifies the path to the sysroot directory for the system on which
7423 the component is built to run (the system that hosts the component).
7424 For most recipes, this sysroot is the one in which that recipe's
7425 :ref:`ref-tasks-populate_sysroot` task copies
7426 files. Exceptions include ``-native`` recipes, where the
Patrick Williams2194f502022-10-16 14:26:09 -05007427 :ref:`ref-tasks-populate_sysroot` task instead uses
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007428 :term:`STAGING_DIR_NATIVE`. Depending on
Andrew Geissler09036742021-06-25 14:25:14 -05007429 the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007430 have the following values:
7431
7432 - For recipes building for the target machine, the value is
7433 "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7434
7435 - For native recipes building for the build host, the value is empty
7436 given the assumption that when building for the build host, the
7437 build host's own directories should be used.
7438
7439 .. note::
7440
7441 ``-native`` recipes are not installed into host paths like such
7442 as ``/usr``. Rather, these recipes are installed into
Andrew Geissler5f350902021-07-23 13:09:54 -04007443 :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007444 standard build environment variables such as
7445 :term:`CPPFLAGS` and
7446 :term:`CFLAGS` are set up so that both host paths
Andrew Geissler09036742021-06-25 14:25:14 -05007447 and :term:`STAGING_DIR_NATIVE` are searched for libraries and
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007448 headers using, for example, GCC's ``-isystem`` option.
7449
7450 Thus, the emphasis is that the ``STAGING_DIR*`` variables
7451 should be viewed as input variables by tasks such as
7452 :ref:`ref-tasks-configure`,
7453 :ref:`ref-tasks-compile`, and
7454 :ref:`ref-tasks-install`. Having the real system
Andrew Geissler09036742021-06-25 14:25:14 -05007455 root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007456 for ``-native`` recipes, as they make use of host headers and
7457 libraries.
7458
Andrew Geisslerf0343792020-11-18 10:42:21 -06007459 :term:`STAGING_DIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007460 Specifies the path to the sysroot directory used when building
7461 components that run on the build host itself.
7462
Andrew Geisslerf0343792020-11-18 10:42:21 -06007463 :term:`STAGING_DIR_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007464 Specifies the path to the sysroot used for the system for which the
7465 component generates code. For components that do not generate code,
Andrew Geissler09036742021-06-25 14:25:14 -05007466 which is the majority, :term:`STAGING_DIR_TARGET` is set to match
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007467 :term:`STAGING_DIR_HOST`.
7468
7469 Some recipes build binaries that can run on the target system but
7470 those binaries in turn generate code for another different system
7471 (e.g. cross-canadian recipes). Using terminology from GNU, the
7472 primary system is referred to as the "HOST" and the secondary, or
7473 different, system is referred to as the "TARGET". Thus, the binaries
7474 run on the "HOST" system and generate binaries for the "TARGET"
Andrew Geissler09036742021-06-25 14:25:14 -05007475 system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7476 for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007477 sysroot used for the "TARGET" system.
7478
Andrew Geisslerf0343792020-11-18 10:42:21 -06007479 :term:`STAGING_ETCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007480 Specifies the path to the ``/etc`` subdirectory of the sysroot
7481 directory for the build host.
7482
Andrew Geisslerf0343792020-11-18 10:42:21 -06007483 :term:`STAGING_EXECPREFIXDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007484 Specifies the path to the ``/usr`` subdirectory of the sysroot
7485 directory for the target for which the current recipe is being built
7486 (:term:`STAGING_DIR_HOST`).
7487
Andrew Geisslerf0343792020-11-18 10:42:21 -06007488 :term:`STAGING_INCDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007489 Specifies the path to the ``/usr/include`` subdirectory of the
7490 sysroot directory for the target for which the current recipe being
7491 built (:term:`STAGING_DIR_HOST`).
7492
Andrew Geisslerf0343792020-11-18 10:42:21 -06007493 :term:`STAGING_INCDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007494 Specifies the path to the ``/usr/include`` subdirectory of the
7495 sysroot directory for the build host.
7496
Andrew Geisslerf0343792020-11-18 10:42:21 -06007497 :term:`STAGING_KERNEL_BUILDDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007498 Points to the directory containing the kernel build artifacts.
7499 Recipes building software that needs to access kernel build artifacts
7500 (e.g. ``systemtap-uprobes``) can look in the directory specified with
Andrew Geissler09036742021-06-25 14:25:14 -05007501 the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007502 after the kernel has been built.
7503
Andrew Geisslerf0343792020-11-18 10:42:21 -06007504 :term:`STAGING_KERNEL_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007505 The directory with kernel headers that are required to build
7506 out-of-tree modules.
7507
Andrew Geisslerf0343792020-11-18 10:42:21 -06007508 :term:`STAGING_LIBDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007509 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7510 directory for the target for which the current recipe is being built
7511 (:term:`STAGING_DIR_HOST`).
7512
Andrew Geisslerf0343792020-11-18 10:42:21 -06007513 :term:`STAGING_LIBDIR_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007514 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7515 directory for the build host.
7516
Andrew Geisslerf0343792020-11-18 10:42:21 -06007517 :term:`STAMP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007518 Specifies the base path used to create recipe stamp files. The path
7519 to an actual stamp file is constructed by evaluating this string and
7520 then appending additional information. Currently, the default
Andrew Geissler09036742021-06-25 14:25:14 -05007521 assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05007522 file is::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007523
7524 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7525
7526 For information on how BitBake uses stamp files to determine if a
7527 task should be rerun, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06007528 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007529 section in the Yocto Project Overview and Concepts Manual.
7530
7531 See :term:`STAMPS_DIR`,
7532 :term:`MULTIMACH_TARGET_SYS`,
7533 :term:`PN`, :term:`EXTENDPE`,
7534 :term:`PV`, and :term:`PR` for related variable
7535 information.
7536
Andrew Geisslerf0343792020-11-18 10:42:21 -06007537 :term:`STAMPS_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007538 Specifies the base directory in which the OpenEmbedded build system
7539 places stamps. The default directory is ``${TMPDIR}/stamps``.
7540
Andrew Geisslerf0343792020-11-18 10:42:21 -06007541 :term:`STRIP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007542 The minimal command and arguments to run ``strip``, which is used to
7543 strip symbols.
7544
Andrew Geisslerf0343792020-11-18 10:42:21 -06007545 :term:`SUMMARY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007546 The short (72 characters or less) summary of the binary package for
7547 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
Andrew Geissler09036742021-06-25 14:25:14 -05007548 :term:`SUMMARY` is used to define the
7549 :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007550 not set in the recipe.
7551
Andrew Geisslerf0343792020-11-18 10:42:21 -06007552 :term:`SVNDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007553 The directory in which files checked out of a Subversion system are
7554 stored.
7555
Andrew Geisslerf0343792020-11-18 10:42:21 -06007556 :term:`SYSLINUX_DEFAULT_CONSOLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007557 Specifies the kernel boot default console. If you want to use a
7558 console other than the default, set this variable in your recipe as
Andrew Geisslerc926e172021-05-07 16:11:35 -05007559 follows where "X" is the console number you want to use::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007560
7561 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7562
7563 The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7564 this variable to null but then checks for a value later.
7565
Andrew Geisslerf0343792020-11-18 10:42:21 -06007566 :term:`SYSLINUX_OPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007567 Lists additional options to add to the syslinux file. You need to set
7568 this variable in your recipe. If you want to list multiple options,
7569 separate the options with a semicolon character (``;``).
7570
7571 The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7572 to create a set of options.
7573
Andrew Geisslerf0343792020-11-18 10:42:21 -06007574 :term:`SYSLINUX_SERIAL`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007575 Specifies the alternate serial port or turns it off. To turn off
7576 serial, set this variable to an empty string in your recipe. The
7577 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007578 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007579
7580 SYSLINUX_SERIAL ?= "0 115200"
7581
7582 The class checks for and uses the variable as needed.
7583
Andrew Geisslerf0343792020-11-18 10:42:21 -06007584 :term:`SYSLINUX_SERIAL_TTY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007585 Specifies the alternate console=tty... kernel boot argument. The
7586 variable's default value is set in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007587 :ref:`syslinux <ref-classes-syslinux>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007588
7589 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7590
7591 The class checks for and uses the variable as needed.
7592
Andrew Geisslerf0343792020-11-18 10:42:21 -06007593 :term:`SYSLINUX_SPLASH`
7594 An ``.LSS`` file used as the background for the VGA boot menu when
7595 you use the boot menu. You need to set this variable in your recipe.
7596
7597 The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7598 variable and if found, the OpenEmbedded build system installs the
7599 splash screen.
7600
7601 :term:`SYSROOT_DESTDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007602 Points to the temporary directory under the work directory (default
7603 "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7604 where the files populated into the sysroot are assembled during the
7605 :ref:`ref-tasks-populate_sysroot` task.
7606
Andrew Geisslerf0343792020-11-18 10:42:21 -06007607 :term:`SYSROOT_DIRS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007608 Directories that are staged into the sysroot by the
7609 :ref:`ref-tasks-populate_sysroot` task. By
Andrew Geisslerc926e172021-05-07 16:11:35 -05007610 default, the following directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007611
7612 SYSROOT_DIRS = " \
7613 ${includedir} \
7614 ${libdir} \
7615 ${base_libdir} \
7616 ${nonarch_base_libdir} \
7617 ${datadir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007618 /sysroot-only \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007619 "
7620
Andrew Geissler9aee5002022-03-30 16:27:02 +00007621 :term:`SYSROOT_DIRS_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007622 Directories that are not staged into the sysroot by the
7623 :ref:`ref-tasks-populate_sysroot` task. You
7624 can use this variable to exclude certain subdirectories of
7625 directories listed in :term:`SYSROOT_DIRS` from
Andrew Geisslerc926e172021-05-07 16:11:35 -05007626 staging. By default, the following directories are not staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007627
Andrew Geissler9aee5002022-03-30 16:27:02 +00007628 SYSROOT_DIRS_IGNORE = " \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007629 ${mandir} \
7630 ${docdir} \
7631 ${infodir} \
Andrew Geissler5199d832021-09-24 16:47:35 -05007632 ${datadir}/X11/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007633 ${datadir}/applications \
Andrew Geissler5199d832021-09-24 16:47:35 -05007634 ${datadir}/bash-completion \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007635 ${datadir}/fonts \
Andrew Geissler5199d832021-09-24 16:47:35 -05007636 ${datadir}/gtk-doc/html \
7637 ${datadir}/installed-tests \
7638 ${datadir}/locale \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007639 ${datadir}/pixmaps \
Andrew Geissler5199d832021-09-24 16:47:35 -05007640 ${datadir}/terminfo \
7641 ${libdir}/${BPN}/ptest \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007642 "
7643
Andrew Geisslerf0343792020-11-18 10:42:21 -06007644 :term:`SYSROOT_DIRS_NATIVE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007645 Extra directories staged into the sysroot by the
7646 :ref:`ref-tasks-populate_sysroot` task for
7647 ``-native`` recipes, in addition to those specified in
7648 :term:`SYSROOT_DIRS`. By default, the following
Andrew Geisslerc926e172021-05-07 16:11:35 -05007649 extra directories are staged::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007650
7651 SYSROOT_DIRS_NATIVE = " \
7652 ${bindir} \
7653 ${sbindir} \
7654 ${base_bindir} \
7655 ${base_sbindir} \
7656 ${libexecdir} \
7657 ${sysconfdir} \
7658 ${localstatedir} \
7659 "
7660
7661 .. note::
7662
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007663 Programs built by ``-native`` recipes run directly from the sysroot
7664 (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7665 containing program executables and supporting files need to be staged.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007666
Andrew Geisslerf0343792020-11-18 10:42:21 -06007667 :term:`SYSROOT_PREPROCESS_FUNCS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007668 A list of functions to execute after files are staged into the
7669 sysroot. These functions are usually used to apply additional
7670 processing on the staged files, or to stage additional files.
7671
Andrew Geisslerf0343792020-11-18 10:42:21 -06007672 :term:`SYSTEMD_AUTO_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007673 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7674 this variable specifies whether the specified service in
7675 :term:`SYSTEMD_SERVICE` should start
7676 automatically or not. By default, the service is enabled to
7677 automatically start at boot time. The default setting is in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05007678 :ref:`systemd <ref-classes-systemd>` class as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007679
7680 SYSTEMD_AUTO_ENABLE ??= "enable"
7681
7682 You can disable the service by setting the variable to "disable".
7683
Andrew Geisslerf0343792020-11-18 10:42:21 -06007684 :term:`SYSTEMD_BOOT_CFG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007685 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007686 "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007687 configuration file that should be used. By default, the
7688 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007689 :term:`SYSTEMD_BOOT_CFG` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007690
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05007691 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007692
7693 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007694 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007695
Andrew Geisslerf0343792020-11-18 10:42:21 -06007696 :term:`SYSTEMD_BOOT_ENTRIES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007697 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007698 "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007699 list of entry files (``*.conf``) to install that contain one boot
7700 entry per file. By default, the
7701 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007702 :term:`SYSTEMD_BOOT_ENTRIES` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007703
7704 SYSTEMD_BOOT_ENTRIES ?= ""
7705
7706 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007707 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007708
Andrew Geisslerf0343792020-11-18 10:42:21 -06007709 :term:`SYSTEMD_BOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007710 When :term:`EFI_PROVIDER` is set to
Andrew Geissler09036742021-06-25 14:25:14 -05007711 "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007712 boot menu timeout in seconds. By default, the
7713 :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007714 :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007715
7716 SYSTEMD_BOOT_TIMEOUT ?= "10"
7717
7718 For information on Systemd-boot, see the `Systemd-boot
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007719 documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007720
Andrew Geissler615f2f12022-07-15 14:00:58 -05007721 :term:`SYSTEMD_DEFAULT_TARGET`
7722
7723 This variable allows to set the default unit that systemd starts at bootup.
7724 Usually, this is either ``multi-user.target`` or ``graphical.target``.
7725 This works by creating a ``default.target`` symbolic link to the chosen systemd
7726 target file.
7727
7728 See `systemd's documentation
7729 <https://www.freedesktop.org/software/systemd/man/systemd.special.html>`__
7730 for details.
7731
7732 For example, this variable is used in the
7733 `core-image-minimal-xfce.bb
7734 <https://git.openembedded.org/meta-openembedded/tree/meta-xfce/recipes-core/images/core-image-minimal-xfce.bb>`__
7735 recipe::
7736
7737 SYSTEMD_DEFAULT_TARGET = "graphical.target"
7738
Andrew Geisslerf0343792020-11-18 10:42:21 -06007739 :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007740 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7741 this variable locates the systemd unit files when they are not found
Andrew Geissler09036742021-06-25 14:25:14 -05007742 in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007743 variable is set such that the systemd unit files are assumed to
Andrew Geisslerc926e172021-05-07 16:11:35 -05007744 reside in the recipes main package::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007745
7746 SYSTEMD_PACKAGES ?= "${PN}"
7747
7748 If these unit files are not in this recipe's main package, you need
Andrew Geissler09036742021-06-25 14:25:14 -05007749 to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007750 the build system can find the systemd unit files.
7751
Andrew Geisslerf0343792020-11-18 10:42:21 -06007752 :term:`SYSTEMD_SERVICE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007753 When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7754 this variable specifies the systemd service name for a package.
7755
Andrew Geissler615f2f12022-07-15 14:00:58 -05007756 Multiple services can be specified, each one separated by a space.
7757
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007758 When you specify this file in your recipe, use a package name
7759 override to indicate the package to which the value applies. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05007760 an example from the connman recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007761
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007762 SYSTEMD_SERVICE:${PN} = "connman.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007763
Andrew Geissler615f2f12022-07-15 14:00:58 -05007764 The package overrides that can be specified are directly related to the value of
7765 term:`SYSTEMD_PACKAGES`. Overrides not included in term:`SYSTEMD_PACKAGES`
7766 will be silently ignored.
7767
Andrew Geisslerf0343792020-11-18 10:42:21 -06007768 :term:`SYSVINIT_ENABLED_GETTYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007769 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06007770 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007771 specifies a space-separated list of the virtual terminals that should
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007772 run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007773 (allowing login), assuming :term:`USE_VT` is not set to
7774 "0".
7775
Andrew Geissler09036742021-06-25 14:25:14 -05007776 The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007777 run a getty on the first virtual terminal).
7778
Andrew Geisslerf0343792020-11-18 10:42:21 -06007779 :term:`T`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007780 This variable points to a directory were BitBake places temporary
7781 files, which consist mostly of task logs and scripts, when building a
Andrew Geisslerc926e172021-05-07 16:11:35 -05007782 particular recipe. The variable is typically set as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007783
7784 T = "${WORKDIR}/temp"
7785
7786 The :term:`WORKDIR` is the directory into which
7787 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7788 file sets this variable.
7789
Andrew Geissler09036742021-06-25 14:25:14 -05007790 The :term:`T` variable is not to be confused with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007791 :term:`TMPDIR` variable, which points to the root of
7792 the directory tree where BitBake places the output of an entire
7793 build.
7794
Andrew Geisslerf0343792020-11-18 10:42:21 -06007795 :term:`TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007796 The target machine's architecture. The OpenEmbedded build system
7797 supports many architectures. Here is an example list of architectures
7798 supported. This list is by no means complete as the architecture is
7799 configurable:
7800
7801 - arm
7802 - i586
7803 - x86_64
7804 - powerpc
7805 - powerpc64
7806 - mips
7807 - mipsel
7808
7809 For additional information on machine architectures, see the
7810 :term:`TUNE_ARCH` variable.
7811
Andrew Geisslerf0343792020-11-18 10:42:21 -06007812 :term:`TARGET_AS_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007813 Specifies architecture-specific assembler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007814 system. :term:`TARGET_AS_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007815 :term:`TUNE_ASARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007816 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007817
7818 TARGET_AS_ARCH = "${TUNE_ASARGS}"
7819
Andrew Geisslerf0343792020-11-18 10:42:21 -06007820 :term:`TARGET_CC_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007821 Specifies architecture-specific C compiler flags for the target
Andrew Geissler09036742021-06-25 14:25:14 -05007822 system. :term:`TARGET_CC_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007823 :term:`TUNE_CCARGS` by default.
7824
7825 .. note::
7826
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007827 It is a common workaround to append :term:`LDFLAGS` to
Andrew Geissler09036742021-06-25 14:25:14 -05007828 :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7829 would not otherwise respect the exported :term:`LDFLAGS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007830
Andrew Geisslerf0343792020-11-18 10:42:21 -06007831 :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007832 This is a specific kernel compiler flag for a CPU or Application
7833 Binary Interface (ABI) tune. The flag is used rarely and only for
7834 cases where a userspace :term:`TUNE_CCARGS` is not
Andrew Geissler09036742021-06-25 14:25:14 -05007835 compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007836 variable allows the kernel (and associated modules) to use a
7837 different configuration. See the
7838 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7839 :term:`Source Directory` for an example.
7840
Andrew Geisslerf0343792020-11-18 10:42:21 -06007841 :term:`TARGET_CFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007842 Specifies the flags to pass to the C compiler when building for the
7843 target. When building in the target context,
7844 :term:`CFLAGS` is set to the value of this variable by
7845 default.
7846
Andrew Geissler09036742021-06-25 14:25:14 -05007847 Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7848 variable in the environment to the :term:`TARGET_CFLAGS` value so that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007849 executables built using the SDK also have the flags applied.
7850
Andrew Geisslerf0343792020-11-18 10:42:21 -06007851 :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007852 Specifies the flags to pass to the C pre-processor (i.e. to both the
7853 C and the C++ compilers) when building for the target. When building
7854 in the target context, :term:`CPPFLAGS` is set to the
7855 value of this variable by default.
7856
7857 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007858 :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007859 value so that executables built using the SDK also have the flags
7860 applied.
7861
Andrew Geisslerf0343792020-11-18 10:42:21 -06007862 :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007863 Specifies the flags to pass to the C++ compiler when building for the
7864 target. When building in the target context,
7865 :term:`CXXFLAGS` is set to the value of this variable
7866 by default.
7867
7868 Additionally, the SDK's environment setup script sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007869 :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007870 value so that executables built using the SDK also have the flags
7871 applied.
7872
Andrew Geisslerf0343792020-11-18 10:42:21 -06007873 :term:`TARGET_FPU`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007874 Specifies the method for handling FPU code. For FPU-less targets,
7875 which include most ARM CPUs, the variable must be set to "soft". If
7876 not, the kernel emulation gets used, which results in a performance
7877 penalty.
7878
Andrew Geisslerf0343792020-11-18 10:42:21 -06007879 :term:`TARGET_LD_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007880 Specifies architecture-specific linker flags for the target system.
Andrew Geissler09036742021-06-25 14:25:14 -05007881 :term:`TARGET_LD_ARCH` is initialized from
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007882 :term:`TUNE_LDARGS` by default in the BitBake
Andrew Geisslerc926e172021-05-07 16:11:35 -05007883 configuration file (``meta/conf/bitbake.conf``)::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007884
7885 TARGET_LD_ARCH = "${TUNE_LDARGS}"
7886
Andrew Geisslerf0343792020-11-18 10:42:21 -06007887 :term:`TARGET_LDFLAGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007888 Specifies the flags to pass to the linker when building for the
7889 target. When building in the target context,
7890 :term:`LDFLAGS` is set to the value of this variable
7891 by default.
7892
7893 Additionally, the SDK's environment setup script sets the
7894 :term:`LDFLAGS` variable in the environment to the
Andrew Geissler09036742021-06-25 14:25:14 -05007895 :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007896 have the flags applied.
7897
Andrew Geisslerf0343792020-11-18 10:42:21 -06007898 :term:`TARGET_OS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007899 Specifies the target's operating system. The variable can be set to
7900 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007901 for musl libc. For ARM/EABI targets, the possible values are
7902 "linux-gnueabi" and "linux-musleabi".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007903
Andrew Geisslerf0343792020-11-18 10:42:21 -06007904 :term:`TARGET_PREFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007905 Specifies the prefix used for the toolchain binary target tools.
7906
7907 Depending on the type of recipe and the build target,
Andrew Geissler5f350902021-07-23 13:09:54 -04007908 :term:`TARGET_PREFIX` is set as follows:
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007909
7910 - For recipes building for the target machine, the value is
7911 "${:term:`TARGET_SYS`}-".
7912
7913 - For native recipes, the build system sets the variable to the
Andrew Geissler5f350902021-07-23 13:09:54 -04007914 value of :term:`BUILD_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007915
7916 - For native SDK recipes (``nativesdk``), the build system sets the
Andrew Geissler09036742021-06-25 14:25:14 -05007917 variable to the value of :term:`SDK_PREFIX`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007918
Andrew Geisslerf0343792020-11-18 10:42:21 -06007919 :term:`TARGET_SYS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007920 Specifies the system, including the architecture and the operating
7921 system, for which the build is occurring in the context of the
7922 current recipe.
7923
7924 The OpenEmbedded build system automatically sets this variable based
7925 on :term:`TARGET_ARCH`,
7926 :term:`TARGET_VENDOR`, and
7927 :term:`TARGET_OS` variables.
7928
7929 .. note::
7930
Andrew Geissler09036742021-06-25 14:25:14 -05007931 You do not need to set the :term:`TARGET_SYS` variable yourself.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007932
7933 Consider these two examples:
7934
7935 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7936 value is "i686-linux".
7937
7938 - Given a recipe being built for a little-endian, MIPS target
7939 running Linux, the value might be "mipsel-linux".
7940
Andrew Geisslerf0343792020-11-18 10:42:21 -06007941 :term:`TARGET_VENDOR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007942 Specifies the name of the target vendor.
7943
Andrew Geisslerf0343792020-11-18 10:42:21 -06007944 :term:`TCLIBC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007945 Specifies the GNU standard C library (``libc``) variant to use during
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007946 the build process.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007947
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007948 You can select "glibc", "musl", "newlib", or "baremetal".
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007949
Andrew Geisslerf0343792020-11-18 10:42:21 -06007950 :term:`TCLIBCAPPEND`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007951 Specifies a suffix to be appended onto the
7952 :term:`TMPDIR` value. The suffix identifies the
7953 ``libc`` variant for building. When you are building for multiple
7954 variants with the same :term:`Build Directory`, this
7955 mechanism ensures that output for different ``libc`` variants is kept
7956 separate to avoid potential conflicts.
7957
7958 In the ``defaultsetup.conf`` file, the default value of
Andrew Geissler5f350902021-07-23 13:09:54 -04007959 :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007960 which normally only support one ``libc`` variant, set
Andrew Geissler09036742021-06-25 14:25:14 -05007961 :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007962 in no suffix being applied.
7963
Andrew Geisslerf0343792020-11-18 10:42:21 -06007964 :term:`TCMODE`
Andrew Geissler09036742021-06-25 14:25:14 -05007965 Specifies the toolchain selector. :term:`TCMODE` controls the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007966 characteristics of the generated packages and images by telling the
7967 OpenEmbedded build system which toolchain profile to use. By default,
7968 the OpenEmbedded build system builds its own internal toolchain. The
7969 variable's default value is "default", which uses that internal
7970 toolchain.
7971
7972 .. note::
7973
Andrew Geissler09036742021-06-25 14:25:14 -05007974 If :term:`TCMODE` is set to a value other than "default", then it is your
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007975 responsibility to ensure that the toolchain is compatible with the
7976 default toolchain. Using older or newer versions of these
7977 components might cause build problems. See the Release Notes for
7978 the Yocto Project release for the specific components with which
7979 the toolchain must be compatible. To access the Release Notes, go
Andrew Geissler4c19ea12020-10-27 13:52:24 -05007980 to the :yocto_home:`Downloads </software-overview/downloads>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007981 page on the Yocto Project website and click on the "RELEASE
7982 INFORMATION" link for the appropriate release.
7983
Andrew Geissler09036742021-06-25 14:25:14 -05007984 The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007985 which controls the variant of the GNU standard C library (``libc``)
7986 used during the build process: ``glibc`` or ``musl``.
7987
7988 With additional layers, it is possible to use a pre-compiled external
7989 toolchain. One example is the Sourcery G++ Toolchain. The support for
7990 this toolchain resides in the separate Mentor Graphics
7991 ``meta-sourcery`` layer at
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007992 https://github.com/MentorEmbedded/meta-sourcery/.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007993
7994 The layer's ``README`` file contains information on how to use the
7995 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7996 be sure to add the layer to your ``bblayers.conf`` file in front of
7997 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7998 in your ``local.conf`` file to the location in which you installed
7999 the toolchain.
8000
8001 The fundamentals used for this example apply to any external
8002 toolchain. You can use ``meta-sourcery`` as a template for adding
8003 support for other external toolchains.
8004
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008005 :term:`TC_CXX_RUNTIME`
8006 Specifies the C/C++ STL and runtime variant to use during
8007 the build process. Default value is 'gnu'
8008
8009 You can select "gnu", "llvm", or "android".
8010
Andrew Geisslerd5838332022-05-27 11:33:10 -05008011 :term:`TEMPLATECONF`
8012 Specifies the directory used by the build system to find templates
8013 from which to build the ``bblayers.conf`` and ``local.conf`` files.
8014 Use this variable if you wish to customize such files, and the default
8015 BitBake targets shown when sourcing the ``oe-init-build-env`` script.
8016
8017 For details, see the
8018 :ref:`dev-manual/common-tasks:creating a custom template configuration directory`
8019 section in the Yocto Project Development Tasks manual.
8020
8021 .. note::
8022
8023 You must set this variable in the external environment in order
8024 for it to work.
8025
Andrew Geisslerf0343792020-11-18 10:42:21 -06008026 :term:`TEST_EXPORT_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008027 The location the OpenEmbedded build system uses to export tests when
8028 the :term:`TEST_EXPORT_ONLY` variable is set
8029 to "1".
8030
Andrew Geissler09036742021-06-25 14:25:14 -05008031 The :term:`TEST_EXPORT_DIR` variable defaults to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008032 ``"${TMPDIR}/testimage/${PN}"``.
8033
Andrew Geisslerf0343792020-11-18 10:42:21 -06008034 :term:`TEST_EXPORT_ONLY`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008035 Specifies to export the tests only. Set this variable to "1" if you
8036 do not want to run the tests but you want them to be exported in a
8037 manner that you to run them outside of the build system.
8038
Andrew Geisslerf0343792020-11-18 10:42:21 -06008039 :term:`TEST_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008040 Holds the SSH log and the boot log for QEMU machines. The
Andrew Geissler09036742021-06-25 14:25:14 -05008041 :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008042
8043 .. note::
8044
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008045 Actual test results reside in the task log (``log.do_testimage``),
8046 which is in the ``${WORKDIR}/temp/`` directory.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008047
Andrew Geisslerf0343792020-11-18 10:42:21 -06008048 :term:`TEST_POWERCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008049 For automated hardware testing, specifies the command to use to
8050 control the power of the target machine under test. Typically, this
8051 command would point to a script that performs the appropriate action
8052 (e.g. interacting with a web-enabled power strip). The specified
8053 command should expect to receive as the last argument "off", "on" or
8054 "cycle" specifying to power off, on, or cycle (power off and then
8055 power on) the device, respectively.
8056
Andrew Geisslerf0343792020-11-18 10:42:21 -06008057 :term:`TEST_POWERCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008058 For automated hardware testing, specifies additional arguments to
8059 pass through to the command specified in
8060 :term:`TEST_POWERCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008061 :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008062 wish, for example, to separate the machine-specific and
8063 non-machine-specific parts of the arguments.
8064
Andrew Geisslerf0343792020-11-18 10:42:21 -06008065 :term:`TEST_QEMUBOOT_TIMEOUT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008066 The time in seconds allowed for an image to boot before automated
8067 runtime tests begin to run against an image. The default timeout
8068 period to allow the boot process to reach the login prompt is 500
8069 seconds. You can specify a different value in the ``local.conf``
8070 file.
8071
8072 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008073 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008074 section in the Yocto Project Development Tasks Manual.
8075
Andrew Geisslerf0343792020-11-18 10:42:21 -06008076 :term:`TEST_SERIALCONTROL_CMD`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008077 For automated hardware testing, specifies the command to use to
8078 connect to the serial console of the target machine under test. This
8079 command simply needs to connect to the serial console and forward
8080 that connection to standard input and output as any normal terminal
8081 program does.
8082
8083 For example, to use the Picocom terminal program on serial device
Andrew Geisslerc926e172021-05-07 16:11:35 -05008084 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008085
8086 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8087
Andrew Geisslerf0343792020-11-18 10:42:21 -06008088 :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008089 For automated hardware testing, specifies additional arguments to
8090 pass through to the command specified in
8091 :term:`TEST_SERIALCONTROL_CMD`. Setting
Andrew Geissler09036742021-06-25 14:25:14 -05008092 :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008093 wish, for example, to separate the machine-specific and
8094 non-machine-specific parts of the command.
8095
Andrew Geisslerf0343792020-11-18 10:42:21 -06008096 :term:`TEST_SERVER_IP`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008097 The IP address of the build machine (host machine). This IP address
8098 is usually automatically detected. However, if detection fails, this
8099 variable needs to be set to the IP address of the build machine (i.e.
8100 where the build is taking place).
8101
8102 .. note::
8103
Andrew Geissler09036742021-06-25 14:25:14 -05008104 The :term:`TEST_SERVER_IP` variable is only used for a small number of
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008105 tests such as the "dnf" test suite, which needs to download packages
8106 from ``WORKDIR/oe-rootfs-repo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008107
Andrew Geisslerf0343792020-11-18 10:42:21 -06008108 :term:`TEST_SUITES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008109 An ordered list of tests (modules) to run against an image when
8110 performing automated runtime testing.
8111
8112 The OpenEmbedded build system provides a core set of tests that can
8113 be used against images.
8114
8115 .. note::
8116
8117 Currently, there is only support for running these tests under
8118 QEMU.
8119
8120 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
Andrew Geissler09036742021-06-25 14:25:14 -05008121 your own tests to the list of tests by appending :term:`TEST_SUITES` as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008122 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008123
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008124 TEST_SUITES:append = " mytest"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008125
8126 Alternatively, you can
8127 provide the "auto" option to have all applicable tests run against
8128 the image.
8129 ::
8130
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008131 TEST_SUITES:append = " auto"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008132
8133 Using this option causes the
8134 build system to automatically run tests that are applicable to the
8135 image. Tests that are not applicable are skipped.
8136
8137 The order in which tests are run is important. Tests that depend on
8138 another test must appear later in the list than the test on which
8139 they depend. For example, if you append the list of tests with two
8140 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
Andrew Geisslerc926e172021-05-07 16:11:35 -05008141 ``test_A``, then you must order the tests as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008142
8143 TEST_SUITES = "test_A test_B"
8144
8145 For more information on testing images, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008146 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008147 section in the Yocto Project Development Tasks Manual.
8148
Andrew Geisslerf0343792020-11-18 10:42:21 -06008149 :term:`TEST_TARGET`
8150 Specifies the target controller to use when running tests against a
Andrew Geisslerc926e172021-05-07 16:11:35 -05008151 test image. The default controller to use is "qemu"::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008152
8153 TEST_TARGET = "qemu"
8154
8155 A target controller is a class that defines how an image gets
8156 deployed on a target and how a target is started. A layer can extend
8157 the controllers by adding a module in the layer's
8158 ``/lib/oeqa/controllers`` directory and by inheriting the
8159 ``BaseTarget`` class, which is an abstract class that cannot be used
Andrew Geissler09036742021-06-25 14:25:14 -05008160 as a value of :term:`TEST_TARGET`.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008161
Andrew Geissler5f350902021-07-23 13:09:54 -04008162 You can provide the following arguments with :term:`TEST_TARGET`:
Andrew Geisslerf0343792020-11-18 10:42:21 -06008163
8164 - *"qemu":* Boots a QEMU image and runs the tests. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008165 ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
Andrew Geisslerf0343792020-11-18 10:42:21 -06008166 in the Yocto Project Development Tasks Manual for more
8167 information.
8168
8169 - *"simpleremote":* Runs the tests on target hardware that is
8170 already up and running. The hardware can be on the network or it
8171 can be a device running an image on QEMU. You must also set
8172 :term:`TEST_TARGET_IP` when you use
8173 "simpleremote".
8174
8175 .. note::
8176
8177 This argument is defined in
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008178 ``meta/lib/oeqa/controllers/simpleremote.py``.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008179
8180 For information on running tests on hardware, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008181 ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008182 section in the Yocto Project Development Tasks Manual.
8183
8184 :term:`TEST_TARGET_IP`
Andrew Geissler09036742021-06-25 14:25:14 -05008185 The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
Andrew Geisslerf0343792020-11-18 10:42:21 -06008186 variable has no effect when :term:`TEST_TARGET` is
8187 set to "qemu".
8188
8189 When you specify the IP address, you can also include a port. Here is
Andrew Geisslerc926e172021-05-07 16:11:35 -05008190 an example::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008191
8192 TEST_TARGET_IP = "192.168.1.4:2201"
8193
8194 Specifying a port is
8195 useful when SSH is started on a non-standard port or in cases when
8196 your hardware under test is behind a firewall or network that is not
8197 directly accessible from your host and you need to do port address
8198 translation.
8199
8200 :term:`TESTIMAGE_AUTO`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008201 Automatically runs the series of automated tests for images when an
Andrew Geissler09036742021-06-25 14:25:14 -05008202 image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008203 any image that successfully builds to automatically boot under QEMU.
8204 Using the variable also adds in dependencies so that any SDK for
8205 which testing is requested is automatically built first.
8206
8207 These tests are written in Python making use of the ``unittest``
8208 module, and the majority of them run commands on the target system
8209 over ``ssh``. You can set this variable to "1" in your ``local.conf``
8210 file in the :term:`Build Directory` to have the
8211 OpenEmbedded build system automatically run these tests after an
8212 image successfully builds:
8213
8214 TESTIMAGE_AUTO = "1"
8215
8216 For more information
8217 on enabling, running, and writing these tests, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008218 ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008219 section in the Yocto Project Development Tasks Manual and the
Andrew Geissler595f6302022-01-24 19:11:47 +00008220 ":ref:`ref-classes-testimage*`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008221
Andrew Geisslerf0343792020-11-18 10:42:21 -06008222 :term:`THISDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008223 The directory in which the file BitBake is currently parsing is
8224 located. Do not manually set this variable.
8225
Andrew Geisslerf0343792020-11-18 10:42:21 -06008226 :term:`TIME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008227 The time the build was started. Times appear using the hour, minute,
8228 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8229 seconds past 1400 hours).
8230
Andrew Geisslerf0343792020-11-18 10:42:21 -06008231 :term:`TMPDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008232 This variable is the base directory the OpenEmbedded build system
8233 uses for all build output and intermediate files (other than the
Andrew Geissler09036742021-06-25 14:25:14 -05008234 shared state cache). By default, the :term:`TMPDIR` variable points to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008235 ``tmp`` within the :term:`Build Directory`.
8236
8237 If you want to establish this directory in a location other than the
8238 default, you can uncomment and edit the following statement in the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008239 ``conf/local.conf`` file in the :term:`Source Directory`::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008240
8241 #TMPDIR = "${TOPDIR}/tmp"
8242
Andrew Geissler09036742021-06-25 14:25:14 -05008243 An example use for this scenario is to set :term:`TMPDIR` to a local disk,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008244 which does not use NFS, while having the Build Directory use NFS.
8245
Andrew Geissler09036742021-06-25 14:25:14 -05008246 The filesystem used by :term:`TMPDIR` must have standard filesystem
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008247 semantics (i.e. mixed-case files are unique, POSIX file locking, and
8248 persistent inodes). Due to various issues with NFS and bugs in some
8249 implementations, NFS does not meet this minimum requirement.
Andrew Geissler09036742021-06-25 14:25:14 -05008250 Consequently, :term:`TMPDIR` cannot be on NFS.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008251
Andrew Geisslerf0343792020-11-18 10:42:21 -06008252 :term:`TOOLCHAIN_HOST_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008253 This variable lists packages the OpenEmbedded build system uses when
8254 building an SDK, which contains a cross-development environment. The
8255 packages specified by this variable are part of the toolchain set
8256 that runs on the :term:`SDKMACHINE`, and each
8257 package should usually have the prefix ``nativesdk-``. For example,
Andrew Geisslerc926e172021-05-07 16:11:35 -05008258 consider the following command when building an SDK::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008259
8260 $ bitbake -c populate_sdk imagename
8261
8262 In this case, a default list of packages is
8263 set in this variable, but you can add additional packages to the
8264 list. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008265 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008266 in the Yocto Project Application Development and the Extensible
8267 Software Development Kit (eSDK) manual for more information.
8268
8269 For background information on cross-development toolchains in the
8270 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008271 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008272 section in the Yocto Project Overview and Concepts Manual. For
8273 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008274 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008275
Andrew Geisslereff27472021-10-29 15:35:00 -05008276 Note that this variable applies to building an SDK, not an eSDK,
8277 in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8278 used instead.
8279
8280 :term:`TOOLCHAIN_HOST_TASK_ESDK`
8281 This variable allows to extend what is installed in the host
8282 portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8283 applying to SDKs.
8284
Andrew Geisslerf0343792020-11-18 10:42:21 -06008285 :term:`TOOLCHAIN_OUTPUTNAME`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008286 This variable defines the name used for the toolchain output. The
8287 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Andrew Geissler09036742021-06-25 14:25:14 -05008288 the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008289
8290 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8291
8292 See
8293 the :term:`SDK_NAME` and
8294 :term:`SDK_VERSION` variables for additional
8295 information.
8296
Andrew Geisslerf0343792020-11-18 10:42:21 -06008297 :term:`TOOLCHAIN_TARGET_TASK`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008298 This variable lists packages the OpenEmbedded build system uses when
8299 it creates the target part of an SDK (i.e. the part built for the
8300 target hardware), which includes libraries and headers. Use this
8301 variable to add individual packages to the part of the SDK that runs
8302 on the target. See the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008303 ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008304 in the Yocto Project Application Development and the Extensible
8305 Software Development Kit (eSDK) manual for more information.
8306
8307 For background information on cross-development toolchains in the
8308 Yocto Project development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008309 ":ref:`sdk-manual/intro:the cross-development toolchain`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008310 section in the Yocto Project Overview and Concepts Manual. For
8311 information on setting up a cross-development environment, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008312 :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008313
Andrew Geisslerf0343792020-11-18 10:42:21 -06008314 :term:`TRANSLATED_TARGET_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008315 A sanitized version of :term:`TARGET_ARCH`. This
8316 variable is used where the architecture is needed in a value where
8317 underscores are not allowed, for example within package filenames. In
8318 this case, dash characters replace any underscore characters used in
Andrew Geissler09036742021-06-25 14:25:14 -05008319 :term:`TARGET_ARCH`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008320
8321 Do not edit this variable.
8322
Andrew Geisslerf0343792020-11-18 10:42:21 -06008323 :term:`TUNE_ARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008324 The GNU canonical architecture for a specific architecture (i.e.
8325 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8326 this value to setup configuration.
8327
Andrew Geissler09036742021-06-25 14:25:14 -05008328 :term:`TUNE_ARCH` definitions are specific to a given architecture. The
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008329 definitions can be a single static definition, or can be dynamically
8330 adjusted. You can see details for a given CPU family by looking at
8331 the architecture's ``README`` file. For example, the
8332 ``meta/conf/machine/include/mips/README`` file in the
8333 :term:`Source Directory` provides information for
Andrew Geissler09036742021-06-25 14:25:14 -05008334 :term:`TUNE_ARCH` specific to the ``mips`` architecture.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008335
Andrew Geissler09036742021-06-25 14:25:14 -05008336 :term:`TUNE_ARCH` is tied closely to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008337 :term:`TARGET_ARCH`, which defines the target
8338 machine's architecture. The BitBake configuration file
Andrew Geissler09036742021-06-25 14:25:14 -05008339 (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008340
8341 TARGET_ARCH = "${TUNE_ARCH}"
8342
8343 The following list, which is by no means complete since architectures
8344 are configurable, shows supported machine architectures:
8345
8346 - arm
8347 - i586
8348 - x86_64
8349 - powerpc
8350 - powerpc64
8351 - mips
8352 - mipsel
8353
Andrew Geisslerf0343792020-11-18 10:42:21 -06008354 :term:`TUNE_ASARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008355 Specifies architecture-specific assembler flags for the target
8356 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008357 :term:`TUNE_ASARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008358 typically under ``meta/conf/machine/include/`` and are influenced
8359 through :term:`TUNE_FEATURES`. For example, the
8360 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008361 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008362
8363 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8364
8365 .. note::
8366
8367 Board Support Packages (BSPs) select the tune. The selected tune,
8368 in turn, affects the tune variables themselves (i.e. the tune can
8369 supply its own set of flags).
8370
Andrew Geisslerf0343792020-11-18 10:42:21 -06008371 :term:`TUNE_CCARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008372 Specifies architecture-specific C compiler flags for the target
8373 system. The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008374 :term:`TUNE_CCARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008375 typically under ``meta/conf/machine/include/`` and are influenced
8376 through :term:`TUNE_FEATURES`.
8377
8378 .. note::
8379
8380 Board Support Packages (BSPs) select the tune. The selected tune,
8381 in turn, affects the tune variables themselves (i.e. the tune can
8382 supply its own set of flags).
8383
Andrew Geisslerf0343792020-11-18 10:42:21 -06008384 :term:`TUNE_FEATURES`
8385 Features used to "tune" a compiler for optimal use given a specific
8386 processor. The features are defined within the tune files and allow
8387 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8388 the features.
8389
8390 The OpenEmbedded build system verifies the features to be sure they
8391 are not conflicting and that they are supported.
8392
8393 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
Andrew Geissler09036742021-06-25 14:25:14 -05008394 :term:`TUNE_FEATURES` as follows::
Andrew Geisslerf0343792020-11-18 10:42:21 -06008395
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008396 TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008397
8398 See the :term:`DEFAULTTUNE` variable for more information.
8399
8400 :term:`TUNE_LDARGS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008401 Specifies architecture-specific linker flags for the target system.
8402 The set of flags is based on the selected tune features.
Andrew Geissler09036742021-06-25 14:25:14 -05008403 :term:`TUNE_LDARGS` is set using the tune include files, which are
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008404 typically under ``meta/conf/machine/include/`` and are influenced
8405 through :term:`TUNE_FEATURES`. For example, the
8406 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
Andrew Geisslerc926e172021-05-07 16:11:35 -05008407 for the x86 architecture as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008408
8409 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8410
8411 .. note::
8412
8413 Board Support Packages (BSPs) select the tune. The selected tune,
8414 in turn, affects the tune variables themselves (i.e. the tune can
8415 supply its own set of flags).
8416
Andrew Geisslerf0343792020-11-18 10:42:21 -06008417 :term:`TUNE_PKGARCH`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008418 The package architecture understood by the packaging system to define
8419 the architecture, ABI, and tuning of output packages. The specific
Andrew Geisslerc926e172021-05-07 16:11:35 -05008420 tune is defined using the "_tune" override as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008421
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008422 TUNE_PKGARCH:tune-tune = "tune"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008423
8424 These tune-specific package architectures are defined in the machine
8425 include files. Here is an example of the "core2-32" tuning as used in
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008426 the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008427
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008428 TUNE_PKGARCH:tune-core2-32 = "core2-32"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008429
Andrew Geisslerf0343792020-11-18 10:42:21 -06008430 :term:`TUNECONFLICTS[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008431 Specifies CPU or Application Binary Interface (ABI) tuning features
8432 that conflict with feature.
8433
8434 Known tuning conflicts are specified in the machine include files in
8435 the :term:`Source Directory`. Here is an example from
8436 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8437 that lists the "o32" and "n64" features as conflicting with the "n32"
Andrew Geisslerc926e172021-05-07 16:11:35 -05008438 feature::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008439
8440 TUNECONFLICTS[n32] = "o32 n64"
8441
Andrew Geisslerf0343792020-11-18 10:42:21 -06008442 :term:`TUNEVALID[feature]`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008443 Specifies a valid CPU or Application Binary Interface (ABI) tuning
8444 feature. The specified feature is stored as a flag. Valid features
8445 are specified in the machine include files (e.g.
8446 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
Andrew Geisslerc926e172021-05-07 16:11:35 -05008447 from that file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008448
8449 TUNEVALID[bigendian] = "Enable big-endian mode."
8450
8451 See the machine include files in the :term:`Source Directory`
8452 for these features.
8453
Andrew Geisslerf0343792020-11-18 10:42:21 -06008454 :term:`UBOOT_CONFIG`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008455 Configures the :term:`UBOOT_MACHINE` and can
8456 also define :term:`IMAGE_FSTYPES` for individual
8457 cases.
8458
8459 Following is an example from the ``meta-fsl-arm`` layer. ::
8460
8461 UBOOT_CONFIG ??= "sd"
8462 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8463 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8464 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8465 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8466
8467 In this example, "sd" is selected as the configuration of the possible four for the
Andrew Geissler09036742021-06-25 14:25:14 -05008468 :term:`UBOOT_MACHINE`. The "sd" configuration defines
8469 "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
Andrew Geissler5f350902021-07-23 13:09:54 -04008470 "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008471
Andrew Geissler09036742021-06-25 14:25:14 -05008472 For more information on how the :term:`UBOOT_CONFIG` is handled, see the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008473 :ref:`uboot-config <ref-classes-uboot-config>`
8474 class.
8475
Andrew Geisslerf0343792020-11-18 10:42:21 -06008476 :term:`UBOOT_DTB_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008477 Specifies the load address for the dtb image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008478 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008479 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8480 the load address to be used in
8481 creating the dtb sections of Image Tree Source for the FIT image.
8482
Andrew Geisslerf0343792020-11-18 10:42:21 -06008483 :term:`UBOOT_DTBO_LOADADDRESS`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008484 Specifies the load address for the dtbo image used by U-Boot. During FIT
Andrew Geissler09036742021-06-25 14:25:14 -05008485 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008486 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8487 creating the dtbo sections of Image Tree Source for the FIT image.
8488
Andrew Geisslerf0343792020-11-18 10:42:21 -06008489 :term:`UBOOT_ENTRYPOINT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008490 Specifies the entry point for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008491 creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008492 command-line parameter to the ``uboot-mkimage`` utility.
8493
Andrew Geisslerf0343792020-11-18 10:42:21 -06008494 :term:`UBOOT_LOADADDRESS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008495 Specifies the load address for the U-Boot image. During U-Boot image
Andrew Geissler09036742021-06-25 14:25:14 -05008496 creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008497 command-line parameter to the ``uboot-mkimage`` utility.
8498
Andrew Geisslerf0343792020-11-18 10:42:21 -06008499 :term:`UBOOT_LOCALVERSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008500 Appends a string to the name of the local version of the U-Boot
8501 image. For example, assuming the version of the U-Boot image built
8502 was "2013.10", the full version string reported by U-Boot would be
Andrew Geisslerc926e172021-05-07 16:11:35 -05008503 "2013.10-yocto" given the following statement::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008504
8505 UBOOT_LOCALVERSION = "-yocto"
8506
Andrew Geisslerf0343792020-11-18 10:42:21 -06008507 :term:`UBOOT_MACHINE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008508 Specifies the value passed on the ``make`` command line when building
8509 a U-Boot image. The value indicates the target platform
8510 configuration. You typically set this variable from the machine
8511 configuration file (i.e. ``conf/machine/machine_name.conf``).
8512
8513 Please see the "Selection of Processor Architecture and Board Type"
8514 section in the U-Boot README for valid values for this variable.
8515
Andrew Geisslerf0343792020-11-18 10:42:21 -06008516 :term:`UBOOT_MAKE_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008517 Specifies the target called in the ``Makefile``. The default target
8518 is "all".
8519
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008520 :term:`UBOOT_MKIMAGE`
8521 Specifies the name of the mkimage command as used by the
8522 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8523 the FIT image. This can be used to substitute an alternative command, wrapper
8524 script or function if desired. The default is "uboot-mkimage".
8525
Andrew Geisslerf0343792020-11-18 10:42:21 -06008526 :term:`UBOOT_MKIMAGE_DTCOPTS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008527 Options for the device tree compiler passed to mkimage '-D'
8528 feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
Andrew Geissler5f350902021-07-23 13:09:54 -04008529 If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008530 pass the ``-D`` option to mkimage.
8531
8532 :term:`UBOOT_MKIMAGE_SIGN`
8533 Specifies the name of the mkimage command as used by the
8534 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8535 the FIT image after it has been assembled (if enabled). This can be used
8536 to substitute an alternative command, wrapper script or function if
8537 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8538
8539 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8540 Optionally specifies additional arguments for the
8541 :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8542 mkimage command when signing the FIT image.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008543
Andrew Geisslerf0343792020-11-18 10:42:21 -06008544 :term:`UBOOT_RD_ENTRYPOINT`
Andrew Geissler4873add2020-11-02 18:44:49 -06008545 Specifies the entrypoint for the RAM disk image.
8546 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008547 :term:`UBOOT_RD_ENTRYPOINT` variable is used
Andrew Geissler4873add2020-11-02 18:44:49 -06008548 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8549 entrypoint to be used in creating the Image Tree Source for
8550 the FIT image.
8551
Andrew Geisslerf0343792020-11-18 10:42:21 -06008552 :term:`UBOOT_RD_LOADADDRESS`
8553 Specifies the load address for the RAM disk image.
8554 During FIT image creation, the
Andrew Geissler09036742021-06-25 14:25:14 -05008555 :term:`UBOOT_RD_LOADADDRESS` variable is used
Andrew Geisslerf0343792020-11-18 10:42:21 -06008556 in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8557 load address to be used in creating the Image Tree Source for
8558 the FIT image.
8559
8560 :term:`UBOOT_SIGN_ENABLE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008561 Enable signing of FIT image. The default value is "0".
8562
Andrew Geisslerf0343792020-11-18 10:42:21 -06008563 :term:`UBOOT_SIGN_KEYDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008564 Location of the directory containing the RSA key and
8565 certificate used for signing FIT image.
8566
Andrew Geisslerf0343792020-11-18 10:42:21 -06008567 :term:`UBOOT_SIGN_KEYNAME`
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008568 The name of keys used for signing U-Boot FIT image stored in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008569 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8570 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8571 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8572
Andrew Geisslerf0343792020-11-18 10:42:21 -06008573 :term:`UBOOT_SUFFIX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008574 Points to the generated U-Boot extension. For example, ``u-boot.sb``
8575 has a ``.sb`` extension.
8576
8577 The default U-Boot extension is ``.bin``
8578
Andrew Geisslerf0343792020-11-18 10:42:21 -06008579 :term:`UBOOT_TARGET`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008580 Specifies the target used for building U-Boot. The target is passed
8581 directly as part of the "make" command (e.g. SPL and AIS). If you do
8582 not specifically set this variable, the OpenEmbedded build process
8583 passes and uses "all" for the target during the U-Boot building
8584 process.
8585
Andrew Geissler9aee5002022-03-30 16:27:02 +00008586 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008587 Specifies a list of options that, if reported by the configure script
8588 as being invalid, should not generate a warning during the
8589 :ref:`ref-tasks-configure` task. Normally, invalid
8590 configure options are simply not passed to the configure script (e.g.
8591 should be removed from :term:`EXTRA_OECONF` or
8592 :term:`PACKAGECONFIG_CONFARGS`).
William A. Kennington IIIac69b482021-06-02 12:28:27 -07008593 However, there are common options that are passed to all
8594 configure scripts at a class level, but might not be valid for some
8595 configure scripts. Therefore warnings about these options are useless.
Andrew Geissler9aee5002022-03-30 16:27:02 +00008596 For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008597
8598 The configure arguments check that uses
Andrew Geissler9aee5002022-03-30 16:27:02 +00008599 :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008600 :ref:`insane <ref-classes-insane>` class and is only enabled if the
8601 recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8602
Andrew Geisslerf0343792020-11-18 10:42:21 -06008603 :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008604 For recipes inheriting the
Andrew Geissler09036742021-06-25 14:25:14 -05008605 :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008606 specifies the package that contains the initscript that is enabled.
8607
8608 The default value is "${PN}". Given that almost all recipes that
8609 install initscripts package them in the main package for the recipe,
8610 you rarely need to set this variable in individual recipes.
8611
Andrew Geissler5199d832021-09-24 16:47:35 -05008612 :term:`UPSTREAM_CHECK_COMMITS`
8613 You can perform a per-recipe check for what the latest upstream
8614 source code version is by calling ``devtool latest-version recipe``. If
8615 the recipe source code is provided from Git repositories, but
8616 releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8617 to ``1`` in the recipe, and the OpenEmbedded build system
8618 will compare the latest commit with the one currently specified
8619 by the recipe (:term:`SRCREV`).
8620 ::
8621
8622 UPSTREAM_CHECK_COMMITS = "1"
8623
Andrew Geisslerf0343792020-11-18 10:42:21 -06008624 :term:`UPSTREAM_CHECK_GITTAGREGEX`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008625 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008626 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008627 the recipe source code is provided from Git repositories, the
8628 OpenEmbedded build system determines the latest upstream version by
8629 picking the latest tag from the list of all repository tags.
8630
Andrew Geissler09036742021-06-25 14:25:14 -05008631 You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008632 regular expression to filter only the relevant tags should the
8633 default filter not work correctly.
8634 ::
8635
8636 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8637
Andrew Geisslerf0343792020-11-18 10:42:21 -06008638 :term:`UPSTREAM_CHECK_REGEX`
Andrew Geissler09036742021-06-25 14:25:14 -05008639 Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008640 regular expression instead of the default one when the package
8641 checking system is parsing the page found using
8642 :term:`UPSTREAM_CHECK_URI`.
8643 ::
8644
8645 UPSTREAM_CHECK_REGEX = "package_regex"
8646
Andrew Geisslerf0343792020-11-18 10:42:21 -06008647 :term:`UPSTREAM_CHECK_URI`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008648 You can perform a per-recipe check for what the latest upstream
Andrew Geissler5199d832021-09-24 16:47:35 -05008649 source code version is by calling ``devtool latest-version recipe``. If
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008650 the source code is provided from tarballs, the latest version is
8651 determined by fetching the directory listing where the tarball is and
8652 attempting to find a later tarball. When this approach does not work,
Andrew Geissler09036742021-06-25 14:25:14 -05008653 you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008654 contains the link to the latest tarball.
8655 ::
8656
8657 UPSTREAM_CHECK_URI = "recipe_url"
8658
Andrew Geissler5199d832021-09-24 16:47:35 -05008659 :term:`UPSTREAM_VERSION_UNKNOWN`
8660 You can perform a per-recipe check for what the latest upstream
8661 source code version is by calling ``devtool latest-version recipe``.
8662 If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8663 :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8664 the recipe allows to determine what the latest upstream version is,
8665 you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8666 to acknowledge that the check cannot be performed.
8667 ::
8668
8669 UPSTREAM_VERSION_UNKNOWN = "1"
8670
Andrew Geisslerf0343792020-11-18 10:42:21 -06008671 :term:`USE_DEVFS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008672 Determines if ``devtmpfs`` is used for ``/dev`` population. The
Andrew Geissler09036742021-06-25 14:25:14 -05008673 default value used for :term:`USE_DEVFS` is "1" when no value is
8674 specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008675 statically populated ``/dev`` directory.
8676
Andrew Geissler09209ee2020-12-13 08:44:15 -06008677 See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008678 the Yocto Project Development Tasks Manual for information on how to
8679 use this variable.
8680
Andrew Geisslerf0343792020-11-18 10:42:21 -06008681 :term:`USE_VT`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008682 When using
Andrew Geissler09209ee2020-12-13 08:44:15 -06008683 :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008684 determines whether or not to run a
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008685 `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008686 virtual terminals in order to enable logging in through those
8687 terminals.
8688
Andrew Geissler09036742021-06-25 14:25:14 -05008689 The default value used for :term:`USE_VT` is "1" when no default value is
8690 specifically set. Typically, you would set :term:`USE_VT` to "0" in the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008691 machine configuration file for machines that do not have a graphical
8692 display attached and therefore do not need virtual terminal
8693 functionality.
8694
Andrew Geisslerf0343792020-11-18 10:42:21 -06008695 :term:`USER_CLASSES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008696 A list of classes to globally inherit. These classes are used by the
Andrew Geissler9aee5002022-03-30 16:27:02 +00008697 OpenEmbedded build system to enable extra features.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008698
Andrew Geisslerc926e172021-05-07 16:11:35 -05008699 The default list is set in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008700
Andrew Geissler9aee5002022-03-30 16:27:02 +00008701 USER_CLASSES ?= "buildstats"
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008702
8703 For more information, see
Andrew Geissler87f5cff2022-09-30 13:13:31 -05008704 ``meta-poky/conf/templates/default/local.conf.sample`` in the
8705 :term:`Source Directory`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008706
Andrew Geisslerf0343792020-11-18 10:42:21 -06008707 :term:`USERADD_ERROR_DYNAMIC`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008708 If set to ``error``, forces the OpenEmbedded build system to produce
8709 an error if the user identification (``uid``) and group
8710 identification (``gid``) values are not defined in any of the files
8711 listed in :term:`USERADD_UID_TABLES` and
8712 :term:`USERADD_GID_TABLES`. If set to
8713 ``warn``, a warning will be issued instead.
8714
8715 The default behavior for the build system is to dynamically apply
8716 ``uid`` and ``gid`` values. Consequently, the
Andrew Geissler09036742021-06-25 14:25:14 -05008717 :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008718 on using statically assigned ``gid`` and ``uid`` values, you should
Andrew Geissler09036742021-06-25 14:25:14 -05008719 set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
Andrew Geisslerc926e172021-05-07 16:11:35 -05008720 file as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008721
8722 USERADD_ERROR_DYNAMIC = "error"
8723
8724 Overriding the
8725 default behavior implies you are going to also take steps to set
8726 static ``uid`` and ``gid`` values through use of the
8727 :term:`USERADDEXTENSION`,
8728 :term:`USERADD_UID_TABLES`, and
8729 :term:`USERADD_GID_TABLES` variables.
8730
8731 .. note::
8732
8733 There is a difference in behavior between setting
Andrew Geissler09036742021-06-25 14:25:14 -05008734 :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008735 When it is set to ``warn``, the build system will report a warning for
8736 every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8737 to ``error``, it will only report errors for recipes that are actually
8738 built.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008739 This saves you from having to add static IDs for recipes that you
8740 know will never be built.
8741
Andrew Geisslerf0343792020-11-18 10:42:21 -06008742 :term:`USERADD_GID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008743 Specifies a password file to use for obtaining static group
8744 identification (``gid``) values when the OpenEmbedded build system
8745 adds a group to the system during package installation.
8746
8747 When applying static group identification (``gid``) values, the
8748 OpenEmbedded build system looks in :term:`BBPATH` for a
8749 ``files/group`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008750 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008751
8752
8753 USERADD_GID_TABLES = "files/group"
8754
8755 .. note::
8756
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008757 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8758 causes the build system to use static ``gid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008759
Andrew Geisslerf0343792020-11-18 10:42:21 -06008760 :term:`USERADD_PACKAGES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008761 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8762 this variable specifies the individual packages within the recipe
8763 that require users and/or groups to be added.
8764
8765 You must set this variable if the recipe inherits the class. For
8766 example, the following enables adding a user for the main package in
Andrew Geisslerc926e172021-05-07 16:11:35 -05008767 a recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008768
8769 USERADD_PACKAGES = "${PN}"
8770
8771 .. note::
8772
Andrew Geissler09036742021-06-25 14:25:14 -05008773 It follows that if you are going to use the :term:`USERADD_PACKAGES`
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008774 variable, you need to set one or more of the :term:`USERADD_PARAM`,
8775 :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008776
Andrew Geisslerf0343792020-11-18 10:42:21 -06008777 :term:`USERADD_PARAM`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008778 When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8779 this variable specifies for a package what parameters should pass to
8780 the ``useradd`` command if you add a user to the system when the
8781 package is installed.
8782
Andrew Geisslerc926e172021-05-07 16:11:35 -05008783 Here is an example from the ``dbus`` recipe::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008784
Patrick Williams0ca19cc2021-08-16 14:03:13 -05008785 USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008786 --no-create-home --shell /bin/false \
8787 --user-group messagebus"
8788
8789 For information on the
8790 standard Linux shell command ``useradd``, see
Andrew Geisslerd1e89492021-02-12 15:35:20 -06008791 https://linux.die.net/man/8/useradd.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008792
Andrew Geisslerf0343792020-11-18 10:42:21 -06008793 :term:`USERADD_UID_TABLES`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008794 Specifies a password file to use for obtaining static user
8795 identification (``uid``) values when the OpenEmbedded build system
8796 adds a user to the system during package installation.
8797
8798 When applying static user identification (``uid``) values, the
8799 OpenEmbedded build system looks in :term:`BBPATH` for a
8800 ``files/passwd`` file and then applies those ``uid`` values. Set the
Andrew Geisslerc926e172021-05-07 16:11:35 -05008801 variable as follows in your ``local.conf`` file::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008802
8803 USERADD_UID_TABLES = "files/passwd"
8804
8805 .. note::
8806
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008807 Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8808 causes the build system to use static ``uid`` values.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008809
Andrew Geisslerf0343792020-11-18 10:42:21 -06008810 :term:`USERADDEXTENSION`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008811 When set to "useradd-staticids", causes the OpenEmbedded build system
8812 to base all user and group additions on a static ``passwd`` and
8813 ``group`` files found in :term:`BBPATH`.
8814
8815 To use static user identification (``uid``) and group identification
8816 (``gid``) values, set the variable as follows in your ``local.conf``
8817 file: USERADDEXTENSION = "useradd-staticids"
8818
8819 .. note::
8820
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008821 Setting this variable to use static ``uid`` and ``gid``
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008822 values causes the OpenEmbedded build system to employ the
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008823 :ref:`ref-classes-useradd` class.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008824
8825 If you use static ``uid`` and ``gid`` information, you must also
8826 specify the ``files/passwd`` and ``files/group`` files by setting the
8827 :term:`USERADD_UID_TABLES` and
8828 :term:`USERADD_GID_TABLES` variables.
8829 Additionally, you should also set the
8830 :term:`USERADD_ERROR_DYNAMIC` variable.
8831
Andrew Geisslerf0343792020-11-18 10:42:21 -06008832 :term:`VOLATILE_LOG_DIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008833 Specifies the persistence of the target's ``/var/log`` directory,
8834 which is used to house postinstall target log files.
8835
Andrew Geissler09036742021-06-25 14:25:14 -05008836 By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008837 file is not persistent. You can override this setting by setting the
8838 variable to "no" to make the log directory persistent.
8839
Andrew Geisslerf0343792020-11-18 10:42:21 -06008840 :term:`WARN_QA`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008841 Specifies the quality assurance checks whose failures are reported as
8842 warnings by the OpenEmbedded build system. You set this variable in
8843 your distribution configuration file. For a list of the checks you
8844 can control with this variable, see the
Andrew Geissler595f6302022-01-24 19:11:47 +00008845 ":ref:`ref-classes-insane`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008846
Andrew Geisslerf0343792020-11-18 10:42:21 -06008847 :term:`WKS_FILE`
8848 Specifies the location of the Wic kickstart file that is used by the
8849 OpenEmbedded build system to create a partitioned image
Andrew Geisslereff27472021-10-29 15:35:00 -05008850 (``image.wic``). For information on how to create a partitioned
Andrew Geisslerf0343792020-11-18 10:42:21 -06008851 image, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -06008852 ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
Andrew Geisslerf0343792020-11-18 10:42:21 -06008853 section in the Yocto Project Development Tasks Manual. For details on
Andrew Geissler09209ee2020-12-13 08:44:15 -06008854 the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
Andrew Geisslerf0343792020-11-18 10:42:21 -06008855
8856 :term:`WKS_FILE_DEPENDS`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008857 When placed in the recipe that builds your image, this variable lists
Andrew Geissler09036742021-06-25 14:25:14 -05008858 build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008859 applicable when Wic images are active (i.e. when
8860 :term:`IMAGE_FSTYPES` contains entries related
8861 to Wic). If your recipe does not create Wic images, the variable has
8862 no effect.
8863
Andrew Geissler09036742021-06-25 14:25:14 -05008864 The :term:`WKS_FILE_DEPENDS` variable is similar to the
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008865 :term:`DEPENDS` variable. When you use the variable in
8866 your recipe that builds the Wic image, dependencies you list in the
Andrew Geissler09036742021-06-25 14:25:14 -05008867 :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008868
Andrew Geissler09036742021-06-25 14:25:14 -05008869 With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008870 specify a list of additional dependencies (e.g. native tools,
8871 bootloaders, and so forth), that are required to build Wic images.
Andrew Geisslerc926e172021-05-07 16:11:35 -05008872 Following is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008873
8874 WKS_FILE_DEPENDS = "some-native-tool"
8875
8876 In the
8877 previous example, some-native-tool would be replaced with an actual
8878 native tool on which the build would depend.
8879
Andrew Geisslerd5838332022-05-27 11:33:10 -05008880 :term:`WKS_FILES`
8881 Specifies a list of candidate Wic kickstart files to be used by the
8882 OpenEmbedded build system to create a partitioned image. Only the
8883 first one that is found, from left to right, will be used.
8884
8885 This is only useful when there are multiple ``.wks`` files that can be
8886 used to produce an image. A typical case is when multiple layers are
8887 used for different hardware platforms, each supplying a different
8888 ``.wks`` file. In this case, you specify all possible ones through
8889 :term:`WKS_FILES`.
8890
8891 If only one ``.wks`` file is used, set :term:`WKS_FILE` instead.
8892
Andrew Geisslerf0343792020-11-18 10:42:21 -06008893 :term:`WORKDIR`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008894 The pathname of the work directory in which the OpenEmbedded build
8895 system builds a recipe. This directory is located within the
8896 :term:`TMPDIR` directory structure and is specific to
8897 the recipe being built and the system for which it is being built.
8898
Andrew Geissler09036742021-06-25 14:25:14 -05008899 The :term:`WORKDIR` directory is defined as follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008900
8901 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8902
8903 The actual directory depends on several things:
8904
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008905 - :term:`TMPDIR`: The top-level build output directory
8906 - :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8907 - :term:`PN`: The recipe name
Andrew Geissler615f2f12022-07-15 14:00:58 -05008908 - :term:`EXTENDPE`: The epoch --- if :term:`PE` is not specified, which
8909 is usually the case for most recipes, then `EXTENDPE` is blank.
Andrew Geissler4c19ea12020-10-27 13:52:24 -05008910 - :term:`PV`: The recipe version
8911 - :term:`PR`: The recipe revision
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008912
8913 As an example, assume a Source Directory top-level folder name
8914 ``poky``, a default Build Directory at ``poky/build``, and a
8915 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8916 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8917 directory the build system uses to build the package would be as
Andrew Geisslerc926e172021-05-07 16:11:35 -05008918 follows::
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008919
8920 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8921
Andrew Geisslerf0343792020-11-18 10:42:21 -06008922 :term:`XSERVER`
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008923 Specifies the packages that should be installed to provide an X
8924 server and drivers for the current machine, assuming your image
8925 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8926 indirectly, includes "x11-base" in
8927 :term:`IMAGE_FEATURES`.
8928
Andrew Geissler09036742021-06-25 14:25:14 -05008929 The default value of :term:`XSERVER`, if not specified in the machine
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008930 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
Patrick Williams03907ee2022-05-01 06:28:52 -05008931
8932 :term:`XZ_THREADS`
8933 Specifies the number of parallel threads that should be used when
8934 using xz compression.
8935
8936 By default this scales with core count, but is never set less than 2
8937 to ensure that multi-threaded mode is always used so that the output
8938 file contents are deterministic. Builds will work with a value of 1
8939 but the output will differ compared to the output from the compression
8940 generated when more than one thread is used.
8941
8942 On systems where many tasks run in parallel, setting a limit to this
8943 can be helpful in controlling system resource usage.
8944
8945 :term:`XZ_MEMLIMIT`
8946 Specifies the maximum memory the xz compression should use as a percentage
8947 of system memory. If unconstrained the xz compressor can use large amounts of
8948 memory and become problematic with parallelism elsewhere in the build.
8949 "50%" has been found to be a good value.
8950
8951 :term:`ZSTD_THREADS`
8952 Specifies the number of parallel threads that should be used when
8953 using ZStandard compression.
8954
8955 By default this scales with core count, but is never set less than 2
8956 to ensure that multi-threaded mode is always used so that the output
8957 file contents are deterministic. Builds will work with a value of 1
8958 but the output will differ compared to the output from the compression
8959 generated when more than one thread is used.
8960
8961 On systems where many tasks run in parallel, setting a limit to this
8962 can be helpful in controlling system resource usage.